Skip to main content
GET
/
{locale}
/
sms
/
status
/
{message_id}
curl -X GET "https://api.loyalty.lt/lt/sms/status/msg_abc123def456" \
  -H "X-API-Key: your_api_key" \
  -H "X-API-Secret: your_api_secret"
const messageId = 'msg_abc123def456';

const response = await fetch(`https://api.loyalty.lt/lt/sms/status/${messageId}`, {
  headers: {
    'X-API-Key': 'your_api_key',
    'X-API-Secret': 'your_api_secret'
  }
});

const data = await response.json();
console.log(`Status: ${data.data.status}`);

if (data.data.delivered_at) {
  console.log(`Delivered at: ${data.data.delivered_at}`);
}
<?php
$messageId = 'msg_abc123def456';

$response = file_get_contents(
    "https://api.loyalty.lt/lt/sms/status/$messageId",
    false,
    stream_context_create([
        'http' => [
            'method' => 'GET',
            'header' => [
                'X-API-Key: your_api_key',
                'X-API-Secret: your_api_secret'
            ]
        ]
    ])
);

$result = json_decode($response, true);
echo "Status: " . $result['data']['status'];
import requests

message_id = 'msg_abc123def456'

response = requests.get(
    f'https://api.loyalty.lt/lt/sms/status/{message_id}',
    headers={
        'X-API-Key': 'your_api_key',
        'X-API-Secret': 'your_api_secret'
    }
)

data = response.json()
print(f"Status: {data['data']['status']}")
{
  "success": true,
  "data": {
    "message_id": "msg_abc123def456",
    "status": "delivered",
    "source": "MyBrand",
    "destination": "+37061234567",
    "sent_at": "2025-01-15T10:30:00Z",
    "delivered_at": "2025-01-15T10:30:05Z",
    "failed_at": null,
    "scheduled": null,
    "validity": "2025-01-16T10:30:00Z",
    "cost": {
      "amount": 0.0556,
      "currency": "EUR"
    },
    "error_message": null
  }
}
{
  "success": true,
  "data": {
    "message_id": "msg_xyz789",
    "status": "queued",
    "source": "MyBrand",
    "destination": "+37061234567",
    "sent_at": null,
    "delivered_at": null,
    "failed_at": null,
    "scheduled": "2025-01-16T08:00:00Z",
    "validity": "2025-01-17T08:00:00Z",
    "cost": {
      "amount": 0.0556,
      "currency": "EUR"
    },
    "error_message": null
  }
}
{
  "success": true,
  "data": {
    "message_id": "msg_failed123",
    "status": "failed",
    "source": "MyBrand",
    "destination": "+37061234567",
    "sent_at": "2025-01-15T10:30:00Z",
    "delivered_at": null,
    "failed_at": "2025-01-15T10:30:02Z",
    "scheduled": null,
    "validity": null,
    "cost": {
      "amount": 0.0556,
      "currency": "EUR"
    },
    "error_message": "Number not in service"
  }
}
{
  "success": false,
  "message": "Message not found"
}

Get SMS Status

Retrieve the current delivery status and details of a previously sent SMS message.

Path Parameters

locale
string
required
Language code (e.g., lt, en)
message_id
string
required
Message ID returned from the Send SMS endpoint.Example: msg_abc123def456

Authentication

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

Response

success
boolean
Whether the request was successful
data
object
curl -X GET "https://api.loyalty.lt/lt/sms/status/msg_abc123def456" \
  -H "X-API-Key: your_api_key" \
  -H "X-API-Secret: your_api_secret"
const messageId = 'msg_abc123def456';

const response = await fetch(`https://api.loyalty.lt/lt/sms/status/${messageId}`, {
  headers: {
    'X-API-Key': 'your_api_key',
    'X-API-Secret': 'your_api_secret'
  }
});

const data = await response.json();
console.log(`Status: ${data.data.status}`);

if (data.data.delivered_at) {
  console.log(`Delivered at: ${data.data.delivered_at}`);
}
<?php
$messageId = 'msg_abc123def456';

$response = file_get_contents(
    "https://api.loyalty.lt/lt/sms/status/$messageId",
    false,
    stream_context_create([
        'http' => [
            'method' => 'GET',
            'header' => [
                'X-API-Key: your_api_key',
                'X-API-Secret: your_api_secret'
            ]
        ]
    ])
);

$result = json_decode($response, true);
echo "Status: " . $result['data']['status'];
import requests

message_id = 'msg_abc123def456'

response = requests.get(
    f'https://api.loyalty.lt/lt/sms/status/{message_id}',
    headers={
        'X-API-Key': 'your_api_key',
        'X-API-Secret': 'your_api_secret'
    }
)

data = response.json()
print(f"Status: {data['data']['status']}")
{
  "success": true,
  "data": {
    "message_id": "msg_abc123def456",
    "status": "delivered",
    "source": "MyBrand",
    "destination": "+37061234567",
    "sent_at": "2025-01-15T10:30:00Z",
    "delivered_at": "2025-01-15T10:30:05Z",
    "failed_at": null,
    "scheduled": null,
    "validity": "2025-01-16T10:30:00Z",
    "cost": {
      "amount": 0.0556,
      "currency": "EUR"
    },
    "error_message": null
  }
}
{
  "success": true,
  "data": {
    "message_id": "msg_xyz789",
    "status": "queued",
    "source": "MyBrand",
    "destination": "+37061234567",
    "sent_at": null,
    "delivered_at": null,
    "failed_at": null,
    "scheduled": "2025-01-16T08:00:00Z",
    "validity": "2025-01-17T08:00:00Z",
    "cost": {
      "amount": 0.0556,
      "currency": "EUR"
    },
    "error_message": null
  }
}
{
  "success": true,
  "data": {
    "message_id": "msg_failed123",
    "status": "failed",
    "source": "MyBrand",
    "destination": "+37061234567",
    "sent_at": "2025-01-15T10:30:00Z",
    "delivered_at": null,
    "failed_at": "2025-01-15T10:30:02Z",
    "scheduled": null,
    "validity": null,
    "cost": {
      "amount": 0.0556,
      "currency": "EUR"
    },
    "error_message": "Number not in service"
  }
}
{
  "success": false,
  "message": "Message not found"
}

Status Values

StatusDescription
queuedMessage accepted and waiting to be sent
sentMessage sent to carrier network
deliveredConfirmed delivered to recipient’s phone
failedDelivery failed (see error_message)
expiredMessage validity period expired before delivery

Polling vs Webhooks

For real-time status updates, use webhooks instead of polling this endpoint. Set receipt: true and receiptURL when sending the message.
If you must poll:
  • Wait at least 5 seconds between requests
  • Most messages are delivered within 10-30 seconds
  • Stop polling after delivered, failed, or expired status

Send SMS

Send a new SMS message

SMS Overview

Webhook setup and documentation