Skip to main content
POST
Generate AI response for conversation

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
conversationId
string
required

Target conversation to generate a reply for. Caller must own it, be assigned, or be ADMIN/SUPERADMIN. The literal value new-sms is rejected.

mergeContextPrompt
string

Free-form context to splice into the system prompt for this single turn (e.g. tour notes, lead status) without modifying the saved prompt.

Response

AI response generated

Returned by /api/ai/process after the AI reply has been generated and persisted into the conversation.

message
string
required

The generated assistant message text that was appended to the conversation.