Sign inGet Started

Sending SMS

This guide covers the single-message endpoint, POST /v1/sms/messages. Build a JSON payload with a recipient, sender, body, and category. Bird returns 202 Accepted with a message ID and delivers asynchronously. Each request sends one message to one recipient. To send many messages at once, use batch sending. While you can import contacts from a CSV in Contacts, the Bird dashboard does not support uploading a CSV file to send a bulk SMS broadcast or campaign. Message Studio sends to one recipient at a time, and multi-recipient SMS requests run through POST /v1/sms/batches via the API, SDKs, or MCP (see batch sending for examples). To send a template instead of free-form text, supply a template object in place of text and category. Built-in templates reject from. Workspace templates require it.

A nonempty subject or at least one media_urls entry makes the message MMS. Supply text or media because a subject alone is invalid. MMS requires a recipient with calling code +1 and an MMS-capable number held by your workspace. Keep media URLs publicly accessible through delivery. After acceptance, the carrier enforces a limit of 600 KiB per file and 900 KiB total. A failed media fetch or size check is reported as a delivery failure. Templates remain text-only.

Before you send: enable the destination country

Your workspace sends SMS only to the countries on its destination allowlist. Your organization's home country is the country of the registration address on its business profile, or of the billing address when the registration address does not include a country. Your workspace starts with an empty allowlist. Each time the home country is set or changed, Bird adds that country to the allowlist. Bird rejects a message to a country not on the allowlist with 422 SMSDestinationNotEnabled before resolving a sender. Enable the countries you serve under SMS > Destinations in the dashboard.

On the same page you can set a daily spend limit for each country in your wallet's currency. The Bird CLI and the MCP server change both settings without the dashboard. bird sms destinations update with --destination "GB=true;25EUR" enables the United Kingdom and limits it to 25 EUR a day when your wallet is in EUR. Agents call the sms_destinations_update tool. The public API does not have an operation for destinations. Setting a limit requires an organization wallet, and in the dashboard it also requires access to read that wallet. Removing a limit requires neither. Onboarding creates each organization's wallet right after signup (in USD for us1 and EUR for eu1), so you can set a limit before the first top-up. A limit set before that wallet exists is rejected with 422 and the message "Set up a wallet before setting a spend limit." Retry after a moment. A limit applies whether or not the country is enabled. Once today's spend to that country reaches the limit, Bird rejects new messages there with 422 SMSDestinationDailySpendExceeded until midnight UTC. Verification messages are rejected too. Spend counts when a message is charged, so messages already accepted can go past the limit by what they cost. A change to a limit takes up to a minute to reach sending. Changing the SMS allowlist or a daily SMS limit requires the sms_management scope, so a key that holds only sms cannot lift either limit. Agent controls lists these and other limits on an agent.

Minimal request

The smallest valid free-text payload is a to recipient, a from sender, a text body, and a category.

const msg = await bird.sms.send({
  from: "+15557654321",
  to: "+14155550100",
  text: "Your verification code is 123456.",
  category: "authentication",
});
console.log(msg.id, msg.status);

