Authentication

Public API requests authenticate with an API key using either Authorization: Bearer YOUR_API_KEY or X-AyuChat-API-Key: YOUR_API_KEY. The API key determines the active workspace and required scope.

Supported endpoints

MethodPathScopePurpose
GET/api/public/contactscontacts.readList workspace contacts.
POST/api/public/contactscontacts.writeCreate a contact.
GET/api/public/campaignscampaigns.readList campaigns.
GET/api/public/templatestemplates.readList templates.
POST/api/public/messages/send-templatemessages.sendQueue an approved template message.
GET/api/public/zapier/triggerscontacts.readRead Zapier trigger definitions.
GET/api/public/zapier/actionscontacts.readRead Zapier action definitions.

Contact create fields

FieldTypeRequiredDescription
namestringYesContact display name.
phonestringYesPhone number, max 20 characters.
emailemailYesContact email address.
sourcestringNoLead or integration source.

Send template fields

FieldTypeRequiredDescription
tostringYesRecipient phone number.
template_idintegerYesApproved template id in the same workspace.
variablesobject/arrayNoTemplate variable values.

Pagination

List endpoints use Laravel pagination and accept per_page up to 100. Keep integrations tolerant of pagination metadata changing order, and always read the response envelope.

Unsupported/private endpoints

Do not use internal Customer, Super Admin, Razorpay, Meta webhook, infrastructure, debug, billing-provider, or private ticket endpoints as public API. Only the allowlisted /api/public/* endpoints above are documented for customer developer use.