Skip to content

Reply to a comment

PubNio API inbox.comments.reply: reply to a comment. Request fields, examples in five clients, errors, and idempotency.

Reply to a comment with POST /api/v1/inbox/comments/{commentId}/replies. Requires an API key with the engage scope or a signed-in workspace member.

Request

Parameter In Type Required
commentId path UUID Yes
workspaceId query UUID Yes
Body field Type Required
text string Yes

Response

  • HTTP 201: InboxComment with id, threadId, accountId, provider, parentCommentId, author, text, likeCount, replyCount, likedByAccount, hidden, canReply, canHide, canLike, canDelete, permalink, actionId, providerCreatedAt, providerUpdatedAt, deletedAt, createdAt.
    • provider: bluesky, facebook, instagram, linkedin, pinterest, reddit, snapchat, tiktok, threads, x, youtube, google_business, meta_ads, google_ads, reddit_ads, pinterest_ads, tiktok_ads, linkedin_ads, snapchat_ads, amazon_ads, openai_ads

The OpenAPI document has each field’s type.

Examples

const reply = await workspace.inbox.replyComment(commentId, {
  text: "Thanks, glad it helped!",
});
reply = workspace.inbox.reply_to_comment(
    comment_id,
    text="Thanks, glad it helped!",
)
curl -X POST "https://pubnio.com/api/v1/inbox/comments/$COMMENT_ID/replies?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Thanks, glad it helped!"}'
pnio inbox comments reply "$COMMENT_ID" --text "Thanks, glad it helped!"
async () => {
  const commentId = "<commentId>";
  // One key per intent; reuse it only to retry this same request.
  const idempotencyKey = crypto.randomUUID();
  const response = await codemode.request({
    method: "POST",
    path: `/api/v1/inbox/comments/${commentId}/replies`,
    query: { workspaceId: codemode.workspaceId },
    headers: { "Idempotency-Key": idempotencyKey },
    body: { text: "Thanks, glad it helped!" },
  });
  return response.data;
};

Errors

It declares no problem of its own.

It declares the problems every Inbox operation and most operations declare.

Idempotency

Required. A retry with the same Idempotency-Key returns the first result for 24 hours. Make one key per intent, such as crypto.randomUUID() or Python’s uuid4(), and reuse it only to retry the same request. The TypeScript SDK makes a key for each call unless you pass idempotencyKey. See Idempotency.

Limits

Type to search…

↑↓ navigate↵ selectEsc close