Sendra / Guides

Test the WhatsApp API without a phone number

You can test a WhatsApp integration without a phone number or Meta account. Sendra's sandbox uses the same API as production, but with one simulated number. It can fake customer replies, failed deliveries and the 24-hour rule, and nothing reaches real people.

By BobWork. Updated .

Get a test key

  1. Sign up for Sendra and open the dashboard.
  2. Switch to Sandbox at the top.
  3. Create a sandbox key. It starts with sk_test_.
  4. Save it as an environment variable called SENDRA_API_KEY. Don't put it in your code or an AI chat.

You don't need to connect a number first.

Simulate a customer message

This opens a 24-hour reply window for that pretend customer. If you've set a sandbox webhook, it also sends your app a message.received event.

curl -X POST "https://chat.bobwork.ai/api/sendra/v1/sandbox/inbound" \
  -H "Authorization: Bearer $SENDRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"from":"+60123456789","text":"Is my order ready?"}'

Now reply to them:

curl "https://chat.bobwork.ai/api/sendra/v1/messages" \
  -H "Authorization: Bearer $SENDRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":"+60123456789","text":"Yes, it is ready."}'

The reply starts as accepted. A few seconds later, the sandbox changes it to sent, delivered and then read. You can see each change with GET /messages, or get it as a message.status webhook.

Test what can go wrong

What to test How to test it What happens
A closed 24-hour window Send text to a number that hasn't written to you The message is accepted with a warning, then fails with 131047
A message that can't be delivered Send to +12025550101 It fails with 131026
A message that's never read Send to +12025550102 It stops at delivered
The wrong template language Send hello_world with a language other than en_US The API returns 422 with Meta code 132001
The wrong number of template values Send sandbox_order_update without exactly two values The API returns 422 with Meta code 132000

+12025550101 always fails with 131026, even if its 24-hour window is closed. To send free text to +12025550102, simulate a message from it first, or send a template instead.

Test for these before you go live. A successful API response only means the message was accepted, so your app must still handle later failures.

Test your webhook

The sandbox has its own webhook address and signing secret. Its events have "livemode": false, while live events have true. Check this before you charge a customer, change a real order or notify your team.

Read how to check signatures and ignore repeated events.

What the sandbox can't test

  • Meta's template review: the sandbox approves new templates immediately. Meta reviews real ones.
  • Real delivery: it can't test real phones, networks, Meta's limits or your number's quality rating.
  • Meta's fees: nothing is charged in the sandbox.

Go live

  1. Connect a number. You can use one you already have, but Meta decides whether it can be connected.
  2. Add a card in Meta. Add a card in Meta before you go live. Without one, Meta can refuse templates, and replies stop once the free ones are used, or sooner for some businesses.
  3. Create your templates on the real number and wait for Meta to approve them.
  4. Set your production webhook and save its new signing secret.
  5. Replace the sk_test_ key with an sk_live_ key.
  6. Send a message to your own phone and check that it arrives.

Common questions

Does the Sendra sandbox send real WhatsApp messages?

No. Messages stay inside Sendra and never reach WhatsApp, Meta or a real phone. Use a live key and a connected number to send real messages.

Is the sandbox free?

Yes. It doesn't use your plan's monthly messages. It has its own limit of 1,000 messages a day.

Can an AI coding tool use the sandbox?

Yes. Connect Claude Code, Codex or Cursor to Sendra's MCP server with a test key. Your AI tool can then send test messages and simulate customer replies.

Sources

Checked 2 December 2026. Prices and features change, so check the links before you decide. If something here is out of date, tell us and we'll fix it.

Related

Try it before you connect a number

Sign up free and create a sandbox key. You don't need a phone or a Meta account, and test messages never reach real people.

Start freeConnect a number with Claude Code