API Documentation

Below you'll find the API documentation and usage guide for integrating our API into your application.

Getting Started

Addresshttps://mail.premiumsms.net/api/v1
MethodPOST, as form data
ResponseJSON
CurrencyTRY
API keyYour 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

CodeDescription
101API key was not sent.
102API key could not be validated.
103Your account is suspended or has no API access.
104Invalid action.
105action was not sent.

Order statuses

StatusDescription
PENDINGNumber received, waiting for SMS.
RECEIVEDSMS received; more may arrive until time runs out.
FINISHEDOrder completed.
CANCELEDOrder canceled, fee refunded.
Account

Check Balance

action=balance

Returns your account's current balance.

Parameters

ParameterDescription
key requiredYour API key. Log in and get it from My Account › API Key.
action requiredbalance

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

ParameterDescription
key requiredYour API key. Log in and get it from My Account › API Key.
action requiredorders
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

CodeDescription
135Invalid 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

ParameterDescription
key requiredYour API key. Log in and get it from My Account › API Key.
action requiredcountries

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

IDOperatorDurationCancelRebuy

Parameters

ParameterDescription
key requiredYour API key. Log in and get it from My Account › API Key.
action requiredoperators

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

ParameterDescription
key requiredYour API key. Log in and get it from My Account › API Key.
action requiredservices
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

CodeDescription
112No 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

ParameterDescription
key requiredYour API key. Log in and get it from My Account › API Key.
action requiredget_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

CodeDescription
106Service ID missing.
107Country code missing.
108Service not found.
109Country not found.
111No 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

ParameterDescription
key requiredYour API key. Log in and get it from My Account › API Key.
action requiredget_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

CodeDescription
113Country missing or not found.
114Operator missing or not found.
115Service missing or not found.
116Database error.
117This operator or service is not accepting orders right now.
118Operator-side issue; please open a support ticket.
119Insufficient balance.
120Service not found at the operator.
121No numbers available.
122Try again later.
123All numbers are busy; try again in a few minutes.
136Price 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

ParameterDescription
key requiredYour API key. Log in and get it from My Account › API Key.
action requiredstatus
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

CodeDescription
124Order ID missing.
125Order 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

ParameterDescription
key requiredYour API key. Log in and get it from My Account › API Key.
action requiredmessages
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

CodeDescription
130Order ID or number missing.
125Order not found.
131No 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

ParameterDescription
key requiredYour API key. Log in and get it from My Account › API Key.
action requiredcancel
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

CodeDescription
124Order ID missing.
125Order not found.
126Cannot be cancelled because an SMS arrived or the order is closed.
127This is a rented number; use rent_cancel.
134The cancel wait time has not passed yet; the seconds left are in the wait field.
118The operator did not approve the cancellation.
116Database 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

ParameterDescription
key requiredYour API key. Log in and get it from My Account › API Key.
action requiredrebuy_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

CodeDescription
124Order ID missing.
125Order not found.
128This order cannot be rebought (only FINISHED single-use orders).
137The operator no longer offers this number.
118Could 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

ParameterDescription
key requiredYour API key. Log in and get it from My Account › API Key.
action requiredrebuy
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

CodeDescription
124Order ID missing.
125Order not found.
128This order cannot be rebought.
137The operator no longer offers this number.
129The number is not available right now; try again in a few minutes.
136The price exceeds max_price or has changed; you were not charged.
119Insufficient balance.
118Could not get the number; you were not charged.
116Database error.