Send SMS
Send single outbound SMS messages via the API.
POST
/api/send/sms
Endpoint
POST /api/send/sms sends one message.
Request
POST
/api/send/sms
curl -X POST https://textpro.co.uk/api/send/sms \
-H "X-API-KEY: tp_live_xxx" \
-H "Content-Type: application/json" \
-d '{"to":"+447000000000","message":"Platform docs test"}'
POST
/api/send/sms
import axios from 'axios'
await axios.post('https://textpro.co.uk/api/send/sms', {
to: '+447000000000',
message: 'Platform docs test',
}, {
headers: {
'X-API-KEY': 'tp_live_xxx',
'Content-Type': 'application/json',
},
})
POST
/api/send/sms
import requests
requests.post(
'https://textpro.co.uk/api/send/sms',
headers={
'X-API-KEY': 'tp_live_xxx',
'Content-Type': 'application/json',
},
json={
'to': '+447000000000',
'message': 'Platform docs test',
},
)
POST
/api/send/sms
$client = new \GuzzleHttp\Client();
$response = $client->post('https://textpro.co.uk/api/send/sms', [
'headers' => [
'X-API-KEY' => 'tp_live_xxx',
'Content-Type' => 'application/json',
],
'json' => [
'to' => '+447000000000',
'message' => 'Platform docs test',
],
]);
Response
200
OK
{
"success": true
}