Authentication
The Unecast API uses Bearer token authentication. Every request must include your API key in theAuthorization header.
Generate your API key in Settings → API → Generate API Key. Treat your API key like a password - do not expose it in client-side code or public repositories.
Core Capabilities
Send Messages
Send WhatsApp messages, SMS, and other channel messages to any contact. Use pre-approved WhatsApp templates for business-initiated outreach.
Manage Contacts
Create, read, update, and delete contact records. Sync contact data from your CRM, database, or any external system.
Manage Lists
Add contacts to lists and remove them programmatically - useful for segmenting audiences before sending broadcasts.
Trigger Automations
Kick-off any Unecast automation for a specific contact via a single API call, letting your external systems control when automations run.
Retrieve Conversation History
Pull message history for any contact or conversation - useful for building dashboards, audit logs, or syncing chat data to a data warehouse.
Webhooks
Register webhook endpoints to receive real-time notifications when new messages arrive, contacts are updated, or automations complete.
Sending a WhatsApp Template Message
The example below sends a pre-approved WhatsApp template namedhello_world
200 statuswith the message object:
Reply to a message
Send a free-text reply within the 24-hour customer service windowThis endpoint only works when the contact has sent you a message in the last 24 hours (WhatsApp’s customer service window). If the window has expired, use the template message endpoint instead. Phone number format: digits only with country code (e.g. 919876543210).
200 statuswith the message object:
Track Delivery Status
Get delivery status of a specific messageReplace :messageId with the messageId returned when the message was sent.
200 statuswith the message object:
Contacts
List all contacts with optional filters
Query Parameters = ?search=John&limit=50&offset=0&groupId=xxx
200 statuswith the message object:
Create a new contact
Phone number must include country code, digits only (e.g. 919876543210). Returns 409 if the contact already exists.
200 statuswith the message object:
Update an existing contact
200 statuswith the message object:
Delete a contact permanently
200 statuswith the message object:
List all contact groups
200 statuswith the message object:
Add a contact to a group
200 statuswith the message object:
Templates
List all templates belonging to a channel
Query Parameters =
?status=APPROVED200 statuswith the message object:
Campaigns
List all campaigns with optional filters
Query Parameters =
?status=completed&limit=10&offset=0200 statuswith the message object:
Account
Get channel information and API details
200 statuswith the message object:
Get detailed API usage and breakdown by time period
200 statuswith the message object:
Error Codes
400 - Bad Request. The request body or parameters are invalid
401 - Unauthorized. Invalid or missing API key/secret
403 - Forbidden. Insufficient permissions for this action or 24-hour window expired
404 - Not Found. The requested resource does not exist
409 - Conflict. Resource already exists (e.g. duplicate contact phone)
429 - Rate Limited. Too many requests - slow down or upgrade your plan
500 - Internal Server Error. Something went wrong on our end.
Getting Your API Key
1
Open Unecast Platform
In Unecast, navigate to Settings→ API.
2
Generate a Key
Click Generate API Key. Give the key a descriptive name (e.g., “Production Integration”) so you can identify it later.
3
Playground
Once an API key is created, you’ll get access to a playground where you can try the API by calling any available endpoint directly from the Unecast dashboard.
.png?fit=max&auto=format&n=bN5f8AdSLzZdY6yK&q=85&s=a7d9c6e1dd5f316fd42ec7fdc5b9a81a)
.png?fit=max&auto=format&n=bN5f8AdSLzZdY6yK&q=85&s=1bf22f695b19ce55b27515062dde3a8a)