API Reference

Ritorica Messaging
API v1

HTTP(S) and SMPP protocols for global SMS delivery. Form-encoded requests, XML responses, login and password authentication. Works with any language or HTTP client.

HTTP(S) + SMPP
TLS 1.2+ only
Login & password auth
XML responses
Any language

Authentication

All requests use your login and password as POST body parameters. Credentials are issued by your account manager — the same login and password work for HTTP(S), SMPP, and the web dashboard.

HTTP(S) Endpoint https://http.ritorica.com/multi.php HTTP(S) · SMPP
Login & Password
Pass your login and password as POST body parameters in every request. Keep credentials server-side — never expose them in frontend code or public repositories.
login=YOUR_LOGIN&password=YOUR_PASSWORD
Content-Type
All POST requests must use form-encoded body. Always include the Content-Type header — every parameter is sent as a key-value pair in the POST body.
Content-Type: application/x-www-form-urlencoded
Response Format
All responses are XML. On success the result tag contains OK and code is 0. On error result is ERROR and the description tag explains what went wrong.
Content-Type: text/xml

API Operations

All HTTP(S) operations use the same endpoint — http.ritorica.com/multi.php — with different parameters. Mailing list operations use http.ritorica.com/list.php.

POST /multi.php Send a single or bulk SMS
Request Parameters
FieldTypeDescription
loginstring requiredYour account login
passwordstring requiredYour account password
phonesstring required*Comma-separated phone numbers in international format without +. E.g. 447911123456,79051112233
messagestring required*SMS text body. Max 160 chars Latin, 70 chars Cyrillic/Unicode. Long messages auto-split into parts.
originatorstring optionalSender name — max 11 alphanumeric chars or 15 digits as a phone number.
rusinteger optionalEncoding: 0 = Latin/transliterate (default), 1 = Windows-1251 Cyrillic, 5 = UTF-8
start_datestring optionalSchedule time in format YYYY-MM-DD HH:MM:SS (UTC+5). Max 3 days in future.
gapfloat optionalInterval between sends in seconds. Default 1, minimum 0.05.
timeoutinteger optionalSMS lifetime in seconds. Max 86400 (24h).
want_sms_ids0 or 1 optionalSet to 1 to receive message IDs in the response for delivery tracking.
individual_messages0 or 1 optionalSet to 1 to send a different text to each phone number.
groupstring optionalName of a saved contacts group — replaces the phones parameter.
Example Request & Response
POST /multi.php HTTP/1.0 Host: http.ritorica.com Content-Type: application/x-www-form-urlencoded login=mylogin&password=mypassword &phones=447911123456 &originator=Ritorica &message=Your+OTP+is+481923 &want_sms_ids=1 <?xml version="1.0" ?> <reply> <result>OK</result> <code>0</code> <description>queued 1 messages</description> <message_infos> <message_info> <phone>447911123456</phone> <sms_id>1000472891</sms_id> </message_info> </message_infos> </reply>
POST /multi.php?operation=status Check delivery status of a message
Request Parameters
FieldTypeDescription
loginstring requiredYour account login
passwordstring requiredYour account password
operationstring requiredAlways "status"
sms_idstring requiredComma-separated message IDs returned from the send call. Status history kept for 2 days only.
Delivery Status Values
DeliveredFinalMessage reached the handset
Non DeliveredFinalFailed — invalid number, subscriber blocked, or call barring
ExpiredFinalPhone off too long or memory full during message lifetime
RejectedFinalOperator rejected — bad sender, wrong format, or spam filter
DeletedFinalRemoved from SMSC — routing restriction or link shortening reduced SMS size
Unknown statusFinalNo delivery report received from SMSC
ClickedFinalSubscriber clicked a tracked link in the message
CheckedFinalSubscriber used the OTP (e.g. typed it on your website)
Buffered SMSCTransitionalStill trying to deliver — phone off or memory full
(blank)TransitionalNo status received yet — scheduled or just sent
Example Response
<reply> <submition_date>2025-04-29 10:23:01</submition_date> <send_date>2025-04-29 10:23:01</send_date> <last_status_change_date> 2025-04-29 10:23:03 </last_status_change_date> <status>Delivered</status> <error></error> <sms_id>1000472891</sms_id> </reply>
POST /multi.php?operation=account Check account credit balance
Request Parameters
FieldTypeDescription
loginstring requiredYour account login
passwordstring requiredYour account password
operationstring requiredAlways "account"
Example Response
<?xml version="1.0" ?> <reply> <account>10025</account> </reply> <!-- Balance is returned as a raw number --> <!-- Use this to build low-balance alerts -->
CALLBACK your-server/callback-url Automatic delivery status notifications
How it works

