Skip to main content
The Unecast REST API gives developers full programmatic access to Unecast’s messaging, contact management, and automation capabilities. Use it to build custom integrations with internal systems, extend Unecast into your own product, or automate complex workflows that go beyond what no-code tools can handle. Every capability available in the Unecast UI - sending WhatsApp messages, creating contacts, triggering automations - is accessible through the API.

Authentication

The Unecast API uses Bearer token authentication. Every request must include your API key in the Authorization 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 named hello_world
A successful response returns a 200 statuswith the message object:

Reply to a message

Send a free-text reply within the 24-hour customer service window
This 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).
A successful response returns a 200 statuswith the message object:

Track Delivery Status

Get delivery status of a specific message
Replace :messageId with the messageId returned when the message was sent.
A successful response returns a 200 statuswith the message object:

Contacts

List all contacts with optional filters

Query Parameters = ?search=John&limit=50&offset=0&groupId=xxx
A successful response returns a 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.
A successful response returns a 200 statuswith the message object:

Update an existing contact

A successful response returns a 200 statuswith the message object:

Delete a contact permanently

A successful response returns a 200 statuswith the message object:

List all contact groups

A successful response returns a 200 statuswith the message object:

Add a contact to a group

A successful response returns a 200 statuswith the message object:

Templates

List all templates belonging to a channel

Query Parameters = ?status=APPROVED
A successful response returns a 200 statuswith the message object:

Campaigns

List all campaigns with optional filters

Query Parameters = ?status=completed&limit=10&offset=0
A successful response returns a 200 statuswith the message object:

Account

Get channel information and API details

A successful response returns a 200 statuswith the message object:

Get detailed API usage and breakdown by time period

A successful response returns a 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.