POST
/
private
/
v2
/
interactions
/
{id}
/
query
curl --request POST \
  --url https://api.{environment}.corti.app/v2/private/v2/interactions/{id}/query \
  --header 'Content-Type: application/json' \
  --data '{
  "query": "What are the key points from the latest guidelines?",
  "queryContext": "doc123",
  "focusContexts": [
    "doc456",
    "doc789"
  ]
}'
{
  "tool": "<string>",
  "data": {
    "summary": "<string>",
    "sources": [
      {
        "favicon": "<string>",
        "title": "<string>",
        "url": "<string>",
        "type": "<string>",
        "description": "<string>"
      }
    ],
    "mentions": [
      {
        "type": "<string>",
        "data": {
          "range": [
            123
          ],
          "time": [
            123
          ],
          "snippet": "<string>",
          "documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "utteranceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "timestamp": "2023-11-07T05:31:56Z"
        }
      }
    ],
    "response": "<string>",
    "rewrittenText": "<string>",
    "queries": [
      "<string>"
    ]
  }
}

Headers

Tenant-Name
string

Identifies a distinct entity within Corti's multi-tenant system. Ensures correct routing and authentication of the request.

Example:

"copiloteu"

Path Parameters

id
string
required

The interaction ID representing the context for the request.

Query Parameters

threadId
string

The thread ID representing the context for the request.

Body

application/json
query
string
required

The text-based query from the user.

Example:

"What are the key points from the latest guidelines?"

queryContext
string

A specific document or focus context for the query.

Example:

"doc123"

focusContexts
string[]

A list of additional focus contexts or documents.

Example:
["doc456", "doc789"]

Response

200
application/json
SSE streaming response with results from multiple tools. The initial response includes a thread ID for continuing the conversation. (`text/event-stream`)
tool
string

The tool providing the response (e.g., guidelines, mentions, general_chat, etc.)

data
object

The response data specific to the tool.