smssak smssak Documentation

Credentials

Every smssak API call needs your API key and usually your Project ID. Get both from your project Settings on smssak.com.

API key key header Project ID JSON body Content-Type application/json

What every API needs

Name
Where
Description
keyrequired
HTTP header
Your account API key. Sent on every request as the key header.
Content-Typerequired
HTTP header
Must be application/json.
projectIdrequired
JSON body
Your project ID. Required on Send OTP, Verify OTP, and Send notification.

Where to find them on smssak.com

  • Open your project in the smssak console.
  • In the left sidebar, open Settings.
  • Copy Project ID and API Key with the copy buttons (see screenshots below).

Project ID

Use this value as projectId in the JSON body of your API requests.

smssak console Settings page with Project ID highlighted
Project ID — Console → Settings → Project ID (copy icon).

API key

Send this value in the key HTTP header on every request. Keep it private — do not put it in public client-side code.

smssak console Settings page with API Key highlighted
API key — Console → Settings → API Key (copy icon).
Missing or invalid key An invalid or missing key header may return a generic 500 response instead of a JSON error body.

Send OTP

Creates a one-time password and sends it by SMS or WhatsApp. The code is valid for 5 minutes. Confirm it with Verify OTP.

Auth key header Content-Type application/json Method POST

Request body

Field
Type
Description
countryrequired
string
Two-letter country code (see Country codes). For SMS, must be "DZ".
phonerequired
string
Recipient phone number. For SMS, must be an Algerian number (+213…).
projectIdrequired
string
Your project ID. Used for the app name and billing.
typeoptional
string
Delivery channel: "sms" or "whatsapp". Defaults to sms.
lengthoptional
number | string
OTP length: 4 or 6 digits. Defaults to 4.
langoptional
string
Message language for SMS: en, fr, or ar. Defaults to en.

Try it

Live call to the API
Request
Response
— Waiting
Send a request to see the response.

Example response

200 OK Success
{ "success": "SMS sent successfully." }

Errors

Error codes 15
StatusMessageCause
405Method Not AllowedNot a POST request.
400Invalid message type. Must be 'sms' or 'whatsapp'.type is neither value.
400Invalid request, missing parameters.country or phone missing.
400Invalid phone number.Phone invalid for the country.
400Only Algeria (DZ) country code is allowed for SMS type.SMS was requested with a country other than Algeria.
400Only Algeria (DZ) country code is allowed.Phone number is not an Algerian number.
401Unauthorized, missing Key.API key missing or not recognized.
402Insufficient funds to send SMS.Account balance is too low.
404Invalid API key.API key does not match an account.
404Project not found.Project does not exist or is not yours.
404User not found.Account could not be found.
404Country not found.Country is not supported for billing.
429Too many OTP requests. Please try again after an hour.More than 3 requests in one hour for that phone.
500Failed to send SMS.Message could not be delivered.
500An error occurred while processing the request.Unexpected server error.

Notes

  • The OTP stays valid for 5 minutes.
  • You can send at most 3 OTPs per phone number per hour (your own verified number is exempt).

Verify OTP

Checks the code the user entered. On success, returns the verified user and creates their record the first time.

Auth key header Content-Type application/json Method POST

Request body

Field
Type
Description
phonerequired
string
The phone number that received the OTP.
otprequired
string
The code the user entered.
projectIdrequired
string
Your project ID.
countryrequired
string
Same country code used when sending the OTP (see Country codes). Always include it.

Try it

Live call to the API
Request
Response
— Waiting
Send a request to see the response.

Example response

200 OK Success
{
  "user": {
    "uid": "f1e2d3c4-...",
    "identifier": "+213555123456",
    "country": "DZ",
    "createdAt": "2026-09-18T10:00:00.000Z",
    "lastLogin": "2026-09-18T10:02:13.000Z",
    "projectId": "my-project-id",
    "customerId": "<userId>",
    "type": "sms"
  }
}

Errors

Error codes 10
StatusMessageCause
405Method Not AllowedNot a POST request.
400Invalid request, missing parameters.phone, otp, or projectId missing.
400Invalid phone number.Phone invalid for the country.
400Invalid OTP.Code does not match the stored OTP.
400OTP has expired.Past the 5-minute window.
401Unauthorized, missing Key.API key missing or not recognized.
404Invalid API key.API key does not match an account.
404Project not found.Project does not exist or is not yours.
404OTP not found or expired.No OTP was found for this phone number.
500An error occurred while processing the request.Unexpected server error.

Notes

  • Only the latest OTP for that phone number is checked.
  • On first success, a user record is created for that phone. Later verifications update the last login time.
  • A successful check does not invalidate the OTP early — it remains usable until it expires.
