Developers
Technical details for your engineers.
SMPP and HTTP for SMS, SIP for voice, and REST APIs with one auth scheme, one error format and signed webhooks for messaging, fintech and AI.
Full API reference available to sandbox users.
export SBT_API_KEY=sbt_test_••••curl https://api.sbtpty.com/v1/balance -H "Authorization: Bearer $SBT_API_KEY"{ "currency": "USD", "available": 25.00, "mode": "test" }Quickstart.
Get your test key
Request sandbox access. You'll receive a test key that starts with sbt_test_.
Make a test call to the API
Call any product endpoint with your key in the Authorization header.
Receive a webhook
Add your endpoint URL in the console and verify the signature on each event.
API surface.
All endpoints live under https://api.sbtpty.com/v1. Examples shown; the full reference comes with sandbox access.
| Method | Endpoint | What it does |
|---|---|---|
| Messaging | ||
| POST | /v1/messages | Send SMS, RCS or WhatsApp |
| GET | /v1/messages/{id} | Get message status |
| POST | /v1/verify | Start a verification |
| POST | /v1/verify/{id}/check | Check a code |
| GET | /v1/lookup/{number} | Number validity, type and operator |
| Fintech | ||
| GET | /v1/topups/products | List top-up products for a number |
| POST | /v1/topups | Send a top-up |
| POST | /v1/codes/orders | Buy a PIN or gift card |
| POST | /v1/payments/links | Create a payment link |
| POST | /v1/esims | Issue an eSIM |
| AI & account | ||
| POST | /v1/ai/completions | Call an AI model |
| GET | /v1/balance | Get account or sub-account balance |
Code samples.
# Send an SMS
curl https://api.sbtpty.com/v1/messages \
-H "Authorization: Bearer $SBT_API_KEY" \
-H "Idempotency-Key: 6f1c2b7e" \
-H "Content-Type: application/json" \
-d '{ "channel": "sms", "from": "SBTDEMO", "to": "+50760000000", "text": "Your code is 482915" }'// Send an SMS (Node.js 18+)
const res = await fetch("https://api.sbtpty.com/v1/messages", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.SBT_API_KEY}`,
"Idempotency-Key": "6f1c2b7e",
"Content-Type": "application/json"
},
body: JSON.stringify({ channel: "sms", from: "SBTDEMO", to: "+50760000000", text: "Your code is 482915" })
});
console.log(await res.json()); // { id: "msg_8Kq2", status: "queued" }# Send an SMS (Python, requests)
import os, requests
r = requests.post(
"https://api.sbtpty.com/v1/messages",
headers={"Authorization": f"Bearer {os.environ['SBT_API_KEY']}", "Idempotency-Key": "6f1c2b7e"},
json={"channel": "sms", "from": "SBTDEMO", "to": "+50760000000", "text": "Your code is 482915"},
)
print(r.json()["status"])<?php
// Send an SMS (PHP 8, cURL)
$ch = curl_init("https://api.sbtpty.com/v1/messages");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("SBT_API_KEY"),
"Idempotency-Key: 6f1c2b7e",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"channel" => "sms", "from" => "SBTDEMO", "to" => "+50760000000", "text" => "Your code is 482915",
]),
]);
echo curl_exec($ch);# Send a top-up
curl https://api.sbtpty.com/v1/topups \
-H "Authorization: Bearer $SBT_API_KEY" \
-H "Idempotency-Key: order-10293" \
-H "Content-Type: application/json" \
-d '{ "phone": "+50760000000", "product": "airtime", "amount": 10, "currency": "USD", "reference": "order-10293" }'// Send a top-up (Node.js 18+)
const res = await fetch("https://api.sbtpty.com/v1/topups", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.SBT_API_KEY}`,
"Idempotency-Key": "order-10293",
"Content-Type": "application/json"
},
body: JSON.stringify({ phone: "+50760000000", product: "airtime", amount: 10, currency: "USD", reference: "order-10293" })
});
console.log(await res.json()); // { id: "top_41Za", status: "processing" }# Send a top-up (Python, requests)
import os, requests
r = requests.post(
"https://api.sbtpty.com/v1/topups",
headers={"Authorization": f"Bearer {os.environ['SBT_API_KEY']}", "Idempotency-Key": "order-10293"},
json={"phone": "+50760000000", "product": "airtime", "amount": 10, "currency": "USD", "reference": "order-10293"},
)
print(r.json()["status"])<?php
// Send a top-up (PHP 8, cURL)
$ch = curl_init("https://api.sbtpty.com/v1/topups");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("SBT_API_KEY"),
"Idempotency-Key: order-10293",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"phone" => "+50760000000", "product" => "airtime", "amount" => 10,
"currency" => "USD", "reference" => "order-10293",
]),
]);
echo curl_exec($ch);# Call a model
curl https://api.sbtpty.com/v1/ai/completions \
-H "Authorization: Bearer $SBT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "text-fast", "messages": [{ "role": "user", "content": "Summarize: order delayed, customer wants refund" }] }'// Call a model (Node.js 18+)
const res = await fetch("https://api.sbtpty.com/v1/ai/completions", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.SBT_API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "text-fast",
messages: [{ role: "user", content: "Summarize: order delayed, customer wants refund" }]
})
});
console.log((await res.json()).output);# Call a model (Python, requests)
import os, requests
r = requests.post(
"https://api.sbtpty.com/v1/ai/completions",
headers={"Authorization": f"Bearer {os.environ['SBT_API_KEY']}"},
json={"model": "text-fast", "messages": [{"role": "user", "content": "Summarize: order delayed, customer wants refund"}]},
)
print(r.json()["output"])<?php
// Call a model (PHP 8, cURL)
$ch = curl_init("https://api.sbtpty.com/v1/ai/completions");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("SBT_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"model" => "text-fast",
"messages" => [["role" => "user", "content" => "Summarize: order delayed, customer wants refund"]],
]),
]);
echo json_decode(curl_exec($ch), true)["output"];REST, SMPP and webhooks.
REST
JSON over HTTPS for every product. Versioned under /v1.
SMPP
SMPP v3.4 for high-volume messaging, with TLS on request and DLRs by deliver_sm.
Webhooks
HTTPS POST for every status change, signed with HMAC-SHA256.
| Host | Provided at onboarding |
|---|---|
| Port | Provided at onboarding |
| TLS port | Provided at onboarding |
| system_id | Provided at onboarding |
| password | Provided at onboarding |
| Bind types | Provided at onboarding |
Webhook events.
Each event includes a type, an ID, a timestamp and the related object. We sign every request in the SBT-Signature header and retry with backoff if your endpoint doesn't answer with a 2xx.
Sample data
| Event | When it fires |
|---|---|
| message.delivered | A message reached the handset |
| message.failed | A message could not be delivered |
| message.received | A customer replied (MO) |
| verify.approved | A code was checked successfully |
| verify.blocked | PumpGuard blocked a request |
| topup.completed | A top-up was applied |
| code.delivered | A PIN or gift card was issued |
| payment.succeeded | A payment was captured |
| esim.activated | An eSIM was installed and activated |
| tokens.threshold_reached | A sub-account hit an alert threshold |
| balance.low | Balance fell below your alert level |
Auth and security.
- Bearer API keys, separate for test and live
- Keys per sub-account, with optional scopes per product
- IP allowlisting for API and SMPP
- HMAC-signed webhooks
- Idempotency-Key header on every POST
- TLS everywhere
A sandbox that behaves like production.
Same endpoints, same responses, same webhooks. Use test numbers to simulate delivered, failed and replied messages, test phone numbers for top-ups and test credits for AI.
- Magic numbers for every status
- Test credits included
- Switch to live by swapping your key
Conventions.
- Errors
- Every error returns an HTTP status and a JSON body with a stable code and a readable message.
- Pagination
- Cursor-based, with limit and starting_after.
- Rate limits
- Set per account and returned in response headers.
- Versioning
- Breaking changes ship as a new version. /v1 stays stable.
{
"error": {
"code": "insufficient_balance",
"message": "Your balance is too low for this request.",
"request_id": "req_93Hf"
}
}Developer FAQ.
Not seeing your question? info@sbtpty.com
01Is there an SDK?
Our API is plain REST and JSON, so any HTTP client works. Copy-ready samples cover cURL, Node.js, Python and PHP.
02Can I use SMPP and REST on the same account?
Yes. Both share your balance, reports and webhooks.
03How do I test inbound SMS?
In the sandbox, send a request to a test number set to reply, and you'll receive a message.received webhook.
04How do I move to production?
Complete business verification, fund your balance or activate partner terms, then replace your test key with a live key.
Need credentials or a technical call?
Tell us how you want to connect: SMPP, HTTP, SIP or REST.