Skip to content

List message logs

GET/messages/smsAPI v1

GET /messages/sms returns a paginated list of per-message delivery records — the same DeliveryReceipt object returned by Send SMS and the message status endpoint — for the authenticated caller. Requests are authenticated with a Bearer token and scoped by your servicePlanId.

Authentication

Send your API token as Authorization: Bearer <token>. The required servicePlanId query parameter authorizes and scopes the search; only messages owned by the authenticated caller are returned.

Query parameters

servicePlanId is required. Provide at least one additional filter (from, to, status, country, mccmnc, fromDate, toDate, or cursor).

ParameterTypeRequiredDescription
servicePlanIdstring (query)Yes
Service plan that owns the messages. Authorizes and scopes the search.
24-character hex identifier.
fromstring (query)No
Filter by sender address (short code, E.164 phone, or alphanumeric sender ID).
tostring (query)No
Filter by destination address.
statusstring (query)No
Filter by public delivery status.
Enum: QUEUED, SENT, DELIVERED, FAILED, UNKNOWN.
countrystring (query)No
Filter by ISO 3166-1 alpha-2 country code (for example US, PR).
mccmncstring (query)No
Filter by mobile country / network code.
5 or 6 digits.
fromDatestring<date-time> (query)No
Start of the createdAt window (inclusive), ISO 8601 date-time.
The window between fromDate and toDate may not exceed 31 days.
toDatestring<date-time> (query)No
End of the createdAt window (inclusive), ISO 8601 date-time.
limitinteger (query)No
Maximum number of items to return.
Defaults to 20; capped at 100.
cursorstring (query)No
Opaque pagination cursor from a previous response (pagination.nextCursor).

Pagination & sorting

  • Provide at least one filter in addition to servicePlanId: from, to, status, country, mccmnc, fromDate, toDate, or cursor.
  • Results are sorted newest-first by createdAt (ties broken by msgId).
  • The default page size is 20 and the maximum is 100; larger values are capped at 100.
  • When pagination.hasMore is true, pass pagination.nextCursor back as the cursor query parameter to fetch the next page.
  • Treat nextCursor as an opaque value: pass it back exactly as received, and do not construct or parse cursor values in client code.
  • When pagination.nextCursor is null, there are no further results.
  • An expired or malformed cursor is rejected with a 400 VALIDATION_ERROR; restart from the first page without a cursor.
  • The fromDate / toDate window filters on createdAt and may not exceed 31 days.

Responses

StatusDescription
200A paginated list of per-message delivery records, newest first.
400Missing/malformed servicePlanId, invalid filter, invalid or too-large date range, or no filter provided in addition to servicePlanId.
401Missing Bearer token, malformed Authorization header, or invalid token.
403Token is valid but not authorized for the requested account/servicePlan mapping.
429Rate limit exceeded. Retry after the indicated interval.
500The message search failed (internal error).

Response envelope

The response is an object with an items array and a pagination object.

{
  "items": [
    {
      "accountId": "111111111111111111111111",
      "servicePlanId": "222222222222222222222222",
      "msgId": "019ee2da-e515-7322-805f-1ac6ce82f20f",
      "channel": "SMS",
      "direction": "MT",
      "from": "+15550001111",
      "to": "+15550002222",
      "body": "Your verification code is 123456",
      "status": "DELIVERED",
      "errorCode": "000",
      "errorMessage": "No error",
      "segments": 1,
      "price": 0.0007,
      "ptf": 0.0065,
      "currency": "USD",
      "mccmnc": "313790",
      "country": "PR",
      "createdAt": "2026-06-20T04:20:40.982Z",
      "sentAt": "2026-06-20T04:20:41.000Z",
      "updatedAt": "2026-06-20T04:20:41.087Z"
    }
  ],
  "pagination": {
    "limit": 20,
    "hasMore": false,
    "nextCursor": null
  }
}

pagination

FieldTypeDescription
limitinteger
Effective page size applied to this response (capped at 100).
hasMoreboolean
Whether more results are available beyond this page.
nextCursorstring | null
Opaque cursor for the next page, or null when there are no further results.
Pass it back as the cursor query parameter.

Item fields (DeliveryReceipt)

Each entry in items is the public delivery record (the delivery receipt).

FieldTypeDescription
accountIdstring | null
Resolved account identifier (business partner) that owns the message.
servicePlanIdstring | null
Service plan that owns the message.
msgIdstring
Server-generated message identifier (UUID).
channelstring
Message channel. Enum: SMS, MMS.
directionstring
Message direction (for example MT).
fromstring | null
Sender address.
tostring | null
Destination address.
bodystring | null
SMS message text.
statusstring
Simplified public delivery status.
Enum: QUEUED, SENT, DELIVERED, FAILED, UNKNOWN.
errorCodestring
000 on success; otherwise the failure code.
errorMessagestring
Human-readable status/error message.
segmentsinteger | null
Number of SMS segments.
pricenumber | null
Charged price, when available.
ptfnumber | null
Pass-through fee, when available.
currencystring | null
Currency of price/ptf.
mccmncstring | null
Mobile country/network code.
countrystring | null
ISO 3166 country code.
createdAtstring<date-time>
When the record was created.
sentAtstring<date-time> | null
When the message was sent, when available.
updatedAtstring<date-time>
When the record was last updated.

Try it

Run GET /v1/messages/sms interactively with your own Bearer token in the SMS API Reference.