Always include the country If country is missing, the request may fail with a generic 500 instead of a clear error message.

Send notification

Sends an SMS notification using one of your approved templates and the values you provide for its placeholders.

Auth key header Content-Type application/json Method POST

Request body

Field
Type
Description
countryrequired
string
Must be "DZ" (Algeria). See Country codes.
phonerequired
string
Recipient phone number (Algerian, +213…).
projectIdrequired
string
Your project ID.
templateIdrequired
string
ID of an approved template on your account.
fieldsoptional
object
Values for template placeholders, e.g. { "name": "Ali" }. Up to 5 fields; each value max 40 characters.

Try it

Live call to the API
Request
Response
— Waiting
Send a request to see the response.

Example response

200 OK Success
{
  "success": "SMS sent successfully.",
  "encoding": "GSM-7",
  "smsLength": 47,
  "pduCount": 1,
  "cost": 7.5
}

Errors

Error codes 16
StatusMessageCause
405Method Not AllowedNot a POST request.
400Invalid request, missing parameters.Missing country, phone, projectId, or templateId.
400Only Algeria (DZ) country code is allowed.Country is not Algeria.
400Invalid phone number.Phone invalid.
400Missing template fields.Empty/missing placeholder values. Body includes missing[].
400Invalid template fields. (too_many_fields)More than 5 fields. Includes details.
400Invalid template fields. (field_value_too_long)A value exceeds 40 chars. Includes details.
400Rendered message is empty.Body blank after substitution.
402Insufficient funds to send SMS.Account balance is too low.
403Template not approved.Template is not approved yet. Response includes status.
404Invalid API key.API key does not match an account.
404Project not found.Project does not exist or is not yours.
404Template not found.Template does not exist or is not yours.
404User not found.Account could not be found.
404Country not found.Country is not supported for billing.
500Failed to send SMS.Message could not be delivered.

Notes

  • The template must be approved before you can send it.
  • Placeholders look like {{name}}. Every required placeholder must have a non-empty value.
  • You can send at most 5 fields; each value can be up to 40 characters.
  • Cost is based on SMS segments. The response includes encoding, length, segment count, and cost. See SMS segments (PDU).
Unexpected errors Some failures may return a generic 500 instead of a JSON error body.

Send WhatsApp message

Sends an approved WhatsApp message template to a number in any country. Pick a template below, fill its parameters, and test it — you only need your API key and Project ID. Copy the cURL to use it in your own code.

Auth key header Content-Type application/json Method POST Cost 4 per message

Request body

Field
Type
Description
countryrequired
string
Two-letter country code (see Country codes), e.g. "DZ", "SA", "ES". WhatsApp templates can be sent to any country.
phonerequired
string
Recipient phone number, e.g. 0612345678 or +212612345678. Validated against the country code.
projectIdrequired
string
Your project ID.
templateNamerequired
string
Name of an approved WhatsApp template, e.g. payment_confirmation.
parametersrequired
array
Values for the template body placeholders, in order. The count must match the template's placeholders (see each template below).
headerParametersoptional
array
Value(s) for a variable template header. Required only when the template has one (e.g. booking_confirmation). A value starting with http:// or https:// is sent as an image.
buttonsoptional
array
Values for URL buttons. Only needed when the template has URL buttons. Copy-code buttons take their value from parameters automatically.

Available WhatsApp templates

These approved templates are ready to send. Click Try this template to load it in the console below and test it.

Try it

Example response

200 OK Success
{ "success": "WhatsApp message sent successfully." }

Errors

Error codes 12
StatusMessageCause
405Method Not AllowedNot a POST request.
400Invalid request, missing parameters.country, phone, templateName, or parameters missing or empty.
400headerParameters must be an array.headerParameters provided but not an array.
400Invalid phone number.Phone invalid for the given country.
400Parameter count mismatch…parameters.length differs from the template's placeholder count. The message lists the expected placeholders.
400Button values mismatch…Template has URL buttons but buttons count differs.
401Unauthorized, missing Key.API key missing or not recognized.
402Insufficient funds to send SMS.Account balance is below the 4 message cost (ignored for pro users).
404Invalid API key.API key does not match an account.
404Project not found.Project does not exist or is not yours.
404Template WhatsApp not found.Template name does not exist.
500Failed to send Whatsapp message.WhatsApp (Meta) rejected the send or an unexpected error occurred. May include details.

