Skip to Content

Developers

APIs for WhatsApp, SMS and AI agents.

Send and receive WhatsApp messages, manage contacts and webhooks, send SMS over REST or SMPP, and run your AI agents from any system.

# Send an approved WhatsApp template
curl -X POST https://platform.unecast.com/api/v1/messages/template \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "94771234567",
    "templateName": "order_shipment_update",
    "language": "en",
    "components": [{ "type": "body",
      "parameters": [{ "type": "text", "text": "Maya" }] }]
  }'

WhatsApp API

Base URL https://platform.unecast.com. Authenticate every request with your key in the X-API-Key header. Create keys in Settings, API key setting.

MethodPathWhat it does
POST/api/v1/messages/templateSend an approved template message to a contact
POST/api/v1/messages/replySend a free-text reply inside the 24-hour service window
GET/api/v1/messages/:contactPhoneGet the message history for a contact
GET/api/v1/messages/status/:messageIdGet the delivery status of a message
GET/api/v1/contactsList contacts
POST/api/v1/contactsCreate a contact
PUT/api/v1/contacts/:idUpdate a contact
DELETE/api/v1/contacts/:idDelete a contact
GET/api/v1/contacts/groupsList contact groups
POST/api/v1/contacts/groups/:groupId/addAdd contacts to a group
POST/api/v1/contacts/groups/:groupId/removeRemove contacts from a group
GET/api/v1/templatesList message templates
GET/api/v1/campaignsList campaigns
GET/api/v1/accountGet account details
GET/api/v1/account/usageGet account usage
GET/api/v1/webhooksList webhooks
POST/api/v1/webhooksCreate a webhook
PUT/api/v1/webhooks/:idUpdate a webhook
DELETE/api/v1/webhooks/:idDelete a webhook

Webhooks deliver incoming messages and status changes to your server. Full request and response examples are in API docs inside your Unecast workspace.

SMS API

All SMS calls use a Bearer token in the Authorization header. SMPP is available for high-volume systems.

MethodPathWhat it does
POSThttps://api.unecast.com/v2/sendSend a message with channel, from, to, message and priority
GEThttps://api.unecast.com/v2/account/balanceRead your account balance
GEThttps://api.unecast.com/v2/status/{message_id}Read the delivery status of one message
# Send a transactional SMS
curl -X POST https://api.unecast.com/v2/send \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "sms",
    "from": "YOURBRAND",
    "to": "94771234567",
    "message": "Your OTP is 482913",
    "priority": "high"
  }'

AI agent API

Every agent, team or workflow you build in AI Studio has its own run endpoint.

  • Run an agent with POST /agents/{agent-id}/runs on aistudio.unecast.com.
  • Authenticate with a tenant-scoped key as a Bearer token. The secret is shown once.
  • Lock it down with an expiry and allowed IP addresses or CIDR ranges.
  • Shape the response with response filters, validators and session state.
# Run an AI agent you built in AI Studio
curl -X POST https://aistudio.unecast.com/agents/YOUR_AGENT_ID/runs \
  -H "Authorization: Bearer YOUR_TENANT_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "message": "Do you deliver to Kandy?" }'

Connect the tools you already use.

Online stores

WooCommerce and Shopify for order and delivery updates.

Websites

WordPress and the Unecast website chat widget.

Automation

Microsoft Power Platform, webhooks and MCP servers.

Billing and hosting

WHMCS for invoices and service notifications.

Need help scoping an integration?

Our engineers will review your systems and suggest the simplest way to connect. Call +94 77 600 3273 or write to sales@unecast.com.

Talk to us now+94 77 600 3273sales@unecast.comMonday to Friday, 9 AM to 6 PM