Send a message to an existing chat in the CRM. Supports multiple message types:
| Type | Description | Required Fields |
|---|---|---|
text | Plain text message | message |
image | Image with optional caption | mediaUri, optionally message (caption) |
video | Video with optional caption | mediaUri, optionally message (caption) |
document | Document file | mediaUri, filename, optionally message (caption) |
template | Pre-approved WhatsApp template | template object (name, language, components) |
Media: Pass a public URL in mediaUri. Base64-encoded media is also supported — the system will upload it to S3 automatically.
Templates: Only available on WHATSAPP_OFFICIAL channels. Use GET /api/wp-crm/channels/:orgId/templates to discover available templates and their parameter structure before sending.
Security: The channel and chat must belong to your organisation. Cross-organisation access is denied with a 403.
See the request body examples below for each message type.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
200Message sent successfully. Returns the created conversation record.
400Bad request — missing required fields, invalid message type, or template messages sent to a non-WHATSAPP_OFFICIAL channel
401Unauthorized — invalid/expired JWT or organisation ID does not match the token
403Forbidden — the specified channel does not belong to this organisation
404Chat not found in this organisation
409Conflict — you cannot send messages to another channel number within the same organisation
500Internal server error
