AI agents

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.

Updated · 4 min read

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 (from GET /workspaces).

Endpoints

Method and pathWhat it does
GET /workspacesThe workspaces the key covers, and what it may do
GET /channelsConnected channels, their limits and whether each can post now. Filters: network, workspaceId
GET /postsFind posts. Filters: statuses, channels (comma-separated), search, from, to, limit (up to 50), cursor
POST /postsCreate 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}/scheduleSchedule, queue or publish an existing draft
POST /posts/{postId}/cancelStop 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}/retryPublish a post's failed channels again
POST /media/importsAdd an image, video or PDF from a public URL
POST /media/uploadsStart an upload: returns a one-time URL to PUT the file to
POST /media/uploads/{mediaId}/completeConfirm 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-Key header, or an idempotencyKey field, on every write. Repeating a request with the same key returns the first answer.

Errors and limits

StatusCodeMeaning
400VALIDATIONA field is missing or wrong; the message names it
401UNAUTHORIZEDNo key, or the key is wrong, revoked or expired
402PLAN_LIMITThe workspace's plan does not allow it
403FORBIDDENThe key's access level does not allow it
404NOT_FOUNDNo such post, channel or endpoint
409CONFLICT, NEEDS_CONFIRMATION, CHANNEL_NEEDS_RECONNECTRepeated key with different content, a confirmation is needed, or the channel needs reconnecting in PostDaily
429RATE_LIMITEDToo many requests; wait and try again

Every error has the same shape: { "error": { "code", "message", "hint" } }. The hint says what to do next.

Still stuck?
Browse all help guides, or write to us: we usually reply within one business day.
Contact support