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\": \"consectetur\",
    \"phone\": \"quos\",
    \"subject\": \"consectetur\",
    \"email\": \"[email protected]\",
    \"message\": \"sit\"
}"
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": "consectetur",
    "phone": "quos",
    "subject": "consectetur",
    "email": "[email protected]",
    "message": "sit"
};

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: consectetur

phone   required  optional    

string Example: quos

subject   required  optional    

string Example: consectetur

email   required  optional    

string Example: [email protected]

message   required  optional    

string Example: sit

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\": \"ducimus\",
    \"length\": \"et\",
    \"expiration\": \"est\",
    \"sender\": \"aperiam\",
    \"payment_type\": \"assumenda\",
    \"receiver\": \"dolores\"
}"
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": "ducimus",
    "length": "et",
    "expiration": "est",
    "sender": "aperiam",
    "payment_type": "assumenda",
    "receiver": "dolores"
};

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: ducimus

length   required  optional    

int [4, 6] Example: et

expiration   required  optional    

int between 1 and 10 minutes Example: est

sender   required  optional    

string Example: aperiam

payment_type   required  optional    

string [wallet, subscription] Example: assumenda

receiver   required  optional    

phone number Example: dolores

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\": \"ad\",
    \"code\": \"quo\"
}"
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": "ad",
    "code": "quo"
};

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: ad

code   required  optional    

string Example: quo

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/contacts/{group_id}

requires authentication

Example request:
curl --request GET \
    --get "https://sms.lamah.com/api/project/contacts/est" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"page\": 9,
    \"per_page\": 9,
    \"from\": \"accusamus\",
    \"to\": \"repellendus\",
    \"group_id\": \"6ff24c0b-66ca-3e4b-985c-766b856b660c\"
}"
const url = new URL(
    "https://sms.lamah.com/api/project/contacts/est"
);

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

let body = {
    "page": 9,
    "per_page": 9,
    "from": "accusamus",
    "to": "repellendus",
    "group_id": "6ff24c0b-66ca-3e4b-985c-766b856b660c"
};

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: est

Body Parameters

page   integer  optional    

nullable Example: 9

per_page   integer  optional    

nullable Example: 9

from   date  optional    

nullable Example: accusamus

to   date  optional    

nullable Example: repellendus

group_id   string  optional    

validation.uuid. Example: 6ff24c0b-66ca-3e4b-985c-766b856b660c

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\": 18,
    \"per_page\": 16,
    \"from\": \"recusandae\",
    \"to\": \"quia\"
}"
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": 18,
    "per_page": 16,
    "from": "recusandae",
    "to": "quia"
};

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: 18

per_page   integer  optional    

nullable Example: 16

from   date  optional    

nullable Example: recusandae

to   date  optional    

nullable Example: quia

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\": \"magnam\",
    \"sender\": \"laborum\",
    \"payment_type\": \"dolor\",
    \"receiver\": \"autem\"
}"
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": "magnam",
    "sender": "laborum",
    "payment_type": "dolor",
    "receiver": "autem"
};

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: magnam

sender   required  optional    

string Example: laborum

payment_type   required  optional    

string [wallet, subscription] Example: dolor

receiver   required  optional    

phone number Example: autem

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 "{
    \"message\": \"vel\",
    \"sender\": \"laudantium\",
    \"payment_type\": \"rerum\",
    \"receivers\": [
        \"placeat\"
    ]
}"
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 = {
    "message": "vel",
    "sender": "laudantium",
    "payment_type": "rerum",
    "receivers": [
        "placeat"
    ]
};

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

message   required  optional    

string Example: vel

sender   required  optional    

string Example: laudantium

payment_type   required  optional    

string [wallet, subscription] Example: rerum

receivers   string[]  optional    

of phone numbers required

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\": \"laboriosam\",
    \"sender\": \"reiciendis\",
    \"payment_type\": \"omnis\",
    \"receiver\": \"quo\",
    \"params\": [
        \"nam\"
    ],
    \"template_id\": \"minus\"
}"
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": "laboriosam",
    "sender": "reiciendis",
    "payment_type": "omnis",
    "receiver": "quo",
    "params": [
        "nam"
    ],
    "template_id": "minus"
};

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: laboriosam

sender   required  optional    

string Example: reiciendis

payment_type   required  optional    

string [wallet, subscription] Example: omnis

receiver   required  optional    

phone number Example: quo

params   string[]     
template_id   required  optional    

string Example: minus

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\": \"quia\",
    \"sender\": \"omnis\",
    \"payment_type\": \"rerum\",
    \"contact_group_id\": \"quaerat\"
}"
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": "quia",
    "sender": "omnis",
    "payment_type": "rerum",
    "contact_group_id": "quaerat"
};

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: quia

sender   required  optional    

string Example: omnis

payment_type   required  optional    

string [wallet, subscription] Example: rerum

contact_group_id   required  optional    

string uuid Example: quaerat

GET api/sms/messages/{message_id}

requires authentication

Example request:
curl --request GET \
    --get "https://sms.lamah.com/api/sms/messages/modi?message_id=in" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"message_id\": \"4eec60a2-8195-36cd-aa41-b6d4353c5033\"
}"
const url = new URL(
    "https://sms.lamah.com/api/sms/messages/modi"
);

const params = {
    "message_id": "in",
};
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": "4eec60a2-8195-36cd-aa41-b6d4353c5033"
};

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: modi

Query Parameters

message_id   string     

uuid Example: in

Body Parameters

message_id   string     

validation.uuid. Example: 4eec60a2-8195-36cd-aa41-b6d4353c5033

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\": 5,
    \"per_page\": 13,
    \"from\": \"non\",
    \"to\": \"non\"
}"
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": 5,
    "per_page": 13,
    "from": "non",
    "to": "non"
};

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: 5

per_page   integer  optional    

nullable Example: 13

from   date  optional    

nullable Example: non

to   date  optional    

nullable Example: non