Educational

Sandbox: how to test your integration without sending SMS

· 4 minutes read

The sandbox lets you test your integration end to end without sending real SMS and without paying. You make exactly the same API calls as in production, and Calisero handles them the same way — except the messages never go out to the networks.

What it is for

  • development and staging — write and test your code without sending SMS to real numbers;
  • automated tests — run your test suite as often as you like, at no cost;
  • callbacks — check that your server receives and handles delivery reports correctly;
  • OTP / 2FA — test the verification flow without a phone: you see the code in the dashboard;
  • demos — show your integration without sending anything.

What happens to a test message

  • it goes through the same validation as a real one: the number format, the text length, the approved sender. A request that is wrong in the sandbox will be wrong in production too;
  • it never reaches the recipient and is not charged;
  • it gets the "Delivered" status right away;
  • if you sent a callback_url, you receive the callbacks with the simulated statuses, as for a real delivery;
  • it does not show in the messages list, the figures, the charts or the invoices;
  • it is recorded in API logs and you can follow it in Debug by its trace ID, like any request — see debugging with a trace ID.

A message stays a test even if you turn the sandbox off before it is sent (a scheduled message, for instance).

Two modes: the whole account or a single key

The whole account in sandbox

Turned on from Developers → Sandbox. While it is on, every message of the account is a test: sent with any API key, from the dashboard ("Send SMS") or as an OTP verification. Nothing reaches the recipients.

Use it when the account is only for testing, or before your first launch. While it is on, the dashboard shows a warning so you don't forget it.

Careful: turning the sandbox on for an account that already sends in production stops the real messages too. When you turn it off, new messages reach recipients and are charged again.

A sandbox key only

Under Developers → API keys, create a new key or edit an existing one and tick Sandbox key. Only the messages and OTP verifications sent with that key are tests; the other keys keep sending normally.

This is the recommended option once you have real traffic: the production key stays live while staging or your local environment use the sandbox key. You go live by swapping the key, without changing your code.

In short:

Whole account Sandbox key
What becomes a test every message of the account only the messages sent with that key
Messages sent from the dashboard yes, they are tests no, they go out normally
The other keys send test messages send normally
Best for test-only account, before launch staging and development, next to production

Where you see the test messages

Under Developers → Sandbox. The page shows what is on right now (the whole account, or how many sandbox keys you have) and the list of test messages, which you can filter and export to CSV. Each message opens on the usual message page, with its whole history. For test OTP verifications, you see the code right in the dashboard, since the SMS never goes out to the phone.

Test messages are deleted automatically after a limited number of days, along with their logs; the Sandbox page tells you how many.

Going live

  1. Use a key without sandbox (or turn the account's sandbox off).
  2. Check the sender: in production, the sender field must be an approved sender — see how to get a custom sender approved.
  3. Send a real message to your own number and follow it in Debug all the way to the callback.

Other relevant articles

All articles