Posts
List Posts
Retrieve a paginated list of posts with filtering and sorting.
Endpoint
GET https://api.postpeer.dev/v1/postsQuery Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
status | string | — | Filter by status: "draft", "scheduled", "published", "failed", or "partial" |
platform | string[] | — | Filter by platform (repeatable, OR logic). e.g. ?platform=twitter&platform=instagram |
createdAfter | string | — | ISO 8601 lower bound on createdAt |
createdBefore | string | — | ISO 8601 upper bound on createdAt |
scheduledAfter | string | — | ISO 8601 lower bound on scheduledFor |
scheduledBefore | string | — | ISO 8601 upper bound on scheduledFor |
limit | integer | 20 | Page size (1–100) |
offset | integer | 0 | Number of posts to skip |
sort | string | "desc" | Sort by createdAt: "asc" or "desc" |
Example
curl "https://api.postpeer.dev/v1/posts?status=published&platform=twitter&limit=5" \
-H "x-access-key: YOUR_API_KEY"Response
{
"success": true,
"total": 42,
"posts": [
{
"postId": "post_abc123",
"content": "Hello world!",
"status": "published",
"scheduledFor": null,
"timezone": "UTC",
"mediaItems": [],
"platforms": [
{
"platform": "twitter",
"status": "published",
"platformPostId": "1234567890",
"platformPostUrl": "https://twitter.com/you/status/1234567890",
"publishedAt": "2026-04-15T14:30:00.000Z",
"errorMessage": null
}
],
"crosspostingEnabled": false,
"createdAt": "2026-04-15T14:30:00.000Z",
"updatedAt": "2026-04-15T14:30:01.000Z"
}
]
}Status Codes
| Code | Meaning |
|---|---|
200 | Success |
400 | Invalid query parameters |