Overview
Send SMS messages to all contacts within a specific contact group. This endpoint allows you to send messages to organized groups of contacts that you’ve created in your dashboard.Endpoint
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
message | string | ✅ | The SMS message content to send to all contacts |
sender | string | ✅ | The sender ID (up to 11 characters) |
payment_type | string | ✅ | Payment method: wallet or subscription |
contact_group_id | string (UUID) | ✅ | ID of the contact group to send messages to |
Parameter Details
message
message
The text content that will be sent to all contacts in the group.
- Maximum length: 160 characters for single SMS, 1530 characters for concatenated SMS
- Encoding: UTF-8 supported for international characters
- Consistency: Same message is sent to all contacts in the group
sender
sender
The sender ID that will appear on all recipients’ devices.
- Length: Maximum 11 characters
- Format: Alphanumeric characters only
- Examples:
Lamah,MyCompany,Alert123
payment_type
payment_type
Specifies how the SMS costs will be charged.
wallet: Deduct from your account balancesubscription: Use your subscription plan credits
contact_group_id
contact_group_id
The unique identifier of the contact group.
- Format: UUID string (e.g.,
123e4567-e89b-12d3-a456-426614174000) - Management: Contact groups are created and managed through your dashboard
- Validation: Group must exist and belong to your project
Response
Success Response (200 OK)
Response Fields
| Field | Type | Description |
|---|---|---|
message_id | string | UUID of the created message batch |
cost | number | Parts × total contacts in the group (as returned) |
details | object | Summary of processing results |
Summary Object Fields
| Field | Type | Description |
|---|---|---|
sent | integer | Count of recipients compatible with the sender provider |
total | integer | Total contacts in the group |
The
cost field is computed as parts × total contacts in the group. Actual wallet/subscription consumption is applied based on compatible recipients.Error Responses
400 Bad Request - Invalid Group
400 Bad Request - Incompatible Sender/Receivers
401 Unauthorized
402 Payment Required
403 Forbidden
Contact Group Management
Contact groups are created and managed through your Lamah dashboard. You can view and manage your contact groups in the Contacts section.
Creating Contact Groups
- Log into Dashboard: Visit https://sms.lamah.com
- Navigate to Contacts: Go to the Contacts section
- Create New Group: Click “Create Contact Group”
- Add Contacts: Upload CSV file or add contacts manually
- Save Group: Give it a name and save
Viewing Contact Groups
You can retrieve your contact groups using the Get Project Contacts endpoint:Best Practices
Verify Group Size
Check group size before sending to estimate costs
Clean Contact Lists
Regularly clean your contact lists to remove invalid numbers
Segment Audiences
Create targeted groups for better engagement
Monitor Results
Track send results to improve future campaigns
Rate Limits
- Contact Group Sends: 5 requests per minute
- Contacts per minute: 10,000 total contacts across all group sends
Cost Estimation
Before sending to a large contact group, you can estimate costs:Monitoring Send Progress
After initiating a contact group send, you can monitor the progress using the returnedbatch_id: