AeternityChat Developer API
Welcome to the AeternityChat Developer API.
Use these APIs to send messages, schedule customer sequences etc programmatically.
Authentication
All Developer API requests must include your API key in the request headers.
Required Header
{
"x-aeternitychat-key": "<your_api_key>"
}Messaging API
Send Bulk Messages
Send up to 100 messages in a single asynchronous request.
Note
- Maximum 100 messages per API request.
- Requests are accepted immediately and processed asynchronously in the background.
Endpoint
POST https://api.aeternity.chat/api/v1/developer/message/channel/:channel/connection/:connectionIdPath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
channel | string | Yes | Messaging channel (for example: whatsapp) |
connectionId | string | Yes | Channel connection identifier |
Request Body
The request body contains a messages array holding up to 100 message objects. Every message must specify messaging_product, recipient to, and the message type.
{
"messages": [
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "919876543210",
"type": "text",
"text": {
"preview_url": false,
"body": "Hello from AeternityChat!"
}
}
]
}Base Message Fields
| Field | Type | Required | Description |
|---|---|---|---|
messaging_product | string | Yes | Messaging channel. Must be "whatsapp" |
to | string | Yes | Customer phone number with country code without + (e.g. 919876543210) |
type | string | Yes | Message format: text, image, video, audio, document, sticker, location, contacts, reaction, interactive, template |
recipient_type | string | No | Defaults to "individual" |
Supported Message Formats
AeternityChat supports all WhatsApp message formats. See the full WhatsApp Message Formats Reference for complete schemas, constraints, and interactive components.
1. Text Message (type: "text")
{
"messaging_product": "whatsapp",
"to": "919876543210",
"type": "text",
"text": {
"preview_url": true,
"body": "Welcome to *AeternityChat*! Visit https://aeternity.chat to learn more."
}
}2. Media Messages (image, video, audio, document, sticker)
{
"messaging_product": "whatsapp",
"to": "919876543210",
"type": "image",
"image": {
"link": "https://example.com/promo.jpg",
"caption": "Check out our latest release!"
}
}Supported media types: image (JPEG/PNG), video (MP4/3GP), audio (AAC/MP3/OGG), document (PDF/DOCX/XLSX with filename), sticker (WebP 512x512).
3. Location Message (type: "location")
{
"messaging_product": "whatsapp",
"to": "919876543210",
"type": "location",
"location": {
"latitude": 12.971598,
"longitude": 77.594566,
"name": "AeternityChat HQ",
"address": "Indiranagar, Bengaluru, Karnataka"
}
}4. Interactive Quick Reply Buttons (type: "interactive")
{
"messaging_product": "whatsapp",
"to": "919876543210",
"type": "interactive",
"interactive": {
"type": "button",
"body": {
"text": "How would you rate your onboarding experience?"
},
"action": {
"buttons": [
{
"type": "reply",
"reply": {
"id": "btn_excellent",
"title": "🌟 Excellent"
}
},
{
"type": "reply",
"reply": {
"id": "btn_good",
"title": "👍 Good"
}
}
]
}
}
}5. Interactive List Menu (type: "interactive")
{
"messaging_product": "whatsapp",
"to": "919876543210",
"type": "interactive",
"interactive": {
"type": "list",
"header": { "type": "text", "text": "Customer Support" },
"body": { "text": "Please select a service option:" },
"action": {
"button": "View Options",
"sections": [
{
"title": "Help Topics",
"rows": [
{ "id": "opt_billing", "title": "Billing Queries", "description": "Invoices and subscription" },
{ "id": "opt_tech", "title": "API Support", "description": "Webhook and API integration" }
]
}
]
}
}
}6. Interactive WhatsApp Flow (type: "interactive")
{
"messaging_product": "whatsapp",
"to": "919876543210",
"type": "interactive",
"interactive": {
"type": "flow",
"body": { "text": "Tap below to book your appointment:" },
"action": {
"name": "flow",
"parameters": {
"flow_message_version": "3",
"flow_token": "token_session_123",
"flow_id": "YOUR_FLOW_ID",
"flow_cta": "Book Slot",
"flow_action": "navigate"
}
}
}
}7. Template Message (type: "template")
{
"messaging_product": "whatsapp",
"to": "919876543210",
"type": "template",
"template": {
"name": "order_update",
"language": { "code": "en_US" },
"components": [
{
"type": "body",
"parameters": [
{ "type": "text", "text": "Jane" },
{ "type": "text", "text": "ORD-10293" }
]
}
]
}
}Explore More Payloads: See the WhatsApp Message Formats Reference for CTA URL Buttons, Location Requests, Voice Call Buttons, Carousel Cards, Address Requests, Order Details & Payments (Razorpay, PayU, UPI), and Product Catalogs.
Response
HTTP Status: 202 Accepted
{
"messages": [
{
"id": "<unique_id>",
"status": "ready"
},
{
"id": "<unique_id>",
"status": "failed",
"error": "<error_reason>"
}
]
}Response Fields
| Field | Type | Description |
|---|---|---|
messages | array | Processing result for each submitted message |
messages[].id | string | Unique message identifier |
messages[].status | string | Processing status (ready or failed) |
messages[].error | string | Failure reason (only present when status is failed) |
cURL Example
curl --request POST \
--url "https://api.aeternity.chat/api/v1/developer/message/channel/whatsapp/connection/YOUR_CONNECTION_ID" \
--header "Content-Type: application/json" \
--header "x-aeternitychat-key: YOUR_API_KEY" \
--data '{
"messages": [
{
"messaging_product": "whatsapp",
"to": "919876543210",
"type": "text",
"text": {
"body": "Hello from AeternityChat"
}
}
]
}'Notes
- Requests are processed asynchronously.
- Each message is validated independently.
- A successful API response (
202 Accepted) only indicates that the request has been accepted for processing. - Individual message failures are returned inside the
messagesarray.
Sequence API
Schedule a Journey
Schedule a sequence for a contact.
Endpoint
POST https://api.aeternity.chat/api/v1/developer/journey/schedule/:sequenceId/contact/:contactIdParameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
sequenceId | string | Yes | — | Sequence identifier |
contactId | string | Yes | — | Contact identifier |
cancelAllPreviousJourneys | boolean | No | true | Cancel all existing scheduled sequences for the contact before scheduling the new one |
shiftMessagesBySeconds | number | No | 0 | Shift the timing of every message in the sequence by the specified number of seconds |
Response
HTTP Status: 202 Accepted
{}cURL Example
curl --request POST \
"https://api.aeternity.chat/api/v1/developer/journey/schedule/<sequenceId>/contact/<contactId>" \
--header "x-aeternitychat-key: YOUR_API_KEY"Cancel a Scheduled Sequence
Cancel one or all scheduled sequences for a contact.
Endpoint
POST https://api.aeternity.chat/api/v1/developer/journey/cancel/contact/:contactIdParameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
contactId | string | Yes | — | Contact identifier |
cancelledReason | string | Yes | — | Reason for cancelling the journey |
scheduledJourneyId | string | No | — | Cancel a specific scheduled journey |
Response
HTTP Status: 202 Accepted
{}cURL Example
curl --request POST \
"https://api.aeternity.chat/api/v1/developer/journey/cancel/contact/<contactId>" \
--header "x-aeternitychat-key: YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"scheduledJourneyId": "test",
"cancelledReason": "Contact is qualified"
}'Notes
- To cancel a specific scheduled sequence, provide
scheduledJourneyId.