Inbox

Search direct message conversations

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.

get/v1/inbox/conversations/search

Request

  • Base URL: https://api.postzen.dev
  • URL: https://api.postzen.dev/v1/inbox/conversations/search
  • Auth: HTTP bearer

Query parameters

querystring required

Search term.

direction'incoming' | 'outgoing'

Match only messages the account received (incoming) or sent (outgoing). Restricts matching to message text.

accountIdstring

Restrict the read to one connected account. Omitted, every Instagram account the key can reach is queried.

profileIdstring

Restrict the read to accounts on one profile.

platform'instagram'

Restrict the read to one platform. Direct messages cover Instagram only; any other value is a validation error.

limitinteger

Page size.

cursorstring

Pagination cursor from pagination.nextCursor. Unlike the list cursor this one is an offset into the result set, so it is only valid for the same query.

Response

Matching conversations returned.

Changes

No recorded changes to this operation across all 1 revision of this API.