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\": \"hic\",
    \"phone\": \"ut\",
    \"subject\": \"aut\",
    \"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": "hic",
    "phone": "ut",
    "subject": "aut",
    "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: hic

phone   required  optional    

string Example: ut

subject   required  optional    

string Example: aut

email   required  optional    

string Example: [email protected]

message   required  optional    

string Example: voluptatem

Endpoints

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\": \"eligendi\",
    \"length\": \"in\",
    \"expiration\": \"rerum\",
    \"sender\": \"repellat\",
    \"payment_type\": \"quibusdam\",
    \"receiver\": \"amet\"
}"
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": "eligendi",
    "length": "in",
    "expiration": "rerum",
    "sender": "repellat",
    "payment_type": "quibusdam",
    "receiver": "amet"
};

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

length   required  optional    

int [4, 6] Example: in

expiration   required  optional    

int between 1 and 10 minutes Example: rerum

sender   required  optional    

string Example: repellat

payment_type   required  optional    

string [wallet, subscription] Example: quibusdam

receiver   required  optional    

phone number Example: amet

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\": \"iste\",
    \"code\": \"nihil\"
}"
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": "iste",
    "code": "nihil"
};

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

code   required  optional    

string Example: nihil

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/minus" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"page\": 14,
    \"per_page\": 18,
    \"from\": \"sed\",
    \"to\": \"enim\",
    \"group_id\": \"e8ff83c4-e405-3c7f-96da-98a781a22d8c\"
}"
const url = new URL(
    "https://sms.lamah.com/api/project/contacts/minus"
);

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

let body = {
    "page": 14,
    "per_page": 18,
    "from": "sed",
    "to": "enim",
    "group_id": "e8ff83c4-e405-3c7f-96da-98a781a22d8c"
};

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

Body Parameters

page   integer  optional    

nullable Example: 14

per_page   integer  optional    

nullable Example: 18

from   date  optional    

nullable Example: sed

to   date  optional    

nullable Example: enim

group_id   string  optional    

validation.uuid. Example: e8ff83c4-e405-3c7f-96da-98a781a22d8c

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\": 3,
    \"per_page\": 14,
    \"from\": \"sapiente\",
    \"to\": \"et\"
}"
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": 3,
    "per_page": 14,
    "from": "sapiente",
    "to": "et"
};

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

per_page   integer  optional    

nullable Example: 14

from   date  optional    

nullable Example: sapiente

to   date  optional    

nullable Example: et

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\": \"qui\",
    \"sender\": \"excepturi\",
    \"payment_type\": \"nihil\",
    \"receiver\": \"quaerat\"
}"
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": "qui",
    "sender": "excepturi",
    "payment_type": "nihil",
    "receiver": "quaerat"
};

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

sender   required  optional    

string Example: excepturi

payment_type   required  optional    

string [wallet, subscription] Example: nihil

receiver   required  optional    

phone number Example: quaerat

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\": \"ea\",
    \"sender\": \"dolores\",
    \"payment_type\": \"doloribus\",
    \"receivers\": [
        \"molestiae\"
    ]
}"
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": "ea",
    "sender": "dolores",
    "payment_type": "doloribus",
    "receivers": [
        "molestiae"
    ]
};

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

sender   required  optional    

string Example: dolores

payment_type   required  optional    

string [wallet, subscription] Example: doloribus

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\": \"ea\",
    \"sender\": \"velit\",
    \"payment_type\": \"odit\",
    \"receiver\": \"dolore\",
    \"params\": [
        \"deserunt\"
    ],
    \"template_id\": \"fuga\"
}"
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": "ea",
    "sender": "velit",
    "payment_type": "odit",
    "receiver": "dolore",
    "params": [
        "deserunt"
    ],
    "template_id": "fuga"
};

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

sender   required  optional    

string Example: velit

payment_type   required  optional    

string [wallet, subscription] Example: odit

receiver   required  optional    

phone number Example: dolore

params   string[]     
template_id   required  optional    

string Example: fuga

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\": \"omnis\",
    \"sender\": \"inventore\",
    \"payment_type\": \"impedit\",
    \"contact_group_id\": \"natus\"
}"
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": "omnis",
    "sender": "inventore",
    "payment_type": "impedit",
    "contact_group_id": "natus"
};

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

sender   required  optional    

string Example: inventore

payment_type   required  optional    

string [wallet, subscription] Example: impedit

contact_group_id   required  optional    

string uuid Example: natus

GET api/sms/messages/{message_id}

requires authentication

Example request:
curl --request GET \
    --get "https://sms.lamah.com/api/sms/messages/optio?message_id=atque" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"message_id\": \"aa817e18-89a3-37a0-9ff8-69f166a24984\"
}"
const url = new URL(
    "https://sms.lamah.com/api/sms/messages/optio"
);

const params = {
    "message_id": "atque",
};
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": "aa817e18-89a3-37a0-9ff8-69f166a24984"
};

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

Query Parameters

message_id   string     

uuid Example: atque

Body Parameters

message_id   string     

validation.uuid. Example: aa817e18-89a3-37a0-9ff8-69f166a24984

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\": 12,
    \"per_page\": 10,
    \"from\": \"aut\",
    \"to\": \"est\"
}"
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": 12,
    "per_page": 10,
    "from": "aut",
    "to": "est"
};

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

per_page   integer  optional    

nullable Example: 10

from   date  optional    

nullable Example: aut

to   date  optional    

nullable Example: est