Set up a script on your server that accepts POST requests, then send your URL to the Ritorica support team. The platform will automatically call your endpoint after every status change.

Parameters Ritorica POSTs to your URL
FieldDescription
sms_idMessage identifier (unsigned 8-byte number)
statusDelivery status value (see status table above)
delivery_dateDate/time of last status change (UTC+5, YYYY-MM-DD HH:MM:SS)
error_codeError code if not delivered (0 if delivered or unknown reason)
Example Callback POST
POST /your-callback-url HTTP/1.1 Host: yourapp.com Content-Type: application/x-www-form-urlencoded sms_id=1000472891 &status=Delivered &delivery_date=2025-04-29 10:23:03 &error_code=0 <!-- Your server must respond with HTTP 200 -->
POST /list.php Manage contact mailing lists
Operations
operation valueDescription
status_allGet all mailing lists in your account (default)
statusGet info about a specific list (requires group_id)
add_memberAdd phone numbers to a list (max 5,000 per request)
remove_memberRemove phone numbers from a list (max 5,000 per request)
Example — Add Numbers to List
POST /list.php HTTP/1.1 Host: http.ritorica.com Content-Type: application/x-www-form-urlencoded login=mylogin&password=mypassword &operation=add_member &group_id=59353 &member=447911123456,79051112233 <?xml version="1.0" ?> <reply> <result>OK</result> <code>0</code> <description>added or updated members: 2</description> </reply>

Limits & Throughput

Limits depend on the protocol and operation. HTTP throughput is account-specific — contact your account manager to increase it. SMPP limits are enforced per connection.

Operation / Protocol Default Limit Notes
SMPP submit_sm 20 SMS / sec Per connection. Contact your account manager to increase.
POST /multi.php — Send SMS Account-specific HTTP throughput set per account. Contact your manager for details.
POST /multi.php?operation=status Max 5,000 IDs / req Status history available for the last 2 days only.
POST /multi.php?operation=set_checked Max 5,000 IDs / req Can only mark messages sent within the last 3 days.
POST /list.php — Mailing list Max 5,000 numbers / req Per add_member or remove_member request.

API Error Code Reference

Errors are returned in the XML response body as a numeric <error> code. A value of 0 means success.

401
Login not transferred
The login parameter is missing from the request.
402
Password not transferred
The password parameter is missing from the request.
403
Phones not transferred
The phones parameter is missing from the request.
411
Wrong login or password
Authentication failed. Verify your login and password credentials.
412
Incorrect IP address
Your server's IP is not whitelisted. Contact your account manager to add it.
415
Insufficient funds
Account balance is too low to send the requested messages. Top up your account.
420
Message text too long
The message exceeds the allowed length. Split into multiple parts or use concatenation.
421
Originator too long
The originator value exceeds the allowed length (max 11 alphanumeric or 15 numeric).
425
Incorrect phone number format
Phone must be in international format without leading + or 00 (e.g. 447911123456).
429
Operator not supported
The destination operator is not available in your account's routing configuration.
432
Phone number blocked
This number has been blocked (subscriber opt-out or admin block). Do not retry.
436
Originator forbidden
The sender name is not approved for your account. Use a pre-approved originator.
501
Incorrect XML structure
The XML body of the request is malformed or missing required elements.
503
Internal system error
An unexpected error occurred on the server. Retry the request after a short delay.
1000
Temporary server problems
The server is temporarily unavailable. Implement exponential backoff and retry.

Send Your First Message

The Ritorica API is a standard HTTPS endpoint — use it directly from any language or HTTP client. No extra library needed.

cURL
Works in any terminal

The fastest way to test the API from the command line. Copy, paste your credentials, and you're live.

Integration guide
Python
requests library

Use the standard requests library — no proprietary SDK needed. Works with any Python 3.x version.

Integration guide
Node.js
node-fetch / axios

Use fetch (Node 18+) or axios. Works in Express, NestJS, or any backend framework.

Integration guide
PHP
cURL / Guzzle

Use PHP's built-in cURL extension or the Guzzle HTTP client. Compatible with Laravel and Symfony.

Integration guide
Java
HttpClient (Java 11+)

Use Java's built-in java.net.http.HttpClient or OkHttp. Works with Spring Boot projects.

Integration guide
Any Language
Standard HTTP POST

Plain HTTPS POST with a form-encoded body (application/x-www-form-urlencoded). If your language can make an HTTP request, it can use the Ritorica API.

Ask our team

Ready to Start Building?

Contact our team to get your API credentials, whitelist your server IP, and go live. Our technical support team is available to help with your integration.

M
Moustafa — Ritorica Assistant
Online · Typically replies instantly
Powered by Gemini · Ritorica AI