# Commonly used Endpoints

## Automatically Sync Dot

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

## POST /api/sync/{connection\_type}/{connection\_id}

> Sync connection with an API token.

```json
{"openapi":"3.1.0","info":{"title":"Dot API","version":"1.0.0"},"security":[{"APIKeyHeader":[]},{"APIKeyCookie":[]},{"OAuth2PasswordBearer":[]},{"QueryTokenAuth":[]}],"components":{"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-KEY"},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"Authorization"},"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/auth/token"}}},"QueryTokenAuth":{"type":"apiKey","in":"query","name":"user_id+api_token"}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/api/sync/{connection_type}/{connection_id}":{"post":{"tags":["Connections"],"summary":"Sync connection with an API token.","operationId":"sync_connection_api_sync__connection_type___connection_id__post","parameters":[{"name":"connection_type","in":"path","required":true,"schema":{"type":"string","title":"Connection Type"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

```javascript
// URL endpoint
https://{region}.getdot.ai/api/sync/{connection_type}/{connection_type}?user_id={user}&api_token={api_token}
```

* **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)](https://www.urlencoder.io/)
* **API Token**: can get created (and overwritten) by clicking `Copy API Token` in Settings/Users/Actions/···

\
**Trigger with curl (CLI)**

```javascript
curl -X "POST" "https://eu.getdot.ai/api/sync/bigquery/my-bg-id?user_id=sync_user%40contoso.com&api_token=dot-42673584be9724a21e1550336d6fe509f4a04207461ec9a926ca2a27cbd27fa0
```

**Trigger with dbt webhooks**

Call the api endpoint after your dbt run completed.

{% embed url="<https://docs.getdbt.com/docs/deploy/webhooks#create-a-webhook-subscription>" %}
Documentation how to setup a dbt webhooks
{% endembed %}

## Import External Assets

Inform Dot about key external knowledge assets, such as BI dashboards or custom data apps, so it can recommend them to users and assist with discovery and understanding. Authentication works similarly to the Sync Connection endpoint.

## POST /api/import\_and\_overwrite\_external\_asset

> Import and overwrite an external asset with an API token.

```json
{"openapi":"3.1.0","info":{"title":"Dot API","version":"1.0.0"},"security":[{"APIKeyHeader":[]},{"APIKeyCookie":[]},{"OAuth2PasswordBearer":[]},{"QueryTokenAuth":[]}],"components":{"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-KEY"},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"Authorization"},"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/auth/token"}}},"QueryTokenAuth":{"type":"apiKey","in":"query","name":"user_id+api_token"}},"schemas":{"Body_import_external_asset_api_import_and_overwrite_external_asset_post":{"properties":{"external_asset":{"$ref":"#/components/schemas/ExternalAsset"}},"type":"object","required":["external_asset"],"title":"Body_import_external_asset_api_import_and_overwrite_external_asset_post"},"ExternalAsset":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the external asset."},"subtype":{"type":"string","title":"Subtype","description":"Subtype of the external asset, such as 'looker_dashboard'."},"folder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder","description":"Folder path where the external asset is stored."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the external asset."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the external asset."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Full URL of the external asset."},"active":{"type":"boolean","title":"Active","description":"Indicates if the external asset is active.","default":true},"view_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"View Count","description":"Number of times the external asset has been viewed.","default":0},"last_accessed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Accessed At","description":"Timestamp of the last access to the external asset."},"dot_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dot Description","description":"Formatted text description of the external asset, can e.g. include a markdown representation of all charts in a dashboard."}},"type":"object","required":["id","subtype"],"title":"ExternalAsset"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/api/import_and_overwrite_external_asset":{"post":{"tags":["Assets"],"summary":"Import and overwrite an external asset with an API token.","operationId":"import_external_asset_api_import_and_overwrite_external_asset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_import_external_asset_api_import_and_overwrite_external_asset_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Export Conversation History

Export all conversations together with relevant meta data fields such as number of messages or author.

## GET /api/export\_history

> Get all historical chat messages.

```json
{"openapi":"3.1.0","info":{"title":"Dot API","version":"1.0.0"},"security":[{"APIKeyHeader":[]},{"APIKeyCookie":[]},{"OAuth2PasswordBearer":[]},{"QueryTokenAuth":[]}],"components":{"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-KEY"},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"Authorization"},"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/auth/token"}}},"QueryTokenAuth":{"type":"apiKey","in":"query","name":"user_id+api_token"}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/api/export_history":{"get":{"tags":["Admin"],"summary":"Get all historical chat messages.","operationId":"export_history_api_export_history_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"type":"string","description":"by default two weeks ago, format YYYY-MM-DD","title":"Start Date"},"description":"by default two weeks ago, format YYYY-MM-DD"},{"name":"end_date","in":"query","required":false,"schema":{"type":"string","description":"by default tomorrow, format YYYY-MM-DD","title":"End Date"},"description":"by default tomorrow, format YYYY-MM-DD"},{"name":"include_all_workspaces","in":"query","required":false,"schema":{"type":"boolean","description":"Include history from all workspaces (main workspace only)","default":false,"title":"Include All Workspaces"},"description":"Include history from all workspaces (main workspace only)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Ask Dot Automatically

## POST /api/ask

> Ask

```json
{"openapi":"3.1.0","info":{"title":"Dot API","version":"1.0.0"},"security":[{"APIKeyHeader":[]},{"APIKeyHeader":[]},{"APIKeyCookie":[]},{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-KEY"},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"Authorization"},"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/auth/token"}}}},"schemas":{"Body_ask_api_ask_post":{"properties":{"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Messages"},"chat_id":{"type":"string","title":"Chat Id"},"scope":{"type":"string","title":"Scope","default":""},"skip_check":{"type":"boolean","title":"Skip Check","default":false},"extra":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extra"}},"type":"object","required":["messages","chat_id"],"title":"Body_ask_api_ask_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/api/ask":{"post":{"tags":["Chat"],"summary":"Ask","operationId":"ask_api_ask_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_ask_api_ask_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /api/ask\_with\_history

> Ask With History

```json
{"openapi":"3.1.0","info":{"title":"Dot API","version":"1.0.0"},"security":[{"APIKeyHeader":[]},{"APIKeyHeader":[]},{"APIKeyCookie":[]},{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-KEY"},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"Authorization"},"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/auth/token"}}}},"schemas":{"Body_ask_with_history_api_ask_with_history_post":{"properties":{"new_message":{"additionalProperties":true,"type":"object","title":"New Message"},"chat_id":{"type":"string","title":"Chat Id"},"extra":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extra"}},"type":"object","required":["new_message","chat_id"],"title":"Body_ask_with_history_api_ask_with_history_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/api/ask_with_history":{"post":{"tags":["Chat"],"summary":"Ask With History","operationId":"ask_with_history_api_ask_with_history_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_ask_with_history_api_ask_with_history_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

Trigger Deep Analysis

## POST /api/agentic

> Agentic

```json
{"openapi":"3.1.0","info":{"title":"Dot API","version":"1.0.0"},"security":[{"APIKeyHeader":[]},{"APIKeyHeader":[]},{"APIKeyCookie":[]},{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-KEY"},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"Authorization"},"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/auth/token"}}}},"schemas":{"Body_agentic_api_agentic_post":{"properties":{"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Messages"},"chat_id":{"type":"string","title":"Chat Id"},"skip_check":{"type":"boolean","title":"Skip Check","default":false},"extra":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extra"}},"type":"object","required":["messages","chat_id"],"title":"Body_agentic_api_agentic_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/api/agentic":{"post":{"tags":["Chat"],"summary":"Agentic","operationId":"agentic_api_agentic_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_agentic_api_agentic_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## User Administration

## GET /api/get\_users

> Get All Users

```json
{"openapi":"3.1.0","info":{"title":"Dot API","version":"1.0.0"},"security":[{"APIKeyHeader":[]},{"APIKeyHeader":[]},{"APIKeyCookie":[]},{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-KEY"},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"Authorization"},"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/auth/token"}}}}},"paths":{"/api/get_users":{"get":{"tags":["Admin"],"summary":"Get All Users","operationId":"get_all_users_api_get_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}}}
```

## POST /api/send\_invitations

> Sendinvitations

```json
{"openapi":"3.1.0","info":{"title":"Dot API","version":"1.0.0"},"security":[{"APIKeyHeader":[]},{"APIKeyHeader":[]},{"APIKeyCookie":[]},{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-KEY"},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"Authorization"},"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/auth/token"}}}},"schemas":{"Body_sendInvitations_api_send_invitations_post":{"properties":{"emails":{"items":{"type":"string"},"type":"array","title":"Emails"}},"type":"object","required":["emails"],"title":"Body_sendInvitations_api_send_invitations_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/api/send_invitations":{"post":{"tags":["Admin"],"summary":"Sendinvitations","operationId":"sendInvitations_api_send_invitations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_sendInvitations_api_send_invitations_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /api/delete\_user

> Delete User Route

```json
{"openapi":"3.1.0","info":{"title":"Dot API","version":"1.0.0"},"security":[{"APIKeyHeader":[]},{"APIKeyHeader":[]},{"APIKeyCookie":[]},{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-KEY"},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"Authorization"},"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/auth/token"}}}},"schemas":{"Body_delete_user_route_api_delete_user_post":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"Body_delete_user_route_api_delete_user_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/api/delete_user":{"post":{"tags":["Admin"],"summary":"Delete User Route","operationId":"delete_user_route_api_delete_user_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_delete_user_route_api_delete_user_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /api/change\_user\_role

> Change User Role

```json
{"openapi":"3.1.0","info":{"title":"Dot API","version":"1.0.0"},"security":[{"APIKeyHeader":[]},{"APIKeyHeader":[]},{"APIKeyCookie":[]},{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-KEY"},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"Authorization"},"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/auth/token"}}}},"schemas":{"Body_change_user_role_api_change_user_role_post":{"properties":{"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"}},"type":"object","required":["email","role"],"title":"Body_change_user_role_api_change_user_role_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/api/change_user_role":{"post":{"tags":["Admin"],"summary":"Change User Role","operationId":"change_user_role_api_change_user_role_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_change_user_role_api_change_user_role_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /api/add\_user\_to\_group

> Add User To Group

```json
{"openapi":"3.1.0","info":{"title":"Dot API","version":"1.0.0"},"security":[{"APIKeyHeader":[]},{"APIKeyHeader":[]},{"APIKeyCookie":[]},{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-KEY"},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"Authorization"},"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/auth/token"}}}},"schemas":{"Body_add_user_to_group_api_add_user_to_group_post":{"properties":{"email":{"type":"string","title":"Email"},"group":{"type":"string","title":"Group"}},"type":"object","required":["email","group"],"title":"Body_add_user_to_group_api_add_user_to_group_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/api/add_user_to_group":{"post":{"tags":["Admin"],"summary":"Add User To Group","operationId":"add_user_to_group_api_add_user_to_group_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_add_user_to_group_api_add_user_to_group_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /api/remove\_user\_from\_group

> Remove User From Group

```json
{"openapi":"3.1.0","info":{"title":"Dot API","version":"1.0.0"},"security":[{"APIKeyHeader":[]},{"APIKeyHeader":[]},{"APIKeyCookie":[]},{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-KEY"},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"Authorization"},"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/auth/token"}}}},"schemas":{"Body_remove_user_from_group_api_remove_user_from_group_post":{"properties":{"email":{"type":"string","title":"Email"},"group":{"type":"string","title":"Group"}},"type":"object","required":["email","group"],"title":"Body_remove_user_from_group_api_remove_user_from_group_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/api/remove_user_from_group":{"post":{"tags":["Admin"],"summary":"Remove User From Group","operationId":"remove_user_from_group_api_remove_user_from_group_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_remove_user_from_group_api_remove_user_from_group_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /api/create\_user

> Create User Route

```json
{"openapi":"3.1.0","info":{"title":"Dot API","version":"1.0.0"},"security":[{"APIKeyHeader":[]},{"APIKeyHeader":[]},{"APIKeyCookie":[]},{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-KEY"},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"Authorization"},"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/auth/token"}}}},"schemas":{"Body_create_user_route_api_create_user_post":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"realname":{"type":"string","title":"Realname"}},"type":"object","required":["email","password","realname"],"title":"Body_create_user_route_api_create_user_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/api/create_user":{"post":{"tags":["Admin"],"summary":"Create User Route","operationId":"create_user_route_api_create_user_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_create_user_route_api_create_user_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## 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](/developers/embed.md) 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".**

## POST /api/auth/embedded\_user\_login

> Get Embedded User Login Token

```json
{"openapi":"3.1.0","info":{"title":"Dot API","version":"1.0.0"},"security":[{"APIKeyHeader":[]},{"APIKeyHeader":[]},{"APIKeyCookie":[]},{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-KEY"},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"Authorization"},"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/auth/token"}}}},"schemas":{"Body_get_embedded_user_login_token_api_auth_embedded_user_login_post":{"properties":{"user_id":{"type":"string","title":"User Id"},"create_if_not_exists":{"type":"boolean","title":"Create If Not Exists","default":false},"groups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Groups"}},"type":"object","required":["user_id"],"title":"Body_get_embedded_user_login_token_api_auth_embedded_user_login_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/api/auth/embedded_user_login":{"post":{"tags":["Authentication"],"summary":"Get Embedded User Login Token","operationId":"get_embedded_user_login_token_api_auth_embedded_user_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_get_embedded_user_login_token_api_auth_embedded_user_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.getdot.ai/developers/api/commonly-used-endpoints.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
