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.
447900000000 Success Scenario
Simulates a successful sandbox send.
Request
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"}'
import axios from 'axios'
await axios.post('https://textpro.co.uk/api/send/sms', {
to: '447900000000',
message: 'Sandbox success',
}, {
headers: {
'X-API-KEY': 'tp_test_xxx',
'Content-Type': 'application/json',
},
})
import requests
requests.post(
'https://textpro.co.uk/api/send/sms',
headers={
'X-API-KEY': 'tp_test_xxx',
'Content-Type': 'application/json',
},
json={
'to': '447900000000',
'message': 'Sandbox success',
},
)
$client = new \GuzzleHttp\Client();
$response = $client->post('https://textpro.co.uk/api/send/sms', [
'headers' => [
'X-API-KEY' => 'tp_test_xxx',
'Content-Type' => 'application/json',
],
'json' => [
'to' => '447900000000',
'message' => 'Sandbox success',
],
]);
Response
{
"success": true,
"status": "sent"
}
447900000001 Invalid Number Scenario
Simulates an invalid recipient number.
Request
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"}'
import axios from 'axios'
await axios.post('https://textpro.co.uk/api/send/sms', {
to: '447900000001',
message: 'Sandbox invalid number',
}, {
headers: {
'X-API-KEY': 'tp_test_xxx',
'Content-Type': 'application/json',
},
})
import requests
requests.post(
'https://textpro.co.uk/api/send/sms',
headers={
'X-API-KEY': 'tp_test_xxx',
'Content-Type': 'application/json',
},
json={
'to': '447900000001',
'message': 'Sandbox invalid number',
},
)
$client = new \GuzzleHttp\Client();
$response = $client->post('https://textpro.co.uk/api/send/sms', [
'headers' => [
'X-API-KEY' => 'tp_test_xxx',
'Content-Type' => 'application/json',
],
'json' => [
'to' => '447900000001',
'message' => 'Sandbox invalid number',
],
]);
Response
{
"success": false,
"error": {
"code": "test_invalid_number"
}
}
447900000002 Unreachable Handset Scenario
Simulates a valid-looking number that cannot be reached.
Request
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"}'
import axios from 'axios'
await axios.post('https://textpro.co.uk/api/send/sms', {
to: '447900000002',
message: 'Sandbox unreachable',
}, {
headers: {
'X-API-KEY': 'tp_test_xxx',
'Content-Type': 'application/json',
},
})
import requests
requests.post(
'https://textpro.co.uk/api/send/sms',
headers={
'X-API-KEY': 'tp_test_xxx',
'Content-Type': 'application/json',
},
json={
'to': '447900000002',
'message': 'Sandbox unreachable',
},
)
$client = new \GuzzleHttp\Client();
$response = $client->post('https://textpro.co.uk/api/send/sms', [
'headers' => [
'X-API-KEY' => 'tp_test_xxx',
'Content-Type' => 'application/json',
],
'json' => [
'to' => '447900000002',
'message' => 'Sandbox unreachable',
],
]);
Response
{
"success": false,
"error": {
"code": "test_unreachable_handset"
}
}
447900000003 Carrier Blocked Scenario
Simulates carrier-level blocking for the destination.
Request
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"}'
import axios from 'axios'
await axios.post('https://textpro.co.uk/api/send/sms', {
to: '447900000003',
message: 'Sandbox blocked',
}, {
headers: {
'X-API-KEY': 'tp_test_xxx',
'Content-Type': 'application/json',
},
})
import requests
requests.post(
'https://textpro.co.uk/api/send/sms',
headers={
'X-API-KEY': 'tp_test_xxx',
'Content-Type': 'application/json',
},
json={
'to': '447900000003',
'message': 'Sandbox blocked',
},
)
$client = new \GuzzleHttp\Client();
$response = $client->post('https://textpro.co.uk/api/send/sms', [
'headers' => [
'X-API-KEY' => 'tp_test_xxx',
'Content-Type' => 'application/json',
],
'json' => [
'to' => '447900000003',
'message' => 'Sandbox blocked',
],
]);
Response
{
"success": false,
"error": {
"code": "test_carrier_blocked"
}
}
447900000004 Provider Timeout Scenario
Simulates an upstream timeout. Treat this as transient and retry with backoff.
Request
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"}'
import axios from 'axios'
await axios.post('https://textpro.co.uk/api/send/sms', {
to: '447900000004',
message: 'Sandbox timeout',
}, {
headers: {
'X-API-KEY': 'tp_test_xxx',
'Content-Type': 'application/json',
},
})
import requests
requests.post(
'https://textpro.co.uk/api/send/sms',
headers={
'X-API-KEY': 'tp_test_xxx',
'Content-Type': 'application/json',
},
json={
'to': '447900000004',
'message': 'Sandbox timeout',
},
)
$client = new \GuzzleHttp\Client();
$response = $client->post('https://textpro.co.uk/api/send/sms', [
'headers' => [
'X-API-KEY' => 'tp_test_xxx',
'Content-Type' => 'application/json',
],
'json' => [
'to' => '447900000004',
'message' => 'Sandbox timeout',
],
]);
Response
{
"success": false,
"error": {
"code": "test_provider_timeout"
}
}