Skip to main content
POST
/
v2
/
chats
Create Chat
curl --request POST \
  --url https://app.textql.com/v2/chats \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "question": "<string>",
  "chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tools": {
    "connector_ids": [
      123
    ],
    "sql_enabled": true,
    "python_enabled": true,
    "web_search_enabled": true,
    "ontology_enabled": true,
    "tableau_enabled": true,
    "powerbi_enabled": true,
    "google_drive_enabled": true
  },
  "connector_ids": [
    123
  ]
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "model": "<string>",
  "response": "<string>",
  "chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "assets": [
    {
      "name": "<string>",
      "type": "<string>",
      "url": "<string>"
    }
  ]
}
There is no dedicated dashboard creation endpoint. Dashboards are created by starting a chat and asking Ana to build one. Ana will generate the dashboard code, attach the relevant data sources, and return a link to the live dashboard.
To create a dashboard, use the Create Chat or Stream Chat endpoint and ask Ana to build a dashboard in your question.
curl -X POST "https://app.textql.com/v2/chats" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "Build a dashboard showing monthly revenue by region for the last 12 months",
    "connector_ids": [1]
  }'
Ana will respond with a chat that includes a dashboard asset. The response contains a dashboard_url in the assets array that links to the live dashboard.

Authorizations

Authorization
string
header
required

API key or JWT token

Body

question
string
required

The question to ask

chat_id
string<uuid>

Existing chat ID to continue a conversation

tools
object

Tool configuration. Enable specific tools for this chat session.

connector_ids
integer<int32>[]

Connector IDs to query (shorthand for tools.connector_ids)

Response

Chat response

id
string<uuid>

Message ID

created_at
string<date-time>
model
string

LLM model name (e.g. default, sonnet_4, opus_4)

response
string

Markdown-formatted answer

chat_id
string<uuid>

Chat session ID

assets
object[]