Sign inGet Started

List events for an SMS message

GET
/v1/sms/messages/{message_id}/events
const events = await bird.sms.listEvents("sms_abc123");
for (const event of events.data ?? []) {
  console.log(event.type, event.occurred_at);
}
Odpowiedź200
{
  "data": [
    {
      "id": "evt_01krdgeqcxet5s7t44vh8rt9mg",
      "type": "sms.delivered",
      "occurred_at": "2026-05-21T12:00:04Z",
      "carrier": "Verizon",
      "mcc_mnc": "311480",
      "error": {
        "code": "invalid_destination",
        "description": "Carrier filtered as spam"
      }
    }
  ]
}

Returns the lifecycle event timeline for a message, in chronological order.

Parametry

message_idstring

ID of the SMS message (sms_ prefix), as returned when the message was accepted.

Parametry zapytania

typestring

Filter by event type, such as sms.delivered or sms.failed.

Treść odpowiedzi

data
array of object
wymagane

Timeline events for this SMS message, in chronological order. The bounded timeline is returned in full and is not paginated.

Pokaż atrybuty podrzędne
data.id
string
wymagane

Unique identifier for this event, stable across repeated fetches of the message.

data.type
string
wymagane

Lifecycle event type. The sms.accepted event means the API accepted the request. The sms.sent event means the message reached the carrier. The sms.delivered event confirms delivery. The sms.undelivered, sms.failed, and sms.expired events describe delivery failures. The sms.rejected event means the message was refused before carrier handoff. This is an open enum. Accept unrecognized values.

Possible values (may grow over time): sms.accepted, sms.sent, sms.delivered, sms.undelivered, sms.failed, sms.rejected, sms.expired

data.occurred_at
string
wymagane

When this event occurred.

data.carrier
string

Carrier that handled the message. Present on sms.sent and sms.delivered once identified, absent otherwise.

data.mcc_mnc
string

Mobile country code and mobile network code of the carrier. Present on sms.sent and sms.delivered once identified, absent otherwise.

data.error
nullable object

Failure detail. Present only on sms.failed, sms.undelivered, sms.rejected, and sms.expired events.

Pokaż atrybuty podrzędne

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