Skip to main content
POST
/
api
/
ai
/
process
Generate AI response for conversation
curl --request POST \
  --url https://your-instance.example.com/api/ai/process \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "conversationId": "64d2f9c5e8a1d4e001a0b1c2",
  "mergeContextPrompt": "The lead just toured the property and is comparing two units."
}
'
{
  "message": "Hi Alex — thanks for reaching out! Are you still interested in the Maple Court corner unit?"
}

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.