Long codes

Local numbers, two-way by default.

A long code is a standard 10-digit phone number that sends and receives SMS. It's the default sender for two-way conversations, OTP, and alerts at moderate volume. For US application traffic it's registered through A2P 10DLC.

send-otp.ts
200 · 0.4s
import { BirdClient } from "@messagebird/sdk";

const bird = new BirdClient({ apiKey: process.env.BIRD_API_KEY! });

const code = generateOtp();

const { data, error } = await bird.sms.send({
  from: "Bird",
  to:   "+15005550006",
  text: `Your Bird verification code is ${code}. Reply STOP to opt out.`,
}).safe();

if (error) throw error;
console.log(data.id);
// → "sms_4kT01Lq2m..."

Today at 2:14 PM

Hey Ada — your Bird sign-in code is 482917. It'll expire in 10 minutes. Don't share it with anyone.
482917
Delivered

When a long code is the right call.

Long codes are one of the four sender types on the Bird SMS numbers surface, part of the broader Bird SMS API. They're local, two-way, and quick to provision — the right starting point for most conversational and transactional traffic before volume justifies a short code.

What a long code gives you.

Local presence, two-way traffic, moderate volume.

  1. 01

    A local 10-digit number.

    Recipients see an area code from their own country or region, which reads as a real sender rather than a marketing blast.

  2. 02

    Two-way by default.

    Point the number's inbound traffic at a webhook and replies arrive as signed events — the foundation for conversational flows.

  3. 03

    Registered through A2P 10DLC.

    US application traffic runs over registered 10DLC campaigns, which earns vetted throughput and the carriers' trust rather than a filtering risk.

  4. 04

    Live as soon as registration clears.

    Buy the number immediately; it starts carrying registered traffic once its 10DLC campaign is approved.

Buy one and start sending.

Search by country and capability, buy the number, and route its inbound at a webhook — the same client you send with. The same code shape provisions any sender type; only the type field changes.

long-code.ts
201 · purchased
const { data: available } = await bird.numbers.search({
  country: "US",
  type:    "long-code",
  capabilities: ["sms"],
}).safe();

const { data: number } = await bird.numbers.buy({
  number:  available[0].number,
  webhook: "https://example.com/webhooks/bird",
}).safe();

Registration is part of the deal.

To send application-to-person traffic to US numbers, a long code runs over a registered A2P 10DLC campaign. Bird files the brand and campaign from the dashboard and reports approval status through the API, so you know exactly when full throughput is available.

Long code FAQ

What is a 10DLC long code?+
A 10-digit long code (10DLC) is a standard local phone number sanctioned for application-to-person SMS in the US once its brand and campaign are registered with the carriers.
How much throughput does a long code get?+
Registered 10DLC long codes get vetted throughput that depends on the brand's trust score and campaign type — more than an unregistered number, less than a short code.
Can a long code receive replies?+
Yes. Long codes are two-way: route the number's inbound at a webhook and replies arrive as HMAC-signed events.
When should I move to a short code instead?+
When one-to-many volume outgrows what a long code's throughput supports, or when a program needs the higher, more predictable rate a carrier-vetted short code provides.

Start on a long code, scale when you need to.

Long codes are one sender type on the Bird SMS numbers surface. Provision one, register the campaign, and route inbound from the same API you send with.

Start with one channel.
Add the others when you're ready.

A test API key is yours immediately. Production unlocks when you add a payment method and verify a sender.

Using Claude Code, Cursor, or Codex? Copy a setup prompt and your agent installs the Bird CLI and skills for you. Pick yours:

Cursor