MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by following these steps:

Contact Us

POST api/contact-us

requires authentication

Example request:
curl --request POST \
    "https://sms.lamah.com/api/contact-us" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"name\": \"quidem\",
    \"phone\": \"est\",
    \"subject\": \"laboriosam\",
    \"email\": \"[email protected]\",
    \"message\": \"voluptatem\"
}"
const url = new URL(
    "https://sms.lamah.com/api/contact-us"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "quidem",
    "phone": "est",
    "subject": "laboriosam",
    "email": "[email protected]",
    "message": "voluptatem"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


json {"message": "string"}
 

Request      

POST api/contact-us

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Body Parameters

name   required  optional    

string Example: quidem

phone   required  optional    

string Example: est

subject   required  optional    

string Example: laboriosam

email   required  optional    

string Example: [email protected]

message   required  optional    

string Example: voluptatem

Endpoints

GET api/wallet/callback

requires authentication

Example request:
curl --request GET \
    --get "https://sms.lamah.com/api/wallet/callback" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}"
const url = new URL(
    "https://sms.lamah.com/api/wallet/callback"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (302):

Show headers
cache-control: no-cache, private
location: https://sms.lamah.com/company/transactions?payment_status=invalid_data
content-type: text/html; charset=utf-8
access-control-allow-origin: *
 

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="refresh" content="0;url='https://sms.lamah.com/company/transactions?payment_status=invalid_data'" />

        <title>Redirecting to https://sms.lamah.com/company/transactions?payment_status=invalid_data</title>
    </head>
    <body>
        Redirecting to <a href="https://sms.lamah.com/company/transactions?payment_status=invalid_data">https://sms.lamah.com/company/transactions?payment_status=invalid_data</a>.
    </body>
</html>
 

Request      

GET api/wallet/callback

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

GET api/faq

requires authentication

Example request:
curl --request GET \
    --get "https://sms.lamah.com/api/faq" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}"
const url = new URL(
    "https://sms.lamah.com/api/faq"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": [
        {
            "question": "كيف يمكنني الاشتراك؟",
            "answer": "للاشتراك في الخدمة، قم بزيارة موقع  وانقر على زر 'التسجيل'. املأ نموذج التسجيل بتفاصيلك، واختر خطة الاشتراك التي تناسب احتياجاتك، وأكمل عملية الدفع. بمجرد الانتهاء، ستتلقى رسالة تأكيد عبر البريد الإلكتروني للبدء!"
        }
    ]
}
 

Request      

GET api/faq

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

GET api/cities

requires authentication

Example request:
curl --request GET \
    --get "https://sms.lamah.com/api/cities" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}"
const url = new URL(
    "https://sms.lamah.com/api/cities"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": [
        {
            "name": "مصراتة",
            "description": null
        },
        {
            "name": "طرابلس",
            "description": null
        },
        {
            "name": "الزنتان",
            "description": null
        },
        {
            "name": "الزاوية",
            "description": null
        },
        {
            "name": "الخمس",
            "description": null
        },
        {
            "name": "زوارة",
            "description": null
        },
        {
            "name": "ترهونة",
            "description": null
        },
        {
            "name": "العزيزية",
            "description": null
        },
        {
            "name": "غريان",
            "description": null
        },
        {
            "name": "بنغازي",
            "description": null
        },
        {
            "name": "البيضاء",
            "description": null
        },
        {
            "name": "درنة",
            "description": null
        },
        {
            "name": "طبرق",
            "description": null
        },
        {
            "name": "اجدابيا",
            "description": null
        },
        {
            "name": "المرج",
            "description": null
        },
        {
            "name": "شحات",
            "description": null
        },
        {
            "name": "سرت",
            "description": null
        },
        {
            "name": "سبها",
            "description": null
        },
        {
            "name": "مرزق",
            "description": null
        },
        {
            "name": "أوباري",
            "description": null
        },
        {
            "name": "غات",
            "description": null
        },
        {
            "name": "براك الشاطئ",
            "description": null
        },
        {
            "name": "القطرون",
            "description": null
        },
        {
            "name": "نالوت",
            "description": null
        }
    ]
}
 

Request      

GET api/cities

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

OTP

POST api/otp/initiate

requires authentication

