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\": \"incidunt\",
    \"phone\": \"rem\",
    \"subject\": \"accusantium\",
    \"email\": \"[email protected]\",
    \"message\": \"numquam\"
}"
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": "incidunt",
    "phone": "rem",
    "subject": "accusantium",
    "email": "[email protected]",
    "message": "numquam"
};

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

phone   required  optional    

string Example: rem

subject   required  optional    

string Example: accusantium

email   required  optional    

string Example: [email protected]

message   required  optional    

string Example: numquam

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\": \"dolor\",
    \"length\": \"voluptatem\",
    \"expiration\": \"sit\",
    \"sender\": \"maiores\",
    \"payment_type\": \"id\",
    \"receiver\": \"ut\"
}"
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": "dolor",
    "length": "voluptatem",
    "expiration": "sit",
    "sender": "maiores",
    "payment_type": "id",
    "receiver": "ut"
};

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

length   required  optional    

int [4, 6] Example: voluptatem

expiration   required  optional    

int between 1 and 10 minutes Example: sit

sender   required  optional    

string Example: maiores

payment_type   required  optional    

string [wallet, subscription] Example: id

receiver   required  optional    

phone number Example: ut

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\": \"earum\",
    \"code\": \"et\"
}"
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": "earum",
    "code": "et"
};

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

code   required  optional    

string Example: et

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/debitis" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"page\": 1,
    \"per_page\": 13,
    \"from\": \"id\",
    \"to\": \"esse\",
    \"group_id\": \"e0fa5df3-555f-319d-929d-1e554ef1298d\"
}"
const url = new URL(
    "https://sms.lamah.com/api/project/contacts/debitis"
);

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

let body = {
    "page": 1,
    "per_page": 13,
    "from": "id",
    "to": "esse",
    "group_id": "e0fa5df3-555f-319d-929d-1e554ef1298d"
};

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

Body Parameters

page   integer  optional    

nullable Example: 1

per_page   integer  optional    

nullable Example: 13

from   date  optional    

nullable Example: id

to   date  optional    

nullable Example: esse

group_id   string  optional    

يجب أن يكون الحقل value معرف UUID صالحًا. Example: e0fa5df3-555f-319d-929d-1e554ef1298d

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\": 19,
    \"per_page\": 1,
    \"from\": \"libero\",
    \"to\": \"aut\"
}"
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": 19,
    "per_page": 1,
    "from": "libero",
    "to": "aut"
};

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

per_page   integer  optional    

nullable Example: 1

from   date  optional    

nullable Example: libero

to   date  optional    

nullable Example: aut

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\": \"atque\",
    \"sender\": \"quod\",
    \"payment_type\": \"iusto\",
    \"receiver\": \"tenetur\"
}"
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": "atque",
    "sender": "quod",
    "payment_type": "iusto",
    "receiver": "tenetur"
};

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

sender   required  optional    

string Example: quod

payment_type   required  optional    

string [wallet, subscription] Example: iusto

receiver   required  optional    

phone number Example: tenetur

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\": [
        \"ut\"
    ],
    \"message\": \"tempora\",
    \"sender\": \"esse\",
    \"payment_type\": \"aspernatur\"
}"
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": [
        "ut"
    ],
    "message": "tempora",
    "sender": "esse",
    "payment_type": "aspernatur"
};

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

sender   required  optional    

string Example: esse

payment_type   required  optional    

string [wallet, subscription] Example: aspernatur

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\": \"quo\",
    \"sender\": \"ea\",
    \"payment_type\": \"necessitatibus\",
    \"receiver\": \"dolore\",
    \"params\": [
        \"odio\"
    ],
    \"template_id\": \"corrupti\"
}"
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": "quo",
    "sender": "ea",
    "payment_type": "necessitatibus",
    "receiver": "dolore",
    "params": [
        "odio"
    ],
    "template_id": "corrupti"
};

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

sender   required  optional    

string Example: ea

payment_type   required  optional    

string [wallet, subscription] Example: necessitatibus

receiver   required  optional    

phone number Example: dolore

params   string[]     
expires_after   string  optional    
template_id   required  optional    

string Example: corrupti

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\": \"distinctio\",
    \"sender\": \"culpa\",
    \"payment_type\": \"non\",
    \"contact_group_id\": \"eligendi\"
}"
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": "distinctio",
    "sender": "culpa",
    "payment_type": "non",
    "contact_group_id": "eligendi"
};

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

sender   required  optional    

string Example: culpa

payment_type   required  optional    

string [wallet, subscription] Example: non

contact_group_id   required  optional    

string uuid Example: eligendi

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/qui?message_id=magnam" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"message_id\": \"b5cbbcf4-d5eb-39aa-b248-e70576ac3fff\"
}"
const url = new URL(
    "https://sms.lamah.com/api/sms/messages/qui"
);

const params = {
    "message_id": "magnam",
};
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": "b5cbbcf4-d5eb-39aa-b248-e70576ac3fff"
};

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

Query Parameters

message_id   string     

uuid Example: magnam

Body Parameters

message_id   string     

يجب أن يكون الحقل value معرف UUID صالحًا. Example: b5cbbcf4-d5eb-39aa-b248-e70576ac3fff

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

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

per_page   integer  optional    

nullable Example: 13

from   date  optional    

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

to   date  optional    

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