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 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: postId is the id of the post in Platica (externalId is Meta's); threadId is the ID of the root comment at Meta and commentId the ID of each comment. They match the comment.* 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

MethodEndpointWhat it does
GET/v1/postsList posts
GET / PATCH/v1/posts/{postId}Get a post, pause/resume the agent or assign an agent
GET/v1/posts/{postId}/threadsList 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}/commentsPublish a comment from the brand
POST/v1/posts/{postId}/threads/{threadId}/repliesReply publicly
POST/v1/posts/{postId}/threads/{threadId}/private-repliesReply by private message
POST/v1/posts/{postId}/threads/{threadId}/send-to-agentSend the thread to the agent
POST/v1/posts/{postId}/comments/{commentId}/moderationHide, 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, ... } }.

Statusdetails.codeWhen
400INVALID_REQUESTThe body or parameters fail validation (details.issues), Idempotency-Key is not a UUID, or the credential covers several workspaces and workspace is missing
400COMMENT_TEXT_TOO_LONGThe text exceeds 2,200 characters on Instagram or 8,000 on Facebook (details.maxCharacters)
401UNAUTHENTICATEDThe credential is missing or not valid
402COMMENT_PAYMENT_PENDINGThe workspace has a pending payment
403FORBIDDENThe credential does not have the Conversations module in that workspace
403COMMENT_FORBIDDENThe person behind the credential has no access to this post
403COMMENT_PRIVATE_REPLY_DISABLEDPrivate replies are not turned on in the workspace
404NOT_FOUND or COMMENT_POST_NOT_FOUNDThe post, thread or comment does not exist in the workspace
409COMMENT_PUBLISH_IN_PROGRESSThat reply is already being published with the same Idempotency-Key
409COMMENT_PUBLISH_RESULT_UNKNOWNAn earlier attempt with the same Idempotency-Key was left unconfirmed. Check the thread before retrying
409PRIVATE_REPLY_ALREADY_SENTThat comment already has its private reply
409PRIVATE_REPLY_NO_DM_CHANNELThe account has no connected messaging channel
409COMMENT_POST_PAUSEDYou sent the thread to the agent while the post is paused
413PAYLOAD_TOO_LARGEThe attachment exceeds 10 MB
415COMMENT_ATTACHMENT_NOT_SUPPORTEDInstagram only accepts text in public comments
422COMMENT_META_REJECTEDMeta rejected the comment. details.provider has what it answered
422, 429, 502 or 504COMMENT_META_MODERATION_FAILEDMeta did not apply the moderation; Platica already saved it in the inbox
429COMMENT_RATE_LIMITED_BY_METAMeta rate limited the account's requests. Wait a few minutes
504COMMENT_PUBLISH_RESULT_UNKNOWNMeta did not answer and it is not known whether it published. Check the thread before retrying
422PRIVATE_REPLY_WINDOW_CLOSEDMore than 7 days have passed since the comment

AI tools are in Posts MCP.