curl --request POST \
--url https://app.thinnest.ai/api/v1/sms/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "+919876543210",
"templateId": "8d2e4f6a-1b3c-4d5e-9f70-a1b2c3d4e5f6",
"values": [
"Asha",
"acme.example/book"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to: '+919876543210',
templateId: '8d2e4f6a-1b3c-4d5e-9f70-a1b2c3d4e5f6',
values: ['Asha', 'acme.example/book']
})
};
fetch('https://app.thinnest.ai/api/v1/sms/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/sms/test"
payload = {
"to": "+919876543210",
"templateId": "8d2e4f6a-1b3c-4d5e-9f70-a1b2c3d4e5f6",
"values": ["Asha", "acme.example/book"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"sent": true,
"messageRef": "a7c3e9f1b2d4",
"text": "Hi Asha, thanks for calling Acme Clinic. Book your visit here: acme.example/book"
}Send Test SMS
Sends one template to one Indian mobile number through your provider — a real SMS, billed by your provider — to prove the provider, header and DLT ids work together. Success sets the connection’s status to working; a provider’s refusal sets it to failing with the reason. Needs a full key.
curl --request POST \
--url https://app.thinnest.ai/api/v1/sms/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "+919876543210",
"templateId": "8d2e4f6a-1b3c-4d5e-9f70-a1b2c3d4e5f6",
"values": [
"Asha",
"acme.example/book"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to: '+919876543210',
templateId: '8d2e4f6a-1b3c-4d5e-9f70-a1b2c3d4e5f6',
values: ['Asha', 'acme.example/book']
})
};
fetch('https://app.thinnest.ai/api/v1/sms/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/sms/test"
payload = {
"to": "+919876543210",
"templateId": "8d2e4f6a-1b3c-4d5e-9f70-a1b2c3d4e5f6",
"values": ["Asha", "acme.example/book"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"sent": true,
"messageRef": "a7c3e9f1b2d4",
"text": "Hi Asha, thanks for calling Acme Clinic. Book your visit here: acme.example/book"
}Authorizations
Headers
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.
"org_3fKq9TzQ1mN8vB2xR7cLpA"