Getting Started
| Address | https://mail.premiumsms.net/api/v1 |
| Method | POST, as form data |
| Response | JSON |
| Currency | TRY |
| API key | Your API key. Log in and get it from My Account › API Key. |
Every request sends key and action. In a successful response status is success, in a failed one it is error; on error, code and message are returned.
Example request
curl -X POST https://mail.premiumsms.net/api/v1 \
-d "key=API_ANAHTARINIZ" \
-d "action=balance"
Example error response
{
"status": "error",
"message": "API Key could not be validated",
"code": 102
}
Errors any action can return
| Code | Description |
101 | API key was not sent. |
102 | API key could not be validated. |
103 | Your account is suspended or has no API access. |
104 | Invalid action. |
105 | action was not sent. |
Order statuses
| Status | Description |
PENDING | Number received, waiting for SMS. |
RECEIVED | SMS received; more may arrive until time runs out. |
FINISHED | Order completed. |
CANCELED | Order canceled, fee refunded. |
Account
Check Balance
action=balance
Returns your account's current balance.
Parameters
| Parameter | Description |
key required | Your API key. Log in and get it from My Account › API Key. |
action required | balance |
Example request
curl -X POST https://mail.premiumsms.net/api/v1 \
-d "key=API_ANAHTARINIZ" \
-d "action=balance"
Example response
{
"status": "success",
"balance": 250.75,
"currency": "TRY"
}
Orders
action=orders
Lists your orders from newest to oldest (My Orders and Rented Numbers).
Parameters
| Parameter | Description |
key required | Your API key. Log in and get it from My Account › API Key. |
action required | orders |
limit |
Number of orders to return (1–100, default 20) |
type |
activation (single-use) or rent (rental). If left empty, both. |
Example request
curl -X POST https://mail.premiumsms.net/api/v1 \
-d "key=API_ANAHTARINIZ" \
-d "action=orders" \
-d "limit=20"
Example response
{
"status": "success",
"currency": "TRY",
"data": [
{
"id": 73,
"type": "ACTIVATION",
"service": 29,
"service_name": "Tinder",
"country": "US",
"number": "12034653202",
"status": "RECEIVED",
"code": "609648",
"charge": 19.07,
"created_at": "2026-11-02 06:15:14",
"end_date": null
}
]
}
Error codes
| Code | Description |
135 | Invalid type value. |
Single-Use Number
Country List
action=countries
Active countries. In other actions, the country is sent as its cca2 code.
Active countries and CCA2 codes (0)
Parameters
| Parameter | Description |
key required | Your API key. Log in and get it from My Account › API Key. |
action required | countries |
Example request
curl -X POST https://mail.premiumsms.net/api/v1 \
-d "key=API_ANAHTARINIZ" \
-d "action=countries"
Example response
{
"status": "success",
"countries": [
{
"name": "Türkiye",
"common_name": "Turkey",
"key": "turkey",
"cca2": "TR"
}
]
}
Operator List
action=operators
Operators accepting orders. When getting a number, set operator to the operator's id value; price and stock vary by operator.
Active operators
| ID | Operator | Duration | Cancel | Rebuy |
Parameters
| Parameter | Description |
key required | Your API key. Log in and get it from My Account › API Key. |
action required | operators |
Example request
curl -X POST https://mail.premiumsms.net/api/v1 \
-d "key=API_ANAHTARINIZ" \
-d "action=operators"
Example response
{
"status": "success",
"operators": [
{
"id": 8,
"name": "Operator - 1",
"minutes": 20,
"cancel_after": 2,
"rebuy": true
}
]
}
minutes: how long the number can be used (minutes). cancel_after: how many minutes after ordering it can be cancelled. rebuy: whether the number can be bought again after it expires.
Service List
action=services
Services in stock, with price (TRY) and stock by country and operator. The full list is large, so filtering by country is recommended.
Active services and service IDs (0)
Parameters
| Parameter | Description |
key required | Your API key. Log in and get it from My Account › API Key. |
action required | services |
country |
Country CCA2 code (e.g. TR) |
service |
Service ID |
Example request
curl -X POST https://mail.premiumsms.net/api/v1 \
-d "key=API_ANAHTARINIZ" \
-d "action=services" \
-d "country=TR"
Example response
{
"status": "success",
"currency": "TRY",
"data": {
"TR": {
"name": "Türkiye",
"common_name": "Turkey",
"key": "turkey",
"operators": {
"8": {
"name": "Operator - 1",
"services": {
"29": {
"name": "Tinder",
"charge": 22.44,
"quantity": 3697
}
}
}
}
}
}
}
Error codes
| Code | Description |
112 | No in-stock services match these criteria. |
Service Lookup
action=get_service
Price and stock of a service in the selected country. If no operator is sent, all active operators are returned.
Parameters
| Parameter | Description |
key required | Your API key. Log in and get it from My Account › API Key. |
action required | get_service |
service required |
Service ID |
country required |
Country CCA2 code |
operator |
Operator ID |
Example request
curl -X POST https://mail.premiumsms.net/api/v1 \
-d "key=API_ANAHTARINIZ" \
-d "action=get_service" \
-d "service=29" \
-d "country=TR"
Example response
{
"status": "success",
"service": {
"id": 29,
"name": "Tinder",
"country": "TR",
"operator": 8,
"charge": 22.44,
"quantity": 3697,
"currency": "TRY"
}
}
If no operator is sent, charge ve quantity yerine data , where per operator ID name, charge, quantity are returned.
Error codes
| Code | Description |
106 | Service ID missing. |
107 | Country code missing. |
108 | Service not found. |
109 | Country not found. |
111 | No service or stock at this operator. |
Get a Number
action=get_number
Buys a single-use number; the cost is deducted from your balance. Use status or messages to check the incoming code.
Parameters
| Parameter | Description |
key required | Your API key. Log in and get it from My Account › API Key. |
action required | get_number |
service required |
Service ID |
country required |
Country CCA2 code |
operator required |
Operator ID (from the operators, services or get_service response) |
Example request
curl -X POST https://mail.premiumsms.net/api/v1 \
-d "key=API_ANAHTARINIZ" \
-d "action=get_number" \
-d "service=29" \
-d "country=TR" \
-d "operator=8"
Example response
{
"status": "success",
"data": {
"id": 73,
"service": 29,
"country": "TR",
"provider": 8,
"number": "905321234567",
"charge": 22.44,
"currency": "TRY",
"status": "PENDING"
}
}
Error codes
| Code | Description |
113 | Country missing or not found. |
114 | Operator missing or not found. |
115 | Service missing or not found. |
116 | Database error. |
117 | This operator or service is not accepting orders right now. |
118 | Operator-side issue; please open a support ticket. |
119 | Insufficient balance. |
120 | Service not found at the operator. |
121 | No numbers available. |
122 | Try again later. |
123 | All numbers are busy; try again in a few minutes. |
136 | Price changed; you were not charged. The new price is in the message. |
Order Status
action=status
Order status, received codes and end time. Single-use orders are updated on the server once a minute.
Parameters
| Parameter | Description |
key required | Your API key. Log in and get it from My Account › API Key. |
action required | status |
order required |
Order ID |
Example request
curl -X POST https://mail.premiumsms.net/api/v1 \
-d "key=API_ANAHTARINIZ" \
-d "action=status" \
-d "order=73"
Example response
{
"status": "success",
"data": {
"id": 73,
"number": "905321234567",
"type": "ACTIVATION",
"status": "RECEIVED",
"code": "609648",
"codes": [
"609648"
],
"charge": 22.44,
"currency": "TRY",
"created_at": "2026-11-02 06:15:14",
"end_date": "2026-11-02 06:35:14"
}
}
Error codes
| Code | Description |
124 | Order ID missing. |
125 | Order not found. |
Messages
action=messages
SMS received for the order (oldest to newest). Query by order ID or number; if the same number is on several orders, the newest one is used.
Parameters
| Parameter | Description |
key required | Your API key. Log in and get it from My Account › API Key. |
action required | messages |
order |
Order ID (send either order or number) |
number |
Phone number |
Example request
curl -X POST https://mail.premiumsms.net/api/v1 \
-d "key=API_ANAHTARINIZ" \
-d "action=messages" \
-d "order=73"
Example response
{
"status": "success",
"order": 73,
"data": [
"Tinder kodun: 609648"
],
"messages": [
{
"text": "Tinder kodun: 609648",
"code": "609648",
"date": "2026-11-02 06:24:51"
}
]
}
Error codes
| Code | Description |
130 | Order ID or number missing. |
125 | Order not found. |
131 | No messages yet. |
Cancel Order
action=cancel
Cancels a single-use order that has not received an SMS; the cost is refunded to your balance. It cannot be cancelled before the operator's cancel wait time has passed.
Parameters
| Parameter | Description |
key required | Your API key. Log in and get it from My Account › API Key. |
action required | cancel |
order required |
Order ID |
Example request
curl -X POST https://mail.premiumsms.net/api/v1 \
-d "key=API_ANAHTARINIZ" \
-d "action=cancel" \
-d "order=73"
Example response
{
"status": "success",
"data": {
"id": 73,
"status": "CANCELED",
"refund": 22.44,
"currency": "TRY"
}
}
Error codes
| Code | Description |
124 | Order ID missing. |
125 | Order not found. |
126 | Cannot be cancelled because an SMS arrived or the order is closed. |
127 | This is a rented number; use rent_cancel. |
134 | The cancel wait time has not passed yet; the seconds left are in the wait field. |
118 | The operator did not approve the cancellation. |
116 | Database error. |
Rebuy Price
action=rebuy_price
Returns the price of buying the number from an expired, completed (FINISHED) order again. You are not charged.
Parameters
| Parameter | Description |
key required | Your API key. Log in and get it from My Account › API Key. |
action required | rebuy_price |
order required |
Order ID |
Example request
curl -X POST https://mail.premiumsms.net/api/v1 \
-d "key=API_ANAHTARINIZ" \
-d "action=rebuy_price" \
-d "order=73"
Example response
{
"status": "success",
"data": {
"order": 73,
"number": "905321234567",
"charge": 22.44,
"currency": "TRY",
"minutes": 20
}
}
minutes: how long the rebought number can be used (minutes).
Error codes
| Code | Description |
124 | Order ID missing. |
125 | Order not found. |
128 | This order cannot be rebought (only FINISHED single-use orders). |
137 | The operator no longer offers this number. |
118 | Could not get the price; try again later. |
Get Number Again
action=rebuy
Buys the number from an expired, completed order again; a new order is created and the cost is deducted from your balance.
Parameters
| Parameter | Description |
key required | Your API key. Log in and get it from My Account › API Key. |
action required | rebuy |
order required |
Order ID |
max_price |
The highest amount you agree to pay; if the price exceeds it, nothing is bought |
Example request
curl -X POST https://mail.premiumsms.net/api/v1 \
-d "key=API_ANAHTARINIZ" \
-d "action=rebuy" \
-d "order=73"
Example response
{
"status": "success",
"data": {
"id": 74,
"number": "905321234567",
"charge": 22.44,
"currency": "TRY",
"status": "PENDING"
}
}
Error codes
| Code | Description |
124 | Order ID missing. |
125 | Order not found. |
128 | This order cannot be rebought. |
137 | The operator no longer offers this number. |
129 | The number is not available right now; try again in a few minutes. |
136 | The price exceeds max_price or has changed; you were not charged. |
119 | Insufficient balance. |
118 | Could not get the number; you were not charged. |
116 | Database error. |