Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Commonly used Endpoints

Automatically Sync Dot

To keep Dot in sync with your production environment, it is recommended to trigger the following API endpoint

Sync connection with an API token.

post
Authorizations
X-API-KEYstringRequired
Path parameters
connection_typestringRequired
connection_idstringRequired
Responses
200

Successful Response

application/json
anyOptional
post/api/sync/{connection_type}/{connection_id}
POST /api/sync/{connection_type}/{connection_id} HTTP/1.1
X-API-KEY: YOUR_API_KEY
Accept: */*

No content

  • Region: app (US) or eu (EU)

  • Connection Type: postgres, redshift, snowflake, mssql, bigquery, databricks, looker, dbt

  • User ID: usually email of the user (url encoded)

  • API Token: can get created (and overwritten) by clicking Copy API Token in Settings/Users/Actions/···

Trigger with curl (CLI)

Trigger with dbt webhooks

Call the api endpoint after your dbt run completed.

Documentation how to setup a dbt webhooks

Export Conversation History

GET /api/export_history returns one row per question asked in Dot. It needs an admin's API token.

Get all historical chat messages.

get
Authorizations
X-API-KEYstringRequired
Query parameters
start_datestringOptional

by default two weeks ago, format YYYY-MM-DD

end_datestringOptional

by default tomorrow, format YYYY-MM-DD

include_all_workspacesbooleanOptional

Include history from all workspaces (main workspace only)

Default: false
Responses
200

Successful Response

application/json
anyOptional
get/api/export_history
GET /api/export_history HTTP/1.1
X-API-KEY: YOUR_API_KEY
Accept: */*

No content

  • Dates: UTC days, from start_date up to but not including end_date. For a single day, pass that day and the day after.

  • Answers: add include_answers=true to get the answer the user read for each question.

  • App building: chat_kind is app on every row of a chat that built or edited an app, and chat otherwise. Sum credits by it to see what apps cost apart from questions.

For one row per chat, use GET /api/chat_history_export. It returns a CSV file and takes the same filters as the History page. Here both start_date and end_date are included, as days in the tz you pass (UTC if you leave it out).

To read one whole conversation, call GET /api/c2/{chat_id}?include_all=true.

Export App Views

GET /api/export_app_views returns who opened each app, one row per app and viewer. It needs an admin's API token.

Ask Dot Automatically

/api/agentic is how you ask Dot anything. It is the same engine behind the app, Slack and Teams: Dot reads your model, writes and runs SQL, builds charts, and keeps going until it can answer. A one-line lookup and a multi-step investigation use this one endpoint — Dot decides how far to go.

Send a question with a chat_id you generate. The call returns the conversation once Dot has finished.

Agentic

post
Authorizations
X-API-KEYstringRequired
Body
chat_idstringRequired
skip_checkbooleanOptionalDefault: false
extrastring · nullableOptional
Responses
200

Successful Response

application/json
anyOptional
post/api/agentic
POST /api/agentic HTTP/1.1
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 104

{
  "messages": [
    {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ],
  "chat_id": "text",
  "skip_check": false,
  "extra": "text"
}

No content

Follow up by posting to /api/agentic_with_history with the same chat_id, so Dot keeps the context of everything already asked.

Both take an optional mode — economy, balanced or frontier — the same dial as the energy mode selector in the app. Left out, your workspace default applies.

To ask against an environment instead of production, send its id in the X-Dot-Environment header. That works on every endpoint on this page, not just these two.

The answer sits in the last message carrying a formatted_result: a list of parts, of which the text ones joined together are what a person reads. A long investigation can outlast the request, so fetch it later with GET /api/c2/{chat_id} using the same chat_id. There is a worked example of both.

User Administration

Get All Users

get
Authorizations
X-API-KEYstringRequired
Responses
200

Successful Response

application/json
anyOptional
get/api/get_users
GET /api/get_users HTTP/1.1
X-API-KEY: YOUR_API_KEY
Accept: */*
200

Successful Response

No content

Sendinvitations

post
Authorizations
X-API-KEYstringRequired
Body
emailsstring[]Required
Responses
200

Successful Response

application/json
anyOptional
post/api/send_invitations
POST /api/send_invitations HTTP/1.1
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "emails": [
    "text"
  ]
}

No content

Delete User Route

post
Authorizations
X-API-KEYstringRequired
Body
emailstringRequired
Responses
200

Successful Response

application/json
anyOptional
post/api/delete_user
POST /api/delete_user HTTP/1.1
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "email": "text"
}

No content

Change User Role

post
Authorizations
X-API-KEYstringRequired
Body
emailstringRequired
rolestringRequired
Responses
200

Successful Response

application/json
anyOptional
post/api/change_user_role
POST /api/change_user_role HTTP/1.1
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 30

{
  "email": "text",
  "role": "text"
}

No content

Add User To Group

post
Authorizations
X-API-KEYstringRequired
Body
emailstringRequired
groupstringRequired
Responses
200

Successful Response

application/json
anyOptional
post/api/add_user_to_group
POST /api/add_user_to_group HTTP/1.1
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 31

{
  "email": "text",
  "group": "text"
}

No content

Remove User From Group

post
Authorizations
X-API-KEYstringRequired
Body
emailstringRequired
groupstringRequired
Responses
200

Successful Response

application/json
anyOptional
post/api/remove_user_from_group
POST /api/remove_user_from_group HTTP/1.1
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 31

{
  "email": "text",
  "group": "text"
}

No content

Create User Route

post
Authorizations
X-API-KEYstringRequired
Body
emailstringRequired
passwordstringRequired
realnamestringRequired
Responses
200

Successful Response

application/json
anyOptional
post/api/create_user
POST /api/create_user HTTP/1.1
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "email": "text",
  "password": "text",
  "realname": "text"
}

No content

Automatically Authenticate Embedded Users

For embedded use cases that require SSO, where your end users have individual permissions you can use this endpoint to obtain an access token for users that is valid for 24h. Here is an example on how you can use it to embed Dot in your application.

Please make sure that you enabled this flag on settings: "Allow admins to authenticate for users to enable SSO in embeds".

Get Embedded User Login Token

post
Authorizations
X-API-KEYstringRequired
Body
user_idstringRequired
create_if_not_existsbooleanOptionalDefault: false
groupsstring[] · nullableOptional
Responses
200

Successful Response

application/json
anyOptional
post/api/auth/embedded_user_login
POST /api/auth/embedded_user_login HTTP/1.1
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 65

{
  "user_id": "text",
  "create_if_not_exists": false,
  "groups": [
    "text"
  ]
}

No content

Last updated