List direct message conversations
Returns the Instagram and Facebook Messenger direct message threads PostZen holds for the accounts this key can reach, newest activity first, and refreshes that stored copy from the platform as a side effect (throttled per account, so a tight polling loop costs nothing extra). meta reports which accounts could not be refreshed; their stored threads are still returned. Read-only and read-write API keys are accepted.
Authorization
bearerAuth PostZen API key.
In: header
Query Parameters
Restrict the read to one connected account. Omitted, every Instagram account and Facebook Page the key can reach is queried.
Restrict the read to accounts on one profile.
Restrict the read to one platform. Direct messages cover Instagram and Facebook; any other value is a validation error.
Return only active or only archived threads. Archive state is PostZen-local.
Order by updatedTime.
Page size.
Opaque pagination cursor. Pass pagination.nextCursor from the previous response.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/inbox/conversations"{ "data": [ { "id": "t_17845791234567890", "platform": "instagram", "accountId": "k17d8s9f0a1b2c3d4e5f6g7h8i", "accountUsername": "postzenhq", "participantId": "17841400000000000", "participantName": "Jane Doe", "participantUsername": "janedoe", "participantPicture": "https://scontent.cdninstagram.com/v/t51.2885-19/jane.jpg", "lastMessage": "Is the sale still on?", "lastMessageAt": "2026-08-18T16:04:11.000Z", "lastInboundAt": "2026-08-18T16:04:11.000Z", "replyWindowClosesAt": "2026-08-19T16:04:11.000Z", "updatedTime": "2026-08-18T16:04:11.000Z", "status": "active", "unreadCount": 2 } ], "pagination": { "hasMore": true, "nextCursor": "eyJpZCI6ImsxN2Q4czlmMGExYjJjM2Q0ZTVmNmc3aDhpIn0" }, "meta": { "accountsQueried": 2, "accountsFailed": 0, "failedAccounts": [], "lastUpdated": "2026-08-18T16:10:00.000Z" }}{ "error": "Direct messages support Instagram and Facebook Page accounts only.", "code": "platformUnsupported", "platform": "tiktok"}{ "error": "Unauthorized"}{ "error": "Reconnect the account to grant PostZen access to its messages.", "code": "platformCapabilityMissing", "platform": "instagram"}{ "error": "That conversation could not be found.", "code": "conversationNotFound"}{ "error": "This connection needs to be reauthorized before its messages can be read.", "code": "connectionDead"}{ "error": "rate_limited", "retryAfter": 30}{ "error": "Failed to create post"}Send a private reply to a comment POST
Sends the commenter one direct message addressed to their comment, so it reaches their inbox without an existing conversation. Works for Instagram accounts and Facebook Pages; Threads and TikTok accounts answer `400 platformUnsupported`. Meta allows one private reply per comment, sent within 7 days of the comment; a second attempt, or a comment Meta will not take a private reply for, answers `400 privateReplyConsumed`. The body is `message` with optional `quickReplies` or `buttons` (not both), under the same rules as `POST /v1/inbox/conversations/{conversationId}/messages`; attachments, templates and message tags are refused with a 400. Until the person answers, this reply is the only message the account can send them. When PostZen already holds a conversation with the commenter the reply is stored in it, and `message.sent` is emitted once. Needs the account's messaging scope (`pages_messaging` on a Facebook Page) and counts toward the plan's monthly inbox send allowance. Shares the direct message send limit of 120 per hour per user. Requires a read-write API key.
Search direct message conversations GET
Searches the conversations PostZen has already synced — Meta exposes no message search API, so this reads PostZen's own copy and refreshes it first. Message text matches whole tokens, case- and accent-insensitively (`cafe` finds `café`, `art` does not match `start`); participant names and usernames match on substring. Setting `direction` narrows the search to message text only, so a thread that matched only on the participant's name is excluded. Read-only and read-write API keys are accepted.