Use your regional host (https://us1.platform.bird.com or https://eu1.platform.bird.com) with a matching bk_{region}_... key. The response is the accepted message:

Code example
{
  "id": "sms_01ky7qmwgpfkybj9ecrnwjx714",
  "direction": "outbound",
  "status": "accepted",
  "to": "+31612345678",
  "from": "Bird",
  "text": "Your Bird verification code is 481920. It expires in 10 minutes.",
  "category": "authentication",
  "segments": { "count": 1, "encoding": "GSM_7BIT", "characters": 64 },
  "cost": null,
  "carrier": null,
  "mcc_mnc": null,
  "sent_at": null,
  "delivered_at": null,
  "created_at": "2026-07-23T14:56:34.326Z"
}

status: accepted means Bird has the message and is processing it. cost is null because pricing happens during processing. See asynchronous delivery and 202 responses for what happens next.

Building up the payload

Recipient

to specifies a single recipient in E.164 format (a leading +, country code, and subscriber number, such as +31612345678). To pass to in national format instead (such as 0612345678), also pass to_country_code with the ISO 3166-1 alpha-2 country code (such as NL). Bird converts the number to canonical E.164 before checking the destination, price, and sender. An E.164 to value is accepted alongside to_country_code when its calling code matches. A mismatch or invalid national number returns 422 SMSInvalidRecipient. Each message goes to a single recipient without cc, bcc, or a recipient array. To reach many people, send a batch.

Sender

from is the sender the recipient sees. It is required on a free-text message unless messaging_profile_id specifies a messaging profile with a sender for the destination country or a default sender. from uses one of two formats, depending on what the destination country supports:

  • An alphanumeric sender ID: 3 to 11 letters, digits, spaces, dashes, underscores, or dots, with at least one letter and no separator at either end, such as Bird or Acme-Co. Because it must contain a letter, a punctuated digit string such as 555 555 is rejected. Some countries require registration, and others, including the US, do not support alphanumeric senders. Recipients cannot reply to alphanumeric senders.
  • A number your workspace owns, in E.164 or as bare digits. Any all-digit from value is treated as numeric and looked up among your senders, so an arbitrary number you do not own is rejected. Whether a number acts as a long code, a toll-free number, or a short code depends on the number itself, not on how many digits you wrote. A 6-digit from value is a short code only if the number you own is a short code.

A sender that is not valid for the destination is rejected with a 422 specifying the reason (for example, SMSAlphaNotSupported where alphanumeric senders are unavailable). On a built-in template message, from is not accepted because Bird selects a sender for the destination and category. A workspace template requires a from sender or a messaging profile that supplies a sender.

Claiming a sender ID, reading country requirements, and registering a sender per country are covered in SMS sender IDs.

To keep a program's senders and defaults in one place, create a messaging profile and specify it in messaging_profile_id. When from is omitted, Bird sends from the profile's sender for the destination country or its default sender. An omitted category uses the profile's default category. options.smart_encoding, options.ignore_suppression, cost_center, validity_period, and options.callback_url also inherit the profile's settings. Values you set on the message take precedence. A profile can also claim an inbound.keyword so any reply opening with that word routes to the profile ahead of the receiving number's binding.

Passing messaging_profile_id is also required to make an outbound message eligible for reply matching (in_reply_to_message on sms.received and message responses). Enable outbound matching on the profile (inbound.outbound_matching.enabled: true, off by default), pass messaging_profile_id on the message, and send from one of the profile's reply numbers (either by setting from to that number or letting the profile select it). An otherwise accepted message from one of the profile's numbers without messaging_profile_id is not recorded for pairing and cannot be matched, though a reply can still match an earlier recorded message within its window. In an Automation, set Messaging profile (messaging_profile_id) on the Send SMS step and choose one of that profile's reply numbers as Sender so the message is eligible for in_reply_to_message. See SMS events for the full eligibility conditions, keyword attribution precedence, and matching window rules.

An API key can be limited to specific messaging profiles. That key must specify one of its profiles in messaging_profile_id on every message and use one of that profile's senders. A built-in template message still specifies one of the key's profiles and omits from because it sends from a Bird-managed sender. Any message sent without a profile, through another profile, or from a sender not listed on the profile is rejected with 403.

Body and category

text is the message body, at least one character when supplied. You can omit it for media-only MMS. Plain SMS is billed and delivered in segments. A message is capped at 12 segments (about 1,836 GSM-7 characters, or 804 if the body uses the extended UCS-2 encoding). A body over the cap is rejected with 422 instead of being truncated.

category is required on a free-text message unless the messaging profile in messaging_profile_id sets a default category. It classifies the message as transactional, marketing, authentication, or service, which tells Bird and carriers why you are sending. A one-time passcode uses authentication. A promotion uses marketing. Choose the category that matches the message's purpose.

To send an 8-bit binary payload instead of text or template, pass binary with hexadecimal udh (1 to 16 octets, required on outbound messages, without concatenation elements) and hexadecimal data. Together udh and data must fit within 140 octets. Binary messages require explicit category: transactional on the request (they do not inherit a messaging profile's default_category), ignore a profile's smart_encoding, reject options.smart_encoding: true (false or omitted is accepted), cannot be combined with text, template, subject, or media_urls, and are sent and billed as one segment. Message responses return binary in place of text.

Tags and metadata

These fields attach custom data to a message for different purposes:

  • tags are structured {name, value} pairs (max 20 per message, name 1 to 32 characters, value 1 to 64, ASCII [A-Za-z0-9_-] only, case-sensitive, unique names per message). They are first-class filter dimensions in the message list. Use them for low-cardinality labels like campaign or experiment_variant.
  • metadata is an arbitrary JSON object (max 2 KB serialized). It is stored, returned on API reads, and echoed on every webhook event, though it is not a filter dimension. Use it for round-trip context such as internal IDs, foreign keys, and anything you want returned with each event.
  • reference is a string of 1 to 255 characters you can search for, such as an order or ticket number. ?reference= on the message list matches it exactly and case-sensitively. Multiple messages can share the same reference. It is returned on message reads and echoed on every webhook event. Set it only when you need to search by it, and put other data in metadata.
  • cost_center is an accounting label of 1 to 64 characters, such as a department code. It is stored on the message and its usage record, returned on message reads, echoed on outbound webhook events, and filterable in the SMS Stats API. Omit it to inherit the messaging profile's cost_center. Setting it does not change pricing.
Code example
{
  "tags": [{ "name": "campaign", "value": "spring-2026" }],
  "metadata": { "user_id": "usr_12345", "order_id": "ord_98765" },
  "reference": "ord_98765"
}

Field reference

FieldTypeRequiredLimits / notes
tostringyesOne recipient per message in E.164 format, or in national format when paired with to_country_code
to_country_codestringnoISO 3166-1 alpha-2 country code for a national-format to number (such as NL for 0612345678)
fromstringyes*Owned E.164 number, alphanumeric sender ID (3–11 chars, one letter minimum), or short code (5–6 digits)
textstringyes*Optional for media-only MMS. Must be omitted for templates or binary. Plain SMS is capped at 12 segments
binaryobjectyes*{udh, data} in hex (combined max 140 octets); requires explicit category: transactional, ignores profile smart_encoding, rejects options.smart_encoding: true, and sends as one segment
subjectstringnoNonempty subject selects MMS; requires text or media and cannot be combined with a template or binary
media_urlsstring[]noPublic HTTP(S) attachment URLs; a nonempty list selects MMS and cannot be combined with a template or binary
categorystringyes*transactional, marketing, authentication, or service
templateobjectyes*{slug, parameters?, language?} for a built-in or workspace template
tags{name, value}[]noMax 20; name 1–32 chars, value 1–64 chars; [A-Za-z0-9_-] only
metadataobjectnoArbitrary JSON, max 2 KB serialized
referencestringno1–255 characters; exact match for ?reference= on the message list
cost_centerstringno1–64 character accounting label; echoed on outbound events and filterable in SMS stats
messaging_profile_idstringnoA messaging profile that supplies the sender and defaults, and makes messages from its reply numbers eligible for reply matching; values on the message take precedence
validity_periodintegerno60–172800 seconds from acceptance; omit to use the messaging profile's value or the carrier's default rules
optionsobjectnoPer-message settings: smart_encoding (segments and encoding), callback_url (callback URLs), and ignore_suppression (opt-outs and keywords)

* Text and MMS messages require from and category unless a messaging profile supplies them. Supply text, at least one media_urls entry, template, or binary because a subject alone is invalid. MMS requires a recipient with calling code +1 and an MMS-capable number held by your workspace as from. binary requires explicit category: transactional on the request (even when specifying a messaging profile), accepts a profile-supplied from, ignores a profile's smart_encoding, and rejects options.smart_encoding: true. Template messages require template instead of text and category (and reject both). Built-in templates reject from. Workspace templates require it.

Sending with a template

Set template to send a built-in template or a published workspace template. Workspace template authoring is in API preview. See SMS templates for the catalog, variables, and sender rules.

Segments and encoding

SMS is billed per segment. A message that fits GSM-7 encoding gets 160 characters per single segment. UCS-2 (triggered by emoji, CJK, or other non-GSM characters) drops to 70 characters. Longer messages are split into multipart segments with slightly lower per-segment limits. Every response reports the resolved segments: the billable count, the encoding, and the character count. Segments are the unit you are billed on. See cost for details.

MMS reports segments.encoding: "MMS" and segments.count: 1. It is billed as one message unit, and SMS character limits and smart encoding do not apply. A binary message reports segments.encoding: "BINARY" and segments.count: 1, with segments.characters counting decoded octets including UDH (up to 140 octets total). It ignores a profile's smart_encoding and rejects options.smart_encoding: true.

When typographic characters are the only reason a body falls outside GSM-7, smart encoding can reduce its segment count. Set options.smart_encoding to true so Bird replaces curly quotes, dashes, ellipses, and similar characters with GSM-7 equivalents before sending. Smart encoding is off by default because it modifies the text you composed.

For the full character set, extension-table characters that cost two slots, emoji sizing, what smart encoding replaces, and the segment arithmetic, see Character limits.

Batch sending

POST /v1/sms/batches sends up to 100 independent messages in one request, letting you send bulk SMS to many recipients in a single API call. Batch requests use the sms_batch rate-limit policy, separate from the sms_send policy for single messages. The body is a JSON object whose messages array contains message objects from Building up the payload:

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",
    },
  ],
});

