# WhatsApp API

**Node.js**: `npm install @messagebird/sdk`

```typescript
const msg = await bird.whatsapp.send({
  to: "+15551234567",
  template: {
    slug: "bird_otp",
    components: [{ type: "body", parameters: [{ type: "text", text: "123456" }] }],
  },
});
console.log(msg.id, msg.status);
```

Examples: [TypeScript](/de-de/whatsapp-api/features/sending.ts.md) · [Python](/de-de/whatsapp-api/features/sending.py.md) · [Go](/de-de/whatsapp-api/features/sending.go.md) · [PHP](/de-de/whatsapp-api/features/sending.php.md) · [CLI](/de-de/whatsapp-api/features/sending.cli.md) · [MCP](/de-de/whatsapp-api/features/sending.mcp.md) · [cURL](/de-de/whatsapp-api/features/sending.curl.md)

Choose your SDK or use HTTP directly. These examples are generated from Bird’s published operation.

## Choose the message for the moment.

Use an approved template for an eligible business-initiated message, or a supported free-form response inside the customer-service window. Keep the sender, recipient, language and content explicit.

## Use the published examples

Start from the generated SDK or HTTP example above. Follow the operation’s actual content shape and validation instead of guessing a method from a marketing illustration.

## Pace the workload

Use the rate-limit response and a bounded queue. When an application fans out messages, retain a durable record of each intended recipient and request.

## Follow acceptance through to the customer’s response.

An accepted API request begins processing. Meta acceptance, delivery and read updates describe later stages; they do not guarantee that a customer completed your business task.

## Reconcile with message reads

Consume the relevant webhooks and retrieve message records when investigating a gap. Keep uncertain attempts distinct from confirmed failures.

## Keep retry decisions precise

Use the documented request protections and error classification. Do not assume an uncertain provider attempt can be safely repeated indefinitely.

**One message, from request to response Example path**

01

Accepted

Bird admits the request and returns its message identity.

02

Processed

The message moves through the sending workflow.

03

Delivered or read

Provider observations update the message record when available.

Thanks! I'll collect it tomorrow.

Handle rejection, failure and missing observations as part of the same integration.

## Carry the useful context into the reply.

Use explicit button or list reply identifiers and your application’s conversation state. A reply can quote an earlier message, but that reference is optional and may be unavailable.

## Keep metadata in its place

Outgoing metadata belongs to the outgoing record. Do not assume it is copied onto the customer’s inbound message.

## Connect tools with the same permissions

CLI and MCP can help developers operate the channel. They remain subject to the same workspace access, sender ownership and sending rules.

## WhatsApp API questions

### Does an accepted request mean the message was delivered?

No. API admission, Meta acceptance, delivery and reads are distinct observations. Confirm the relevant message state and the business outcome separately.

### Can I send free-form messages at any time?

Free-form replies depend on the customer-service window and the supported content type. Outside that window, use an eligible approved template.

### Is there a WhatsApp batch endpoint?

The published message API sends individual messages. Pace application fanout using the documented limits; do not assume an email broadcast endpoint also sends WhatsApp.

### How do I match an interactive reply to my application?

Use explicit reply identifiers with your stored conversation or task state. A quoted-message reference can help when available, but outgoing metadata is not automatically inherited by the reply.

## Connect the complete journey

- [WhatsApp API guide](/docs/guides/whatsapp/sending-whatsapp): Follow the setup, operating decisions and verification steps.
- [WhatsApp templates](/whatsapp-api/features/templates): Build reusable messages and follow approval by language.
- [WhatsApp conversations](/whatsapp-api/features/two-way): Bring customer context, AI and your team into one conversation.
- [WhatsApp analytics](/whatsapp-api/features/analytics): Follow delivery, customer response and business results.
- [WhatsApp resource library](/whatsapp-api/resources): Explore implementation guides, explained answers and comparisons.
- [WhatsApp platform](/whatsapp-api): Explore the connected product and choose the next capability.

## Scale without  losing control.

Organize teams in workspaces, control API access, and trace changes through audit logs.

Harbor Organization
Workspaces Production Sandbox

### Delivery agent

API key · Customer operations team
Active
Permissions Access
Email Read & write
SMS Read & write
WhatsApp Read Read & write
AL Alex Lee Admin  Permissions updated

### Audit log

Production
 API key updated Alex Lee · 09:42:18 UTC

Workspace
Production

Resource
Delivery agent

WhatsApp
Read Read & write

Succeeded

 [Workspaces](/docs/guides/workspaces)[Team roles](/docs/guides/users-teams-roles)[API authentication](/docs/guides/authentication)
[Explore Enterprise](/enterprise)

## Start with WhatsApp. Build across channels with Bird.

[Get started](/dashboard/signup?returnTo=%2Fdashboard%2Fw%2Fwhatsapp) · [Contact Sales](/demo?product=whatsapp)

[Email](/email-api) · [SMS](/sms-api) · [WhatsApp](/whatsapp-api) · [Apple Messages](/apple-messages-api) · [Voice](/voice-api)



## Related resources

- [Connecting WhatsApp to Bird: from buying a number to a live channel](/learn/whatsapp/connecting-whatsapp-to-bird) (video)
- [What is the 24-hour customer service window on WhatsApp?](/explained/whatsapp/what-is-the-24-hour-customer-service-window) (answer)
- [WhatsApp message builder](/tools/whatsapp-message-builder) (tool)
- [Build your first integration](/learn/paths/integration) (course)

[Get an implementation brief](/learn/workspace?topic=whatsapp)
