Sign inGet Started

List events for a message

GET
/v1/amb/messages/{message_id}/events
const result = await bird.amb.listEvents("amb_01krdgeqcxet5s7t44vh8rt9mg");
console.log(result);
Odpowiedź200
{
  "data": [
    {
      "id": "aev_01krdgeqcxet5s7t44vh8rt9mg",
      "type": "amb.sent",
      "error": {
        "code": "bird:business_not_registered",
        "description": "Apple refused the message with HTTP status 404."
      }
    }
  ]
}

Returns a message's lifecycle events in chronological order, one entry per status transition (amb.accepted, amb.sent, amb.send_failed, amb.received). The timeline is bounded and returned in full, so this list is not paginated. Event history does not expire based on age.

Parametry

message_idstring

Message identifier. Starts with amb_.

Parametry zapytania

typestring

Keep only events of this exact type (for example amb.sent or amb.send_failed). Omit for the full timeline.

Possible values (may grow over time): amb.accepted, amb.sent, amb.send_failed, amb.rejected, amb.received

Treść odpowiedzi

data
array of object
wymagane

The message's events, oldest first. Not paginated: a message's timeline is bounded and returned in full.

Pokaż atrybuty podrzędne
data.id
string
wymagane

ID of the event, unique within the message's timeline.

data.type
string
wymagane

Message timeline event type:

  • amb.accepted: The API accepted the request.
  • amb.sent: The message was handed to Apple.
  • amb.send_failed: Apple refused the message, or its send attempts were exhausted.
  • amb.rejected: Bird refused the message before any send attempt.
  • amb.received: An inbound message arrived from the customer.

This is an open enum. Accept unrecognized values.

Possible values (may grow over time): amb.accepted, amb.sent, amb.send_failed, amb.rejected, amb.received

data.occurred_at
string
wymagane

When this event occurred.

data.error
nullable object

Failure detail, on an amb.send_failed or amb.rejected event. Null on every other event type.

Pokaż atrybuty podrzędne

Przejdź do dokumentacji, przewodników i przykładów dotyczących tego tematu.