Example request:
curl --request POST \
    "https://sms.lamah.com/api/otp/initiate" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"lang\": \"perferendis\",
    \"length\": \"facilis\",
    \"expiration\": \"quidem\",
    \"sender\": \"enim\",
    \"payment_type\": \"quia\",
    \"receiver\": \"laudantium\"
}"
const url = new URL(
    "https://sms.lamah.com/api/otp/initiate"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "lang": "perferendis",
    "length": "facilis",
    "expiration": "quidem",
    "sender": "enim",
    "payment_type": "quia",
    "receiver": "laudantium"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


json {"request_id": "string", "cost": int}
 

Request      

POST api/otp/initiate

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Body Parameters

lang   required  optional    

string [ar, en] Example: perferendis

length   required  optional    

int [4, 6] Example: facilis

expiration   required  optional    

int between 1 and 10 minutes Example: quidem

sender   required  optional    

string Example: enim

payment_type   required  optional    

string [wallet, subscription] Example: quia

receiver   required  optional    

phone number Example: laudantium

POST api/otp/verify

requires authentication

Example request:
curl --request POST \
    "https://sms.lamah.com/api/otp/verify" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"request_id\": \"nostrum\",
    \"code\": \"voluptatem\"
}"
const url = new URL(
    "https://sms.lamah.com/api/otp/verify"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "request_id": "nostrum",
    "code": "voluptatem"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


json {"message": "string"}
 

Request      

POST api/otp/verify

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Body Parameters

request_id   required  optional    

string Example: nostrum

code   required  optional    

string Example: voluptatem

Plan

GET api/plans

Example request:
curl --request GET \
    --get "https://sms.lamah.com/api/plans"
const url = new URL(
    "https://sms.lamah.com/api/plans"
);



fetch(url, {
    method: "GET",
}).then(response => response.json());

Example response (200):


json
 

Request      

GET api/plans

Project

GET api/project/details

requires authentication

Example request:
curl --request GET \
    --get "https://sms.lamah.com/api/project/details" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}"
const url = new URL(
    "https://sms.lamah.com/api/project/details"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


json
 

Request      

GET api/project/details

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

GET api/project/balance

requires authentication

Example request:
curl --request GET \
    --get "https://sms.lamah.com/api/project/balance" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}"
const url = new URL(
    "https://sms.lamah.com/api/project/balance"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


json
 

Request      

GET api/project/balance

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

GET api/project/contact-groups

requires authentication

Example request:
curl --request GET \
    --get "https://sms.lamah.com/api/project/contact-groups" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}"
