Sign inGet Started

Create a batch of SMS messages

POST
/v1/sms/batches
const result = await bird.sms.sendBatch({
  messages: [
    {
      from: "+15557654321",
      to: "+15551111111",
      text: "Hi Alice!",
      category: "marketing",
    },
    {
      from: "+15557654321",
      to: "+15552222222",
      text: "Hi Bob!",
      category: "marketing",
    },
  ],
});
Odpowiedź202
{
  "data": [
    {
      "id": "sms_01krdgeqcxet5s7t44vh8rt9mg",
      "direction": "outbound",
      "content_type": "mms",
      "status": "accepted",
      "from": "+12025550123",
      "to": "+12025550199",
      "text": "Order ready",
      "subject": "Order update",
      "category": "transactional",
      "media": [
        {
          "mime_type": "application/octet-stream",
          "url": "https://example.com/order.jpg"
        }
      ],
      "segments": {
        "count": 1,
        "encoding": "MMS",
        "characters": 11
      },
      "requested_language": null,
      "resolved_language": null,
      "template_id": null,
      "template_version_id": null,
      "template_content_hash": null,
      "created_at": "2026-05-21T12:00:00Z"
    }
  ],
  "summary": {
    "accepted_count": 2
  }
}

Sends up to 100 independent SMS or MMS messages in one request. Each item is a complete send request with its own recipient, content, ID, status, and cost. For a single message, use Send an SMS message instead.

A nonempty subject or media_urls selects MMS for that item. MMS requires text or media, a +1 recipient and an MMS-capable number held by the workspace; it uses one message unit at MMS rates. Templates remain text-only.

Acceptance is all-or-nothing: every item is validated before any is queued, and one invalid item rejects the whole batch with a 422 (nothing is sent). A batch from a workspace with no wallet balance fails with a 402. The 202 response lists the accepted messages in submission order; each delivers asynchronously and is tracked individually, like a single send. Items sent to the capacity-test range (+15005551000 to +15005551999) stop at 202 with no charge, stored record (404 on reads), or webhooks, while ordinary items in the same batch progress normally.

Treść żądania

messages
array of object
wymagane

SMS message send requests, up to 100. Each is an independent send; all are validated before any is queued.

Pokaż parametry podrzędne

Treść odpowiedzi

data
array of object
wymagane

One entry per message in the batch, in submission order.

Pokaż atrybuty podrzędne
summary
object
wymagane

Aggregate result for the batch.

Pokaż atrybuty podrzędne

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