Sign inGet Started

List messages

GET
/v1/amb/messages
const result = await bird.amb.list({
  business_account_id: "abz_01krdgeqcxet5s7t44vh8rt9mg",
  limit: 2,
});
console.log(result);
Réponse200
{
  "data": [
    {
      "id": "amb_01krdgeqcxet5s7t44vh8rt9mg",
      "conversation_id": "acv_01krdgeqcxet5s7t44vh8rt9mg",
      "business_account_id": "abz_01krdgeqcxet5s7t44vh8rt9mg",
      "direction": "outbound",
      "status": "accepted",
      "kind": "text",
      "source": "operator",
      "in_reply_to_message_id": "amb_01krdgeqcxet5s7t44vh8rt9mg",
      "reply_message_id": "amb_01krdgh7m2zq8w4x6y9b3c5d7e",
      "replied_at": "2026-10-13T10:09:00Z",
      "locale": "en_US",
      "category": "order_update",
      "tags": [
        {
          "name": "category",
          "value": "welcome"
        }
      ],
      "cost": {
        "amount": "0.00990",
        "currency_code": "USD",
        "transaction_amount": "0.00790",
        "passthrough_amount": "0.00200"
      },
      "last_error": {
        "code": "bird:business_not_registered",
        "description": "Apple refused the message with HTTP status 404."
      },
      "requested_language": "pt-BR",
      "resolved_language": "pt-BR",
      "template_id": "amt_01krdgeqcxet5s7t44vh8rt9mg",
      "template_version_id": "amv_01krdgeqcxet5s7t44vh8rt9mg",
      "template_content_hash": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
    }
  ],
  "next_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9",
  "prev_cursor": null,
  "refresh_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"
}

Returns your business's Apple Messages for Business messages across conversations, newest first, both received and sent. To page through older messages, use starting_after. Messages do not expire based on age.

To list messages within a single conversation, use listAMBConversationMessages.

Paramètres de requête

conversation_idstring

Filter to messages belonging to this conversation.

business_account_idstring

Filter to messages belonging to this business.

directionstring

Filter to received (inbound) or sent (outbound) messages.

Possible values: outbound, inbound

statusstring

Filter to messages with this status.

Possible values: accepted, sent, send_failed, rejected, received

kindstring

Filter to messages whose content is this shape.

Possible values: text, attachment, rich_link, quick_reply, list_picker, time_picker, form, apple_pay, authenticate, imessage_app, interactive

categorystring

Filter to outbound messages sent with this category, exact match.

tagarray

Filter by tag. Accepts name to match any record carrying that tag name, or name:value to match a specific tag pair (for example category:welcome). Repeat the parameter to add more tags. A record must match every tag listed to be returned.

created_afterstring

Limits the response to resources created at or after this timestamp. Combine it with created_before to select a time window. Use an RFC 3339 timestamp with a timezone offset.

created_beforestring

Limits the response to resources created before this timestamp. Combine it with created_after to select a time window. Use an RFC 3339 timestamp with a timezone offset.

limitinteger

Maximum number of items to return per page.

starting_afterstring

Cursor from the next_cursor field of a previous list response. Returns items immediately after the cursor position in the current sort order.

ending_beforestring

Cursor from the prev_cursor or refresh_cursor field of a previous list response. Returns items immediately before the cursor position in the current sort order. prev_cursor returns the preceding page. refresh_cursor anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.

Contenu de la réponse

data
array of object
obligatoire

Page of Apple Messages for Business messages, newest first.

Afficher les attributs enfants
next_cursor
nullable string
obligatoire

Cursor for the next page. Pass back as starting_after to advance forward. null when no next page exists.

prev_cursor
nullable string
obligatoire

Cursor for the previous page. Pass back as ending_before to step backward. null when no previous page exists.

refresh_cursor
nullable string
obligatoire

Refresh anchor, the first row of this response. Pass back as ending_before to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-null whenever data is non-empty; null only on an empty page. Distinct from prev_cursor.

Poursuivez avec la documentation, les guides et les exemples sur ce sujet.