const url = new URL(
    "https://sms.lamah.com/api/project/contact-groups"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


json
 

Request      

GET api/project/contact-groups

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

GET api/project/contacts/{group_id}

requires authentication

Example request:
curl --request GET \
    --get "https://sms.lamah.com/api/project/contacts/voluptatem" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"page\": 3,
    \"per_page\": 17,
    \"from\": \"officia\",
    \"to\": \"quo\",
    \"group_id\": \"31d82aae-bb62-3f1c-89eb-ec8abf0e8fab\"
}"
const url = new URL(
    "https://sms.lamah.com/api/project/contacts/voluptatem"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "page": 3,
    "per_page": 17,
    "from": "officia",
    "to": "quo",
    "group_id": "31d82aae-bb62-3f1c-89eb-ec8abf0e8fab"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


json
 

Request      

GET api/project/contacts/{group_id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

URL Parameters

group_id   string     

The ID of the group. Example: voluptatem

Body Parameters

page   integer  optional    

nullable Example: 3

per_page   integer  optional    

nullable Example: 17

from   date  optional    

nullable Example: officia

to   date  optional    

nullable Example: quo

group_id   string  optional    

يجب أن يكون الحقل value معرف UUID صالحًا. Example: 31d82aae-bb62-3f1c-89eb-ec8abf0e8fab

GET api/project/consumptions

requires authentication

Example request:
curl --request GET \
    --get "https://sms.lamah.com/api/project/consumptions" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"page\": 10,
    \"per_page\": 2,
    \"from\": \"eum\",
    \"to\": \"aspernatur\"
}"
const url = new URL(
    "https://sms.lamah.com/api/project/consumptions"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "page": 10,
    "per_page": 2,
    "from": "eum",
    "to": "aspernatur"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


json
 

Request      

GET api/project/consumptions

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Body Parameters

page   integer  optional    

nullable Example: 10

per_page   integer  optional    

nullable Example: 2

from   date  optional    

nullable Example: eum

to   date  optional    

nullable Example: aspernatur

SMS

POST api/sms/messages

requires authentication

Example request:
curl --request POST \
    "https://sms.lamah.com/api/sms/messages" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"message\": \"soluta\",
    \"sender\": \"et\",
    \"payment_type\": \"qui\",
    \"receiver\": \"necessitatibus\"
}"
const url = new URL(
    "https://sms.lamah.com/api/sms/messages"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "message": "soluta",
    "sender": "et",
    "payment_type": "qui",
    "receiver": "necessitatibus"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


json
 

Request      

POST api/sms/messages

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Body Parameters

message   required  optional    

string Example: soluta

sender   required  optional    

string Example: et

payment_type   required  optional    

string [wallet, subscription] Example: qui

receiver   required  optional    

phone number Example: necessitatibus

expires_after   string  optional    

POST api/sms/messages/bulk

requires authentication

Example request:
curl --request POST \
    "https://sms.lamah.com/api/sms/messages/bulk" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"receivers\": [
        \"esse\"
    ],
    \"message\": \"ipsum\",
    \"sender\": \"debitis\",
    \"payment_type\": \"dolore\"
}"
const url = new URL(
    "https://sms.lamah.com/api/sms/messages/bulk"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "receivers": [
        "esse"
    ],
    "message": "ipsum",
    "sender": "debitis",
    "payment_type": "dolore"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


json
 

Request      

POST api/sms/messages/bulk

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Body Parameters

receivers   string[]  optional    

of phone numbers required

message   required  optional    

string Example: ipsum

sender   required  optional    

string Example: debitis

payment_type   required  optional    

string [wallet, subscription] Example: dolore

POST api/sms/messages/template

requires authentication

Example request:
curl --request POST \
    "https://sms.lamah.com/api/sms/messages/template" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"template_name\": \"quae\",
    \"sender\": \"ullam\",
    \"payment_type\": \"accusamus\",
    \"receiver\": \"deleniti\",
    \"params\": [
        \"non\"
    ],
    \"template_id\": \"est\"
}"
const url = new URL(
    "https://sms.lamah.com/api/sms/messages/template"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "template_name": "quae",
    "sender": "ullam",
    "payment_type": "accusamus",
    "receiver": "deleniti",
    "params": [
        "non"
    ],
    "template_id": "est"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


json
 

Request      

POST api/sms/messages/template

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Body Parameters

template_name   string     

Example: quae

sender   required  optional    

string Example: ullam

payment_type   required  optional    

string [wallet, subscription] Example: accusamus

receiver   required  optional    

phone number Example: deleniti

params   string[]     
expires_after   string  optional    
template_id   required  optional    

string Example: est

POST api/sms/messages/contacts

requires authentication

Example request:
curl --request POST \
    "https://sms.lamah.com/api/sms/messages/contacts" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"message\": \"laudantium\",
    \"sender\": \"eum\",
    \"payment_type\": \"qui\",
    \"contact_group_id\": \"voluptatibus\"
}"
const url = new URL(
    "https://sms.lamah.com/api/sms/messages/contacts"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "message": "laudantium",
    "sender": "eum",
    "payment_type": "qui",
    "contact_group_id": "voluptatibus"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


json
 

Request      

POST api/sms/messages/contacts

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Body Parameters

message   required  optional    

string Example: laudantium

sender   required  optional    

string Example: eum

payment_type   required  optional    

string [wallet, subscription] Example: qui

contact_group_id   required  optional    

string uuid Example: voluptatibus

expires_after   string  optional    

GET api/sms/messages/{message_id}

requires authentication

Example request:
curl --request GET \
    --get "https://sms.lamah.com/api/sms/messages/facilis?message_id=et" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"message_id\": \"a2b24730-842c-3c54-bdd9-ca86f9430e00\"
}"
const url = new URL(
    "https://sms.lamah.com/api/sms/messages/facilis"
);

const params = {
    "message_id": "et",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "message_id": "a2b24730-842c-3c54-bdd9-ca86f9430e00"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


json
 

Request      

GET api/sms/messages/{message_id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

URL Parameters

message_id   string     

The ID of the message. Example: facilis

Query Parameters

message_id   string     

uuid Example: et

Body Parameters

message_id   string     

يجب أن يكون الحقل value معرف UUID صالحًا. Example: a2b24730-842c-3c54-bdd9-ca86f9430e00

GET api/sms/messages

requires authentication

Example request:
curl --request GET \
    --get "https://sms.lamah.com/api/sms/messages" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"page\": 15,
    \"per_page\": 1,
    \"from\": \"magnam\",
    \"to\": \"eveniet\"
}"
const url = new URL(
    "https://sms.lamah.com/api/sms/messages"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "page": 15,
    "per_page": 1,
    "from": "magnam",
    "to": "eveniet"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


json
 

Request      

GET api/sms/messages

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Body Parameters

page   integer  optional    

nullable Example: 15

per_page   integer  optional    

nullable Example: 1

from   date  optional    

nullable Within the last 90 days once message archiving is on; older messages are archived. Example: magnam

to   date  optional    

nullable Within the last 90 days once message archiving is on; older messages are archived. Example: eveniet