Skip to content

Sandbox keys (sk_test_…) let you build and test your entire integration — sending, status polling, and webhook handling — without sending real SMS or spending money. Switching to production is swapping one environment variable.

Live key (sk_prod_…)Sandbox key (sk_test_…)
Validation & errorsRealIdentical — same codes, same order
Segments & encodingRealIdentical (GSM-7/UCS-2 detection)
Cost previewReal ratesReal rates when cached, else 0
SMS deliveryReal carrierSimulated — nothing is sent
BalanceDeductedNever touched
Delivery webhookReal DLRSynthesized DELIVRD ~5s after send, same HMAC signing
Message storagePermanent history24 hours, last 500 messages
ResponseCarries "sandbox": true
  1. Create a sandbox key. In the portal under Settings → API Keys, enable Test mode when creating the key. You get an sk_test_… key.

  2. Send a simulated SMS — same request as production:

    Terminal window
    curl -X POST https://restlink23telecom.com/api/v1/sms/send \
    -H "X-API-Key: $API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "to": [
    "+447911123456"
    ],
    "message": "Sandbox hello!",
    "sender_id": "MyApp"
    }'

    The response has the exact production shape plus "sandbox": true.

  3. Watch the delivery report arrive. About 5 seconds later your configured delivery_url receives a synthesized DELIVRD webhook with a valid HMAC signature — verify it exactly like a real one (securing webhooks).

  4. Poll status if you prefer: GET /sms/status/{message_id} returns sent, then DELIVRD after the simulated carrier latency.

  • Sandbox message history is kept for 24 hours (last 500 per workspace) — it never appears in production statistics or exports.
  • URL auto-shortening and blocked-country filtering are skipped.
  • GET /sms/messages supports pagination but not SQL-grade filters.
  • If the simulator is unavailable you get 503 SANDBOX_UNAVAILABLE — a test key never falls through to the live pipeline.

Replace the key. That’s the whole migration:

Terminal window
# before
export API_KEY=sk_test_abc...
# after
export API_KEY=sk_prod_xyz...