🚀

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, PHP, 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 →
Interactive API Documentation
🛡️

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.

💡
We charge zero integration fees — our primary goal is the success of your project. Our technical team is available 24/7 to supervise your implementation at no cost.

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 legal registration and service activation.

💳

Message Credits

Ensure your account has 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 clearly identified 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'];
}
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

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.

POST https://api.turkeysms.com.tr/sms/send
⚠️
Keep your API key secure. Never share it in public repositories (e.g., GitHub) or in client-side code.
🔍

Auth Audit & Permissions

Verify your API key and retrieve all granted permissions (Sending, OTP, Balance) along with the current account status.

POST https://api.turkeysms.com.tr/auth/check
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);

Response Example

JSON — 200 OK
{
  "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 Single SMS

Send a single SMS to a specific phone number with a POST request:

POST https://api.turkeysms.com.tr/sms/send

Parameters

ParameterTypeStatusDescription
api_keystringRequiredYour unique API key.
titlestringRequiredYour registered Sender ID (Case-sensitive).
textstringRequiredMessage text. Fully supports Unicode.
senttostringRequiredRecipient number in international format (e.g., 905xxxxxxxxx). Digits only.
reportintOptionalEnable response report: 1, disable: 0. Default: 1
sms_langintOptional0 English, 1 Turkish, 2 Arabic/Unicode. Default: 2
content_typeintOptional0 Transactional, 1 High Quality, 2 Advertising. Default: 0
response_typestringOptionalResponse format: json or php. Default: json

Request Example

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);

Success Response

JSON — 200 OK
{
  "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). Ensures ultra-fast delivery with the highest priority in the messaging queue.

POST https://api.turkeysms.com.tr/otp/send

Parameters

ParameterTypeStatusDescription
api_keystringRequiredYour unique API key.
mobilestringRequiredRecipient number in international format (e.g., 905xxxxxxxxx).
langintOptional0 English, 1 Turkish, 2 Arabic. Default: 2
digitsintOptionalNumber of OTP digits (4, 5, or 6). Default: 4
reportintOptionalEnable report: 1. Default: 1
response_typestringOptionalResponse format: json or php. Default: json

Request Example

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);
🛡️

Send Custom OTP (Advanced)

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.

POST https://api.turkeysms.com.tr/otp/detailed
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()

Scheduled SMS

Schedule messages to be sent at a specific future date and time. Uses the same /sms/send endpoint with additional scheduling parameters.

POST https://api.turkeysms.com.tr/sms/send
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 content",
  "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.

POST https://api.turkeysms.com.tr/group/send
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", "905000000003"]
}'

2. Multiple Texts to Multiple Numbers

Send personalized messages to each number (array indices must match).

POST https://api.turkeysms.com.tr/group/sendMixed
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"]
}'
⚙️

Sending Options

Message Language — sms_lang

ValueLanguageDescription
0EnglishEnglish (GSM 7-bit encoding)
1TurkishTurkish with special character support
2Arabic / UnicodeArabic or any UTF-8 language

Content Type — content_type

ValueTypeDescription
0TransactionalSystem notifications, alerts, OTP
1High QualityPremium delivery route
2AdvertisingMarketing & promotional messages
💰

Check Balance

Query your remaining SMS credits programmatically. Requires Check Balance permission in your API settings.

POST https://api.turkeysms.com.tr/balance/
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)
🏷️

Sender ID Inquiry

Query the list of active Sender IDs in your account. Enable the Sender ID Inquiry option in your API key settings first.

POST https://api.turkeysms.com.tr/senderid/check
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);

Response Example

JSON — 200 OK
{
  "result": true, "result_code": "TS-1040",
  "sender_ids": [
    { "id": 12345, "title": "TurkeySMS", "status": 1, "document": 1, "network_stat": 1 }
  ]
}
📊

SMS Reports

Two types of reports to track message status: Basic Report for a general summary, and Detailed Report for per-number status tracking.

1. Basic Report (Summary)

POSThttps://api.turkeysms.com.tr/reports/basic
cURL
curl -X POST https://api.turkeysms.com.tr/reports/basic \
-H "Content-Type: application/json" \
-d '{ "api_key": "YOUR_API_KEY", "raporid": 12345 }'
JSON Response
{ "result": true, "rapor_id": 12345, "total_numbers": 1000,
  "success_count": 950, "failed_count": 30, "pending_count": 20 }

2. Detailed Report (Paginated)

Per-number status tracking. Supports pagination with a limit of 500 records per page.

POSThttps://api.turkeysms.com.tr/reports/detailed
ParameterTypeDescription
api_keystringYour API Key. Required
raporidintegerReport ID received after sending. Required
pageintegerPage number (Detailed report only). Defaults to 1.
JSON Response (Detailed)
{
  "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" }]
}
📄

SMS Status

Query the delivery status of a specific message using the unique SMS ID received during sending.

POSThttps://api.turkeysms.com.tr/sms/status
ParameterTypeDescription
api_keystringYour API Key. Required
sms_idintegerUnique SMS ID of the message. Required
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 }'
JSON — 200 OK
{
  "status": "success", "result_code": "TS-1064", "result": true,
  "sender_id": "SENDER", "sms_status": "Number received the message",
  "sms_balance": "1 SMS"
}
📁

Group Management

Manage your contact groups programmatically. Create, edit, delete, or list groups.

1. Create New Group

POSThttps://api.turkeysms.com.tr/groups/create
cURL
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" }'
JSON Response
{ "result": true, "result_code": "TS-1080", "group": { "id": 5412, "name": "My New Group", "created_at": "2026-04-03" } }