Notes

  • The template must be approved before it can be sent — every template listed on this page is approved.
  • Sending requires an API key, a Project ID that belongs to your account, and enough balance (4 per message, unless pro).
  • parameters maps to the template body placeholders in order; headerParameters (when present) maps to the header.
  • Copy-code buttons (OTP templates) automatically use the first value you pass in parameters.
  • The account API key is sent as the key header. Keep it private — never expose it in client-side code.

SMS segments (PDU)

Segment count depends on encoding and length. Type a message below to see the result instantly.

GSM-7 160 / 153 Unicode 70 / 67 Extended ×2

Calculator

EncodingGSM-7
Length0
Segments0
This segment0 / 160

Type a message to see encoding, length, and segment count.

How it works

  1. 1

    Encoding

    All characters in the GSM 7-bit alphabet → GSM-7. Any other character (Arabic, emoji, …) → Unicode for the whole message.

  2. 2

    Length

    GSM-7: basic = 1 septet, extended ^ { } \ [ ] ~ | € = 2. Unicode: UTF-16 code units (emoji often count as 2).

  3. 3

    Segments

    GSM-7: 1 if ≤ 160, else ceil(length / 153). Unicode: 1 if ≤ 70, else ceil(length / 67).

Limits

Encoding
Single
Multi-part
GSM-7
160
153 per segment
Unicode
70
67 per segment

Examples

Message
Encoding
Result
Hello
GSM-7
5 → 1
Price: 10€
GSM-7
€ ×2 → 11 → 1
161 Latin letters
GSM-7
ceil(161/153) → 2
مرحبا
Unicode
5 → 1
Hi 👋
Unicode
Emoji → 1

GSM characters

Click a character to insert it into the calculator. Anything outside this set forces Unicode.

1 septet each

References

  • 3GPP TS 23.038 Alphabets (GSM 03.38). GSM-7 default + extension table, UCS-2. Single segment: 160 / 70 in 140 octets.
  • 3GPP TS 23.040 SMS technical realization (GSM 03.40). Concatenated segments: 153 GSM-7 / 67 UCS-2 with 6-octet UDH.

Country codes

Use a two-letter code like "DZ" — not the dialing prefix ("213" / "+213").

Format ISO 3166-1 alpha-2 SMS DZ only WhatsApp Any below

Usage

SMS

Algeria (DZ) only for OTP and notifications. Phone must be +213….

WhatsApp

Any country in the list, for OTP and message templates, if the number is valid for that country.

Verify OTP

Use the same country code you sent with.

All countries

