Inbox · Messages

Search conversations

Searches conversations.

GEThttps://api.pozy.ai/v1/inbox/conversations/search
searchInboxConversations

Guide: Messages

Request

Send your API key as Authorization: Bearer pz_live_.... Read-only keys can call it. Keys with the messages resource group disabled get 403 resource_group_disabled. Authentication

Query parameters

NameTypeNotes
queryrequiredstringUp to 200 characters
directionstringOne of incoming, outgoing
profileIdstring
platformstringOne of facebook, instagram, telegram, whatsapp, sms, rcs, slack, imessage
accountIdstring
limitintegerDefault 201 to 50
cursorstring

Example

curl -X GET "https://api.pozy.ai/v1/inbox/conversations/search?query=string&limit=20" \
  -H "Authorization: Bearer $POZY_API_KEY"

Response

200 on success

  • dataarray of object
    • conversationobject
      11 child fields
      • idstring
      • platformstring
      • accountIdstring
      • participantNamestring

        Can be null.

      • participantUsernamestring

        Can be null.

      • participantPicturestring

        Can be null.

      • businessScopedUserIdstring
      • whatsappUsernamestring
      • statusstring

        One of active, archived.

      • lastMessagestring

        Can be null.

      • lastMessageAtstring (date-time)

        Can be null.

    • matchCountinteger
    • matchesarray of object
      4 child fields
      • idstring
      • textstring

        Can be null.

      • directionstring

        One of incoming, outgoing.

      • timestampstring (date-time)
  • paginationobject
    • hasMoreboolean
    • nextCursorstring

      Can be null.

  • metaobject
    • accountsQueriedinteger
    • accountsFailedinteger
    • failedAccountsarray of object
      4 child fields
      • accountIdstring
      • accountUsernamestring

        Can be null.

      • platformstring
      • errorstring
    • lastUpdatedstring (date-time)
    • accountsSkippedarray of object
      2 child fields
      • accountIdstring
      • platformstring
200 response
{
  "data": [
    {
      "conversation": {
        "id": "6bfebd43ddc270f6d2c56fc5",
        "platform": "instagram",
        "accountId": "696e0b682d0a31188e7a2ba9",
        "participantName": "Acme",
        "participantUsername": "acme",
        "participantPicture": "string",
        "businessScopedUserId": "61f84cc05876a1c25c483817",
        "whatsappUsername": "acme",
        "status": "active",
        "lastMessage": "Hello from Pozy",
        "lastMessageAt": "2026-10-02T09:00:00.000Z"
      },
      "matchCount": 42,
      "matches": [
        {
          "id": "6bfebd43ddc270f6d2c56fc5",
          "text": "Hello from Pozy",
          "direction": "incoming",
          "timestamp": "2026-10-02T09:00:00.000Z"
        }
      ]
    }
  ],
  "pagination": {
    "hasMore": true,
    "nextCursor": "string"
  },
  "meta": {
    "accountsQueried": 42,
    "accountsFailed": 42,
    "failedAccounts": [
      {
        "accountId": "696e0b682d0a31188e7a2ba9",
        "accountUsername": "acme",
        "platform": "instagram",
        "error": "string"
      }
    ],
    "lastUpdated": "2026-10-02T09:00:00.000Z",
    "accountsSkipped": [
      {
        "accountId": "696e0b682d0a31188e7a2ba9",
        "platform": "instagram"
      }
    ]
  }
}

Errors

Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:

400invalid_request_errorA parameter or body field is missing or invalid. param names it.
401authentication_errorThe API key is missing, revoked or expired.
403permission_errorThe key is scoped to other profiles or has this resource group disabled.
429rate_limit_errorToo many requests this minute. Wait for Retry-After seconds.

Every code is listed in Errors.

More in Messages