Zernio
APIFor you
Zernio
APIFor you
API Reference

Comments

List commented postsGETGet post commentsGETSet comment moderation statusPOSTDelete commentDELETEEdit commentPATCHHide commentPOSTLike commentPOSTLike postPOSTPin commentPOSTReply to commentPOSTSend private replyPOSTUnhide commentDELETEUnlike commentDELETEUnlike postDELETEUnpin commentDELETE
Dashboard
OverviewPlatformsAPI ReferenceResources
Comments

Reply to comment

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

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, so 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, and treat an empty result as inconclusive rather than as proof nothing was posted.


POST
/v1/inbox/comments/{postId}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

postId*string

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:).

Header Parameters

Idempotency-Key?string

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 (for example by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

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"  }}
Was this page helpful?

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. Optionally attach interactive elements: `quickReplies` (chips above the keyboard, max 13) or `buttons` (1-3 inline postback/url buttons rendered in the same bubble via Meta's button_template). Chips do not render in the Instagram Message Requests folder. Instagram can refuse buttons, cards and attachments to commenters who do not follow the account (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, an affected account gets it on many of its non-followers, and 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. `quickReplies` and `buttons` are mutually exclusive. When the comment's single private reply is spent (by this call or an earlier one) the 400 carries `details.privateReplyConsumed: true`; never retry it. A 502 means 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. 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.

accountId*string
message*string
attachmentUrl?string

(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.

Formaturi
commentId?string

Reply to specific comment (optional)

parentCid?string

(Bluesky only) Parent content identifier

rootUri?string

(Bluesky only) Root post URI

rootCid?string

(Bluesky only) Root post CID