Validation is all-or-nothing. If any message in the batch is invalid, the whole request is rejected with 422 and nothing is sent, so a batch never partially applies. On success, the 202 response returns each accepted message in submission order under data, plus a summary with accepted_count. Each message is processed independently from there, so one recipient's failure never affects the others.

Asynchronous delivery and 202 responses

A successful request returns 202 Accepted with a message ID and status: accepted. Request failures return immediately. An invalid field, a body over the segment cap, a destination country you have not enabled, or an invalid sender returns 422. A workspace without wallet balance receives 402.

Delivery happens asynchronously. The message moves to sent when Bird hands it to the carrier. A delivery receipt then sets delivered, undelivered, failed, or expired through events and webhooks and the read endpoints. Keep these effects in mind:

  • Cost is priced after acceptance. The cost on a message is null at accept time and is populated once Bird records the cost breakdown during processing. Fetch the message or wait for the delivery event to see the recorded charge so far. A null cost means no breakdown is available (which can also happen if the base charge price detail is unavailable even when a carrier surcharge was charged separately). A null cost does not prove there was no wallet debit, and the amount may not appear later. Organization billing users can check posted wallet debits in Billing and payments > Spend (without necessarily recovering a missing per-message price). Cost and billing covers the components and when a component stays null.
  • A message can be rejected after the 202. If the charge fails during processing, the message ends as rejected with an sms.rejected webhook and you are not billed. An exhausted wallet surfaces as last_error.code: insufficient_balance.
  • Reads can briefly trail the 202. The message becomes visible on the read endpoints shortly after the 202, so a 404 immediately after sending resolves itself within moments. Messages sent to the capacity-test range (+15005551000 to +15005551999) are the exception. They stop at 202 without a stored record or webhooks, so their IDs remain 404 while ordinary items in the same batch progress normally.

