Resellers
Every resellers route, with request, response, errors and samples in curl, Node, Python and PHP.
See the overview for sign-in and the error shape.
List your clients
GET /v1/reseller/clients
Who can call it: A reseller signed in to the dashboard (session token). API keys are refused.
| Query | Type | Required | Default | Meaning |
|---|---|---|---|---|
reseller_id | string | No | ||
search | string | No | Search text. |
curl -X GET "https://api.sms.jtnoble.com/v1/reseller/clients" \
-H "Authorization: Bearer $JTSMS_SESSION_TOKEN"const resp = await fetch('https://api.sms.jtnoble.com/v1/reseller/clients', {
method: 'GET',
headers: { Authorization: `Bearer ${process.env.JTSMS_SESSION_TOKEN}` },
});
console.log(resp.status, await resp.text());import os
import requests
resp = requests.get(
"https://api.sms.jtnoble.com/v1/reseller/clients",
headers={"Authorization": f"Bearer {os.environ['JTSMS_SESSION_TOKEN']}"},
timeout=30,
)
print(resp.status_code, resp.text)<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/reseller/clients');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_SESSION_TOKEN')],
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;HTTP 200:
{
"clients": [
{
"user_id": "3f0c7a52-6d1e-4b9a-8f21-7c5e2a9d1b40",
"reseller_id": "8b2d6c14-0f3a-4e77-a1c9-5d2e7f9b3c60",
"email": "client@example.mw",
"name": "Client Ltd",
"phone": "+2348030000000",
"phone_number": "+2348030000000",
"balance": 0.4,
"currency": "USD",
"created_at": "2026-11-07T10:00:00+00:00"
}
],
"total": 0.0004,
"balance": 2,
"currency": "USD"
}| HTTP | code | Message |
|---|---|---|
| 401 | unauthorized | Not authenticated |
| 403 | reseller_only | Reseller access required. |
| 429 | rate_limited | Too many requests. Try again in a moment. |
Create a client
POST /v1/reseller/clients
Who can call it: A reseller signed in to the dashboard (session token). API keys are refused.
| Query | Type | Required | Default | Meaning |
|---|---|---|---|---|
reseller_id | string | No |
Body (JSON):
| Field | Type | Required | Default | Meaning |
|---|---|---|---|---|
email | string | Yes | Email address. | |
name | string | Yes | A name. | |
phone | string | No | Mobile number in international format. | |
company_name | string | No |
curl -X POST "https://api.sms.jtnoble.com/v1/reseller/clients" \
-H "Authorization: Bearer $JTSMS_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"email":"client@example.mw","name":"Client Ltd"}'const resp = await fetch('https://api.sms.jtnoble.com/v1/reseller/clients', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.JTSMS_SESSION_TOKEN}`, 'Content-Type': 'application/json' },
body: JSON.stringify({"email":"client@example.mw","name":"Client Ltd"}),
});
console.log(resp.status, await resp.text());import os
import requests
resp = requests.post(
"https://api.sms.jtnoble.com/v1/reseller/clients",
headers={"Authorization": f"Bearer {os.environ['JTSMS_SESSION_TOKEN']}"},
json={"email":"client@example.mw","name":"Client Ltd"},
timeout=30,
)
print(resp.status_code, resp.text)<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/reseller/clients');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_SESSION_TOKEN'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"email":"client@example.mw","name":"Client Ltd"}',
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;HTTP 200:
{
"user_id": "3f0c7a52-6d1e-4b9a-8f21-7c5e2a9d1b40",
"reseller_id": "8b2d6c14-0f3a-4e77-a1c9-5d2e7f9b3c60",
"email": "client@example.mw",
"name": "Client Ltd",
"phone": null,
"phone_number": null,
"company_name": null,
"balance": 0,
"currency": "USD",
"created": true
}| HTTP | code | Message |
|---|---|---|
| 400 | reseller_required | Pass reseller_id to create a client for a reseller. |
| 401 | unauthorized | Not authenticated |
| 403 | reseller_only | Reseller access required. |
| 409 | client_of_other_reseller | This account belongs to another reseller. |
| 422 | invalid_email | Enter a valid email address. |
| 422 | invalid_phone | Enter a mobile number in international format, for example +2348030000000. |
| 422 | validation_error | Request validation failed |
| 429 | rate_limited | Too many requests. Try again in a moment. |
Move balance to a client
POST /v1/reseller/clients/{user_id}/transfer
Who can call it: A reseller signed in to the dashboard (session token). API keys are refused.
| Path value | Type | Meaning |
|---|---|---|
user_id | string | The client's user id. |
Body (JSON):
| Field | Type | Required | Default | Meaning |
|---|---|---|---|---|
amount | number | Yes | Amount in your balance currency. | |
note | string | No | A short note. |
curl -X POST "https://api.sms.jtnoble.com/v1/reseller/clients/USER_ID/transfer" \
-H "Authorization: Bearer $JTSMS_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"amount":1000,"note":"November"}'const resp = await fetch('https://api.sms.jtnoble.com/v1/reseller/clients/USER_ID/transfer', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.JTSMS_SESSION_TOKEN}`, 'Content-Type': 'application/json' },
body: JSON.stringify({"amount":1000,"note":"November"}),
});
console.log(resp.status, await resp.text());import os
import requests
resp = requests.post(
"https://api.sms.jtnoble.com/v1/reseller/clients/USER_ID/transfer",
headers={"Authorization": f"Bearer {os.environ['JTSMS_SESSION_TOKEN']}"},
json={"amount":1000,"note":"November"},
timeout=30,
)
print(resp.status_code, resp.text)<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/reseller/clients/USER_ID/transfer');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_SESSION_TOKEN'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"amount":1000,"note":"November"}',
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;HTTP 200:
{
"status": "success",
"reference": "6a1f0c9e2b7d4c3a9e5f1d2037c8a410",
"amount": 0.4,
"currency": "USD",
"credited": 0.4,
"client_currency": "USD",
"reseller_balance": 1.6,
"client_balance": 0.8
}| HTTP | code | Message |
|---|---|---|
| 400 | invalid_transfer | Cannot transfer to yourself. |
| 401 | unauthorized | Not authenticated |
| 402 | insufficient_balance | Your balance is too low for this transfer. |
| 403 | reseller_only | Reseller access required. |
| 404 | client_not_found | This account is not one of your clients. |
| 422 | unsupported_currency | The two balances use currencies that cannot be converted. |
| 422 | validation_error | Request validation failed |
| 429 | rate_limited | Too many requests. Try again in a moment. |
Reseller totals
GET /v1/reseller/summary
Who can call it: A reseller signed in to the dashboard (session token). API keys are refused.
| Query | Type | Required | Default | Meaning |
|---|---|---|---|---|
days | integer | No | 30 |
curl -X GET "https://api.sms.jtnoble.com/v1/reseller/summary" \
-H "Authorization: Bearer $JTSMS_SESSION_TOKEN"const resp = await fetch('https://api.sms.jtnoble.com/v1/reseller/summary', {
method: 'GET',
headers: { Authorization: `Bearer ${process.env.JTSMS_SESSION_TOKEN}` },
});
console.log(resp.status, await resp.text());import os
import requests
resp = requests.get(
"https://api.sms.jtnoble.com/v1/reseller/summary",
headers={"Authorization": f"Bearer {os.environ['JTSMS_SESSION_TOKEN']}"},
timeout=30,
)
print(resp.status_code, resp.text)<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/reseller/summary');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_SESSION_TOKEN')],
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;HTTP 200:
{
"reseller_id": "8b2d6c14-0f3a-4e77-a1c9-5d2e7f9b3c60",
"days": 30,
"currency": "USD",
"clients": [
{
"user_id": "3f0c7a52-6d1e-4b9a-8f21-7c5e2a9d1b40",
"name": "Client Ltd",
"email": "client@example.mw",
"balance": 0.4,
"messages": 120,
"segments": 130,
"revenue": 2600
}
]
}| HTTP | code | Message |
|---|---|---|
| 401 | unauthorized | Not authenticated |
| 403 | reseller_only | Reseller access required. |
| 429 | rate_limited | Too many requests. Try again in a moment. |