List Posts
Retrieve posts from your workspace with optional status filtering and cursor-based pagination.
Retrieve posts from your workspace with optional status filtering and cursor-based pagination.
/api/v1/postList posts in your workspace, optionally filtered by status.
| Parameter | Type | Default | Description |
|---|---|---|---|
status | string | — | Filter by post status. Omit to return all statuses |
limit | number | 20 | Number of posts to return (1–100) |
cursor | string | — | Post ID to paginate from. Omit for the first page |
| Value | Description |
|---|---|
PENDING | Scheduled posts waiting to be published |
PUBLISHED | Posts already published to the platform |
DRAFT | Posts saved but not yet scheduled or published |
FAILED | Posts that failed during publishing |
curl --request GET \
--url 'https://dopost.co/api/v1/post?status=PENDING&limit=10' \
--header 'x-api-key: <apiKey>'curl --request GET \
--url 'https://dopost.co/api/v1/post?status=PENDING&limit=10' \
--header 'x-api-key: <apiKey>'{
"posts": [
{
"id": "cm3abc123def456",
"status": "PENDING",
"platform": "INSTAGRAM",
"text": "Hello from the dopost API!",
"media": [],
"account": {
"id": "cm3xyz789ghi012",
"platform": "INSTAGRAM",
"platformUsername": "johndoe"
},
"schedule": {
"scheduledFor": "2025-12-25T12:00:00.000Z",
"status": "SCHEDULED",
"publishedAt": null
},
"jobId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"source": "api",
"createdAt": "2025-07-01T12:00:00.000Z",
"updatedAt": "2025-07-01T12:00:00.000Z"
}
],
"nextCursor": "cm3xyz789ghi012",
"hasMore": true
}{
"posts": [
{
"id": "cm3abc123def456",
"status": "PENDING",
"platform": "INSTAGRAM",
"text": "Hello from the dopost API!",
"media": [],
"account": {
"id": "cm3xyz789ghi012",
"platform": "INSTAGRAM",
"platformUsername": "johndoe"
},
"schedule": {
"scheduledFor": "2025-12-25T12:00:00.000Z",
"status": "SCHEDULED",
"publishedAt": null
},
"jobId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"source": "api",
"createdAt": "2025-07-01T12:00:00.000Z",
"updatedAt": "2025-07-01T12:00:00.000Z"
}
],
"nextCursor": "cm3xyz789ghi012",
"hasMore": true
}| Field | Description |
|---|---|
posts | Array of post objects |
nextCursor | Pass as cursor to fetch the next page. null when no more items |
hasMore | true if there are more posts after this page |
Results are ordered newest first. Iterate using the nextCursor:
let cursor = undefined;
do {
const params = new URLSearchParams({ status: "PENDING", limit: "50" });
if (cursor) params.set("cursor", cursor);
const res = await fetch(`https://dopost.co/api/v1/post?${params}`, {
headers: { "x-api-key": "<apiKey>" },
});
const { posts, nextCursor } = await res.json();
console.log(`Fetched ${posts.length} posts`);
cursor = nextCursor;
} while (cursor);let cursor = undefined;
do {
const params = new URLSearchParams({ status: "PENDING", limit: "50" });
if (cursor) params.set("cursor", cursor);
const res = await fetch(`https://dopost.co/api/v1/post?${params}`, {
headers: { "x-api-key": "<apiKey>" },
});
const { posts, nextCursor } = await res.json();
console.log(`Fetched ${posts.length} posts`);
cursor = nextCursor;
} while (cursor);| Status | Error | Cause |
|---|---|---|
400 | Invalid status | The status value is not one of the allowed values |
401 | Invalid or missing API key | Bad or missing x-api-key header |
403 | API key does not have permission for this action | API key lacks the required scope for this endpoint |
429 | Rate limit exceeded | Too many requests. Check X-RateLimit-* response headers and retry after the indicated time |