customer_identifier, making this ideal for integrating AI replies into external platforms, CRMs, or custom messaging interfaces.
This endpoint is rate-limited to 5 requests per minute per API token.
Endpoint
POST /user/ai/generate-reply
Request
ID of the assistant to use. Must belong to your account.
A unique identifier for the customer. Used to maintain conversation context across multiple messages. Examples: phone number, email, CRM contact ID, Facebook user ID. Maximum 255 characters.
The customer’s message to respond to.
Optional context variables to pass to the assistant. Merged with any existing conversation variables.
Response
Whether the request was successful.
UUID of the conversation. Use this to reference the conversation later.
The customer identifier provided in the request.
The AI-generated response.
Functions the assistant executed while processing the message.
Whether AI responses are disabled for this conversation (e.g., due to manual takeover).
Example
200 Success
404 Assistant not found
402 Insufficient balance
429 Rate limited
Conversation persistence
Conversations are automatically persisted byassistant_id + customer_identifier:
- Same identifier: Messages are added to the existing conversation, maintaining full context.
- New identifier: A new conversation is created.
- Variables merge: Variables provided in the request are merged with existing conversation variables.