SendMessage creates and sends a message via channel.
POST/api/v1/engagements/:engagementId/messages/send
This is the primary method for agents to send messages to contacts. The message is created, queued, and delivered through the appropriate channel based on engagement configuration.
Delivery Process
- Message created with status PENDING
- Routed to channel provider (WhatsApp, SMS, etc.)
- Status updated via webhook callbacks
Template Messages
Set message_type=MESSAGE_TYPE_TEMPLATE and template_id.
Call TemplateService.PreviewTemplate first to see resolved variable values
and their labels before committing to send. See SendMessageRequest
for the full template workflow.
Errors
- NOT_FOUND: Engagement does not exist
- FAILED_PRECONDITION: Channel not configured or inactive
- PERMISSION_DENIED: Caller lacks message:send permission
- INVALID_ARGUMENT: Template variables missing values (TEMPLATE_VARS_MISSING)
Request
Responses
- 200
- default
A successful response.
An unexpected error response.