Skip to Content

Testing in Sandbox

Test with an sk_test_ key and magic phone numbers on the SMS Pro API.

View Markdown (.md)

Use an sk_test_ key on https://api.smspro.com to exercise authentication, validation, and webhooks without contacting a handset or charging the wallet. The same numbers are on Developer > Sandbox (/customer/developer/sandbox).

Sandbox page


Test-key rules

  • The request is validated the same way as a live send.
  • The response is 202 with status ACCEPTED_SANDBOX and a message id that starts with sim_.
  • The wallet is not charged.
  • A simulated delivery is posted to your webhook URL.

Magic test numbers

These numbers select the simulated outcome. They take the simulated path even when the key is sk_live_.

Magic test numbers

NumberSimulated status
+233200000001DELIVERED
+233200000002UNDELIVERABLE
+233200000003EXPIRED
+233200000004REJECTED_SPAM

REJECTED_SPAM is a sandbox result. Live traffic uses statuses such as BLOCKED_SPAM.

Example

curl -X POST "https://api.smspro.com/api/v1/public/sms/send" \
  -H "X-Api-Key: sk_test_example" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+233200000004",
    "senderId": "SMSPRO",
    "message": "Testing spam rejection flow."
  }'

The 202 body includes the simulated message id. The matching status is sent to your webhook. Do not expect a stored message lookup to return this simulation.


Testing Webhooks & Delivery Receipts

In production, carrier networks send asynchronous Delivery Receipts (DLR) back to SMS Pro once a handset acknowledges receipt. SMS Pro forwards these events to your registered webhook URL.

Testing Your Webhook Endpoint via CLI

You can trigger a mock webhook ping to verify that your local webhook handler can receive, parse, and verify signatures without sending an actual message:

curl -X POST "https://api.smspro.com/api/v1/public/mfa/workflows/test-webhook" \
  -H "X-Api-Key: sk_test_948f293048a1b2c3d4e5f60718" \
  -H "Content-Type: application/json" \
  -d '{
    "webhookUrl": "https://api.yourdomain.com/webhooks/smspro",
    "eventType": "SMS_DELIVERY_STATUS"
  }'

The gateway immediately sends a simulated signed delivery receipt to your endpoint and returns the HTTP status code received from your server:

{
  "status": "success",
  "data": {
    "success": true,
    "statusCode": 200,
    "latencyMs": 48,
    "webhookUrl": "https://api.yourdomain.com/webhooks/smspro"
  }
}

Balance

GET the balance endpoint with your test key. It returns the account balance. Test sends do not reduce that balance.


API logs

Calls are listed in the SMS Pro console under Developer > API Logs (/customer/developer/api-logs). Open a row to see the request and response.


Next Step

Once your integration handles sandbox requests and webhook events reliably, review the launch requirements in Going Live.

On this page