Buluthat SMS API
Bulk SMS, personalized SMS, OTP (verification code) SMS, inbound SMS, delivery report and blocklist.
- Address:
https://api.buluthat.com/api/sms.php?action=<eylem> - Identity:
Authorization: Bearer <anahtar>(orX-Api-Key: <anahtar>). Key: Panel > Bulk SMS > API and Settings. - Body: JSON (
Content-Type: application/json) or a form. Responses are JSON, UTF-8. - Error:
{"ok":false,"error":"<kod>","message":"<açıklama>"}+ HTTP 4xx/5xx. - Numbers
05321234567,5321234567,+905321234567,905321234567is accepted in the formats.
Message length
| Encoding | 1 SMS | 2 SMS | 3 SMS | … 7 SMS |
|---|---|---|---|---|
| Standard | 160 | 306 | 459 | 1071 |
| Turkish (if it contains Ş ş Ğ ğ ç ı İ) | 155 | 298 | 447 | 1043 |
| Unicode (emoji, etc.) | 70 | 134 | 201 | 469 |
^ { } \ [ ] ~ | € counts as two characters. Ö ö Ü ü Ç are in the standard encoding.
Send — send (POST)
{
"header": "FIRMAADI",
"message": "Merhaba {ad}, {tutar} TL ödemeniz alınmıştır.",
"recipients": [
{"phone": "05321234567", "name": "Ayşe Yılmaz", "tutar": "1.250", "ref": "CARI-17"},
{"phone": "05331234567", "name": "Mehmet Kaya", "tutar": "300"}
],
"send_at": "2026-10-01 10:00",
"is_commercial": false,
"valid_for": "24:00",
"rate_per_minute": 500,
"custom_ref": "EYLUL-KAMPANYA"
}
| Field | Description |
|---|---|
header | Approved sender ID. If empty, the default sender ID. |
message | Text. Placeholders: {ad} {soyad} {adsoyad} {telefon} {firma} {ret_link} + the recipient's other fields. |
recipients | [{phone, name?, ref?, <alan>…}]. The same number is sent once. |
phones | Shortcut: ["0532…","0533…"] or comma-separated text (the same message to everyone). |
messages | A completely different text per person: [{phone, message, ref?}] (in this case message not required). |
send_at | Future date (at most 90 days). If empty, immediately. |
is_commercial | Commercial message. true if iys_recipient_type: BIREYSEL / TACIR; it is not sent to recipients without IYS consent. |
valid_for | If the phone is off, the trial period, SS:DD (00:01 – 48:00). |
rate_per_minute | Sending per minute (0 = fastest). |
custom_ref | Your own reference; status is queried with. |
Response:
{"ok":true,"data":{"campaign_id":152,"status":"queued","recipients":2,"credits":2,
"skipped":{"invalid":0,"blacklist":0,"duplicate":0}, ...}}
Blocklisted and invalid numbers, and (if duplicate protection is on) numbers that have already received the same text today, are skipped; no credit is deducted. The credit for an undelivered message is refunded automatically.
Error codes: missing_recipients, missing_message, request_failed (insufficient credits, unapproved sender ID, message too long… — message reveals), account_inactive.
Report — status (GET)
?action=status&campaign_id=152 or &custom_ref=EYLUL-KAMPANYA; optional status, phone, limit (≤1000), offset.
Message statuses: queued (in queue), sending, waiting (waiting for carrier report), delivered, failed, expired, rejected, cancelled.
Other actions
| Action | Method | Description |
|---|---|---|
balance | GET | {"sms":1200,"otp":500,"lots":[…]} remaining credits and expiry dates |
headers | GET | Approved sender IDs |
campaigns | GET | Send list (from, to, limit, offset) |
cancel | POST | campaign_id — unsent messages are cancelled, credit refunded |
inbound | GET | Inbound SMS: since_id, limit → [{id, from, to, keyword, text, optout, received_at}] |
blacklist | GET | Blocklist |
blacklist_add / blacklist_remove | POST | phones: ["0532…"] |
OTP SMS
POST ?action=otp_send {"phone":"05321234567","reference":"UYE-1452"}
→ {"ok":true,"data":{"id":88,"status":"sent","expires_at":"…"},"code":"482913"}
POST ?action=otp_verify {"id":88,"code":"482913"}
→ {"ok":true,"verified":true}
hata: wrong_code | expired | too_many_attempts | already_verified | not_found
GET ?action=otp_status&id=88
- You can also provide the code yourself (
code, 4-10 digits); if we generate it, it is returned only once in this response, and only the hash is stored. templateyou can change the text with ({kod}mandatory,{firma},{sure}).- OTP is deducted from OTP credits first, then from SMS credits; it is sent without waiting.
- There is a limit of 10 sends to the same number per minute.
Webhook
If you enter an address under Panel > Bulk SMS > API and Settings, events are POSTed:
X-Buluthat-Event: sms.delivery | sms.inbound | sms.optout
X-Buluthat-Signature: sha256=<HMAC-SHA256(gövde, sır)>
{"event":"delivery","data":{"message_id":9012,"campaign_id":152,"ref":"CARI-17",
"phone":"905321234567","status":"delivered","detail":"İletildi","done_at":"…"}}
{"event":"inbound","data":{"id":44,"from":"905321234567","to":"…","keyword":"","text":"…","optout":false}}
If you don't return 2xx, it is retried after 1 min, 5 min, 15 min, 1 h, 3 h, 6 h.
Example (PHP)
$ch = curl_init('https://api.buluthat.com/api/sms.php?action=send');
curl_setopt_array($ch, [
CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $key, 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['message' => 'Siparişiniz kargoda.', 'phones' => ['05321234567']]),
]);
$res = json_decode(curl_exec($ch), true);
