JT Noble SMS documentation home

Messages

Every messages route, with request, response, errors and samples in curl, Node, Python and PHP.

See the overview for sign-in and the error shape.

List messages

GET /v1/messages

Who can call it: API key with the query scope, or a dashboard session token.

QueryTypeRequiredDefaultMeaning
pageintegerNo0Page number, starting at 0.
limitintegerNo20Items per page.
statusstringNoOnly this status.
environmentstringNolive | test | all
tostringNoFilter by recipient phone (E.164)
batch_idstringNoFilter by bulk batch id
date_fromstringNoISO date/datetime lower bound (created_at)
date_tostringNoISO date/datetime upper bound (created_at)
curl -X GET "https://api.sms.jtnoble.com/v1/messages" \
  -H "Authorization: Bearer $JTSMS_API_KEY"
const resp = await fetch('https://api.sms.jtnoble.com/v1/messages', {
  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/messages",
    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/messages');
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:

{
  "messages": [
    {
      "id": "test_bacec39cde5f46288cc7c82e9c142e19",
      "phone": "+2348030001111",
      "text": "Your order 1042 is ready.",
      "sender_id": "MYSHOP",
      "route": "NG",
      "country": "NG",
      "segments": 1,
      "encoding": "GSM7",
      "environment": "test",
      "cost": 0.0116,
      "cost_currency": "USD",
      "currency": "USD",
      "price_per_segment": 0.0116,
      "price_currency": "USD",
      "status": "delivered",
      "error_code": null,
      "retry_count": 0,
      "created_at": "2026-11-07T17:00:41.840923+00:00",
      "delivered_at": "2026-11-07T17:00:42.862328+00:00"
    },
    {
      "id": "test_d0bf4ca07e1b4cb48786a40166d39048",
      "phone": "+2348030001234",
      "text": "Your order 1042 is ready.",
      "sender_id": "MYSHOP",
      "route": "NG",
      "country": "NG",
      "segments": 1,
      "encoding": "GSM7",
      "environment": "test",
      "cost": 0,
      "cost_currency": "USD",
      "currency": "USD",
      "price_per_segment": 0,
      "price_currency": "USD",
      "status": "delivered",
      "error_code": null,
      "retry_count": 0,
      "created_at": "2026-11-05T23:31:37.346774+00:00",
      "delivered_at": "2026-11-05T23:31:38.368386+00:00"
    }
  ],
  "total": 2,
  "page": 0,
  "limit": 2
}
HTTPcodeMessage
400bad_request
401unauthorizedNot authenticated
403insufficient_scopeThis API key is not authorised for this action.
429rate_limitedToo many requests. Try again in a moment.

Export messages as CSV

GET /v1/messages/export

Export messages as CSV download (live traffic; test keys get test traffic, matching the /messages list isolation).

Who can call it: API key with the query scope, or a dashboard session token.

QueryTypeRequiredDefaultMeaning
statusstringNoOnly this status.
curl -X GET "https://api.sms.jtnoble.com/v1/messages/export" \
  -H "Authorization: Bearer $JTSMS_API_KEY"
const resp = await fetch('https://api.sms.jtnoble.com/v1/messages/export', {
  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/messages/export",
    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/messages/export');
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, a CSV file:

message_id,phone,sender_id,text,status,country,currency,cost,segments,created_at,delivered_at
test_561d9cd7c5c84df1a655dad26d603ffd,+2348030001195,MYSHOP,webhook check,delivered,NG,0.008,USD,1,2026-11-07T17:48:12.427678+00:00,2026-11-07T17:48:13.439077+00:00
test_6759df572e6b4e81a75713eec971dab2,+2
HTTPcodeMessage
401unauthorizedNot authenticated
403insufficient_scopeThis API key is not authorised for this action.
429rate_limitedToo many requests. Try again in a moment.

Price a message

POST /v1/messages/rate

Price a message BEFORE sending - no charge, no delivery.

Who can call it: Any API key, or a dashboard session token.

Body (JSON):

FieldTypeRequiredDefaultMeaning
tostring or array of stringYesMobile number in international format, for example +2348030000000. Also accepted: 2348030000000, or 08030000000 in your default country.
textstringYesThe message.
routestringNoRoute code. Only NG exists; leave it out.
curl -X POST "https://api.sms.jtnoble.com/v1/messages/rate" \
  -H "Authorization: Bearer $JTSMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":"+2348030001111","text":"Your order 1042 is ready."}'
const resp = await fetch('https://api.sms.jtnoble.com/v1/messages/rate', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({"to":"+2348030001111","text":"Your order 1042 is ready."}),
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.post(
    "https://api.sms.jtnoble.com/v1/messages/rate",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    json={"to":"+2348030001111","text":"Your order 1042 is ready."},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/messages/rate');
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":"+2348030001111","text":"Your order 1042 is ready."}',
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 200:

{
  "encoding": "GSM7",
  "segments": 1,
  "characters": 25,
  "units": 25,
  "over_segment_cap": false,
  "max_segments": 10,
  "wallet_currency": "USD",
  "wallet_balance": 0,
  "recipients": [
    {
      "to": "+2348030001111",
      "country": "NG",
      "route": "NG",
      "routable": true,
      "segments": 1,
      "encoding": "GSM7",
      "price_per_segment": 0.0116,
      "route_currency": "USD",
      "cost_route": 0.0116,
      "cost_wallet": 0.0116
    }
  ],
  "routable_count": 1,
  "unroutable": [],
  "total_cost": 0.0116,
  "affordable": false
}
HTTPcodeMessage
400bad_requestRate check is limited to 1000 recipients per call
401unauthorizedNot authenticated
422validation_errorRequest validation failed
429rate_limitedToo many requests. Try again in a moment.

Send one SMS

POST /v1/messages/send

Who can call it: API key with the send scope, or a dashboard session token.

Body (JSON):

FieldTypeRequiredDefaultMeaning
tostringYesMobile number in international format, for example +2348030000000. Also accepted: 2348030000000, or 08030000000 in your default country.
textstringNo""The message.
sender_idstringNoSender name, up to 11 characters. It must be approved on your account. Without it the default sender is used.
routestringNoRoute code. Only NG exists; leave it out.
schedule_modestringNo"now"now (default) or scheduled.
scheduled_atstringNoISO 8601 time with a time zone, 5 minutes to 7 days ahead.
flashbooleanNofalseFlash SMS (message class 0): shown on screen, not stored. Same price.
validity_periodintegerNoMinutes (1-4320) the network keeps retrying before the message expires
priorityintegerNo0 normal (default), 1 high, 2 higher, 3 highest
binaryobjectNoRaw binary SMS instead of text (omit text)
curl -X POST "https://api.sms.jtnoble.com/v1/messages/send" \
  -H "Authorization: Bearer $JTSMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":"+2348030000000","text":"Your order 1042 is ready.","sender_id":"MYSHOP"}'
const resp = await fetch('https://api.sms.jtnoble.com/v1/messages/send', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({"to":"+2348030000000","text":"Your order 1042 is ready.","sender_id":"MYSHOP"}),
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.post(
    "https://api.sms.jtnoble.com/v1/messages/send",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    json={"to":"+2348030000000","text":"Your order 1042 is ready.","sender_id":"MYSHOP"},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/messages/send');
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","text":"Your order 1042 is ready.","sender_id":"MYSHOP"}',
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 200:

{
  "id": "test_bacec39cde5f46288cc7c82e9c142e19",
  "status": "queued",
  "environment": "test",
  "livemode": false,
  "segments": 1,
  "encoding": "GSM7",
  "recipients": 1,
  "price_per_sms": 0.0116,
  "cost": 0.0116,
  "cost_currency": "USD",
  "route_cost": 0.0116,
  "route_currency": "USD",
  "route": "NG",
  "balance_after": null,
  "scheduled_at": null,
  "note": "Sandbox message - simulated, not sent to a real network and not billed.",
  "options": {
    "flash": false,
    "validity_period": null,
    "priority": 0,
    "binary": false
  },
  "live": {
    "country": "NG",
    "availability": "live",
    "country_enabled": true,
    "note": "Enabled for live sends.",
    "sender_approved": true
  }
}
HTTPcodeMessage
400bad_request
400feature_not_enabledFlash SMS is not enabled on this platform yet.
400invalid_phoneThis is not a valid phone number.
400invalid_phone_lengthThe phone number has the wrong length for its country.
400unsupported_wallet_currency
401unauthorizedNot authenticated
402insufficient_balanceSandbox: simulated insufficient balance (magic number).
403forbidden
403insufficient_scopeThis API key is not authorised for this action.
403recipient_dndThis number is on the do-not-disturb list.
403recipient_opted_outThe recipient has opted out.
403sender_not_approvedThis sender ID is not approved on your account.
409conflictDuplicate request (idempotency conflict)
409duplicate_messageAn identical message was sent to this number in the last 5 minutes.
413message_too_long
422destination_not_allowed
422validation_errorRequest validation failed
429rate_limitedToo many requests. Try again in a moment.

Message totals

GET /v1/messages/stats

Who can call it: API key with the query scope, or a dashboard session token.

curl -X GET "https://api.sms.jtnoble.com/v1/messages/stats" \
  -H "Authorization: Bearer $JTSMS_API_KEY"
const resp = await fetch('https://api.sms.jtnoble.com/v1/messages/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/messages/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/messages/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:

{
  "sent_today": 24,
  "sent_delta_pct": 0,
  "delivery_rate": 68,
  "failed_today": 2,
  "failed_delta": 2,
  "balance": 0,
  "currency": "USD",
  "sms_estimate": 0,
  "period_total": 0.01,
  "period_days": 14
}
HTTPcodeMessage
401unauthorizedNot authenticated
403insufficient_scopeThis API key is not authorised for this action.
429rate_limitedToo many requests. Try again in a moment.

Status of several messages

GET /v1/messages/status

Look up delivery status for many messages in one call.

Who can call it: API key with the query scope, or a dashboard session token.

QueryTypeRequiredDefaultMeaning
idsstringYesComma-separated message ids (max 100)
curl -X GET "https://api.sms.jtnoble.com/v1/messages/status?ids=IDS" \
  -H "Authorization: Bearer $JTSMS_API_KEY"
const resp = await fetch('https://api.sms.jtnoble.com/v1/messages/status?ids=IDS', {
  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/messages/status?ids=IDS",
    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/messages/status?ids=IDS');
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:

{
  "messages": [
    {
      "id": "test_bacec39cde5f46288cc7c82e9c142e19",
      "status": "delivered",
      "segments": 1,
      "error_code": null,
      "error_message": null,
      "submitted_at": "2026-11-07T17:00:42.253790+00:00",
      "delivered_at": "2026-11-07T17:00:42.862328+00:00"
    }
  ]
}
HTTPcodeMessage
400bad_requestProvide at least one message id in ?ids=
401unauthorizedNot authenticated
403insufficient_scopeThis API key is not authorised for this action.
429rate_limitedToo many requests. Try again in a moment.

Check phone numbers

POST /v1/messages/validate

Validate recipient numbers before sending - format, validity, line type and assigned carrier (offline libphonenumber; no HLR network call, no charge). Reject non-mobile or invalid numbers early to save spend.

Who can call it: Any API key, or a dashboard session token.

Body (JSON):

FieldTypeRequiredDefaultMeaning
phonestring or array of stringYesMobile number in international format.
curl -X POST "https://api.sms.jtnoble.com/v1/messages/validate" \
  -H "Authorization: Bearer $JTSMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phone":"0888123456"}'
const resp = await fetch('https://api.sms.jtnoble.com/v1/messages/validate', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({"phone":"0888123456"}),
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.post(
    "https://api.sms.jtnoble.com/v1/messages/validate",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    json={"phone":"0888123456"},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/messages/validate');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"phone":"0888123456"}',
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 200:

{
  "input": "0888123456",
  "e164": "+2348038123456",
  "valid": true,
  "possible": true,
  "country": "NG",
  "type": "mobile",
  "carrier": "MTN",
  "location": "Nigeria",
  "national": "0888 12 34 56",
  "reason": null
}
HTTPcodeMessage
400bad_requestValidation is limited to 1000 numbers per call
401unauthorizedNot authenticated
422validation_errorRequest validation failed
429rate_limitedToo many requests. Try again in a moment.

Daily message volume

GET /v1/messages/volume

Daily message volume for the chart.

Who can call it: API key with the query scope, or a dashboard session token.

QueryTypeRequiredDefaultMeaning
daysintegerNo14
curl -X GET "https://api.sms.jtnoble.com/v1/messages/volume" \
  -H "Authorization: Bearer $JTSMS_API_KEY"
const resp = await fetch('https://api.sms.jtnoble.com/v1/messages/volume', {
  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/messages/volume",
    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/messages/volume');
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:

[
  {
    "date": "2026-11-05",
    "day": "Thu",
    "delivered": 1,
    "failed": 0,
    "pending": 0
  },
  {
    "date": "2026-11-07",
    "day": "Sat",
    "delivered": 16,
    "failed": 2,
    "pending": 0
  }
]
HTTPcodeMessage
401unauthorizedNot authenticated
403insufficient_scopeThis API key is not authorised for this action.
429rate_limitedToo many requests. Try again in a moment.

Get one message with its timeline

GET /v1/messages/{message_id}

Who can call it: API key with the query scope, or a dashboard session token.

Path valueTypeMeaning
message_idstringThe message id.
curl -X GET "https://api.sms.jtnoble.com/v1/messages/MESSAGE_ID" \
  -H "Authorization: Bearer $JTSMS_API_KEY"
const resp = await fetch('https://api.sms.jtnoble.com/v1/messages/MESSAGE_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/messages/MESSAGE_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/messages/MESSAGE_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": "test_bacec39cde5f46288cc7c82e9c142e19",
  "phone": "+2348030001111",
  "text": "Your order 1042 is ready.",
  "sender_id": "MYSHOP",
  "route": "NG",
  "country": "NG",
  "segments": 1,
  "cost": 0.0116,
  "cost_currency": "USD",
  "currency": "USD",
  "price_per_segment": 0.0116,
  "price_currency": "USD",
  "status": "delivered",
  "error_code": null,
  "error_message": null,
  "retry_count": 0,
  "created_at": "2026-11-07T17:00:41.840923+00:00",
  "submitted_at": "2026-11-07T17:00:42.253790+00:00",
  "delivered_at": "2026-11-07T17:00:42.862328+00:00",
  "failed_at": null,
  "timeline": [
    {
      "event": "accepted",
      "status": "queued",
      "detail": "Sandbox: accepted (no charge, not delivered to a real network)",
      "at": "2026-11-07T17:00:41.843968+00:00",
      "metadata": {
        "livemode": false
      }
    },
    {
      "event": "submitted",
      "status": "submitted",
      "detail": "Sandbox: gateway accepted (simulated)",
      "at": "2026-11-07T17:00:42.256091+00:00",
      "metadata": null
    }
  ]
}
HTTPcodeMessage
401unauthorizedNot authenticated
403insufficient_scopeThis API key is not authorised for this action.
404not_foundMessage not found
429rate_limitedToo many requests. Try again in a moment.

Cancel a scheduled message

POST /v1/messages/{message_id}/cancel

Cancel a scheduled single message before it is dispatched. The amount charged when it was scheduled is refunded to the wallet.

Who can call it: API key with the send scope, or a dashboard session token.

Path valueTypeMeaning
message_idstringThe message id.
curl -X POST "https://api.sms.jtnoble.com/v1/messages/MESSAGE_ID/cancel" \
  -H "Authorization: Bearer $JTSMS_API_KEY"
const resp = await fetch('https://api.sms.jtnoble.com/v1/messages/MESSAGE_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/messages/MESSAGE_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/messages/MESSAGE_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": "test_a19286d8ca4d4a59af98bdeb2233b77a",
  "status": "cancelled",
  "refund": null
}
HTTPcodeMessage
401unauthorizedNot authenticated
403insufficient_scopeThis API key is not authorised for this action.
404not_foundMessage not found
409not_cancellable
429rate_limitedToo many requests. Try again in a moment.

Retry a failed message

POST /v1/messages/{message_id}/retry

Who can call it: API key with the send scope, or a dashboard session token.

Path valueTypeMeaning
message_idstringThe message id.
curl -X POST "https://api.sms.jtnoble.com/v1/messages/MESSAGE_ID/retry" \
  -H "Authorization: Bearer $JTSMS_API_KEY"
const resp = await fetch('https://api.sms.jtnoble.com/v1/messages/MESSAGE_ID/retry', {
  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/messages/MESSAGE_ID/retry",
    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/messages/MESSAGE_ID/retry');
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": "6f1c2b9e-1d2a-4c55-9a0e-2b7f0c1d3e4f",
  "status": "submitted",
  "retry_count": 1
}
HTTPcodeMessage
400bad_request
400sandbox_no_retrySandbox (test) messages cannot be retried.
400unsupported_wallet_currency
401unauthorizedNot authenticated
402insufficient_balanceInsufficient balance to retry this message.
403insufficient_scopeThis API key is not authorised for this action.
404not_foundMessage not found
409delivery_being_confirmedThis message is still being confirmed with the network.
429rate_limitedToo many requests. Try again in a moment.

Price a message (short path)

POST /v1/rate

Price a message BEFORE sending - no charge, no delivery.

Who can call it: Any API key, or a dashboard session token.

Body (JSON):

FieldTypeRequiredDefaultMeaning
tostring or array of stringYesMobile number in international format, for example +2348030000000. Also accepted: 2348030000000, or 08030000000 in your default country.
textstringYesThe message.
routestringNoRoute code. Only NG exists; leave it out.
curl -X POST "https://api.sms.jtnoble.com/v1/rate" \
  -H "Authorization: Bearer $JTSMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":["+2348030001111","+2348030001112"],"text":"Muli bwanji? Moni kuchokera ku JTSMS"}'
const resp = await fetch('https://api.sms.jtnoble.com/v1/rate', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({"to":["+2348030001111","+2348030001112"],"text":"Muli bwanji? Moni kuchokera ku JTSMS"}),
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.post(
    "https://api.sms.jtnoble.com/v1/rate",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    json={"to":["+2348030001111","+2348030001112"],"text":"Muli bwanji? Moni kuchokera ku JTSMS"},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/rate');
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":["+2348030001111","+2348030001112"],"text":"Muli bwanji? Moni kuchokera ku JTSMS"}',
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 200:

{
  "encoding": "GSM7",
  "segments": 1,
  "characters": 35,
  "units": 35,
  "over_segment_cap": false,
  "max_segments": 10,
  "wallet_currency": "USD",
  "wallet_balance": 0,
  "recipients": [
    {
      "to": "+2348030001111",
      "country": "NG",
      "route": "NG",
      "routable": true,
      "segments": 1,
      "encoding": "GSM7",
      "price_per_segment": 0.0116,
      "route_currency": "USD",
      "cost_route": 0.0116,
      "cost_wallet": 0.0116
    },
    {
      "to": "+2348030001112",
      "country": "NG",
      "route": "NG",
      "routable": true,
      "segments": 1,
      "encoding": "GSM7",
      "price_per_segment": 0.0116,
      "route_currency": "USD",
      "cost_route": 0.0116,
      "cost_wallet": 0.0116
    }
  ],
  "routable_count": 2,
  "unroutable": [],
  "total_cost": 0.0232,
  "affordable": false
}
HTTPcodeMessage
400bad_requestRate check is limited to 1000 recipients per call
401unauthorizedNot authenticated
422validation_errorRequest validation failed
429rate_limitedToo many requests. Try again in a moment.

Check phone numbers (short path)

POST /v1/validate

Validate recipient numbers before sending - format, validity, line type and assigned carrier (offline libphonenumber; no HLR network call, no charge). Reject non-mobile or invalid numbers early to save spend.

Who can call it: Any API key, or a dashboard session token.

Body (JSON):

FieldTypeRequiredDefaultMeaning
phonestring or array of stringYesMobile number in international format.
curl -X POST "https://api.sms.jtnoble.com/v1/validate" \
  -H "Authorization: Bearer $JTSMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phone":["+2348038123456","12345"]}'
const resp = await fetch('https://api.sms.jtnoble.com/v1/validate', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({"phone":["+2348038123456","12345"]}),
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.post(
    "https://api.sms.jtnoble.com/v1/validate",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    json={"phone":["+2348038123456","12345"]},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/validate');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"phone":["+2348038123456","12345"]}',
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 200:

{
  "count": 2,
  "valid": 1,
  "invalid": 1,
  "mobile": 1,
  "results": [
    {
      "input": "+2348038123456",
      "e164": "+2348038123456",
      "valid": true,
      "possible": true,
      "country": "NG",
      "type": "mobile",
      "carrier": "MTN",
      "location": "Nigeria",
      "national": "0888 12 34 56",
      "reason": null
    },
    {
      "input": "12345",
      "e164": null,
      "valid": false,
      "possible": false,
      "country": null,
      "type": null,
      "carrier": null,
      "location": null,
      "national": null,
      "reason": "parse_error"
    }
  ]
}
HTTPcodeMessage
400bad_requestValidation is limited to 1000 numbers per call
401unauthorizedNot authenticated
422validation_errorRequest validation failed
429rate_limitedToo many requests. Try again in a moment.

On this page