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
| Method | Endpoint | Description |
|---|---|---|
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
| Field | What it identifies |
|---|---|
postId | The post id in Platica. Same as post.id in the comment.* webhooks. |
externalId | The post id in Meta. |
threadId | The Meta id of the thread's root comment. Same as thread.id in the webhooks. |
commentId | The 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:
| Action | Billed | Blocked |
|---|---|---|
| Public comment or reply | No | With an overdue payment or a canceled subscription |
| Private reply | As a comment reply (free during the beta) | With an overdue payment or a canceled subscription |
| Moderate | No | Never |
| Pause, resume, resolve, assign | No | No |
| Send to the agent | Whatever the agent answers | With 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 If the response is 504 with COMMENT_PUBLISH_RESULT_UNKNOWN, Meta may have published. Retry with
the same Idempotency-Key, never a new one.
Errors
Errors follow the general format . details.code carries the reason:
details.code | HTTP | When |
|---|---|---|
COMMENT_FORBIDDEN | 403 | The key's owner has no access to this post |
COMMENT_POST_NOT_FOUND | 404 | The post does not exist |
COMMENT_PAYMENT_PENDING | 402 | The workspace has a pending payment |
COMMENT_TEXT_TOO_LONG | 400 | Over 2,200 characters on Instagram or 8,000 on Facebook |
COMMENT_ATTACHMENT_NOT_SUPPORTED | 415 | An image on an Instagram comment |
COMMENT_RATE_LIMITED_BY_META | 429 | Meta rate-limited the account; wait before retrying |
COMMENT_META_REJECTED | 422 | Meta rejected the action |
COMMENT_PUBLISH_RESULT_UNKNOWN | 504 | Unknown whether Meta published; retry with the same key |
PRIVATE_REPLY_ALREADY_SENT | 409 | Meta allows one private reply per comment |
PRIVATE_REPLY_WINDOW_CLOSED | 422 | More than 7 days since the comment |
PRIVATE_REPLY_NO_DM_CHANNEL | 409 | The account has no messaging channel connected |
COMMENT_PRIVATE_REPLY_DISABLED | 403 | Private replies are not enabled in the workspace |
COMMENT_POST_PAUSED | 409 | Sending to the agent while the post is paused |