2. Edit Group Name

POSThttps://api.turkeysms.com.tr/groups/edit
cURL
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" }'

3. Delete Group

POSThttps://api.turkeysms.com.tr/groups/delete
cURL
curl -X POST https://api.turkeysms.com.tr/groups/delete \
-H "Content-Type: application/json" \
-d '{ "api_key": "YOUR_API_KEY", "group_id": 1234 }'

4. List Groups

POSThttps://api.turkeysms.com.tr/groups/list
cURL
curl -X POST https://api.turkeysms.com.tr/groups/list \
-H "Content-Type: application/json" \
-d '{ "api_key": "YOUR_API_KEY", "search": "Team" }'
JSON Response (List)
{ "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" }
  ] }
👤

Contact Management

Add or remove phone numbers from your contact groups programmatically, with support for custom fields.

Add Number to Group

POSThttps://api.turkeysms.com.tr/contacts/add

Parameters: api_key, group_id, gsm_number (required). Optional: name, f_01, f_02, f_03.

cURL
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"
}'
JSON Response
{ "result": true, "result_code": "TS-1100",
  "group_id": 5412, "total_added": 1, "total_failed": 0, "mobile": "905051234567" }
🚫

Blacklist Management

Block specific phone numbers to prevent any messages from being sent to them. Managed independently per user.

1. Add Number to Blacklist

POSThttps://api.turkeysms.com.tr/blacklist/add
cURL
curl -X POST https://api.turkeysms.com.tr/blacklist/add \
-H "Content-Type: application/json" \
-d '{ "api_key": "YOUR_API_KEY", "number": "905xxxxxxxx" }'

2. Check Blacklist Status

POSThttps://api.turkeysms.com.tr/blacklist/status
cURL
curl -X POST https://api.turkeysms.com.tr/blacklist/status \
-H "Content-Type: application/json" \
-d '{ "api_key": "YOUR_API_KEY", "number": "905xxxxxxxx" }'
JSON Response (Blocked)
{ "status": "success", "result_code": "TS-1143",
  "is_blocked": true, "block_date": "2026-04-03", "block_time": "17:50" }
🔗

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.

🛠️
Enable this feature and configure your Webhook URL from the API Settings section in your Control Panel.

Signature Verification (Security)

We include the X-TurkeySms-Signature header — an HMAC-SHA256 hash of the request body using your Webhook Secret Key.

PHP — Receiver
<?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
}
?>
🧩

Integrations

Ready-to-use solutions for the world's most popular platforms to simplify your integration process.

💡
Our integrations support WooCommerce alerts, Laravel auto-discovery, and smart templates to simplify your workflow.
🌀

Make.com Integration

Integrate TurkeySMS natively into your Make.com (formerly Integromat) scenarios. Automate communication workflows without writing a single line of code.

🔗
Add the TurkeySMS app to your Make account via our official integration link.

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 across all scenarios.

Setup Steps

  1. In your Make.com scenario, add the TurkeySMS module.
  2. Click Add Connection and name it (e.g., "My TurkeySMS Account").
  3. Paste your API Key from your TurkeySMS Panel.
  4. Configure your module parameters and start automating!
📦

Developer SDKs

Fully documented SDKs for the most popular programming environments. All support Instant SMS, OTP, Scheduled Messaging, and Bulk SMS.

📊

Response Codes

Every operation returns a status code. Use this table to diagnose issues and handle errors gracefully.

CodeHTTPDescription
TS-1000200Auth check successful.
TS-1022200Number did not receive the message (delivery failed).
TS-1023200Number out of coverage, message not received yet.
TS-1024200SMS dispatched successfully.
TS-1025400Recipient number is missing or invalid.
TS-1026400Message text is missing or empty.
TS-1027403Insufficient balance to complete the operation.
TS-1028403Sender ID is not activated or not verified.
TS-1029403Sender ID not found in the account.
TS-1030403Account is deactivated or temporarily suspended.
TS-1031401Invalid or deactivated API key.
TS-1032403International sending is not enabled for this account.
TS-1033400Invalid request format (not valid JSON).
TS-1034400Sender title is missing or contains invalid characters.
TS-1036403Standard OTP sending privilege is not enabled.
TS-1037403Advanced OTP sending privilege is not enabled.
TS-1038403Sender ID inquiry privilege is not enabled.
TS-1040200Balance / Sender ID inquiry successful.
TS-1050401API key is missing from the request.
TS-1052400SMS ID is missing.
TS-1060403Per-minute rate limit exceeded.
TS-1061403POST sending permission is not enabled.
TS-1063403SMS Status inquiry permission is not enabled.
TS-1064200Operation success.
TS-1065403API Key permissions do not allow this operation.
TS-1066403Group sending privilege is not enabled.
TS-1072400Scheduled date/time is in the past or invalid. Use a future date and time.
TS-1080200Group created successfully.
TS-1081403Group creation privilege disabled.
TS-1082400Group name already exists.
TS-1083400Invalid group name.
TS-1084403Group edit privilege disabled.
TS-1085403Group delete privilege disabled.
TS-1086404Group not found or unauthorized access.
TS-1087200Group name updated successfully.
TS-1088200Group deleted successfully.
TS-1089403Group list privilege disabled.
TS-1090200Group list retrieved successfully.
TS-1100200Contact added successfully.
TS-1101400Failed to add number or number already exists.
TS-1140400Number already blocked for this user.
TS-1141200Number added to blacklist successfully.
TS-1142200Number not found in blacklist.
TS-1143200Number is currently blocked.
TS-1144400Invalid phone number format.

SDK Code