Send SMS API (send-sms)
The send-sms endpoint delivers an SMS to one or many mobile numbers in a single request. Each request is treated as an order; the response returns an orderId you can use to retrieve delivery reports or cancel scheduled orders. One order per request, one sender (header) per order.
Prerequisite: enable API access in the panel
Before calling this endpoint, the Allow API access toggle must be on in your iletiMerkezi panel.
Location:
panel.iletimerkezi.com→ Settings → Security → Access PermissionsIf it is off, every request returns
401 — Üyelik bilgileri hatalı("Authentication failed"). See authentication.md for details.
Endpoint
| Field | Value | |---|---| | Method | POST | | URL | https://api.iletimerkezi.com/v1/send-sms/json | | Content-Type | application/json | | Auth | API Key + Hash (request.authentication) |
Request
Schema
request
├─ authentication
│ ├─ key (string, required)
│ └─ hash (string, required)
└─ order
├─ sender (string, required) — sender ID approved in panel, max 11 chars
├─ iys (string, required) — "1" or "0"
├─ iysList (string, conditional) — if iys=1, "BIREYSEL" or "TACIR"
├─ sendDateTime (string[], optional) — future schedule, format "DD/MM/YYYY HH:MM"
└─ message
├─ text (string, required) — SMS body
└─ receipents
└─ number (string[], required) — accepts 905XXXXXXXXX, +905XXXXXXXXX, 5XXXXXXXXXThe
iysfield is always required. For commercial messages (campaigns, promotions, greetings) send"1"along with a validiysList(BIREYSELfor individuals,TACIRfor businesses); failure to do so may trigger legal penalties under Turkish regulation. For transactional messages (notifications, OTP, delivery, regulatory), send"0";iysListis then ignored.
The
receipents(sic.) field sits insidemessage, not directly underorder. Some legacy examples place it asorder.receipents— that is incorrect; the correct path isorder.message.receipents.
Full example
{
"request": {
"authentication": {
"key": "API_KEY",
"hash": "API_HASH"
},
"order": {
"sender": "YOURBRAND",
"iys": "0",
"message": {
"text": "Order #1234 prepared and shipped.",
"receipents": {
"number": ["905XXXXXXXXX"]
}
}
}
}
}For multiple recipients, add to the same number array:
"receipents": {
"number": ["905XXXXXXXXX", "905YYYYYYYYY", "905ZZZZZZZZZ"]
}Response
Success (200)
{
"response": {
"status": {
"code": 200,
"message": "İşlem başarılı"
},
"order": {
"id": "312891245"
}
}
}İşlem başarılı means "Request successful" in Turkish.
Fields:
response.status.code(integer): internal status code, mirrors the HTTP coderesponse.status.message(string): human-readable Turkish messageresponse.order.id(string): unique numeric order ID. Use it withget-reportto fetch delivery reports, or to cancel a scheduled order.
Error responses
401 — Üyelik bilgileri hatalı ("Authentication failed")
API Key / Hash invalid, or the panel toggle is off. See authentication.md.
451 — Tekrar eden sipariş ("Duplicate order")
The same sender + recipient + text was sent again within a short window (idempotency guard). Vary the message text or check the previous order's status with get-report before retrying.
452 — Mesaj alıcıları hatalı ("Invalid recipients")
receipents.number is empty, malformed, or the field is missing. The most common cause: receipents placed directly under order instead of under order.message. Check the path first.
Other error codes
For the full table of 400, 402, 450, 453, 454, 457, 468, 469, 470: see error-codes.md.
Code samples
cURL
curl -X POST 'https://api.iletimerkezi.com/v1/send-sms/json' \
-H 'Content-Type: application/json' \
-d '{
"request": {
"authentication": {
"key": "'"$ILETIMERKEZI_API_KEY"'",
"hash": "'"$ILETIMERKEZI_API_HASH"'"
},
"order": {
"sender": "YOURBRAND",
"iys": "0",
"message": {
"text": "Order prepared and shipped.",
"receipents": { "number": ["905XXXXXXXXX"] }
}
}
}
}'Common pitfalls
- Misplacing
receipents. The correct path isorder.message.receipents.number[], notorder.receipents. Legacy examples may show the wrong nesting; if you hit a452, check this first. iysis required, with no default. Skip it and the request fails. Commercial messages must use"1"plus a validiysList; otherwise legal action under Turkish IYS regulations is possible.- Sender must be approved in the panel. Sender IDs like
YOURBRANDneed panel approval before they can be used. Pull the approved list withget-sender. While approval is pending, you can set the sender to"APITEST"to test the HTTP integration (the message body is replaced with a fixed test text, but the full request/response/report flow runs). See test-mode. - Watch for duplicate orders. Sending the same
sender + recipient + textin quick succession returns451. For idempotent calls, append a unique reference (order ID, timestamp) to the text. - Number format is flexible but stay consistent.
905XXXXXXXXX,+905XXXXXXXXX, and5XXXXXXXXXare all accepted. Pick one (preferably905XXXXXXXXX, 12 digits) for easier debugging. - International numbers require abroad mode. To send to country codes outside Turkey (
+49,+44, etc.), enable abroad mode under Settings → SMS → Abroad in the panel. Activation converts your credit balance to a TL balance and the account stays in TL mode. See overview. - Compare balance before and after. Use
get-balanceon each side of a test send. Message length (eMarka limits, lower than standard SMS due to the B186 prefix: English 155/153, Turkish 150/148, Unicode 65/63), character mode, scheduled orders, and multi-part splits all affect credit consumption. See overview. - Up to 7 parts / ~1071 characters. A single message cannot exceed 7 concatenated parts. Longer content must be shortened or split via an iim.to short link.
- Undelivered SMS are free. Messages that fail to reach the recipient (off network, invalid number, blacklist) do not consume credit. Read actual consumption from
get-report— thedeliveredcounter andpricefield. - 11-character sender limit. Maximum 11 alphanumeric characters; spaces count.
- Save characters with short links. Pasting long URLs in the body burns through the first-SMS limit (155 / 150 / 65 depending on character set) fast. Create an
iim.to/...short link in the iletiMerkezi panel and paste it instead — click tracking and the auto opt-out flow run through this link. Short links are managed in the panel today; there is no separate API endpoint.
Related
- Authentication
- Approved sender IDs (get-sender)
- Delivery report (get-report)
- Get balance
- Error code table
Last updated: 2026-04-29 · Türkçe