Skip to main content
POST
/
{locale}
/
sms
/
send
curl -X POST "https://api.loyalty.lt/lt/sms/send" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -H "X-API-Secret: your_api_secret" \
  -d '{
    "source": "MyBrand",
    "destination": "+37061234567",
    "message": "Sveiki! Jūsų užsakymas #12345 išsiųstas."
  }'
{
  "success": true,
  "message": "SMS sent successfully",
  "data": {
    "message_id": "msg_abc123def456",
    "source": "MyBrand",
    "destination": "+37061234567",
    "status": "queued",
    "parts": 1,
    "cost": {
      "amount": 0.0556,
      "currency": "EUR",
      "parts_charged": 1
    },
    "scheduled": null,
    "validity": "2025-01-16T10:30:00Z",
    "marketing_consent_registered": false
  },
  "code": 200
}

Send SMS

Send an SMS message to a mobile phone number. Messages are queued and processed asynchronously with delivery status tracking.
This endpoint requires an approved sender name. See SMS Overview for setup instructions.

Path Parameters

locale
string
required
Language code (e.g., lt, en)

Authentication

X-API-Key
string
required
API key from Partners Portal
X-API-Secret
string
required
API secret from Partners Portal

Request Body

Required Fields

source
string
required
Origin sender name (alphatag). Must be pre-approved in Partners Portal.Requirements:
  • Alphanumeric only (letters, numbers, spaces)
  • Maximum 11 characters
  • Must be approved for your account
Example: "Loyalty", "MyBrand"
destination
string
required
Target mobile number in E.164 format (with country code).Example: "+37061234567", "37061234567"
message
string
required
Message text to send. Maximum 1600 characters.
Long messages are split into multiple parts and billed accordingly.

Optional Fields

receipt
boolean
default:"false"
Request delivery receipt. If true, status updates will be sent to receiptURL.
receiptURL
string
Callback URL for delivery receipt webhook. Required when receipt: true.
There is no default webhook URL. You must provide receiptURL with every request to receive delivery updates.
Example: "https://your-site.com/sms-webhook"
scheduled
string
Schedule message for future delivery. ISO 8601 format.Example: "2025-01-15T10:30:00Z"
validity
string
Message expiry time. If not delivered by this time, message is discarded. ISO 8601 format.Example: "2025-01-15T23:59:59Z"
validityMinutes
integer
Alternative to validity. Number of minutes until message expires.Range: 1-10080 (7 days max)Example: 1440 (24 hours)
If true, registers that the recipient has consented to receive marketing messages from you.
client_ip
string
The actual IP address of the end user/client who gave consent. Required for GDPR compliance.Example: "192.168.1.100"
client_user_agent
string
Browser/device user agent string of the person who gave consent.Example: "Mozilla/5.0 (Windows NT 10.0; Win64; x64)..."
URL of the page where consent was obtained.Example: "https://example.com/subscribe"

Response

success
boolean
Whether the message was queued successfully
message
string
Status message
data
object
curl -X POST "https://api.loyalty.lt/lt/sms/send" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -H "X-API-Secret: your_api_secret" \
  -d '{
    "source": "MyBrand",
    "destination": "+37061234567",
    "message": "Sveiki! Jūsų užsakymas #12345 išsiųstas."
  }'
{
  "success": true,
  "message": "SMS sent successfully",
  "data": {
    "message_id": "msg_abc123def456",
    "source": "MyBrand",
    "destination": "+37061234567",
    "status": "queued",
    "parts": 1,
    "cost": {
      "amount": 0.0556,
      "currency": "EUR",
      "parts_charged": 1
    },
    "scheduled": null,
    "validity": "2025-01-16T10:30:00Z",
    "marketing_consent_registered": false
  },
  "code": 200
}

Message Parts Calculation

Messages are split based on character encoding:

GSM-7 (Standard Latin Characters)

Characters: A-Z, a-z, 0-9, space, and: @£$¥èéùìòÇØøÅåΔ_ΦΓΛΩΠΨΣΘΞ^{}\\[~]|€ÆæßÉ!"#¤%&'()*+,-./:;<=>?¡ÄÖÑܧ¿äöñüà
Message LengthParts
1-160 chars1 part
161-306 chars2 parts
307-459 chars3 parts

Unicode (Non-Latin Characters, Emoji)

Message LengthParts
1-70 chars1 part
71-134 chars2 parts
135-201 chars3 parts
To minimize costs, keep messages short and use GSM-7 compatible characters when possible.