Send a private reply to a comment
Sends the commenter one direct message addressed to their comment, so it reaches their inbox without an existing conversation. Works for Instagram accounts and Facebook Pages; Threads and TikTok accounts answer 400 platformUnsupported. Meta allows one private reply per comment, sent within 7 days of the comment; a second attempt, or a comment Meta will not take a private reply for, answers 400 privateReplyConsumed. The body is message with optional quickReplies or buttons (not both), under the same rules as POST /v1/inbox/conversations/{conversationId}/messages; attachments, templates and message tags are refused with a 400. Until the person answers, this reply is the only message the account can send them. When PostZen already holds a conversation with the commenter the reply is stored in it, and message.sent is emitted once. Needs the account's messaging scope (pages_messaging on a Facebook Page) and counts toward the plan's monthly inbox send allowance. Shares the direct message send limit of 120 per hour per user. Requires a read-write API key.
Authorization
bearerAuth PostZen API key.
In: header
Path Parameters
Post the comment is on: the platform's own post/media id or a PostZen post id. It scopes the Idempotency-Key; the reply itself is addressed to commentId.
Platform id of the comment to answer privately.
Header Parameters
Replay protection. Retrying with the same key and the same body replays the stored outcome and sets Idempotent-Replayed: true; the same key with a different body, or reused for another comment or for a direct message send, is a 422, and a key whose first request is still in flight is a 409. A reply whose outcome could not be confirmed (502 providerOutcomeUnknown) is stored as a terminal outcome, so retrying that key returns the same 502 rather than risking a second reply. Keys are retained for 24 hours.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
message with optional quickReplies or buttons, not both. attachmentUrl, attachmentType, template, messagingType and messageTag are refused with a 400.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/inbox/comments/string/string/private-reply" \ -H "Content-Type: application/json" \ -d '{ "accountId": "k57a1b2c3d4e5f6g7h8i9j0k1l", "message": "Thanks for asking. Here is the price list.", "buttons": [ { "type": "url", "title": "See prices", "url": "https://example.com/prices" } ] }'{ "success": true, "data": { "messageId": "m_AbCdEfGhIjKlMnOpQrStUvWxYz0123456789", "commentId": "987654321098765_1122334455667788", "platform": "facebook" }}{ "error": "This comment cannot take another private reply (one per comment, within 7 days of it).", "code": "privateReplyConsumed", "platform": "facebook", "platformError": { "code": 10900, "type": "OAuthException" }}{ "error": "Unauthorized"}{ "error": "The Free plan includes 100 inbox messages and replies a month, and this month's are used up. Upgrade to keep replying.", "code": "paymentRequired", "reason": "freeInboxSendLimitExceeded", "documentationUrl": "https://docs.postzen.dev/api-reference/connect/create-connect-url", "dashboardUrl": "https://app.postzen.dev/billing"}{ "error": "Reconnect Facebook and allow Messenger access so PostZen can send messages from this Page.", "code": "platformCapabilityMissing", "platform": "facebook"}{ "error": "That account could not be found.", "code": "accountNotFound"}{ "error": "A request with that Idempotency-Key is still in flight.", "code": "idempotencyInFlight", "platform": "facebook"}{ "error": "That Idempotency-Key was already used with a different request body.", "code": "idempotencyConflict"}{ "error": "This connection needs to be reauthorized before its messages can be read.", "code": "connectionDead"}{ "error": "rate_limited", "retryAfter": 30}{ "error": "Failed to create post"}{ "error": "Private reply delivery outcome unknown. Check the conversation before sending again.", "code": "providerOutcomeUnknown", "platform": "instagram"}Unlike a comment DELETE
Removes the connected Facebook Page's or TikTok account's like from a comment. Facebook Pages and TikTok accounts only: Instagram and Threads answer `400 unsupported`. Requires a read-write API key and the account's comment-management scope. Limited to 120 per hour per user, shared with liking.
List direct message conversations GET
Returns the Instagram and Facebook Messenger direct message threads PostZen holds for the accounts this key can reach, newest activity first, and refreshes that stored copy from the platform as a side effect (throttled per account, so a tight polling loop costs nothing extra). `meta` reports which accounts could not be refreshed; their stored threads are still returned. Read-only and read-write API keys are accepted.