245
Code
Country
Dialing prefix
AC
AC
+247
AF
Afghanistan
+93
AX
Aland
+358
AL
Albania
+355
DZ
Algeria
+213
AS
American Samoa
+1
AD
Andorra
+376
AO
Angola
+244
AI
Anguilla
+1
AG
Antigua and Barbuda
+1
AR
Argentina
+54
AM
Armenia
+374
AW
Aruba
+297
AU
Australia
+61
AT
Austria
+43
AZ
Azerbaijan
+994
BS
Bahamas
+1
BH
Bahrain
+973
BD
Bangladesh
+880
BB
Barbados
+1
BY
Belarus
+375
BE
Belgium
+32
BZ
Belize
+501
BJ
Benin
+229
BM
Bermuda
+1
BT
Bhutan
+975
BO
Bolivia
+591
BQ
Bonaire
+599
BA
Bosnia and Herzegovina
+387
BW
Botswana
+267
BR
Brazil
+55
IO
British Indian Ocean Territory
+246
VG
British Virgin Islands
+1
BN
Brunei
+673
BG
Bulgaria
+359
BF
Burkina Faso
+226
BI
Burundi
+257
KH
Cambodia
+855
CM
Cameroon
+237
CA
Canada
+1
CV
Cape Verde
+238
KY
Cayman Islands
+1
CF
Central African Republic
+236
TD
Chad
+235
CL
Chile
+56
CN
China
+86
CX
Christmas Island
+61
CC
Cocos (Keeling) Islands
+61
CO
Colombia
+57
KM
Comoros
+269
CK
Cook Islands
+682
CR
Costa Rica
+506
HR
Croatia
+385
CU
Cuba
+53
CW
Curacao
+599
CY
Cyprus
+357
CZ
Czech Republic
+420
CD
Democratic Republic of the Congo
+243
DK
Denmark
+45
DJ
Djibouti
+253
DM
Dominica
+1
DO
Dominican Republic
+1
TL
East Timor
+670
EC
Ecuador
+593
EG
Egypt
+20
SV
El Salvador
+503
GQ
Equatorial Guinea
+240
ER
Eritrea
+291
EE
Estonia
+372
SZ
Eswatini
+268
ET
Ethiopia
+251
FK
Falkland Islands
+500
FO
Faroe Islands
+298
FJ
Fiji
+679
FI
Finland
+358
FR
France
+33
GF
French Guiana
+594
PF
French Polynesia
+689
GA
Gabon
+241
GM
Gambia
+220
GE
Georgia
+995
DE
Germany
+49
GH
Ghana
+233
GI
Gibraltar
+350
GR
Greece
+30
GL
Greenland
+299
GD
Grenada
+1
GP
Guadeloupe
+590
GU
Guam
+1
GT
Guatemala
+502
GG
Guernsey
+44
GN
Guinea
+224
GW
Guinea-Bissau
+245
GY
Guyana
+592
HT
Haiti
+509
HN
Honduras
+504
HK
Hong Kong
+852
HU
Hungary
+36
IS
Iceland
+354
IN
India
+91
ID
Indonesia
+62
IR
Iran
+98
IQ
Iraq
+964
IE
Ireland
+353
IM
Isle of Man
+44
IL
Israel
+972
IT
Italy
+39
CI
Ivory Coast
+225
JM
Jamaica
+1
JP
Japan
+81
JE
Jersey
+44
JO
Jordan
+962
KZ
Kazakhstan
+7
KE
Kenya
+254
KI
Kiribati
+686
XK
Kosovo
+383
KW
Kuwait
+965
KG
Kyrgyzstan
+996
LA
Laos
+856
LV
Latvia
+371
LB
Lebanon
+961
LS
Lesotho
+266
LR
Liberia
+231
LY
Libya
+218
LI
Liechtenstein
+423
LT
Lithuania
+370
LU
Luxembourg
+352
MO
Macao
+853
MG
Madagascar
+261
MW
Malawi
+265
MY
Malaysia
+60
MV
Maldives
+960
ML
Mali
+223
MT
Malta
+356
MH
Marshall Islands
+692
MQ
Martinique
+596
MR
Mauritania
+222
MU
Mauritius
+230
YT
Mayotte
+262
MX
Mexico
+52
FM
Micronesia
+691
MD
Moldova
+373
MC
Monaco
+377
MN
Mongolia
+976
ME
Montenegro
+382
MS
Montserrat
+1
MA
Morocco
+212
MZ
Mozambique
+258
MM
Myanmar (Burma)
+95
NA
Namibia
+264
NR
Nauru
+674
NP
Nepal
+977
NL
Netherlands
+31
NC
New Caledonia
+687
NZ
New Zealand
+64
NI
Nicaragua
+505
NE
Niger
+227
NG
Nigeria
+234
NU
Niue
+683
NF
Norfolk Island
+672
KP
North Korea
+850
MK
North Macedonia
+389
MP
Northern Mariana Islands
+1
NO
Norway
+47
OM
Oman
+968
PK
Pakistan
+92
PW
Palau
+680
PS
Palestine
+970
PA
Panama
+507
PG
Papua New Guinea
+675
PY
Paraguay
+595
PE
Peru
+51
PH
Philippines
+63
PL
Poland
+48
PT
Portugal
+351
PR
Puerto Rico
+1
QA
Qatar
+974
CG
Republic of the Congo
+242
RE
Reunion
+262
RO
Romania
+40
RU
Russia
+7
RW
Rwanda
+250
BL
Saint Barthelemy
+590
SH
Saint Helena
+290
KN
Saint Kitts and Nevis
+1
LC
Saint Lucia
+1
MF
Saint Martin
+590
PM
Saint Pierre and Miquelon
+508
VC
Saint Vincent and the Grenadines
+1
WS
Samoa
+685
SM
San Marino
+378
ST
Sao Tome and Principe
+239
SA
Saudi Arabia
+966
SN
Senegal
+221
RS
Serbia
+381
SC
Seychelles
+248
SL
Sierra Leone
+232
SG
Singapore
+65
SX
Sint Maarten
+1
SK
Slovakia
+421
SI
Slovenia
+386
SB
Solomon Islands
+677
SO
Somalia
+252
ZA
South Africa
+27
KR
South Korea
+82
SS
South Sudan
+211
ES
Spain
+34
LK
Sri Lanka
+94
SD
Sudan
+249
SR
Suriname
+597
SJ
Svalbard and Jan Mayen
+47
SE
Sweden
+46
CH
Switzerland
+41
SY
Syria
+963
TA
TA
+290
TW
Taiwan
+886
TJ
Tajikistan
+992
TZ
Tanzania
+255
TH
Thailand
+66
TG
Togo
+228
TK
Tokelau
+690
TO
Tonga
+676
TT
Trinidad and Tobago
+1
TN
Tunisia
+216
TR
Turkey
+90
TM
Turkmenistan
+993
TC
Turks and Caicos Islands
+1
TV
Tuvalu
+688
VI
U.S. Virgin Islands
+1
UG
Uganda
+256
UA
Ukraine
+380
AE
United Arab Emirates
+971
GB
United Kingdom
+44
US
United States
+1
UY
Uruguay
+598
UZ
Uzbekistan
+998
VU
Vanuatu
+678
VA
Vatican City
+39
VE
Venezuela
+58
VN
Vietnam
+84
WF
Wallis and Futuna
+681
EH
Western Sahara
+212
YE
Yemen
+967
ZM
Zambia
+260
ZW
Zimbabwe
+263

