Querio
Embed QuerioEmbedded API

Start a conversation

POST
/v2/embed/{customer_slug}/conversations
AuthorizationBearer <token>

Include your API token in the Authorization header:

Authorization: Bearer <token>

Tokens are created in the Querio workspace settings under Embedded > API Tokens.

In: header

Path Parameters

customer_slugstring

Customer slug that maps to a workspace and agent configuration.

promptstring

The user's question.

datasourceIdstring

Datasource to query against.

modelstring

AI model ID.

Default"claude-sonnet-4-6"
Value in"claude-sonnet-4-6" | "claude-sonnet-4-5" | "claude-opus-4-6" | "claude-opus-4-5" | "gemini-2.5-pro" | "gemini-2.5-flash" | "gpt-5.4"
scope?Scope

Runtime scope variables such as customer_id used for RLS.

Empty Object

environment?string

Environment label for filtering.

tags?Tags

Key-value tags for filtering and grouping conversations.

Empty Object

Response Body

curl -X POST "https://app.querio.ai/api/v2/embed/dunder-mifflin/conversations" \  -H "Content-Type: application/json" \  -d '{    "prompt": "Show me the last 10 orders",    "datasourceId": "cls_abc123",    "model": "claude-sonnet-4-6",    "scope": {      "customer_id": "acme-corp"    },    "environment": "production",    "tags": {      "team": "sales",      "source": "app"    }  }'

{
  "id": "38770bb6-b14b-405c-aed6-71e8849c77dc",
  "title": "Recent orders analysis",
  "datasourceId": "cls_abc123",
  "status": "PENDING",
  "createdAt": "2026-04-08T12:00:00.000Z",
  "updatedAt": "2026-04-08T12:00:00.000Z",
  "messages": [
    {
      "id": "msg-0",
      "role": "user",
      "createdAt": "2026-04-08T12:00:00.000Z",
      "parts": [
        {
          "type": "text",
          "text": "Show me the last 10 orders"
        }
      ]
    }
  ]
}

{
  "error": "Unsupported model",
  "message": "Model ID not in supported list"
}

{
  "error": "Missing or invalid Authorization header",
  "message": "No Bearer token or invalid token"
}

{
  "error": "Token does not have access to this consumer",
  "message": "Token workspace does not match consumer"
}

{
  "error": "Unknown consumer",
  "message": "Customer slug not configured"
}