Posts
Read and reply to Instagram or Facebook comments. Each post has threads, made up of a root comment and its replies.
Use these endpoints for comments and Messages for direct messages. Comments do not appear in List conversations; Search conversations finds them with kind: "post".
Example
# 1. List the threads of a post
curl "https://api.platic.ai/v1/posts/$POST_ID/threads?needsReply=true" \
-H "Authorization: Bearer $PLATIC_API_KEY"
# 2. Reply publicly in a thread
curl -X POST https://api.platic.ai/v1/posts/$POST_ID/threads/$THREAD_ID/replies \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "We sent you the details in a direct message."}' // 1. List posts and their threads waiting for a reply
const { data: posts } = await platic.posts.list({ platform: "instagram" });
const { data: threads } = await platic.posts.threads.list(posts[0].id, { needsReply: true });
// 2. Reply publicly or by private message
await platic.posts.threads.reply(posts[0].id, threads[0].id, {
message: "We sent you the details in a direct message.",
}); What you need to know
- IDs:
postIdis theidof the post in Platica (externalIdis Meta's);threadIdis the ID of the root comment at Meta andcommentIdthe ID of each comment. They match thecomment.*webhooks. - Safe retries: replies reach Meta right away. If you get a timeout (
504 COMMENT_PUBLISH_RESULT_UNKNOWN), check the thread before retrying so you do not duplicate comments. - Meta limits: at most 2,200 characters on Instagram and 8,000 on Facebook; a single private reply per comment within 7 days, and only if the account has a connected DM channel.
- Permissions and billing: uses the Conversations module. Commenting and moderating are not charged; sending a thread to the agent to answer does consume replies.
Endpoints
| Method | Endpoint | What it does |
|---|---|---|
GET | /v1/posts | List posts |
GET / PATCH | /v1/posts/{postId} | Get a post, pause/resume the agent or assign an agent |
GET | /v1/posts/{postId}/threads | List the threads of a post |
GET / PATCH | /v1/posts/{postId}/threads/{threadId} | Get a thread, resolve/reopen, pause the agent or assign owners |
POST | /v1/posts/{postId}/comments | Publish a comment from the brand |
POST | /v1/posts/{postId}/threads/{threadId}/replies | Reply publicly |
POST | /v1/posts/{postId}/threads/{threadId}/private-replies | Reply by 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 |
Responses
All of them answer { "status": "success", "data": … }. Lists carry an array in data and, in nextPageToken, the token of the next page (null on the last one); send that value as pageToken. A read carries the object in data. Writes add a short message.
Each request works in one workspace. With a multi-workspace credential, send ?workspace=<id>; without it the response is 400.
Errors
Errors follow the format in Errors: { code, error, details: { code, message, ... } }.
| Status | details.code | When |
|---|---|---|
400 | INVALID_REQUEST | The body or parameters fail validation (details.issues), Idempotency-Key is not a UUID, or the credential covers several workspaces and workspace is missing |
400 | COMMENT_TEXT_TOO_LONG | The text exceeds 2,200 characters on Instagram or 8,000 on Facebook (details.maxCharacters) |
401 | UNAUTHENTICATED | The credential is missing or not valid |
402 | COMMENT_PAYMENT_PENDING | The workspace has a pending payment |
403 | FORBIDDEN | The credential does not have the Conversations module in that workspace |
403 | COMMENT_FORBIDDEN | The person behind the credential has no access to this post |
403 | COMMENT_PRIVATE_REPLY_DISABLED | Private replies are not turned on in the workspace |
404 | NOT_FOUND or COMMENT_POST_NOT_FOUND | The post, thread or comment does not exist in the workspace |
409 | COMMENT_PUBLISH_IN_PROGRESS | That reply is already being published with the same Idempotency-Key |
409 | COMMENT_PUBLISH_RESULT_UNKNOWN | An earlier attempt with the same Idempotency-Key was left unconfirmed. Check the thread before retrying |
409 | PRIVATE_REPLY_ALREADY_SENT | That comment already has its private reply |
409 | PRIVATE_REPLY_NO_DM_CHANNEL | The account has no connected messaging channel |
409 | COMMENT_POST_PAUSED | You sent the thread to the agent while the post is paused |
413 | PAYLOAD_TOO_LARGE | The attachment exceeds 10 MB |
415 | COMMENT_ATTACHMENT_NOT_SUPPORTED | Instagram only accepts text in public comments |
422 | COMMENT_META_REJECTED | Meta rejected the comment. details.provider has what it answered |
422, 429, 502 or 504 | COMMENT_META_MODERATION_FAILED | Meta did not apply the moderation; Platica already saved it in the inbox |
429 | COMMENT_RATE_LIMITED_BY_META | Meta rate limited the account's requests. Wait a few minutes |
504 | COMMENT_PUBLISH_RESULT_UNKNOWN | Meta did not answer and it is not known whether it published. Check the thread before retrying |
422 | PRIVATE_REPLY_WINDOW_CLOSED | More than 7 days have passed since the comment |
AI tools are in Posts MCP.