Privacy policy

How smssak collects, uses, and protects data when you use smssak.com, the console, this documentation, and the smssak APIs.

Last updated October 3, 2026 Contact info@smssak.com

Who this policy covers

  • Customers — developers and businesses who create a smssak account and projects, and call the API. For your account data, smssak decides how it is used.
  • End users — the people whose phone numbers you send OTPs and messages to. For this data, you are responsible for having a lawful reason to contact them; smssak only processes it on your behalf to deliver and verify your messages.

Data we collect

Category
Source
What it includes
Account
You
Name, email address, phone number, sign-in credentials, and your API key.
Projects
You
Project ID, app name, sender ID requests, and the message templates you create.
Messages
API requests
Recipient phone number, country, channel (SMS or WhatsApp), template and field values, message content, cost, date, and delivery status.
OTP verification
API requests
The phone number, the generated code, its expiry time (5 minutes), and — once verified — a user record for that phone number in your project with its login dates.
Billing
Payment provider
Top-up amounts, payment status, and transaction references. Card details are handled by the payment provider and are not stored by smssak.
Technical
Automatic
Request metadata such as IP address, HTTP headers, and timestamps, kept for security, debugging, and billing.

How we use data

  • Deliver OTPs, SMS notifications, and WhatsApp messages you request, and verify the codes your users enter.
  • Authenticate API requests, calculate usage, charge your balance, and show reports and statistics in the console.
  • Send you service emails: email verification, password reset, and low-balance alerts.
  • Prevent fraud, spam, and abuse, and keep the platform secure and reliable.
  • Comply with legal obligations and requests from telecom operators and authorities.
No selling, no marketing to your users smssak does not sell personal data and does not use your end users' phone numbers to send its own marketing.

Who we share data with

Recipient
Purpose
Data shared
Mobile operators
SMS delivery
Recipient phone number, sender ID, and message content.
Meta (WhatsApp Business Platform)
WhatsApp delivery
Recipient phone number, template name, and template parameters.
Google Cloud / Firebase
Hosting & database
All platform data is stored and processed on Google Cloud infrastructure, which may be located outside your country.
Payment providers
Balance top-ups
Your account identifier and the payment amount.
Authorities
Legal compliance
Only what is required by a valid legal request.

This documentation site

  • The docs site sets no tracking or advertising cookies.
  • Your theme preference is saved in your browser's local storage.
  • If you use a Try it console, the API key you type is saved in your browser's local storage so you don't have to re-enter it. It is sent only to the smssak API when you press Send request. Clear your browser's site data to remove it.
  • Fonts are loaded from Google Fonts, which receives your IP address and browser details when the page loads.
Try it sends real messages Requests from the Try it console are live API calls: they reach real phone numbers and are billed to your balance. Only enter numbers you are allowed to contact.

Retention

  • OTP codes are valid for 5 minutes and cannot be used after they expire.
  • Message, usage, and payment records are kept for as long as your account is active and as needed for billing, dispute resolution, and legal obligations.
  • Account and project data is kept until you ask us to delete your account.

Security

  • All API and console traffic is encrypted in transit with HTTPS.
  • API access requires your secret API key. Keep it server-side, and regenerate it from console Settings if it may have leaked.
  • Access to production data is limited to the people who need it to operate the service.

Your responsibilities as a customer

  • Only send messages to people who have a relationship with you or have agreed to receive them.
  • Tell your users in your own privacy policy that their phone number is shared with smssak to deliver and verify messages.
  • Do not put sensitive data (passwords, health, or financial details) in message templates or fields.

Your rights

You can ask to access, correct, or delete your personal data, or object to how it is used. If you are an end user who received a message through smssak, contact the business that sent it first; we will help them respond to your request.

  • Email info@smssak.com from the address linked to your account.
  • We may ask you to confirm your identity before acting on a request.

Changes to this policy

We may update this policy as the service changes. The "Last updated" date at the top shows the latest version; significant changes are announced by email or in the console.