إرسال
SMS

Send Bulk SMS

Send the same SMS message to up to 1000 recipients at once

Endpoint

POST /api/sms/messages/bulk

Request body

FieldTypeRequiredDescription
messagestringYesMessage content (max 1530 chars for concatenated SMS)
senderstringYesSender ID (max 11 alphanumeric chars)
payment_typestringYeswallet or subscription
receiversarrayYesArray of phone numbers in international format (max 1000)

Example

curl -X POST https://sms.lamah.com/api/sms/messages/bulk \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Your order has been shipped.",
    "sender": "MyShop",
    "payment_type": "wallet",
    "receivers": [
      "00218912345678",
      "00218922654321",
      "00218944678901"
    ]
  }'

Response

{
  "message_id": "batch_123456789",
  "cost": 3,
  "details": {
    "sent": 3,
    "total": 3
  }
}
FieldDescription
message_idUnique identifier for the bulk send batch
costTotal cost for all messages
details.sentNumber of messages successfully sent
details.totalTotal number of recipients

Error responses

401 Unauthorized

{ "message": "Unauthenticated." }

Sending to more than 1000 recipients

Split your list into chunks:

const chunk = (arr, size) =>
  Array.from({ length: Math.ceil(arr.length / size) }, (_, i) =>
    arr.slice(i * size, i * size + size)
  );

for (const batch of chunk(allReceivers, 1000)) {
  await sendBulk({ ...payload, receivers: batch });
  await new Promise(r => setTimeout(r, 6000)); // wait between batches
}

Duplicate numbers are automatically removed. Maximum 1000 recipients per request.

On this page