Verify
Every verify route, with request, response, errors and samples in curl, Node, Python and PHP.
See the overview for sign-in and the error shape.
List verifications
GET /v1/verify
Who can call it: API key with the query scope, or a dashboard session token.
| Query | Type | Required | Default | Meaning |
|---|---|---|---|---|
status | string | No | Only this status. | |
environment | string | No | live or test. | |
page | integer | No | 0 | Page number, starting at 0. |
limit | integer | No | 25 | Items per page. |
curl -X GET "https://api.sms.jtnoble.com/v1/verify" \
-H "Authorization: Bearer $JTSMS_API_KEY"const resp = await fetch('https://api.sms.jtnoble.com/v1/verify', {
method: 'GET',
headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}` },
});
console.log(resp.status, await resp.text());import os
import requests
resp = requests.get(
"https://api.sms.jtnoble.com/v1/verify",
headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
timeout=30,
)
print(resp.status_code, resp.text)<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/verify');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY')],
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;HTTP 200:
{
"verifications": [
{
"id": "vrf_cec78e20e1bc4ea3b8594992",
"status": "cancelled",
"to": "+234990****42",
"environment": "test",
"livemode": false,
"attempts": 0,
"attempts_left": 3,
"sends": 1,
"expires_at": "2026-11-07T17:03:00.594624+00:00",
"verified_at": null,
"cost": 0,
"currency": "USD",
"created_at": "2026-11-07T17:01:00.595336+00:00"
},
{
"id": "vrf_e2fd9c0f289a44e1997ff436",
"status": "approved",
"to": "+234990****41",
"environment": "test",
"livemode": false,
"attempts": 2,
"attempts_left": 3,
"sends": 1,
"expires_at": "2026-11-07T17:05:58.637685+00:00",
"verified_at": "2026-11-07T17:01:00.119521+00:00",
"cost": 0,
"currency": "USD",
"created_at": "2026-11-07T17:00:58.640037+00:00"
}
],
"total": 2,
"page": 0,
"limit": 2
}| HTTP | code | Message |
|---|---|---|
| 401 | unauthorized | Not authenticated |
| 403 | insufficient_scope | This API key is not authorised for this action. |
| 429 | rate_limited | Too many requests. Try again in a moment. |
Check a code
POST /v1/verify/check
Who can call it: API key with the send scope, or a dashboard session token.
Body (JSON):
| Field | Type | Required | Default | Meaning |
|---|---|---|---|---|
id | string | No | The id from /verify/start. Or pass to. | |
to | string | No | Uses the newest pending verification for this number. | |
code | string | Yes | What the person typed. | |
test | boolean | No | false | Simulate: nothing is sent or charged. |
curl -X POST "https://api.sms.jtnoble.com/v1/verify/check" \
-H "Authorization: Bearer $JTSMS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id":"vrf_8f2c0a6e1b7d4c3a9e5f1d20","code":"482913"}'const resp = await fetch('https://api.sms.jtnoble.com/v1/verify/check', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({"id":"vrf_8f2c0a6e1b7d4c3a9e5f1d20","code":"482913"}),
});
console.log(resp.status, await resp.text());import os
import requests
resp = requests.post(
"https://api.sms.jtnoble.com/v1/verify/check",
headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
json={"id":"vrf_8f2c0a6e1b7d4c3a9e5f1d20","code":"482913"},
timeout=30,
)
print(resp.status_code, resp.text)<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/verify/check');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"id":"vrf_8f2c0a6e1b7d4c3a9e5f1d20","code":"482913"}',
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;HTTP 200:
{
"id": "vrf_e2fd9c0f289a44e1997ff436",
"status": "pending",
"to": "+234990****41",
"environment": "test",
"livemode": false,
"attempts": 1,
"attempts_left": 4,
"sends": 1,
"expires_at": "2026-11-07T17:05:58.637685+00:00",
"verified_at": null,
"cost": 0,
"currency": "USD",
"created_at": "2026-11-07T17:00:58.640037+00:00",
"valid": false
}| HTTP | code | Message |
|---|---|---|
| 400 | id_required | Pass id or to. |
| 401 | unauthorized | Not authenticated |
| 403 | insufficient_scope | This API key is not authorised for this action. |
| 404 | verification_not_found | No such verification. |
| 422 | validation_error | Request validation failed |
| 429 | rate_limited | Too many requests. Try again in a moment. |
Send a code
POST /v1/verify/start
Who can call it: API key with the send scope, or a dashboard session token.
Body (JSON):
| Field | Type | Required | Default | Meaning |
|---|---|---|---|---|
to | string | Yes | Mobile number in international format, for example +2348030000000. Also accepted: 2348030000000, or 08030000000 in your default country. | |
sender_id | string | No | Sender name, up to 11 characters. It must be approved on your account. Without it the default sender is used. | |
app_name | string | No | Shown in the default message. | |
template | string | No | Your own wording; must contain {code}. {minutes} is replaced with the time limit. | |
code_length | integer | No | 6 | 4 to 8. Default 6. |
ttl_seconds | integer | No | 300 | 60 to 1800. Default 300. |
max_attempts | integer | No | 5 | Wrong tries allowed, 1 to 10. Default 5. |
test | boolean | No | false | Simulate: nothing is sent or charged and the code comes back in sandbox_code. |
curl -X POST "https://api.sms.jtnoble.com/v1/verify/start" \
-H "Authorization: Bearer $JTSMS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to":"+2348030000000","app_name":"Shop"}'const resp = await fetch('https://api.sms.jtnoble.com/v1/verify/start', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({"to":"+2348030000000","app_name":"Shop"}),
});
console.log(resp.status, await resp.text());import os
import requests
resp = requests.post(
"https://api.sms.jtnoble.com/v1/verify/start",
headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
json={"to":"+2348030000000","app_name":"Shop"},
timeout=30,
)
print(resp.status_code, resp.text)<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/verify/start');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"to":"+2348030000000","app_name":"Shop"}',
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;HTTP 201:
{
"id": "vrf_e2fd9c0f289a44e1997ff436",
"status": "pending",
"to": "+234990****41",
"environment": "test",
"livemode": false,
"attempts": 0,
"attempts_left": 5,
"sends": 1,
"expires_at": "2026-11-07T17:05:58.637685+00:00",
"verified_at": null,
"cost": 0,
"currency": "USD",
"created_at": "2026-11-07T17:00:58.640037+00:00",
"sandbox_code": "010537"
}| HTTP | code | Message |
|---|---|---|
| 400 | template_missing_code | The template must contain {code}. |
| 401 | unauthorized | Not authenticated |
| 402 | insufficient_balance | The balance does not cover this message. |
| 403 | insufficient_scope | This API key is not authorised for this action. |
| 403 | recipient_opted_out | The recipient has opted out. |
| 404 | verification_not_found | No such verification. |
| 409 | conflict | Duplicate request (idempotency conflict) |
| 422 | validation_error | Request validation failed |
| 429 | rate_limited | Too many requests. Try again in a moment. |
| 429 | verify_rate_limited | Too many codes for this number. Try again later. |
| 502 | otp_send_failed | The code could not be sent. |
Verification totals
GET /v1/verify/stats
Who can call it: API key with the query scope, or a dashboard session token.
| Query | Type | Required | Default | Meaning |
|---|---|---|---|---|
days | integer | No | 30 | |
environment | string | No | live or test. |
curl -X GET "https://api.sms.jtnoble.com/v1/verify/stats" \
-H "Authorization: Bearer $JTSMS_API_KEY"const resp = await fetch('https://api.sms.jtnoble.com/v1/verify/stats', {
method: 'GET',
headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}` },
});
console.log(resp.status, await resp.text());import os
import requests
resp = requests.get(
"https://api.sms.jtnoble.com/v1/verify/stats",
headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
timeout=30,
)
print(resp.status_code, resp.text)<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/verify/stats');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY')],
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;HTTP 200:
{
"days": 30,
"environment": "test",
"started": 2,
"approved": 1,
"failed": 0,
"sends": 2,
"cost": 0,
"conversion_rate": 50
}| HTTP | code | Message |
|---|---|---|
| 401 | unauthorized | Not authenticated |
| 403 | insufficient_scope | This API key is not authorised for this action. |
| 404 | verification_not_found | No such verification. |
| 429 | rate_limited | Too many requests. Try again in a moment. |
Read a verification
GET /v1/verify/{public_id}
Who can call it: API key with the query scope, or a dashboard session token.
| Path value | Type | Meaning |
|---|---|---|
public_id | string | The verification id (vrf_...). |
curl -X GET "https://api.sms.jtnoble.com/v1/verify/PUBLIC_ID" \
-H "Authorization: Bearer $JTSMS_API_KEY"const resp = await fetch('https://api.sms.jtnoble.com/v1/verify/PUBLIC_ID', {
method: 'GET',
headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}` },
});
console.log(resp.status, await resp.text());import os
import requests
resp = requests.get(
"https://api.sms.jtnoble.com/v1/verify/PUBLIC_ID",
headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
timeout=30,
)
print(resp.status_code, resp.text)<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/verify/PUBLIC_ID');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY')],
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;HTTP 200:
{
"id": "vrf_e2fd9c0f289a44e1997ff436",
"status": "pending",
"to": "+234990****41",
"environment": "test",
"livemode": false,
"attempts": 0,
"attempts_left": 5,
"sends": 1,
"expires_at": "2026-11-07T17:05:58.637685+00:00",
"verified_at": null,
"cost": 0,
"currency": "USD",
"created_at": "2026-11-07T17:00:58.640037+00:00"
}| HTTP | code | Message |
|---|---|---|
| 401 | unauthorized | Not authenticated |
| 403 | insufficient_scope | This API key is not authorised for this action. |
| 404 | verification_not_found | No such verification. |
| 429 | rate_limited | Too many requests. Try again in a moment. |
Cancel a verification
POST /v1/verify/{public_id}/cancel
Who can call it: API key with the send scope, or a dashboard session token.
| Path value | Type | Meaning |
|---|---|---|
public_id | string | The verification id (vrf_...). |
curl -X POST "https://api.sms.jtnoble.com/v1/verify/PUBLIC_ID/cancel" \
-H "Authorization: Bearer $JTSMS_API_KEY"const resp = await fetch('https://api.sms.jtnoble.com/v1/verify/PUBLIC_ID/cancel', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}` },
});
console.log(resp.status, await resp.text());import os
import requests
resp = requests.post(
"https://api.sms.jtnoble.com/v1/verify/PUBLIC_ID/cancel",
headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
timeout=30,
)
print(resp.status_code, resp.text)<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/verify/PUBLIC_ID/cancel');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY')],
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;HTTP 200:
{
"id": "vrf_cec78e20e1bc4ea3b8594992",
"status": "cancelled",
"to": "+234990****42",
"environment": "test",
"livemode": false,
"attempts": 0,
"attempts_left": 3,
"sends": 1,
"expires_at": "2026-11-07T17:03:00.594624+00:00",
"verified_at": null,
"cost": 0,
"currency": "USD",
"created_at": "2026-11-07T17:01:00.595336+00:00"
}| HTTP | code | Message |
|---|---|---|
| 401 | unauthorized | Not authenticated |
| 403 | insufficient_scope | This API key is not authorised for this action. |
| 404 | verification_not_found | No such verification. |
| 429 | rate_limited | Too many requests. Try again in a moment. |
Send a fresh code
POST /v1/verify/{public_id}/resend
Who can call it: API key with the send scope, or a dashboard session token.
| Path value | Type | Meaning |
|---|---|---|
public_id | string | The verification id (vrf_...). |
curl -X POST "https://api.sms.jtnoble.com/v1/verify/PUBLIC_ID/resend" \
-H "Authorization: Bearer $JTSMS_API_KEY"const resp = await fetch('https://api.sms.jtnoble.com/v1/verify/PUBLIC_ID/resend', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}` },
});
console.log(resp.status, await resp.text());import os
import requests
resp = requests.post(
"https://api.sms.jtnoble.com/v1/verify/PUBLIC_ID/resend",
headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
timeout=30,
)
print(resp.status_code, resp.text)<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/verify/PUBLIC_ID/resend');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY')],
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;HTTP 200:
{
"id": "vrf_8f2c0a6e1b7d4c3a9e5f1d20",
"status": "pending",
"to": "+234990****00",
"environment": "live",
"livemode": true,
"attempts": 0,
"attempts_left": 5,
"sends": 2,
"expires_at": "2026-11-07T10:06:00+00:00",
"verified_at": null,
"cost": 0.0232,
"currency": "USD",
"created_at": "2026-11-07T10:00:00+00:00"
}| HTTP | code | Message |
|---|---|---|
| 401 | unauthorized | Not authenticated |
| 403 | insufficient_scope | This API key is not authorised for this action. |
| 404 | verification_not_found | No such verification. |
| 409 | verification_closed | |
| 429 | rate_limited | Too many requests. Try again in a moment. |
| 429 | verify_rate_limited | Wait a moment before asking for another code. |