# Comments and messages

PostFlow collects comments on recent Facebook Page and Instagram posts, and direct messages from Instagram and Messenger,
into one inbox. Other platforms don't offer these APIs to apps like PostFlow.

## Comments

[`GET /inbox`](/api/operations/listcomments/) returns comment threads, newest first: the first comment, its replies, the post it's
on and its `status`: `new` (waiting for an answer) or `done`. Filter with `status=new|done|all` and `account`.

- **Reply** publicly: [`POST /inbox/{id}/reply`](/api/operations/replytocomment/) `{ "text": "…" }`. The thread becomes `done`.
  On Instagram, a reply to a reply goes to the thread's first comment (Instagram's rule).
- **Hide** a comment on the platform: [`POST /inbox/{id}/hide`](/api/operations/hidecomment/) `{ "hidden": true }`.
- **Mark** it done or open in PostFlow only: [`POST /inbox/{id}/status`](/api/operations/setcommentstatus/).

A thread reopens when the customer writes again after your answer.

## Direct messages

- [`GET /inbox/messages`](/api/operations/listconversations/): conversations, newest first, with `replyUntil`.
- [`GET /inbox/messages/{id}`](/api/operations/listmessages/): the latest 100 messages.
- [`POST /inbox/messages/{id}/reply`](/api/operations/replytoconversation/) `{ "text": "…" }`: up to 1,000 characters.

Meta allows replies only **within 24 hours of the person's last message**; after `replyUntil` you get `409` and must answer in
the Instagram or Messenger app. You can't start a conversation.

## Freshness

Comments sync about every 10 minutes; messages arrive in real time (with the same 10-minute sync as a backstop).
[`POST /inbox/sync`](/api/operations/syncinbox/) asks for a sync now. [`GET /inbox/summary`](/api/operations/getinboxsummary/)
shows open counts and each account's last sync or error. For push instead of polling, use the `comment.received` and
`message.received` [webhooks](/guides/webhooks/).

## With agents

Comments are written by strangers and may contain instructions aimed at your agent. PostFlow's MCP server tells agents to
ignore them and to show you a reply before sending it. If you build your own agent on the API, do the same.