Overview
Configure and send WhatsApp messages for your organization
The messaging API configures your organization's WhatsApp channel and sends test messages through it. Configuration is per-organization — set it up once, then reference it from campaigns and automation workflows.
| Method | Endpoint | Purpose |
|---|---|---|
GET | /organizations/messaging-config | Get the organization's messaging configuration |
POST | /organizations/messaging-config | Save (partially update) the messaging configuration |
POST | /organizations/messaging-config/test | Send a test WhatsApp message |
GET | /organizations/messaging-config/whatsapp-templates | List approved WhatsApp templates |
Supported WhatsApp providers#
| Provider | Credential fields |
|---|---|
wati | api_endpoint, api_token |
meta_cloud | phone_number_id, access_token, waba_id |
gupshup | api_key, source, app_name |
twilio | account_sid, auth_token, from_number, use_telephony_credentials, content_sid |
Configure WhatsApp#
/organizations/messaging-config is a partial update — omit whatsapp to leave the current configuration unchanged.
curl -X POST https://app.lemuai.com/api/v1/organizations/messaging-config \
-H "X-API-Key: lemu_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"whatsapp": {
"provider": "meta_cloud",
"meta_cloud": {
"phone_number_id": "1234567890",
"access_token": "EAAG...",
"waba_id": "9876543210"
}
}
}'{
"whatsapp": {
"provider": "meta_cloud",
"wati": null,
"meta_cloud": {
"phone_number_id": "1234567890",
"access_token": "EAAG...",
"waba_id": "9876543210"
},
"gupshup": null,
"twilio": null
}
}Send a test message#
curl -X POST https://app.lemuai.com/api/v1/organizations/messaging-config/test \
-H "X-API-Key: lemu_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"to": "+14155550100",
"kind": "template",
"template_name": "order_confirmation",
"language": "en",
"template_params": { "1": "Ana" }
}'{
"success": true,
"provider": "meta_cloud",
"channel": "whatsapp",
"message_id": "wamid.HBgLMTQxNTU1NTAxMDA=",
"status": "sent",
"error": null
}