The Future of Messaging: TurkeySMS API
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, and C#. We provide comprehensive SDKs and dedicated tools to minimize integration time while maximizing message delivery performance.
Interactive API Explorer
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.
TurkeySMS Swagger V4
Fully compatible with OpenAPI 3.0 specs. Try out SMS, OTP, and reports without writing a single line of code.
Launch Interactive Docs →
Elevate Your User Experience
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.
Requirements
To ensure a successful integration and maintain regulatory compliance, please verify the following requirements:
Account Activation (E-imza)
For accounts in Turkey, a valid Digital Signature (E-imza) is required to complete the legal registration and service activation.
Message Credits
Ensure your account has a sufficient balance for the API to process and dispatch your sending requests successfully.
Sender ID (Title)
You must have an approved Sender ID (Alphanumeric Title) to be identified clearly by your recipients.
Quick Start
Start sending your first SMS in just 3 steps:
⚡ The Fastest Way to Start
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']; }
Authentication
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.
Auth Audit & Permissions
A professional endpoint that allows you to verify your API key and retrieve all granted permissions (Sending, OTP, Balance) as well as the current account status.
Request Example (CURL)
curl -X POST https://api.turkeysms.com.tr/auth/check \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY" }'
Response Example (JSON)
{ "result": true, "result_code": "TS-1000", "key_details": { "status": "Active", "permissions": { "post_request": true, "send_single_sms": true, "send_otp": true, "check_balance": true, "check_senderid": true, "manage_groups": true } }, "account_summary": { "account_status": "Active", "balance": { "main": 1500, "international": 250 } } }
Send Single SMS
Send a single SMS to a specific phone number with a POST request:
Parameters
| 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 | Content language: 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 |
Request Example (CURL)
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
}'
Request Example (PHP - cURL)
$data = [ "api_key" => "YOUR_API_KEY", "title" => "MyCompany", "text" => "Hello! This is a test message.", "sentto" => "905xxxxxxxxx", "report" => 1, "sms_lang" => 0, "content_type" => 0, "response_type" => "json" ]; $ch = curl_init("https://api.turkeysms.com.tr/sms/send"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); echo $response;
Success Response Example
{
"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"
}
Send OTP SMS
Special endpoint for sending One-Time Passwords (OTP). This API ensures ultra-fast delivery with the highest priority in the messaging queue.
Parameters
| 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 | Text language: 0 English, 1 Turkish, 2 Arabic. Default: 2 |
| digits | int | Optional | Number of OTP digits to generate (4, 5, or 6). Default: 4 |
| report | int | Optional | Enable report: 1, disable: 0. Default: 1 |
| response_type | string | Optional | Response format: json or php. Default: json |
Request Example (CURL)
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 }'
Request Example (PHP - cURL)
$data = [ "api_key" => "YOUR_API_KEY", "mobile" => "905xxxxxxxxx", "lang" => 0, "digits" => 4, "report" => 1, "response_type" => "json" ]; $ch = curl_init("https://api.turkeysms.com.tr/otp/send"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); echo $response;
Send Custom OTP (Advanced)
Special endpoint for sending custom OTP messages where you control the text format.
IMPORTANT: You MUST have an active Sender ID in your account to use this feature. You MUST also add the keyword TS-CODE in the text, which will be automatically replaced with the generated OTP code.
Request Example (CURL)
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 to our service! Verification code: TS-CODE", "lang": 0, "digits": 4 }'
Request Example (PHP - cURL)
$data = [ "api_key" => "YOUR_API_KEY", "mobile" => "905xxxxxxxxx", "title" => "YOUR_TITLE", "text" => "Welcome! Your code is: TS-CODE", "lang" => 0, "digits" => 4, "report" => 1, "response_type" => "json" ]; $ch = curl_init("https://api.turkeysms.com.tr/otp/detailed"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); echo $response;
Group Management
This interface allows you to manage your contact groups programmatically. You can create new groups, edit their names, delete them, or list all existing groups.
1. Create New Group
Parameters: api_key, group_name.
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" }'
2. Edit Group Name
Parameters: api_key, group_id, new_name.
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" }'
Response Example (Edit)
{
"result": true,
"result_code": "TS-1081",
"result_message": "Group updated successfully",
"new_name": "Updated Name"
}
3. Delete Group (Soft Delete)
Parameters: api_key, group_id.
curl -X POST https://api.turkeysms.com.tr/groups/delete \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"group_id": 1234
}'
Response Example (Delete)
{
"result": true,
"result_code": "TS-1082",
"result_message": "Group deleted successfully"
}
4. List Groups
Parameters: api_key, search (optional).
curl -X POST https://api.turkeysms.com.tr/groups/list \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"search": "Team"
}'
Response Example (List Groups)
{
"result": true,
"result_code": "TS-1083",
"groups_count": 2,
"groups": [
{ "id": 123, "name": "Team A", "date": "2026-04-01" },
{ "id": 456, "name": "Clients", "date": "2026-04-02" }
]
}
Response Example (Create Group)
{
"result": true,
"result_code": "TS-1080",
"result_message": "Group created successfully",
"group": {
"id": 5412,
"name": "My Team",
"created_at": "2026-04-03"
}
}
Contact Management (Numbers)
This interface allows you to add or delete phone numbers from your existing groups programmatically, with support for custom fields.
1. Add Number to Group
Parameters: api_key (required), group_id (required), gsm_number (required), name (optional), f_01, f_02, f_03 (optional fields).
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"
}'
Response Example (Add Number)
{
"result": true,
"result_code": "TS-1100",
"result_message": "Contact added successfully",
"group_id": 5412,
"total_sent": 1,
"total_added": 1,
"total_failed": 0,
"mobile": "905050300074"
}
Scheduled SMS
Schedule your messages to be sent at a specific future date and time.
Request Example (CURL)
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", "sentto": "905xxxxxxxxx", "scheduled_sms": 1, "scheduled_date": "2026-12-31", "scheduled_time": "09:00" }'
Send Bulk SMS
Send messages to multiple recipients in two ways depending on your campaign needs.
1. Single Text to Multiple Numbers
Send a fixed message to a list of numbers.
Request Example (CURL)
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"] }'
2. Multiple Texts to Multiple Numbers
Send personalized messages to each number (array indices must match).
Request Example (CURL)
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"] }'
Check Balance
Query your remaining SMS credits programmatically. Requires Check Balance permission in your API settings.
Request Example (CURL)
curl -X POST https://api.turkeysms.com.tr/balance/ \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY" }'
Sender ID Inquiry
This endpoint allows you to query the list of active Sender IDs (titles) in your account. You must enable the Sender ID Inquiry option in your API key settings in the control panel.
Request Example (CURL)
curl -X POST https://api.turkeysms.com.tr/senderid/check \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY" }'
Request Example (PHP - cURL)
$data = [ "api_key" => "YOUR_API_KEY" ]; $ch = curl_init("https://api.turkeysms.com.tr/senderid/check"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); echo curl_exec($ch);
Success Response Example
{
"result": true,
"result_code": "TS-1040",
"result_message": "Operation success",
"sender_ids": [
{
"id": 12345,
"title": "TurkeySMS",
"status": 1,
"document": 1,
"network_stat": 1
}
]
}
SMS Reports
Our system provides two types of reports to track your message status: Basic Report for a general summary, and Detailed Report for per-number status tracking.
1. Basic Report (Summary)
Provides general statistics like total number of delivered, failed, and rejected messages.
Request Example (CURL)
curl -X POST https://api.turkeysms.com.tr/reports/basic \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "raporid": 12345 }'
Response Example (Summary)
{
"result": true,
"rapor_id": 12345,
"total_numbers": 1000,
"success_count": 950,
"failed_count": 30,
"pending_count": 20
}
Request Example (PHP - cURL) — Basic Report
$data = [ "api_key" => "YOUR_API_KEY", "raporid" => 12345 ]; $ch = curl_init("https://api.turkeysms.com.tr/reports/basic"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); echo curl_exec($ch);
2. Detailed Report (Paginated)
Provides the status for every single phone number in the batch. This report supports Pagination with a limit of 500 records per page.
Request Example (CURL) — Detailed Report
$data = [ "api_key" => "YOUR_API_KEY", "raporid" => 12345, "page" => 1 ]; $ch = curl_init("https://api.turkeysms.com.tr/reports/detailed"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); echo curl_exec($ch);
Supported Parameters
| Parameter | Type | Description |
|---|---|---|
api_key | String | Your API Key. Required |
raporid | Integer | The Report ID you received after sending. Required |
page | Integer | The page number (Detailed report only). Defaults to 1. |
Response Example (Detailed Report)
{
"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"
}
]
}
Blacklist Management
This interface allows customers to block specific phone numbers and prevent any messages from being sent to them programmatically. The blacklist is managed independently for each user.
1. Add Number to Blacklist
Required Parameters: api_key, number.
Request Example (CURL)
curl -X POST https://api.turkeysms.com.tr/blacklist/add \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "number": "905xxxxxxxx" }'
Response Example (Add)
{
"status": "success",
"result_code": "TS-1141",
"result_message": "Number added to blacklist successfully"
}
2. Check Blacklist Status
Request Example (CURL)
curl -X POST https://api.turkeysms.com.tr/blacklist/status \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "number": "905xxxxxxxx" }'
Parameters: api_key, number.
{
"status": "success",
"result_code": "TS-1143",
"is_blocked": true,
"block_date": "2026-04-03",
"block_time": "17:50"
}
SMS Status
This interface allows you to query the delivery status of a specific message using the unique ID (SMS ID) received during sending.
Request Example (CURL)
curl -X POST https://api.turkeysms.com.tr/sms/status \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "sms_id": 12345678 }'
Required Parameters
| Parameter | Type | Description |
|---|---|---|
api_key | String | Your API Key. Required |
sms_id | Integer | The unique SMS ID of the message. Required |
Success Response Example (Delivered)
{
"status": "success",
"result_code": "TS-1064",
"result_message": "Number received the message.",
"result": true,
"sender_id": "SENDER",
"sms_status": "Number received the message",
"sms_balance": "1 SMS"
}
Sending Options
Message Language — 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 |
Response Codes
Every operation returns a status code indicating its result. Use this table to diagnose issues.
| Code | HTTP | Description |
|---|---|---|
| TS-1024 | 200 | SMS dispatched successfully. |
| TS-1040 | 200 | Balance inquiry successful. |
| 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 for this key. |
| TS-1037 | 403 | Advanced OTP sending privilege is not enabled for this key. |
| TS-1038 | 403 | Sender ID inquiry privilege is not enabled for this key. |
| TS-1050 | 401 | API key is missing from the request. |
| TS-1060 | 403 | Per-minute rate limit exceeded. |
| TS-1061 | 403 | POST sending permission is not enabled for this key. |
| TS-1063 | 403 | SMS Status inquiry permission is not enabled for this key. |
| 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 for this key. |
| TS-1072 | 400 | Duplicate recipient numbers found. |
| TS-1052 | 400 | SMS ID is missing. |
| TS-1023 | 200 | Number out of coverage, message not received yet. |
| TS-1100 | 200 | Number added to contacts successfully. |
| TS-1101 | 400 | Failed to add number or number already exists. |
| TS-1022 | 200 | Number did not receive the message (delivery failed). |
| 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. |
| 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. |
Webhooks (Real-time Delivery Reports)
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. This reduces server overhead and ensures near-instant data synchronization.
Signature Verification (Security)
To ensure requests originate from our servers, we include the X-TurkeySms-Signature header. This is an HMAC-SHA256 hash of the request body using your unique Webhook Secret Key.
Sample Receiver (PHP)
<?php $secret = "YOUR_WEBHOOK_SECRET"; $payload = file_get_contents('php://input'); $signature = $_SERVER['HTTP_X_TURKEYSMS_SIGNATURE'] ?? ''; // Verify signature for security $expectedSignature = hash_hmac('sha256', $payload, $secret); if (hash_equals($expectedSignature, $signature)) { $data = json_decode($payload, true); // Process the delivery report here 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 } ?>
Integrations
We provide ready-to-use solutions for the world's most popular platforms to simplify your integration process without complex coding.
Make.com Integration
Integrate TurkeySMS natively into your Make.com (formerly Integromat) scenarios. With our official app, you can automate your communication workflows without writing a single line of code.
Available Modules
- Send Single SMS: Automate notifications, alerts, and marketing.
- Send OTP: Fast delivery for verification codes.
- Check Balance: Monitor your credits in real-time.
- Auth Connection: Securely enter your API key once and use it across scenarios.
How to Setup
- In your Make.com scenario, add the TurkeySMS module.
- Click Add Connection and name it (e.g., "My Account").
- Paste your API Key from your TurkeySMS Panel.
- Configure your module parameters and start automating!
Developer SDKs
To accelerate your integration, we offer fully documented SDKs for the most popular programming environments. All libraries support Instant SMS, OTP, Scheduled Messaging, and Streaming Bulk SMS.