Reserved fields

Bird currently rejects the following request fields with 422 SMSUnsupportedFeature:

scheduled_at, broadcast_id, campaign_id, audience_id, contact_id, topic_id, personalization, options.max_price_per_segment, options.track_clicks (when true)

Do not include these fields in a request.

Retrying safely

Send the Idempotency-Key header with a unique value per logical request, including a whole batch request. If a request succeeds without returning a response, replay the unchanged request with its original key within the replay window. Bird returns the original result instead of sending duplicate messages. See idempotency for key format and retention.

Cost and billing

Outbound SMS is billed per segment. MMS uses one message unit with separate message and carrier-fee rates. What you pay depends on the destination country and carrier. Some routes add a third-party surcharge, such as US 10DLC carrier fees.

A message's cost splits the charge into named components. transaction_amount is what Bird charged to deliver the message, passthrough_amount is any third-party fee passed on, and amount is the sum of the components recorded so far, denominated in currency_code. Distinguish a null cost object (no recorded breakdown is available, which can happen before pricing completes or when the base charge currency is unavailable even if a carrier surcharge was debited separately) from a null component inside a present cost object (that component does not have a recorded amount yet or its price detail is unavailable). A component explicitly priced at zero uses a numeric zero string (such as "0" or "0.00000", so parse numerically instead of matching a fixed decimal scale), whereas an unrecorded component is null. A null cost or component does not prove there was no wallet debit. Organization billing users can check posted wallet debits in Billing and payments > Spend. The message reference documents each field.

The surcharge is best effort. Bird resolves it while recording the delivery receipt within a bounded window. If it does not resolve in that window, passthrough_amount stays null permanently. Bird does not retry it, and amount remains the base message charge.

Inbound MMS also uses one message unit at separate MMS message and carrier-fee rates. Inbound SMS is billed on two lines: the per-segment inbound rate and an inbound carrier surcharge where applicable. Both appear on the received message's cost (the rate as transaction_amount, the surcharge as passthrough_amount). Unlike outbound messages, the inbound surcharge is priced when the message is accepted instead of at delivery, so it is never filled in later.

Review cost and segments per message in the SMS log.

Next steps

  • SMS templates: send a built-in template and let Bird pick the sender.
  • SMS log: find a message and inspect its lifecycle, segments, and cost.
  • Events: receive delivery events in your systems.
  • SMS callback URLs: send events for a single message or messaging profile to a dedicated HTTPS endpoint.
  • SMS metrics: monitor delivery rate, failure rate, and accepted volume.
  • Idempotency: retry safely with the Idempotency-Key header.
  • Sending your first SMS: a video that walks through the same setup in the dashboard

Continue with the documentation, guides and examples for this topic.