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.
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
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.
- 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.
- 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.
- 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.
- 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.
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?+
How much throughput does a long code get?+
Can a long code receive replies?+
When should I move to a short code instead?+
Other ways to send
Long codes are one of four sender types. Compare the rest.
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.