TextPro Docs

Sandbox Mode

Use sandbox keys to test safely without external SMS delivery.

Sandbox Key Behavior

Requests authenticated with tp_test_ keys use sandbox balance, never hit external providers, and are marked as sandbox in logs.

Allowed Sandbox Numbers

Use these fixed test recipients to simulate predictable outcomes.

  • Name
    447900000000
    Description

    200 success simulation.

  • Name
    447900000001
    Description

    422 test_invalid_number simulation.

  • Name
    447900000002
    Description

    422 test_unreachable_handset simulation.

  • Name
    447900000003
    Description

    403 test_carrier_blocked simulation.

  • Name
    447900000004
    Description

    504 test_provider_timeout simulation.

POST /api/send/sms

447900000000 Success Scenario

Simulates a successful sandbox send.

Request

POST
/api/send/sms
curl -X POST https://textpro.co.uk/api/send/sms \
  -H "X-API-KEY: tp_test_xxx" \
  -H "Content-Type: application/json" \
  -d '{"to":"447900000000","message":"Sandbox success"}'

Response

200
OK
{
  "success": true,
  "status": "sent"
}
POST /api/send/sms

447900000001 Invalid Number Scenario

Simulates an invalid recipient number.

Request

POST
/api/send/sms
curl -X POST https://textpro.co.uk/api/send/sms \
  -H "X-API-KEY: tp_test_xxx" \
  -H "Content-Type: application/json" \
  -d '{"to":"447900000001","message":"Sandbox invalid number"}'

Response

422
Unprocessable Entity
{
  "success": false,
  "error": {
    "code": "test_invalid_number"
  }
}
POST /api/send/sms

447900000002 Unreachable Handset Scenario

Simulates a valid-looking number that cannot be reached.

Request

POST
/api/send/sms
curl -X POST https://textpro.co.uk/api/send/sms \
  -H "X-API-KEY: tp_test_xxx" \
  -H "Content-Type: application/json" \
  -d '{"to":"447900000002","message":"Sandbox unreachable"}'

Response

422
Unprocessable Entity
{
  "success": false,
  "error": {
    "code": "test_unreachable_handset"
  }
}
POST /api/send/sms

447900000003 Carrier Blocked Scenario

Simulates carrier-level blocking for the destination.

Request

POST
/api/send/sms
curl -X POST https://textpro.co.uk/api/send/sms \
  -H "X-API-KEY: tp_test_xxx" \
  -H "Content-Type: application/json" \
  -d '{"to":"447900000003","message":"Sandbox blocked"}'

Response

403
Forbidden
{
  "success": false,
  "error": {
    "code": "test_carrier_blocked"
  }
}
POST /api/send/sms

447900000004 Provider Timeout Scenario

Simulates an upstream timeout. Treat this as transient and retry with backoff.

Request

POST
/api/send/sms
curl -X POST https://textpro.co.uk/api/send/sms \
  -H "X-API-KEY: tp_test_xxx" \
  -H "Content-Type: application/json" \
  -d '{"to":"447900000004","message":"Sandbox timeout"}'

Response

504
Gateway Timeout
{
  "success": false,
  "error": {
    "code": "test_provider_timeout"
  }
}