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. For the standard API endpoints, switching to production is swapping one environment variable. CRM integrations use the managed activation steps in their platform guide.

Live key (sk_prod_…)Sandbox key (sk_test_…)
Validation & errorsRealSame request validation; production account/cost lookup and blocked-country filtering are skipped
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 success response has the production fields 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, blocked-country filtering and production account/cost lookup are skipped. Live pricing or balance cache misses are fail-open, not local send gates.
  • 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.

For the standard /sms/send and /sms/send-individual endpoints, replace the key. That’s the whole migration:

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

For /integrations/sms/send and the CRM platform guides, follow the page’s Production activation section. Your account manager enables the exact workspace and, where required, supplies the approved production URL or adapter mapping. Do not promote a legacy CRM batch template by changing only its key.