🚀

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 →
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 process 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 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:

PHP
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.

POSThttps://api.turkeysms.com.tr/sms/send

You can find your API key in your control panel under My Account → API Settings.

⚠️
Keep your API key secure. Never share it in public repositories (e.g., GitHub) or in client-side code.
🔍

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.

POSThttps://api.turkeysms.com.tr/auth/check

Request Example (CURL)

Bash — 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)

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,
            "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:

POSThttps://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_langintOptionalContent language: 0 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)

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)

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

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). This API ensures ultra-fast delivery with the highest priority in the messaging queue.

POSThttps://api.turkeysms.com.tr/otp/send

Parameters

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

Request Example (CURL)

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)

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.

POSThttps://api.turkeysms.com.tr/otp/detailed

Request Example (CURL)

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)

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

POST https://api.turkeysms.com.tr/groups/create

Parameters: api_key, group_name.

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"
}'

2. Edit Group Name

POST https://api.turkeysms.com.tr/groups/edit

Parameters: api_key, group_id, new_name.

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"
}'

Response Example (Edit)

JSON
{
    "result": true,
    "result_code": "TS-1081",
    "result_message": "Group updated successfully",
    "new_name": "Updated Name"
}

3. Delete Group (Soft Delete)

POST https://api.turkeysms.com.tr/groups/delete

Parameters: api_key, group_id.

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
}'

Response Example (Delete)

JSON
{
    "result": true,
    "result_code": "TS-1082",
    "result_message": "Group deleted successfully"
}

4. List Groups

POST https://api.turkeysms.com.tr/groups/list

Parameters: api_key, search (optional).

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

JSON
{
    "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)

JSON
{
    "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

POST https://api.turkeysms.com.tr/contacts/add

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

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"
}'

Response Example (Add Number)

JSON
{
    "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
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.

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

Request Example (CURL)

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

POST https://api.turkeysms.com.tr/group/sendMixed

Request Example (CURL)

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.

POST https://api.turkeysms.com.tr/balance/

Request Example (CURL)

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.

POST https://api.turkeysms.com.tr/senderid/check

Request Example (CURL)

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)

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

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

POST https://api.turkeysms.com.tr/reports/basic

Request Example (CURL)

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)

JSON
{
    "result": true,
    "rapor_id": 12345,
    "total_numbers": 1000,
    "success_count": 950,
    "failed_count": 30,
    "pending_count": 20
}

Request Example (PHP - cURL) — Basic Report

PHP — cURL
$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.

POST https://api.turkeysms.com.tr/reports/detailed

Request Example (CURL) — Detailed Report

PHP — cURL
$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

ParameterTypeDescription
api_keyStringYour API Key. Required
raporidIntegerThe Report ID you received after sending. Required
pageIntegerThe page number (Detailed report only). Defaults to 1.

Response Example (Detailed Report)

JSON
{
    "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

POST https://api.turkeysms.com.tr/blacklist/add

Required Parameters: api_key, number.

CURL

Request Example (CURL)

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)

JSON
{
    "status": "success",
    "result_code": "TS-1141",
    "result_message": "Number added to blacklist successfully"
}

2. Check Blacklist Status

POST https://api.turkeysms.com.tr/blacklist/status

Request Example (CURL)

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.

JSON Response (Blocked)
{
    "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.

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

Request Example (CURL)

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

ParameterTypeDescription
api_keyStringYour API Key. Required
sms_idIntegerThe unique SMS ID of the message. Required

Success Response Example (Delivered)

JSON
{
    "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

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

Response Codes

Every operation returns a status code indicating its result. Use this table to diagnose issues.

CodeHTTPDescription
TS-1024200SMS dispatched successfully.
TS-1040200Balance inquiry successful.
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 for this key.
TS-1037403Advanced OTP sending privilege is not enabled for this key.
TS-1038403Sender ID inquiry privilege is not enabled for this key.
TS-1050401API key is missing from the request.
TS-1060403Per-minute rate limit exceeded.
TS-1061403POST sending permission is not enabled for this key.
TS-1063403SMS Status inquiry permission is not enabled for this key.
TS-1064200Operation success.
TS-1065403API Key permissions do not allow this operation.
TS-1066403Group sending privilege is not enabled for this key.
TS-1072400Duplicate recipient numbers found.
TS-1052400SMS ID is missing.
TS-1023200Number out of coverage, message not received yet.
TS-1100200Number added to contacts successfully.
TS-1101400Failed to add number or number already exists.
TS-1022200Number did not receive the message (delivery failed).
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.
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.
🔗

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.

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

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
<?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.

💡
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. With our official app, you can automate your communication workflows without writing a single line of code.

🔗
You can add the TurkeySMS app to your Make account using our official integration link.

Available Modules

How to Setup

  1. In your Make.com scenario, add the TurkeySMS module.
  2. Click Add Connection and name it (e.g., "My Account").
  3. Paste your API Key from your TurkeySMS Panel.
  4. 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.

Interactive Swagger documentation is now available for real-time browser-based API exploration.

SDK Viewer