Reply to comments
Publish a comment, reply publicly, or send a private reply. Public replies are sent to Meta immediately. Before retrying a call that did not respond, read Safe retries.
Example
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 a message." }' await platic.posts.threads.reply("post_123", "thread_123", { message: "We sent you a message." }); Publish a comment
Publish a new comment from your business on the post.
curl -X POST https://api.platic.ai/v1/posts/$POST_ID/comments \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "message": "Thanks for the love!" }' await platic.posts.comments.publish("post_123", { message: "Thanks for the love!" }); Request body
| Field | Type | Required | Description |
|---|---|---|---|
message | string | ✓ if there is no image | Text. Up to 2,200 characters on Instagram and 8,000 on Facebook |
attachmentUrl | string | — | Facebook only: JPG, PNG or GIF image over https, up to 10 MB |
{
"message": "Thanks for all your comments! We'll reply here 👇"
} Response
201 Created
{
"status": "success",
"message": "Comment published",
"data": {
"commentId": "17890000000000099",
"clientToken": "6f1c7a9e-3b4d-4f8a-9c2e-1a5b7d9e0f12",
"mode": "root",
"parentCommentId": null,
"commentPersistencePending": false
}
} The comment appears in the thread and in the comment.created webhooks when Meta confirms it, within seconds.
Reply publicly
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": "Hi Ana! Yes, we have size M in every color." }' await platic.posts.threads.reply("post_123", "thread_123", { message: "We sent you a message." }); Request body
| Field | Type | Required | Description |
|---|---|---|---|
message | string | ✓ | Text of the reply |
parentCommentId | string | — | Comment of the thread you are replying to. By default, the root comment |
{
"message": "Hi Ana! Yes, we have size M in every color."
} 201 Created with message: "Reply published" and, in data, commentId, mode: "reply" and the state of the thread, which ends up resolved.
If the thread needs assistance, accept it before replying: send PATCH /v1/posts/{postId}/threads/{threadId} with "operation": "supervised".
Reply privately
Send a direct message to the person who commented. Meta allows one private reply per comment, within 7 days of the comment. Its conversation is created in the account's messaging channel and appears in /v2/conversations.
curl -X POST https://api.platic.ai/v1/posts/$POST_ID/threads/$THREAD_ID/private-replies \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "message": "Here is your discount code." }' await platic.posts.threads.privateReply("post_123", "thread_123", { message: "Here is your discount code." }); Request body
| Field | Type | Required | Description |
|---|---|---|---|
message | string | ✓ | Text of the private message, up to 1,000 characters |
commentId | string | — | Comment you are replying to. By default, the thread's root comment |
publicNotice | string | — | Public comment that announces you sent a private message |
{
"message": "Hi Ana! I'm sending you the prices here.",
"publicNotice": "We wrote to you by private message! 📩"
} Response
201 Created
{
"status": "success",
"message": "Private reply sent",
"data": {
"clientToken": "0d6e…",
"commentId": "17890000000000001",
"rootCommentId": "17890000000000001",
"providerMessageId": "aWdfZAG…",
"conversationDocId": "conv_dm_045",
"clientId": "cli_123",
"persistedConversation": true,
"publicNoticeCommentId": "17890000000000100"
}
} The message is charged as a comment reply (free during the beta) and emits conversation.created (if the conversation is new) and message.created with source: "api.comment.private_reply".
Send a thread to the agent
Send unanswered comments from a supervised thread to the agent. The thread becomes automatic. The post must be unpaused and the channel must have automatic replies enabled.
curl -X POST https://api.platic.ai/v1/posts/$POST_ID/threads/$THREAD_ID/send-to-agent \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.posts.threads.sendToAgent("post_123", "thread_123"); Request body
| Field | Type | Required | Description |
|---|---|---|---|
dryRun | boolean | — | true only computes what would be sent, without sending anything |
{
"dryRun": false
} In data, the response says which threads were sent (threads), which were skipped and why (skipped) and how many were enqueued (enqueued). message is Thread sent to agent, or Send to agent preview with dryRun.
Errors
All these calls can answer 400 INVALID_REQUEST if the body is not valid or the credential covers several workspaces and workspace is missing, and 404 NOT_FOUND if the post, thread or comment does not exist in the workspace. Meta's rejections and the comment limits have their own codes. See errors for the codes in this section.