Skip to main content
While you build an integration, you want to send real events and real one-time codes without reaching real customers. A test key does that. It’s an API key tied to a non-production environment, such as staging, and it can only:
  • message your test numbers,
  • start journeys published to its environment, and
  • call the few endpoints an integration needs to test.
Your production keys keep working exactly as before. Test keys are available in every organization.

Set it up

1

Create a staging environment

Go to Settings → Environments and click New environment. Name it staging.The first environment an organization creates becomes its default, and a test key can’t use the default. If the list is empty, create production first and then staging. Names like production, prod, prd and live can’t hold a test key, and neither can test, which Boom uses for test sends from the dashboard. See Environments for what else an environment holds.
2

Add your test numbers

Go to Settings → Test numbers and click Add number for every phone your team tests with. Each entry expires after the number of days you choose. Click Renew to keep it. A test key can’t reach a number that isn’t on this list or has expired.
3

Publish your journeys to staging

Open the journey, choose staging in the environment switcher in its toolbar, and click Publish. A test key starts only journeys published to its environment, so a journey published only to production never runs from a test key.
4

Create the test key

Go to Settings → API keys and click Create key. Give it a name, set Environment to staging, and click Create Key. Copy the key now: you won’t see it again.In the keys table, it shows as staging · test key. A key’s environment can’t be changed later.
A journey published only to staging can still start from your production keys. Before you send production events with the same name, publish the journey to production too.

Use the key

Use the test key exactly like a production key, from your development backend:
Send a one-time code to a test number:
Verify it with the same test key. A code sent with a test key verifies only with a test key, and a production code only with a production key. See One-time codes › Testing. Create a test person, then record an event for them:
The event starts the journeys published to staging that it triggers. externalId is the event’s idempotency key: sending the same one again stores no second event and returns created: false, but it can still start a new run once the earlier one has finished. Use a new externalId each time you re-run the example.

What a test key can and can’t do

A send to a phone that isn’t a test number answers 403 recipient_not_test_number, and nothing is sent. From a test key, a journey starts only if it sends WhatsApp (to test numbers) or makes HTTP requests only. A journey that sends email or SMS, places calls or gives rewards doesn’t start. Test runs never cancel or change a production run, and they don’t count toward your production frequency cap or Smart Sending cooldown.

Good to know

  • Messages are real. Test codes and journey messages go out from your usual WhatsApp number and template. They’re billed and show up in the inbox.
  • Only one environment per key. Create one test key per environment you test in.
  • Going live. Create a production key in Settings → API keys and switch your production backend to it. A test key never becomes a production key.

Not covered yet

  • A different WhatsApp sender per environment: test messages use your production number.
  • Batch endpoints, reads and every other endpoint answer 403 environment_not_supported.
For the full endpoint reference, see Authentication › Test keys.