LANA SMSDeveloper Docs
LANA SMS Developer Platform

Build messaging into
anything.

Everything you need to connect your application to LANA SMS. Generate an API key, make a simple POST request, and start sending reliable SMS from your own system.

REST APIBearer AuthenticationDeveloper-first

Up and running quickly

The basic integration flow is intentionally simple.


01

Get your API key

Open your LANA SMS dashboard and create or copy an API key.

02

Send POST data

Pass phone and message as regular POST parameters.

03

Read the response

The API returns a JSON response containing the result and remaining balance.

Authentication

Every protected request uses your API key as a Bearer token.


Add your API key to the Authorization request header exactly as shown below.
Required Header
Authorization: Bearer YOUR_API_KEY
Keep API keys on your server. Do not expose them in public JavaScript, mobile apps, or client-side code.

Generating and managing API Keys

Your API key is created and managed directly from your LANA SMS account.


01

Open Developer & API

From the side navigation in your LANA SMS dashboard, select Developer & API.

02

Open API Keys

Select API Keys to view keys already associated with your account.

03

Copy or generate

Copy an existing key, or click Generate New API Key to create another one.

Developer & API menu
API Keys page

Send SMS

Send one SMS or send the same message to multiple recipients.


Endpoint
POSThttps://api.lanasms.com/v1/send
Important: Do not send JSON. Pass phone and message as regular POST parameters.
ParameterRequiredDescription
phoneYesA recipient phone number. For multiple recipients, separate phone numbers with commas: 256700000000,256712345678
messageYesThe SMS content to send.

Integration examples

All examples below submit standard POST parameters.


cURL
cURL
curl -X POST "https://api.lanasms.com/v1/send" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "phone=256700000000" \
  -d "message=Hello from LANA SMS!"
PHP cURL
PHP
$ch = curl_init('https://api.lanasms.com/v1/send');

curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer YOUR_API_KEY'
  ],
  CURLOPT_POSTFIELDS => [
    'phone' => '256700000000',
    'message' => 'Hello from LANA SMS!'
  ]
]);

$response = curl_exec($ch);
$data = json_decode($response, true);
JavaScript
JavaScript
const form = new URLSearchParams();
form.append('phone', '256700000000');
form.append('message', 'Hello from LANA SMS!');

const response = await fetch(
  'https://api.lanasms.com/v1/send',
  {
    method: 'POST',
    headers: {
      Authorization: 'Bearer YOUR_API_KEY'
    },
    body: form
  }
);

const data = await response.json();
Python
Python
import requests

response = requests.post(
    'https://api.lanasms.com/v1/send',
    headers={
        'Authorization': 'Bearer YOUR_API_KEY'
    },
    data={
        'phone': '256700000000',
        'message': 'Hello from LANA SMS!'
    }
)

data = response.json()

Send SMS responses

Responses are returned as JSON.


No phone number
JSON
{
  "status": false,
  "message": "No phone number provided."
}
No message
JSON
{
  "status": false,
  "message": "No message provided."
}
Message sent successfully
JSON
{
  "status": "success",
  "message": "Message sent successfully",
  "credits": 1,
  "balance": "97"
}

Account balance and API information

Check your available credits, balance, and number of API keys on your account.


Endpoint
GEThttps://api.lanasms.com/v1/info
cURL
curl "https://api.lanasms.com/v1/info" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "status": "success",
  "credits": "97",
  "balance": "1000",
  "api_keys": "1",
  "message": "Fetched Successfully"
}

Security best practices

Protect your integration and your messaging balance.


  • Store API keys in environment variables or secure server-side configuration.
  • Never commit keys to public repositories.
  • Do not expose keys inside frontend JavaScript.
  • Generate a new key if you suspect an existing key has been exposed.