---
title: "Comment on a post or reply to a comment"
method: POST
path: "/v1/inbox/comments/{postId}"
tags: ["Inbox"]
---

# Comment on a post or reply to a comment

`POST /v1/inbox/comments/{postId}`

## Request

- Base URL: `https://api.postzen.dev`
- URL: `https://api.postzen.dev/v1/inbox/comments/{postId}`
- Auth: HTTP bearer

Publishes a comment on the post, or a reply to `commentId` when one is given. Requires a read-write API key and the account's comment-management scope; without the scope the call answers `403 platformCapabilityMissing` and nothing is sent to the platform. `attachmentUrl` is Facebook only — every other platform rejects it with `400 attachmentUnsupported`. Instagram is two levels deep, so replying to a reply is redirected to that reply's top-level parent. A Threads reply is created as a container and then published; when the publish is still pending after PostZen's internal retries the call returns `502 publishPending` and the reply may still appear on its own, so check the thread before retrying rather than posting twice.

## Request body

- InboxReplyRequest
  - `accountId` string, required: PostZen account id of the connected Instagram, Facebook, or Threads account that owns the post.
  - `message` string, required: Comment text to publish.
  - `commentId` string: Reply to this comment instead of commenting on the post. On Instagram a reply to a reply is redirected to its top-level parent.
  - `attachmentUrl` string, uri: Facebook only. Publicly reachable image URL to attach to the comment. Sending it for any other platform returns `400 attachmentUnsupported`.

## Response `200`

Comment published.

- InboxReplyResponse
  - `success` true, required
  - `data` object, required
    - `commentId` string, required: Platform id of the comment that was created.
    - `isReply` boolean, required: True when the comment was published as a reply to another comment rather than directly on the post.

## Other responses

- `400`: A parameter is missing or malformed — a plain `{ error }` body — the account is not on a platform the inbox supports (`platformUnsupported`), or `attachmentUrl` was sent for a platform other than Facebook (`attachmentUnsupported`). A platform-rejected identifier or parameter also lands here, with `platformError` carrying the platform's wording.
- `401`: Missing or invalid API key.
- `403`: The API key is read-only, the account is outside its profile access (`forbidden`), or the connection is missing the account's comment-management scope (`platformCapabilityMissing`) — nothing is sent to the platform in that case.
- `404`: No such account (`accountNotFound`), no such post for that account (`postNotFound`), the PostZen post has not published to this account yet (`postNotPublished`), or the platform reported the comment as missing.
- `424`: The account's connection is dead and must be reauthorized before its comments can be read or written.
- `429`: The platform rate limited the upstream request; `platformError` carries its wording and `Retry-After` gives the wait in seconds. PostZen's own per-key and per-operation limiters also return `429`, with the plain body `{"error":"rate_limited","retryAfter":<seconds>}`.
- `500`: Unexpected server error.
- `502`: The platform could not answer the request. `platformError` carries its wording.

---

[API](https://skmtc.dev/postzen/apis/postzen-public-api.md) · [All operations](https://skmtc.dev/postzen/apis/postzen-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postzen/apis/postzen-public-api/revisions/40863e3710ec?raw)
