Posts

A post is an Instagram or Facebook post with comments. Its comments are grouped into threads: a root comment and its replies. It is the same thing you see in the Posts inbox and the same thing the comment.* webhooks deliver.

Posts do not show up in /v1/conversations by default (use kind=all to see them there) and you do not write to them with /v1/messages: you answer them with these endpoints.

Available endpoints

MethodEndpointDescription
GET/v1/posts List posts
GET/v1/posts/{postId} Get a post
PATCH/v1/posts/{postId} Pause or resume the agent, or give the post its own agent
GET/v1/posts/{postId}/threads List threads
GET/v1/posts/{postId}/threads/{threadId} Get a thread with its comments
PATCH/v1/posts/{postId}/threads/{threadId} Resolve, reopen, pause the agent on the thread, or change owners
POST/v1/posts/{postId}/comments Publish a brand comment
POST/v1/posts/{postId}/threads/{threadId}/replies Reply publicly
POST/v1/posts/{postId}/threads/{threadId}/private-replies Reply with a private message
POST/v1/posts/{postId}/threads/{threadId}/send-to-agent Send the thread to the agent
POST/v1/posts/{postId}/comments/{commentId}/moderation Hide, unhide, delete, or mark as spam

How IDs work

FieldWhat it identifies
postIdThe post id in Platica. Same as post.id in the comment.* webhooks.
externalIdThe post id in Meta.
threadIdThe Meta id of the thread's root comment. Same as thread.id in the webhooks.
commentIdThe Meta id of a comment. Same as comment.id in the webhooks.

Permissions

Posts endpoints use the conversations module, like the inbox. Writes run on behalf of the person who owns the API key (or who connected the OAuth client): they need write access to conversations in the workspace and, if their role only sees what is assigned to them, the post must be assigned to them. Platica's internal agents can read but not write.

Billing and blocks

Answering through the API costs and is blocked exactly like the inbox:

ActionBilledBlocked
Public comment or replyNoWith an overdue payment or a canceled subscription
Private replyAs a comment reply (free during the beta)With an overdue payment or a canceled subscription
ModerateNoNever
Pause, resume, resolve, assignNoNo
Send to the agentWhatever the agent answersWith an overdue payment, or on a trial without credits or past the monthly reply cap

Safe retries

Publishing a comment, replying publicly, and replying privately accept an Idempotency-Key header with a UUID. If you repeat the call with the same key, the response includes replayed: true and nothing is published twice. Always send it when you might retry: a timeout can arrive after Meta has already published.

Idempotency-Key: 6f1c7a9e-3b4d-4f8a-9c2e-1a5b7d9e0f12

Errors

Errors follow the general format . details.code carries the reason:

details.codeHTTPWhen
COMMENT_FORBIDDEN403The key's owner has no access to this post
COMMENT_POST_NOT_FOUND404The post does not exist
COMMENT_PAYMENT_PENDING402The workspace has a pending payment
COMMENT_TEXT_TOO_LONG400Over 2,200 characters on Instagram or 8,000 on Facebook
COMMENT_ATTACHMENT_NOT_SUPPORTED415An image on an Instagram comment
COMMENT_RATE_LIMITED_BY_META429Meta rate-limited the account; wait before retrying
COMMENT_META_REJECTED422Meta rejected the action
COMMENT_PUBLISH_RESULT_UNKNOWN504Unknown whether Meta published; retry with the same key
PRIVATE_REPLY_ALREADY_SENT409Meta allows one private reply per comment
PRIVATE_REPLY_WINDOW_CLOSED422More than 7 days since the comment
PRIVATE_REPLY_NO_DM_CHANNEL409The account has no messaging channel connected
COMMENT_PRIVATE_REPLY_DISABLED403Private replies are not enabled in the workspace
COMMENT_POST_PAUSED409Sending to the agent while the post is paused