Posts
Count posts
How many posts are in each status group, plus how many are blocked by a channel that needs reconnecting.
GET
/
posts
/
counts
Count posts
curl --request GET \
--url https://api.postploy.com/public/v1/posts/counts \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.postploy.com/public/v1/posts/counts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.postploy.com/public/v1/posts/counts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"draft": 3,
"approval": 2,
"scheduled": 14,
"published": 41,
"failed": 1,
"blocked": 0
}
}{
"statusCode": 400,
"message": "Scheduled date and time must be in the future",
"errors": [
{
"message": "Scheduled date and time must be in the future",
"path": [
"posts",
0,
"scheduledAt"
],
"cause": "custom"
}
],
"timestamp": "2030-01-10T12:00:00.000Z",
"route": "/public/v1/posts"
}{
"statusCode": 401,
"message": "Invalid API key",
"errors": null,
"timestamp": "2030-01-10T12:00:00.000Z",
"route": "/public/v1/accounts"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}Authorizations
Query Parameters
⌘I
Count posts
curl --request GET \
--url https://api.postploy.com/public/v1/posts/counts \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.postploy.com/public/v1/posts/counts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.postploy.com/public/v1/posts/counts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"draft": 3,
"approval": 2,
"scheduled": 14,
"published": 41,
"failed": 1,
"blocked": 0
}
}{
"statusCode": 400,
"message": "Scheduled date and time must be in the future",
"errors": [
{
"message": "Scheduled date and time must be in the future",
"path": [
"posts",
0,
"scheduledAt"
],
"cause": "custom"
}
],
"timestamp": "2030-01-10T12:00:00.000Z",
"route": "/public/v1/posts"
}{
"statusCode": 401,
"message": "Invalid API key",
"errors": null,
"timestamp": "2030-01-10T12:00:00.000Z",
"route": "/public/v1/accounts"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}