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:
- Visit your dashboard and navigate to the Projects section.
- Create a new project or select an existing one.
- Locate and copy the API token provided in the project details.
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"}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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": "للاشتراك في الخدمة، قم بزيارة موقع وانقر على زر 'التسجيل'. املأ نموذج التسجيل بتفاصيلك، واختر خطة الاشتراك التي تناسب احتياجاتك، وأكمل عملية الدفع. بمجرد الانتهاء، ستتلقى رسالة تأكيد عبر البريد الإلكتروني للبدء!"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.