Welcome to the ultimate developer's hub. The TurkeySMS API delivers robust, secure, and scalable programmatic solutions to integrate SMS capabilities directly into your digital ecosystem — whether you're building web platforms, mobile apps, or enterprise ERP systems.
Our API is engineered to perform seamlessly across all modern environments, including Node.js, Python, PHP, and C#. We provide comprehensive SDKs and dedicated tools to minimize integration time while maximizing message delivery performance.
Experience the power of our API in real-time. Our interactive documentation allows you to test endpoints, view schemas, and understand response structures directly from your browser.
Fully compatible with OpenAPI 3.0 specs. Try out SMS, OTP, and reports without writing a single line of code.
Launch Interactive Docs →
Integrating with TurkeySMS empowers you to establish intelligent, real-time communication channels. From automated system triggers to multi-factor authentication (OTP), we provide the reliable backbone for your communications, meeting the highest international security standards.
To ensure a successful integration and maintain regulatory compliance, please verify the following requirements:
For accounts in Turkey, a valid Digital Signature (E-imza) is required to complete legal registration and service activation.
Ensure your account has sufficient balance for the API to process and dispatch your sending requests successfully.
You must have an approved Sender ID (Alphanumeric Title) to be clearly identified by your recipients.
Start sending your first SMS in just 3 steps:
Download the TurkeySmsClient_EN.php file, include it in your project, and use the following code:
require_once 'TurkeySmsClient_EN.php'; $client = new TurkeySmsClient('YOUR_API_KEY'); $result = $client->sendSms('SenderID', '905xxxxxxxxx', 'Hello!'); if ($client->isLastSuccess()) { echo "✅ Sent! ID: " . $result['sms_id']; }
import requests url = "https://api.turkeysms.com.tr/sms/send" data = { "api_key": "YOUR_API_KEY", "title": "SenderID", "sentto": "905xxxxxxxxx", "text": "Hello!" } result = requests.post(url, json=data).json() print(result)
const axios = require('axios'); const result = await axios.post('https://api.turkeysms.com.tr/sms/send', { api_key: 'YOUR_API_KEY', title: 'SenderID', sentto: '905xxxxxxxxx', text: 'Hello!' }); console.log(result.data);
Authentication is handled using your unique API key, sent within the JSON request body. You can find your API key in your control panel under My Account → API Settings.
Verify your API key and retrieve all granted permissions (Sending, OTP, Balance) along with the current account status.
curl -X POST https://api.turkeysms.com.tr/auth/check \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY" }'
$ch = curl_init("https://api.turkeysms.com.tr/auth/check"); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode(["api_key" => "YOUR_API_KEY"]), CURLOPT_HTTPHEADER => ['Content-Type: application/json'], ]); echo curl_exec($ch);
result = requests.post("https://api.turkeysms.com.tr/auth/check", json={"api_key": "YOUR_API_KEY"}).json() print(result)
const r = await axios.post('https://api.turkeysms.com.tr/auth/check', { api_key: 'YOUR_API_KEY' }); console.log(r.data);
{ "result": true, "result_code": "TS-1000", "key_details": { "status": "Active", "permissions": { "post_request": true, "send_single_sms": true, "send_otp": true, "check_balance": true } }, "account_summary": { "account_status": "Active", "balance": { "main": 1500, "international": 250 } } }
Send a single SMS to a specific phone number with a POST request:
| Parameter | Type | Status | Description |
|---|---|---|---|
| api_key | string | Required | Your unique API key. |
| title | string | Required | Your registered Sender ID (Case-sensitive). |
| text | string | Required | Message text. Fully supports Unicode. |
| sentto | string | Required | Recipient number in international format (e.g., 905xxxxxxxxx). Digits only. |
| report | int | Optional | Enable response report: 1, disable: 0. Default: 1 |
| sms_lang | int | Optional | 0 English, 1 Turkish, 2 Arabic/Unicode. Default: 2 |
| content_type | int | Optional | 0 Transactional, 1 High Quality, 2 Advertising. Default: 0 |
| response_type | string | Optional | Response format: json or php. Default: json |
curl -X POST https://api.turkeysms.com.tr/sms/send \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "title": "MyCompany", "text": "Hello! This is a test message.", "sentto": "905xxxxxxxxx", "sms_lang": 0, "content_type": 0 }'
$data = [ "api_key" => "YOUR_API_KEY", "title" => "MyCompany", "text" => "Hello! This is a test message.", "sentto" => "905xxxxxxxxx", "sms_lang" => 0, "content_type" => 0, ]; $ch = curl_init("https://api.turkeysms.com.tr/sms/send"); curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode($data), CURLOPT_HTTPHEADER => ['Content-Type: application/json']]); echo curl_exec($ch);
result = requests.post("https://api.turkeysms.com.tr/sms/send", json={ "api_key": "YOUR_API_KEY", "title": "MyCompany", "text": "Hello! This is a test message.", "sentto": "905xxxxxxxxx", "sms_lang": 0, "content_type": 0, }).json() print(result)
const r = await axios.post('https://api.turkeysms.com.tr/sms/send', { api_key: 'YOUR_API_KEY', title: 'MyCompany', text: 'Hello! This is a test message.', sentto: '905xxxxxxxxx', sms_lang: 0, content_type: 0, }); console.log(r.data);
{ "result": true, "result_code": "TS-1024", "result_message": "SMS dispatched successfully.", "sms_id": 1000007721, "number_of_sms": 1, "sms_lang": "English", "content_type": "Transactional", "country": "Turkey-TR" }
Special endpoint for sending One-Time Passwords (OTP). Ensures ultra-fast delivery with the highest priority in the messaging queue.
| Parameter | Type | Status | Description |
|---|---|---|---|
| api_key | string | Required | Your unique API key. |
| mobile | string | Required | Recipient number in international format (e.g., 905xxxxxxxxx). |
| lang | int | Optional | 0 English, 1 Turkish, 2 Arabic. Default: 2 |
| digits | int | Optional | Number of OTP digits (4, 5, or 6). Default: 4 |
| report | int | Optional | Enable report: 1. Default: 1 |
| response_type | string | Optional | Response format: json or php. Default: json |
curl -X POST https://api.turkeysms.com.tr/otp/send \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "mobile": "905xxxxxxxxx", "lang": 0, "digits": 4 }'
$ch = curl_init("https://api.turkeysms.com.tr/otp/send"); curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode(["api_key" => "YOUR_API_KEY", "mobile" => "905xxxxxxxxx", "lang" => 0, "digits" => 4]), CURLOPT_HTTPHEADER => ['Content-Type: application/json']]); echo curl_exec($ch);
result = requests.post("https://api.turkeysms.com.tr/otp/send", json={"api_key": "YOUR_API_KEY", "mobile": "905xxxxxxxxx", "lang": 0, "digits": 4}).json() print(result)
const r = await axios.post('https://api.turkeysms.com.tr/otp/send', { api_key: 'YOUR_API_KEY', mobile: '905xxxxxxxxx', lang: 0, digits: 4 }); console.log(r.data);
Control the full OTP message text. You must include the keyword TS-CODE in the text — it will be automatically replaced with the generated OTP code. An active Sender ID is required.
curl -X POST https://api.turkeysms.com.tr/otp/detailed \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "mobile": "905xxxxxxxxx", "title": "YOUR_TITLE", "text": "Welcome! Your verification code is: TS-CODE", "lang": 0, "digits": 4 }'
curl_setopt_array($ch = curl_init("https://api.turkeysms.com.tr/otp/detailed"), [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode([ "api_key" => "YOUR_API_KEY", "mobile" => "905xxxxxxxxx", "title" => "YOUR_TITLE", "text" => "Your code: TS-CODE", "lang" => 0, "digits" => 4 ]), CURLOPT_HTTPHEADER => ['Content-Type: application/json'] ]); echo curl_exec($ch);
result = requests.post("https://api.turkeysms.com.tr/otp/detailed", json={ "api_key": "YOUR_API_KEY", "mobile": "905xxxxxxxxx", "title": "YOUR_TITLE", "text": "Your code: TS-CODE", "lang": 0, "digits": 4 }).json()
Schedule messages to be sent at a specific future date and time. Uses the same /sms/send endpoint with additional scheduling parameters.
curl -X POST https://api.turkeysms.com.tr/sms/send \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "title": "MyCompany", "text": "Scheduled message content", "sentto": "905xxxxxxxxx", "scheduled_sms": 1, "scheduled_date": "2026-12-31", "scheduled_time": "09:00" }'
Send messages to multiple recipients in two ways depending on your campaign needs.
Send a fixed message to a list of numbers.
curl -X POST https://api.turkeysms.com.tr/group/send \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "title": "SenderID", "text": "Universal message for all", "sentto": ["905000000001", "905000000002", "905000000003"] }'
Send personalized messages to each number (array indices must match).
curl -X POST https://api.turkeysms.com.tr/group/sendMixed \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "title": "SenderID", "text": ["Hello Alice", "Hello Bob"], "sentto": ["905000000001", "905000000002"] }'
sms_lang| Value | Language | Description |
|---|---|---|
| 0 | English | English (GSM 7-bit encoding) |
| 1 | Turkish | Turkish with special character support |
| 2 | Arabic / Unicode | Arabic or any UTF-8 language |
content_type| Value | Type | Description |
|---|---|---|
| 0 | Transactional | System notifications, alerts, OTP |
| 1 | High Quality | Premium delivery route |
| 2 | Advertising | Marketing & promotional messages |
Query your remaining SMS credits programmatically. Requires Check Balance permission in your API settings.
curl -X POST https://api.turkeysms.com.tr/balance/ \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY" }'
curl_setopt_array($ch = curl_init("https://api.turkeysms.com.tr/balance/"), [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode(["api_key" => "YOUR_API_KEY"]), CURLOPT_HTTPHEADER => ['Content-Type: application/json']]); echo curl_exec($ch);
result = requests.post("https://api.turkeysms.com.tr/balance/", json={"api_key": "YOUR_API_KEY"}).json() print(result)
Query the list of active Sender IDs in your account. Enable the Sender ID Inquiry option in your API key settings first.
curl -X POST https://api.turkeysms.com.tr/senderid/check \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY" }'
curl_setopt_array($ch = curl_init("https://api.turkeysms.com.tr/senderid/check"), [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode(["api_key" => "YOUR_API_KEY"]), CURLOPT_HTTPHEADER => ['Content-Type: application/json']]); echo curl_exec($ch);
{ "result": true, "result_code": "TS-1040", "sender_ids": [ { "id": 12345, "title": "TurkeySMS", "status": 1, "document": 1, "network_stat": 1 } ] }
Two types of reports to track message status: Basic Report for a general summary, and Detailed Report for per-number status tracking.
curl -X POST https://api.turkeysms.com.tr/reports/basic \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "raporid": 12345 }'
{ "result": true, "rapor_id": 12345, "total_numbers": 1000, "success_count": 950, "failed_count": 30, "pending_count": 20 }
Per-number status tracking. Supports pagination with a limit of 500 records per page.
| Parameter | Type | Description |
|---|---|---|
| api_key | string | Your API Key. Required |
| raporid | integer | Report ID received after sending. Required |
| page | integer | Page number (Detailed report only). Defaults to 1. |
{ "result": true, "result_code": "TS-1064", "pagination": { "current_page": 1, "total_pages": 5, "total_records": 2350 }, "data": [{ "phone_number": "905xxxxxxxxx", "sent_at": "2026-04-03 12:00:00", "sms_status": "Number received the message" }] }
Query the delivery status of a specific message using the unique SMS ID received during sending.
| Parameter | Type | Description |
|---|---|---|
| api_key | string | Your API Key. Required |
| sms_id | integer | Unique SMS ID of the message. Required |
curl -X POST https://api.turkeysms.com.tr/sms/status \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "sms_id": 12345678 }'
{ "status": "success", "result_code": "TS-1064", "result": true, "sender_id": "SENDER", "sms_status": "Number received the message", "sms_balance": "1 SMS" }
Manage your contact groups programmatically. Create, edit, delete, or list groups.
curl -X POST https://api.turkeysms.com.tr/groups/create \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "group_name": "My New Group" }'
{ "result": true, "result_code": "TS-1080", "group": { "id": 5412, "name": "My New Group", "created_at": "2026-04-03" } }
curl -X POST https://api.turkeysms.com.tr/groups/edit \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "group_id": 1234, "new_name": "Updated Name" }'
curl -X POST https://api.turkeysms.com.tr/groups/delete \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "group_id": 1234 }'
curl -X POST https://api.turkeysms.com.tr/groups/list \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "search": "Team" }'
{ "result": true, "result_code": "TS-1090", "groups_count": 2, "groups": [ { "id": 123, "name": "Team A", "date": "2026-04-01" }, { "id": 456, "name": "Clients", "date": "2026-04-02" } ] }
Add or remove phone numbers from your contact groups programmatically, with support for custom fields.
Parameters: api_key, group_id, gsm_number (required). Optional: name, f_01, f_02, f_03.
curl -X POST https://api.turkeysms.com.tr/contacts/add \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "group_id": 1234, "gsm_number": "905051234567", "name": "John Doe", "f_01": "Extra Info" }'
{ "result": true, "result_code": "TS-1100", "group_id": 5412, "total_added": 1, "total_failed": 0, "mobile": "905051234567" }
Block specific phone numbers to prevent any messages from being sent to them. Managed independently per user.
curl -X POST https://api.turkeysms.com.tr/blacklist/add \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "number": "905xxxxxxxx" }'
curl -X POST https://api.turkeysms.com.tr/blacklist/status \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "number": "905xxxxxxxx" }'
{ "status": "success", "result_code": "TS-1143", "is_blocked": true, "block_date": "2026-04-03", "block_time": "17:50" }
Instead of polling the API for message status, TurkeySMS provides Webhooks to push detailed delivery reports directly to your server as soon as they are updated by the operator.
We include the X-TurkeySms-Signature header — an HMAC-SHA256 hash of the request body using your Webhook Secret Key.
<?php $secret = "YOUR_WEBHOOK_SECRET"; $payload = file_get_contents('php://input'); $signature = $_SERVER['HTTP_X_TURKEYSMS_SIGNATURE'] ?? ''; $expectedSignature = hash_hmac('sha256', $payload, $secret); if (hash_equals($expectedSignature, $signature)) { $data = json_decode($payload, true); // Process delivery report file_put_contents('webhook_log.txt', $data['data']['sms_id'] . ": " . $data['data']['status']); http_response_code(200); } else { http_response_code(403); // Reject unauthorized requests } ?>
Ready-to-use solutions for the world's most popular platforms to simplify your integration process.
Integrate TurkeySMS natively into your Make.com (formerly Integromat) scenarios. Automate communication workflows without writing a single line of code.
Fully documented SDKs for the most popular programming environments. All support Instant SMS, OTP, Scheduled Messaging, and Bulk SMS.
Every operation returns a status code. Use this table to diagnose issues and handle errors gracefully.
| Code | HTTP | Description |
|---|---|---|
| TS-1000 | 200 | Auth check successful. |
| TS-1022 | 200 | Number did not receive the message (delivery failed). |
| TS-1023 | 200 | Number out of coverage, message not received yet. |
| TS-1024 | 200 | SMS dispatched successfully. |
| TS-1025 | 400 | Recipient number is missing or invalid. |
| TS-1026 | 400 | Message text is missing or empty. |
| TS-1027 | 403 | Insufficient balance to complete the operation. |
| TS-1028 | 403 | Sender ID is not activated or not verified. |
| TS-1029 | 403 | Sender ID not found in the account. |
| TS-1030 | 403 | Account is deactivated or temporarily suspended. |
| TS-1031 | 401 | Invalid or deactivated API key. |
| TS-1032 | 403 | International sending is not enabled for this account. |
| TS-1033 | 400 | Invalid request format (not valid JSON). |
| TS-1034 | 400 | Sender title is missing or contains invalid characters. |
| TS-1036 | 403 | Standard OTP sending privilege is not enabled. |
| TS-1037 | 403 | Advanced OTP sending privilege is not enabled. |
| TS-1038 | 403 | Sender ID inquiry privilege is not enabled. |
| TS-1040 | 200 | Balance / Sender ID inquiry successful. |
| TS-1050 | 401 | API key is missing from the request. |
| TS-1052 | 400 | SMS ID is missing. |
| TS-1060 | 403 | Per-minute rate limit exceeded. |
| TS-1061 | 403 | POST sending permission is not enabled. |
| TS-1063 | 403 | SMS Status inquiry permission is not enabled. |
| TS-1064 | 200 | Operation success. |
| TS-1065 | 403 | API Key permissions do not allow this operation. |
| TS-1066 | 403 | Group sending privilege is not enabled. |
| TS-1072 | 400 | Scheduled date/time is in the past or invalid. Use a future date and time. |
| TS-1080 | 200 | Group created successfully. |
| TS-1081 | 403 | Group creation privilege disabled. |
| TS-1082 | 400 | Group name already exists. |
| TS-1083 | 400 | Invalid group name. |
| TS-1084 | 403 | Group edit privilege disabled. |
| TS-1085 | 403 | Group delete privilege disabled. |
| TS-1086 | 404 | Group not found or unauthorized access. |
| TS-1087 | 200 | Group name updated successfully. |
| TS-1088 | 200 | Group deleted successfully. |
| TS-1089 | 403 | Group list privilege disabled. |
| TS-1090 | 200 | Group list retrieved successfully. |
| TS-1100 | 200 | Contact added successfully. |
| TS-1101 | 400 | Failed to add number or number already exists. |
| TS-1140 | 400 | Number already blocked for this user. |
| TS-1141 | 200 | Number added to blacklist successfully. |
| TS-1142 | 200 | Number not found in blacklist. |
| TS-1143 | 200 | Number is currently blocked. |
| TS-1144 | 400 | Invalid phone number format. |