PostDaily REST API
Draft, schedule and publish posts from your own code or an automation tool with PostDaily's REST API: base URL, API keys, endpoints, errors and limits.
Short answer
PostDaily's REST API lives at https://api.postdaily.app/v1. Send an API key as a Bearer token, send and receive JSON, and use the same endpoints for posts, media and channels that PostDaily's AI connector uses. A Drafts only key can create drafts but never schedule or publish.
Authentication
- Create a key in Settings → AI agents → API key. Pick Drafts only, Read only or Full access, and the workspaces it covers. Connect with an API key has the steps.
- Send it on every request:
Authorization: Bearer pd_live_... - A key that covers one workspace needs no workspace id. With several, add
workspaceId(fromGET /workspaces).
Endpoints
| Method and path | What it does |
|---|---|
| GET /workspaces | The workspaces the key covers, and what it may do |
| GET /channels | Connected channels, their limits and whether each can post now. Filters: network, workspaceId |
| GET /posts | Find posts. Filters: statuses, channels (comma-separated), search, from, to, limit (up to 50), cursor |
| POST /posts | Create a post as a draft, in the queue, scheduled or published now |
| GET /posts/{postId} | One post, with each channel's status and link |
| PATCH /posts/{postId} | Edit a draft: text, title, media, channels, tags |
| DELETE /posts/{postId} | Delete a post from PostDaily (a published post stays live on the network) |
| POST /posts/{postId}/schedule | Schedule, queue or publish an existing draft |
| POST /posts/{postId}/cancel | Stop a scheduled post from publishing (it stays in PostDaily as canceled; to take it back to drafts instead, call /schedule with mode draft) |
| POST /posts/{postId}/retry | Publish a post's failed channels again |
| POST /media/imports | Add an image, video or PDF from a public URL |
| POST /media/uploads | Start an upload: returns a one-time URL to PUT the file to |
| POST /media/uploads/{mediaId}/complete | Confirm an upload arrived |
Request bodies use the same fields as PostDaily's AI tools: for example channels, text, mode (draft, queue, scheduled, now), scheduledAt and media when creating a post. A field the endpoint does not know is ignored, so check the spelling of each field name. A wrong value in a known field is refused with a message that names the field.
Publishing safely
- Publishing now needs
confirmPublish: true, and retrying a failed post needs it too. Without it, nothing is sent and the answer says what would be. - Warnings: a post with warnings stays a draft, and is not queued, scheduled or published, until you send
confirmWarnings: true. - No double posts: send an
Idempotency-Keyheader, or anidempotencyKeyfield, on every write. Repeating a request with the same key returns the first answer.
Errors and limits
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION | A field is missing or wrong; the message names it |
| 401 | UNAUTHORIZED | No key, or the key is wrong, revoked or expired |
| 402 | PLAN_LIMIT | The workspace's plan does not allow it |
| 403 | FORBIDDEN | The key's access level does not allow it |
| 404 | NOT_FOUND | No such post, channel or endpoint |
| 409 | CONFLICT, NEEDS_CONFIRMATION, CHANNEL_NEEDS_RECONNECT | Repeated key with different content, a confirmation is needed, or the channel needs reconnecting in PostDaily |
| 429 | RATE_LIMITED | Too many requests; wait and try again |
Every error has the same shape: { "error": { "code", "message", "hint" } }. The hint says what to do next.