OverviewProductsPlatformsAPI ReferenceResources
Comments

Reply to comment

POSThttps://zernio.com/api/v1/inbox/comments/{postId}

Post a reply to a post or specific comment. Requires accountId in request body.

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Path parameters

postIdstringRequired

Zernio post ID or platform-specific post ID. On LinkedIn, pass the post id exactly as the feed returns it (urn:li:share: or urn:li:ugcPost:); a bare number is read as an activity id (urn:li:activity:).

Body

application/json

What every request needs

accountIdstringRequired
messagestringRequired

Reply text. On LinkedIn, mention with @[https://www.linkedin.com/in/vanity] (resolved to LinkedIn's live name, same rules and errors as post content) or @Name; a hand-written name must match LinkedIn's exactly or it renders as plain text.

Optional parameters6 fields
attachmentUrlstring (uri)

(Facebook only) URL of an image to attach, publishing a photo comment alongside the text. The URL must be publicly accessible so Meta can fetch it. Returns 400 for other platforms.

commentIdstring

Reply to specific comment (optional)

mentionAuthorboolean

(LinkedIn only) When true, the reply starts with an @mention of the author of commentId (a member or a page), tagged with their URN and the name LinkedIn returns for them. Requires commentId.

  • Returns 400 platform_not_supported on other platforms.
  • Returns 400 linkedin_mention_name_unavailable with details.authorUrn when LinkedIn does not return the author's name (for example a page the account does not administer); mention them in message as @Name instead.
  • If LinkedIn rejects any mention in the reply, it is posted once more with every mention as plain text.
parentCidstring

(Bluesky only) Parent content identifier

rootUristring

(Bluesky only) Root post URI

rootCidstring

(Bluesky only) Root post CID

Headers

Optional
Idempotency-Keystring, max 255

Optional client-generated unique key (e.g. a UUID) that makes retries safe.

  • Same key + same body: replays the original response.
  • Same key + different body: 422.
  • Key still processing: 409.

A request cut off mid-handler (e.g. by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.

On the Ads create, boost and duplicate endpoints, a same-body retry runs again once the cut-off request started more than 15 minutes ago.

Responses

Success· the request worked

Errors· the request failed

How it behaves

Idempotency

Send an Idempotency-Key header to make retries safe (e.g. after a client-side timeout where delivery is unknown).

  • Same key + same body replays the original response (with Idempotent-Replayed: true) instead of posting the comment a second time.
  • Same key + different body returns 422.
  • A key still in flight returns 409.

Keys are retained for 24 hours and are scoped to the credential and to this exact path. Reusing a key against a different postId returns 422 rather than replaying the other post's response.

Only successful (2xx) responses are stored for replay. If the request throws or returns a non-2xx status the key is released, so the header protects the "request succeeded but the response was lost" case.

After an ambiguous failure (a 5xx or a network timeout), list the post's comments before retrying with the same key. Treat an empty result as inconclusive rather than as proof nothing was posted.

Pin comment

Pin a top-level comment to the top of a post's comment section. TikTok accounts connected through the TikTok for Business app only; every other platform returns 400.

Send private reply

Send a direct message to the author of a comment. Supported on Instagram and Facebook only. One reply per comment, must be sent within 7 days. ### Interactive elements Optionally attach one of these (`quickReplies` and `buttons` are mutually exclusive): - `quickReplies`: chips above the keyboard, max 13. Chips do not render in the Instagram Message Requests folder. - `buttons`: 1-3 inline postback/url buttons rendered in the same bubble via Meta's button_template. ### Non-followers on Instagram Instagram can refuse buttons, cards and attachments to commenters who do not follow the account. This is Meta code 2, subcode 1545133, returned here as a non-retryable 400 that says so. The refusal is uneven: most accounts do not get it, and an affected account gets it on many of its non-followers. Only that account's own past refusals show whether it is affected. The failed call still consumes the comment's single private reply. On an affected account, send plain text to reach non-followers and add buttons once they reply. ### Errors - 400 with `details.privateReplyConsumed: true`: the comment's single private reply is spent (by this call or an earlier one). Never retry it. - 502: Meta answered a server error after receiving the reply. It carries `details.privateReplyOutcome: "unknown"`. The reply is usually delivered and the comment's private reply spent, so check the conversation before retrying. - Meta-originated failures carry Meta's error object in `platformError` (`code`, `error_subcode`, `message`, `type`, `fbtrace_id`). Common Instagram subcodes: 2534014 commenter not found (no reason given), 2534023 already replied, 2534024 older than 7 days, 2534025 not eligible for a private reply, 2534066 declined. ### Recording The reply is recorded in the inbox conversation with the commenter (`sentVia` `api` for key auth, `human` for a session) and fires `message.sent` once. A success response and `message.sent` mean Meta accepted the reply, not that the commenter saw it. Instagram has no delivery event, and the reply can land in the commenter's Message Requests folder, where they may never open it.

POST/v1/inbox/comments/{postId}
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.comments.replyToInboxPost({  path: {    postId: 'post_abc123',  },  body: {    accountId: 'account_abc123',    message: 'Hello, world!',  },});console.log(data);
{  "success": true,  "data": {    "commentId": "string",    "isReply": true,    "cid": "string"  }}
OpenAPI specification
Was this page helpful?