Skip to main content
POST
/
surveys
/
{id}
/
agent
/
chat
Stream agent chat
curl --request POST \
  --url https://api.questra.ai/surveys/{id}/agent/chat \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Org-Id: <x-org-id>' \
  --data '
{
  "message": "<string>",
  "messages": [
    {}
  ],
  "thread_id": "<string>",
  "thread": {
    "id": "<string>",
    "metadata": {}
  },
  "memory": {
    "thread": "<string>"
  },
  "model_id": "<string>"
}
'
"<string>"

Documentation Index

Fetch the complete documentation index at: https://docs.questra.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Headers

X-Org-Id
string
required

The ID of the organization to make requests against. Found on your Settings page.

Path Parameters

id
string
required

Unique ID or slug of the survey

Query Parameters

mode
enum<string>

Agent mode. preview uses preview-focused tools; omitted defaults to code mode.

Available options:
preview

Body

application/json
message
string
messages
object[]
thread_id
string
thread
object
memory
object
model_id
string

Response

SSE stream of agent UI message events.

The response is of type string.