latestOpenAPI 3.1.0MIT2026-08-102046250.0 KB

67cb925f1c81

Batches

List Batches

With the list operation you can list batch messages created in the last 14 days that you have created. This operation supports pagination.

get/xms/v1/{service_plan_id}/batches

Query parameters

pageinteger

The page number starting from 0.

page_sizeinteger

Determines the size of a page.

start_datestring date-time

Only list messages received at or after this date/time. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.

Default: Now-24

end_datestring date-time

Only list messages received before this date/time. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.

fromstring[]

Only list messages sent from this sender number. Multiple originating numbers can be comma separated. Must be phone numbers or short code.

client_referencestring

Client reference to include

Response

OK. A successful response, or an Error.

countinteger

The total number of entries matching the given filters.

pageinteger

The requested page.

page_sizeinteger

The number of entries returned in this request.

Example response

{
  "count": 12,
  "batches": [
    {
      "id": "01FC66621XXXXX119Z8PMV1QPQ",
      "to": [
        "+15551231234",
        "+15551256344"
      ],
      "from": "+15551231234",
      "body": "Hi ${name}! How are you?",
      "client_reference": "myReference"
    }
  ],
  "page_size": 30
}