REST API Reference
This page lists every endpoint in DocsGPTβs Swagger document, generated from the current code. Your own instance serves the document for the version you run at /swagger.json, and a Swagger UI for it at /api/docs (see Swagger UI and the OpenAPI document). A few routes are not in the document; the API overview lists them and where they are covered.
How to read an entry:
- Authentication is the same for every endpoint: a session token or a personal access token in
Authorization: Bearer <token>, or none whenAUTH_TYPEis unset. The chat and search endpoints also take an agent API key in the body. See Choose a credential. - Token scope is the personal access token scope the endpoint needs; any one of the listed scopes is enough, and a
writescope includes the matchingreadscope. Not available to personal access tokens means a token is refused whatever its scopes; call it from a signed-in session. - Parameters and JSON body show what the code declares. Some endpoints read more fields than they declare, and the document does not describe response bodies; the guides linked from the API overview cover the common ones in detail.
- Answer (3)
- Analytics (7)
- Artifacts (5)
- Attachments (7)
- Conversations (8)
- Current user (2)
- Models (8)
- Agents (20)
- Agent folders (7)
- Guardrails (3)
- Prompts (5)
- Schedules (10)
- Sharing (2)
- Sources (29)
- Teams (17)
- Tools (14)
- Workflows (4)
- Connectors (7)
- Connections (18)
- Admin (26)
- Personal access tokens (6)
Answer
Answer related operations.
POST/api/answer
Provide a response based on the question and retriever.
Token scope: chat:run
JSON body (AnswerModel):
| Field | Type | Required | Description |
|---|---|---|---|
active_docs | string | no | Active documents. |
agent_id | string | no | Agent ID. |
api_key | string | no | API key. |
chunks | integer | no | Number of chunks. Default: 6. |
conversation_id | string | no | Existing conversation ID (loads history) |
history | array of string | no | Conversation history (only for new conversations) |
isNoneDoc | boolean | no | Flag indicating if no document is used. |
model_id | string | no | Model ID to use for this request. |
passthrough | object | no | Dynamic parameters to inject into prompt template. |
prompt_id | string | no | Prompt ID. Default: "default". |
question | string | yes | Question to be asked. |
retriever | string | no | Retriever type. |
save_conversation | boolean | no | Deprecated, no effect: conversations always persist. Use `visibility` to control sidebar listing. |
visibility | string | no | 'listed' shows the conversation in the owner's sidebar; any other value (or omitting it) persists it hidden. Default: "hidden". |
POST/api/search
Search for relevant documents based on query.
Token scope: chat:run
JSON body (SearchModel):
| Field | Type | Required | Description |
|---|---|---|---|
api_key | string | yes | API key for authentication. |
chunks | integer | no | Number of results to return. Default: 5. |
question | string | yes | Search query. |
POST/stream
Stream a response based on the question and retriever.
Token scope: chat:run
JSON body (StreamModel):
| Field | Type | Required | Description |
|---|---|---|---|
active_docs | string | no | Active documents. |
agent_id | string | no | Agent ID. |
api_key | string | no | API key. |
attachments | array of string | no | List of attachment IDs. |
chunks | integer | no | Number of chunks. Default: 6. |
conversation_id | string | no | Existing conversation ID (loads history) |
history | array of string | no | Conversation history (only for new conversations) |
index | integer | no | Index of the query to update. |
isNoneDoc | boolean | no | Flag indicating if no document is used. |
model_id | string | no | Model ID to use for this request. |
passthrough | object | no | Dynamic parameters to inject into prompt template. |
prompt_id | string | no | Prompt ID. Default: "default". |
question | string | yes | Question to be asked. |
retriever | string | no | Retriever type. |
save_conversation | boolean | no | Deprecated, no effect: conversations always persist. Use `visibility` to control sidebar listing. |
visibility | string | no | 'listed' shows the conversation in the owner's sidebar; any other value (or omitting it) persists it hidden. Default: "hidden". |
Analytics
Analytics and reporting operations.
POST/api/get_feedback_analytics
Get feedback analytics data.
Token scope: analytics:read
JSON body (GetFeedbackAnalyticsModel):
| Field | Type | Required | Description |
|---|---|---|---|
api_key_id | string | no | API Key ID. |
filter_option | string | no | Filter option for analytics. One of: last_hour, last_24_hour, last_7_days, last_15_days, last_30_days. Default: "last_30_days". |
POST/api/get_message_analytics
Get message analytics based on filter option.
Token scope: analytics:read
JSON body (GetMessageAnalyticsModel):
| Field | Type | Required | Description |
|---|---|---|---|
api_key_id | string | no | API Key ID. |
filter_option | string | no | Filter option for analytics. One of: last_hour, last_24_hour, last_7_days, last_15_days, last_30_days. Default: "last_30_days". |
POST/api/get_schedule_analytics
Get scheduled agent run outcomes over time.
Token scope: analytics:read
JSON body (GetScheduleAnalyticsModel):
| Field | Type | Required | Description |
|---|---|---|---|
api_key_id | string | no | API Key ID. |
filter_option | string | no | Filter option for analytics. One of: last_hour, last_24_hour, last_7_days, last_15_days, last_30_days. Default: "last_30_days". |
POST/api/get_token_analytics
Get token analytics data.
Token scope: analytics:read
JSON body (GetTokenAnalyticsModel):
| Field | Type | Required | Description |
|---|---|---|---|
api_key_id | string | no | API Key ID. |
filter_option | string | no | Filter option for analytics. One of: last_hour, last_24_hour, last_7_days, last_15_days, last_30_days. Default: "last_30_days". |
group_by | string | no | Second grouping dimension for the series. One of: none, model, agent, source. Default: "none". |
include_side_channel | boolean | no | Include non-user-initiated token usage (title generation, compression, RAG condensing, fallback) Default: true. |
POST/api/get_tool_analytics
Get tool call analytics from the tool execution journal.
Token scope: analytics:read
JSON body (GetToolAnalyticsModel):
| Field | Type | Required | Description |
|---|---|---|---|
api_key_id | string | no | API Key ID. |
filter_option | string | no | Filter option for analytics. One of: last_hour, last_24_hour, last_7_days, last_15_days, last_30_days. Default: "last_30_days". |
POST/api/get_user_logs
Get user activity logs with pagination. Merges chat answers (user_logs), request errors (stack_logs) and scheduled agent runs (schedule_runs) into one timeline.
Token scope: analytics:read
JSON body (GetUserLogsModel):
| Field | Type | Required | Description |
|---|---|---|---|
api_key_id | string | no | API Key ID. |
event_type | string | no | Filter by event source. One of: chat, schedule, webhook, workflow, system, search, graph. |
level | string | no | Filter by log level. One of: info, error, warning. |
page | integer | no | Page number for pagination. Default: 1. |
page_size | integer | no | Number of logs per page. Default: 10. |
search | string | no | Substring filter on the summary. |
GET/api/traces
Stored execution traces (span timelines) for one Logs row. Pass exactly one of message_id, request_id, activity_id, workflow_run_id or id; api_key_id scopes to an agent you own.
Token scope: analytics:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
message_id | query | string | no | Assistant message id. |
request_id | query | string | no | Request id (chat turn, scheduled run) |
activity_id | query | string | no | Agent activity id (webhook and system rows) |
workflow_run_id | query | string | no | Workflow run id. |
id | query | string | no | Trace id. |
api_key_id | query | string | no | Agent id to scope to. |
Artifacts
Artifact operations.
GET/api/artifacts
List artifacts for a conversation, workflow run, or the caller.
Not available to personal access tokens
GET/api/artifacts/{artifact_id}
Get an artifact's metadata, version list, and current spec.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
artifact_id | path | string | yes |
DELETE/api/artifacts/{artifact_id}
Delete an artifact and all its versions (owner only)
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
artifact_id | path | string | yes |
POST/api/artifacts/{artifact_id}/restore
Restore a prior version by appending it as the new current version.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
artifact_id | path | string | yes |
GET/api/artifacts/{artifact_id}/versions/{version}
Get a single artifact version's metadata and spec.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
artifact_id | path | string | yes | |
version | path | integer | yes |
Attachments
File attachments and media operations.
GET/api/images/{agent_id}/{capability}
Serve an agent image using an opaque capability URL.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
agent_id | path | string | yes | |
capability | path | string | yes |
POST/api/store_attachment
Stores one or multiple attachments without vectorization or training. Supports user or API key authentication.
Token scope: chat:run
JSON body (AttachmentModel):
| Field | Type | Required | Description |
|---|---|---|---|
api_key | string | no | API key (optional) |
file | object | yes | File(s) to upload. |
POST/api/stt
Transcribe an uploaded audio file.
Not available to personal access tokens
JSON body (SpeechToTextModel):
| Field | Type | Required | Description |
|---|---|---|---|
file | object | yes | Audio file. |
language | string | no | Optional transcription language hint. |
POST/api/stt/live/chunk
Transcribe a chunk for a live speech-to-text session.
Not available to personal access tokens
JSON body (LiveSpeechToTextChunkModel):
| Field | Type | Required | Description |
|---|---|---|---|
chunk_index | integer | yes | Sequential chunk index. |
file | object | yes | Audio chunk. |
is_silence | boolean | no | Whether the latest capture window was mostly silence. |
session_id | string | yes | Live transcription session ID. |
POST/api/stt/live/finish
Finish a live speech-to-text session.
Not available to personal access tokens
POST/api/stt/live/start
Start a live speech-to-text session.
Not available to personal access tokens
POST/api/tts
Synthesize audio speech from text.
Not available to personal access tokens
JSON body (TextToSpeechModel):
| Field | Type | Required | Description |
|---|---|---|---|
text | string | yes | Text to be synthesized as audio. |
Conversations
Conversation management operations.
GET/api/delete_all_conversations
Deletes all conversations for a specific user.
Token scope: conversations:write
POST/api/delete_conversation
Deletes a conversation by ID.
Token scope: conversations:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | query | string | no | The ID of the conversation to delete. |
POST/api/feedback
Submit feedback for a conversation.
Token scope: conversations:write
JSON body (FeedbackModel):
| Field | Type | Required | Description |
|---|---|---|---|
answer | string | no | The AI answer. |
api_key | string | no | Optional API key. |
conversation_id | string | yes | id of the particular conversation. |
feedback | string | yes | User feedback. |
question | string | no | The user question. |
question_index | integer | yes | The question number in that particular conversation. |
GET/api/get_conversations
Retrieve a list of the latest 30 sidebar conversations (visibility = listed)
Token scope: conversations:read
GET/api/get_single_conversation
Retrieve a single conversation by ID.
Token scope: conversations:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | query | string | no | The conversation ID. |
GET/api/messages/{message_id}/tail
Current state of one conversation_messages row, scoped to the authenticated user. Used to reconnect to an in-flight stream after a refresh.
Token scope: chat:run or conversations:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
message_id | path | string | yes | Message UUID. |
GET/api/search_conversations
Search the authenticated user's conversations by name or message content (case-insensitive substring match). Mirrors the visibility filter and response shape of /get_conversations, and additionally returns ``match_field`` (``name``, ``prompt`` or ``response``) and ``match_snippet`` (a short excerpt of the matched text centered on the query) for each result.
Token scope: conversations:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
q | query | string | no | Search term (required) |
limit | query | string | no | Maximum number of results to return (default 30, max 100) |
POST/api/update_conversation_name
Updates the name of a conversation.
Token scope: conversations:write
JSON body (UpdateConversationModel):
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Conversation ID. |
name | string | yes | New name of the conversation. |
Current user
Current user identity and roles.
GET/api/user/me
Return ``{user_id, roles, email?, name?, picture?}`` for the caller.
Any valid personal access token
GET/api/user/quota
Return the caller's limited buckets: ``{bucket, tokens, cost, resets_at}`` each.
Any valid personal access token
Models
Available models.
GET/api/models
Get list of available models with their capabilities.
When the request is authenticated, the response includes the user's own BYOM registrations alongside the built-in catalog.
Token scope: chat:run or models:read
GET/api/user/models
List the current user's BYOM custom models.
Token scope: models:read
POST/api/user/models
Register a new BYOM custom model.
Token scope: models:write
POST/api/user/models/test
Test an arbitrary BYOM payload (display_name / model id / base_url / api_key) without saving. Used by the UI's 'Test connection' button so the user can validate before they Save. Uses the selected API protocol with the same SSRF guard and 5s timeout as the by-id variant.
Token scope: models:write
GET/api/user/models/{model_id}
Get one BYOM custom model.
Token scope: models:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
model_id | path | string | yes |
PATCH/api/user/models/{model_id}
Update a BYOM custom model (partial)
Token scope: models:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
model_id | path | string | yes |
DELETE/api/user/models/{model_id}
Delete a BYOM custom model.
Token scope: models:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
model_id | path | string | yes |
POST/api/user/models/{model_id}/test
Test a saved BYOM record. Defaults to the stored base_url / upstream_model_id / encrypted api_key, but any of those can be overridden via the request body so the UI can test in-flight edits before saving. Used by the 'Test connection' button in edit mode.
Token scope: models:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
model_id | path | string | yes |
Agents
Agent management operations.
POST/api/adopt_agent
Adopt an agent by ID.
Token scope: agents:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | query | string | no | Agent ID. |
GET/api/agent_webhook
Generate webhook URL for the agent.
Token scope: agents:keys
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | query | string | no | ID of the agent. |
POST/api/create_agent
Create a new agent.
Token scope: agents:write
JSON body (CreateAgentModel):
| Field | Type | Required | Description |
|---|---|---|---|
agent_type | string | no | Type of the agent (classic, react, workflow). Defaults to 'classic' for backwards compatibility. |
allow_system_prompt_override | boolean | no | Allow API callers to override the system prompt via the v1 endpoint. |
chunks | integer | no | Chunks count. |
default_model_id | string | no | Default model ID for this agent. |
description | string | yes | Description of the agent. |
folder_id | string | no | Folder ID to organize the agent. |
image | object | no | Image file upload. |
json_schema | object | no | JSON schema for enforcing structured output format. |
limited_request_mode | boolean | no | Whether the agent is in limited request mode. |
limited_token_mode | boolean | no | Whether the agent is in limited token mode. |
models | array of string | no | List of available model IDs for this agent. |
name | string | yes | Name of the agent. |
prompt_id | string | no | Prompt ID. |
request_limit | integer | no | Request limit for the agent in limited mode. |
retriever | string | no | Retriever ID. |
source | string | no | Source ID (legacy single source) |
sources | array of string | no | List of source identifiers for multiple sources. |
status | string | yes | Status of the agent (draft or published) |
token_limit | integer | no | Token limit for the agent in limited mode. |
tools | array of string | no | List of tool identifiers. |
workflow | string | no | Workflow ID for workflow-type agents. |
DELETE/api/delete_agent
Delete an agent by ID.
Token scope: agents:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | query | string | no | ID of the agent. |
GET/api/export_agent
Export an agent as YAML.
Token scope: agents:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | query | string | no | Agent ID. |
GET/api/get_agent
Get agent by ID.
Token scope: agents:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | query | string | no | Agent ID. |
GET/api/get_agents
Retrieve agents for the user.
Token scope: agents:read
POST/api/import_agent
Import an agent from YAML: create a draft, or update the agent matched by id or slug.
Token scope: agents:write
POST/api/import_agent/plan
Dry-run an agent YAML import and return the resolution plan.
Token scope: agents:write
POST/api/pin_agent
Pin or unpin an agent.
Token scope: agents:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | query | string | no | ID of the agent. |
GET/api/pinned_agents
Get pinned agents for the user.
Token scope: agents:read
POST/api/regenerate_agent_key/{agent_id}
Rotate an agent's API key. The previous key is invalidated immediately and a fresh key is returned once. Historical logging and usage records are re-pointed to the new key so analytics stay intact. Owner only.
Token scope: agents:keys
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
agent_id | path | string | yes | ID of the agent. |
DELETE/api/remove_shared_agent
Remove a shared agent from the current user's shared list.
Token scope: agents:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | query | string | no | ID of the shared agent. |
PUT/api/share_agent
Share or unshare an agent.
Token scope: agents:write
JSON body (ShareAgentModel):
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | ID of the agent. |
shared | boolean | yes | Share or unshare the agent. |
username | string | no | Name of the user. |
GET/api/shared_agent
Get a shared agent by token or ID.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
token | query | string | no | Shared token of the agent. |
GET/api/shared_agents
Get shared agents explicitly shared with the user.
Token scope: agents:read
GET/api/template_agents
Get template/premade agents.
Token scope: agents:read
PUT/api/update_agent/{agent_id}
Update an existing agent.
Token scope: agents:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
agent_id | path | string | yes |
JSON body (UpdateAgentModel):
| Field | Type | Required | Description |
|---|---|---|---|
agent_type | string | no | Type of the agent (classic, react, workflow). Defaults to 'classic' for backwards compatibility. |
allow_system_prompt_override | boolean | no | Allow API callers to override the system prompt via the v1 endpoint. |
chunks | integer | no | Chunks count. |
default_model_id | string | no | Default model ID for this agent. |
description | string | yes | New description of the agent. |
folder_id | string | no | Folder ID to organize the agent. |
image | object | no | Image file upload. |
json_schema | object | no | JSON schema for enforcing structured output format. |
limited_request_mode | boolean | no | Whether the agent is in limited request mode. |
limited_token_mode | boolean | no | Whether the agent is in limited token mode. |
models | array of string | no | List of available model IDs for this agent. |
name | string | yes | New name of the agent. |
prompt_id | string | no | Prompt ID. |
request_limit | integer | no | Request limit for the agent in limited mode. |
retriever | string | no | Retriever ID. |
source | string | no | Source ID (legacy single source) |
sources | array of string | no | List of source identifiers for multiple sources. |
status | string | yes | Status of the agent (draft or published) |
token_limit | integer | no | Token limit for the agent in limited mode. |
tools | array of string | no | List of tool identifiers. |
workflow | string | no | Workflow ID for workflow-type agents. |
GET/api/webhooks/agents/{webhook_token}
Webhook listener for agent events (GET). Uses URL query parameters as payload to trigger processing. Honors an optional ``Idempotency-Key`` header: a repeat request with the same key within 24h returns the original cached response and does not re-enqueue the task.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
webhook_token | path | string | yes |
POST/api/webhooks/agents/{webhook_token}
Webhook listener for agent events (POST). Expects JSON payload, which is used to trigger processing. Honors an optional ``Idempotency-Key`` header: a repeat request with the same key within 24h returns the original cached response and does not re-enqueue the task.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
webhook_token | path | string | yes |
Agent folders
Agent folder management.
GET/api/agents/folders/
Get all folders for the user.
Token scope: agents:read
POST/api/agents/folders/
Create a new folder.
Token scope: agents:write
JSON body (CreateFolder):
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Folder name. |
parent_id | string | no | Parent folder ID. |
POST/api/agents/folders/bulk_move
Move multiple agents to a folder.
Token scope: agents:write
JSON body (BulkMoveAgents):
| Field | Type | Required | Description |
|---|---|---|---|
agent_ids | array of string | yes | List of agent IDs. |
folder_id | string | no | Target folder ID. |
POST/api/agents/folders/move_agent
Move an agent to a folder or remove from folder.
Token scope: agents:write
JSON body (MoveAgent):
| Field | Type | Required | Description |
|---|---|---|---|
agent_id | string | yes | Agent ID to move. |
folder_id | string | no | Target folder ID (null to remove from folder) |
GET/api/agents/folders/{folder_id}
Get a specific folder with its agents.
Token scope: agents:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
folder_id | path | string | yes |
PUT/api/agents/folders/{folder_id}
Update a folder.
Token scope: agents:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
folder_id | path | string | yes |
DELETE/api/agents/folders/{folder_id}
Delete a folder.
Token scope: agents:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
folder_id | path | string | yes |
Guardrails
Agent guardrail configuration and audit.
GET/api/guardrails/catalog
List available guardrail checks and their capabilities.
Token scope: agents:read
GET/api/guardrails/events
List guardrail decisions recorded for an agent.
Token scope: agents:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
agent_id | query | string | no | Agent ID. |
limit | query | string | no | Max rows (default 100) |
offset | query | string | no | Row offset. |
GET/api/guardrails/summary
Aggregate guardrail activity for the caller.
Token scope: agents:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
days | query | string | no | Trailing window in days (default 30) |
agent_id | query | string | no | Scope the aggregate to one agent (optional) |
Prompts
Prompt management operations.
POST/api/create_prompt
Create a new prompt.
Token scope: prompts:write
JSON body (CreatePromptModel):
| Field | Type | Required | Description |
|---|---|---|---|
content | string | yes | Content of the prompt. |
name | string | yes | Name of the prompt. |
POST/api/delete_prompt
Delete a prompt by ID.
Token scope: prompts:write
JSON body (DeletePromptModel):
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Prompt ID to delete. |
GET/api/get_prompts
Get all prompts for the user.
Token scope: prompts:read
GET/api/get_single_prompt
Get a single prompt by ID.
Token scope: prompts:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | query | string | no | ID of the prompt. |
POST/api/update_prompt
Update an existing prompt.
Token scope: prompts:write
JSON body (UpdatePromptModel):
| Field | Type | Required | Description |
|---|---|---|---|
content | string | yes | New content of the prompt. |
id | string | yes | Prompt ID to update. |
name | string | yes | New name of the prompt. |
Schedules
Agent schedule management.
GET/api/agents/{agent_id}/schedules
List schedules for an agent (recurring + one-time).
Token scope: schedules:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
agent_id | path | string | yes |
POST/api/agents/{agent_id}/schedules
Create a schedule (recurring or one-time) for an agent.
Token scope: schedules:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
agent_id | path | string | yes |
JSON body (ScheduleCreate):
| Field | Type | Required | Description |
|---|---|---|---|
cron | string | no | Required when trigger_type == 'recurring'. |
end_at | string | no | ISO 8601. |
instruction | string | yes | |
model_id | string | no | |
name | string | no | |
run_at | string | no | ISO 8601 β required when trigger_type == 'once'. |
timezone | string | no | |
token_budget | integer | no | |
tool_allowlist | array of string | no | |
trigger_type | string | no | 'recurring' (default) or 'once'. |
GET/api/agents/{agent_id}/schedules/stats
Return run count, failures, tokens and latest failure for an agent.
Run stats for an agent's schedules over a recent window. Args: agent_id: Agent id from the URL. Returns: A Flask response with ``days``, ``runs``, ``failed``, ``tokens`` and ``latest_failure`` (or an error envelope).
Token scope: schedules:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
agent_id | path | string | yes | |
days | query | string | no | Window in days (default 30, clamped to 1..365) |
GET/api/schedules/{schedule_id}
Get schedule by id.
Token scope: schedules:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
schedule_id | path | string | yes |
PUT/api/schedules/{schedule_id}
Edit a schedule's editable fields.
Token scope: schedules:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
schedule_id | path | string | yes |
PATCH/api/schedules/{schedule_id}
Pause / resume a schedule.
Token scope: schedules:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
schedule_id | path | string | yes |
DELETE/api/schedules/{schedule_id}
Cancel / delete a schedule.
Token scope: schedules:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
schedule_id | path | string | yes |
POST/api/schedules/{schedule_id}/run
Run a schedule immediately (trigger_source='manual').
Token scope: schedules:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
schedule_id | path | string | yes |
GET/api/schedules/{schedule_id}/runs
Paginated run log for a schedule.
Token scope: schedules:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
schedule_id | path | string | yes | |
limit | query | string | no | Page size (default 50) |
offset | query | string | no | Page offset. |
GET/api/schedules/{schedule_id}/runs/{run_id}
Full output / error for a single run.
Token scope: schedules:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
schedule_id | path | string | yes | |
run_id | path | string | yes |
Sharing
Conversation sharing operations.
POST/api/share
Share a conversation.
Not available to personal access tokens
JSON body (ShareConversationModel):
| Field | Type | Required | Description |
|---|---|---|---|
chunks | integer | no | Chunks count (optional) |
conversation_id | string | yes | Conversation ID. |
prompt_id | string | no | Prompt ID (optional) |
user | string | no | User ID (optional) |
GET/api/shared_conversation/{identifier}
Get publicly shared conversations by identifier.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
identifier | path | string | yes |
Sources
Source document management operations.
POST/api/add_chunk
Adds a new chunk to the document.
Token scope: sources:write
JSON body (AddChunkModel):
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Document ID. |
metadata | object | no | Metadata associated with the chunk. |
text | string | yes | Text of the chunk. |
GET/api/combine
Redirects /api/combine to /api/sources for backward compatibility.
Not available to personal access tokens
DELETE/api/delete_chunk
Deletes a specific chunk from the document.
Token scope: sources:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | query | string | no | The document ID. |
chunk_id | query | string | no | The ID of the chunk to delete. |
GET/api/delete_old
Deletes old indexes and associated files.
Token scope: sources:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
source_id | query | string | no | The source ID to delete. |
GET/api/directory_structure
Get the directory structure for a document.
Token scope: sources:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | query | string | no | The document ID. |
GET/api/get_chunks
Retrieves chunks from a document, optionally filtered by file path and search term.
Token scope: sources:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | query | string | no | The document ID. |
page | query | string | no | Page number for pagination. |
per_page | query | string | no | Number of chunks per page. |
path | query | string | no | Optional: Filter chunks by relative file path. |
search | query | string | no | Optional: Search term to filter chunks by title or content. |
POST/api/manage_source_files
Add files, remove files, or remove directories from an existing source.
Token scope: sources:write
JSON body (ManageSourceFilesModel):
| Field | Type | Required | Description |
|---|---|---|---|
directory_path | string | no | Directory path to remove (for remove_directory operation) |
file | object | no | Files to add (for add operation) |
file_paths | array of string | no | File paths to remove (for remove operation) |
operation | string | yes | Operation: 'add', 'remove', or 'remove_directory'. |
parent_dir | string | no | Parent directory path relative to source root. |
source_id | string | yes | Source ID to modify. |
POST/api/manage_sync
Manage sync frequency for sources.
Token scope: sources:write
JSON body (ManageSyncModel):
| Field | Type | Required | Description |
|---|---|---|---|
source_id | string | yes | Source ID. |
sync_frequency | string | yes | Sync frequency (never, daily, weekly, monthly) |
POST/api/remote
Uploads remote source for vectorization. Honors an optional ``Idempotency-Key`` header: a repeat request with the same key within 24h returns the original cached response without re-enqueuing.
Token scope: sources:write
JSON body (RemoteUploadModel):
| Field | Type | Required | Description |
|---|---|---|---|
data | string | yes | Data to process. |
name | string | yes | Job name. |
repo_url | string | no | GitHub repository URL. |
source | string | yes | Source of the data. |
user | string | yes | User ID. |
GET/api/sources
Provide JSON file with combined available indexes.
Token scope: sources:read
GET/api/sources/paginated
Get document with pagination, sorting and filtering.
Token scope: sources:read
POST/api/sources/reingest
Re-run ingestion for a source β e.g. to recover a stalled embed flagged by the reconciler.
Token scope: sources:write
JSON body (ReingestSourceModel):
| Field | Type | Required | Description |
|---|---|---|---|
source_id | string | yes | Source ID. |
POST/api/sources/wiki
Create an LLM-editable wiki source. No ingestion task is enqueued; pages are authored via the WikiTool. An optional initial_content seeds /index.md and triggers its per-page re-embed.
Token scope: sources:write
JSON body (CreateWikiModel):
| Field | Type | Required | Description |
|---|---|---|---|
initial_content | string | no | Optional markdown seed for /index.md. |
name | string | yes | Wiki source name. |
PATCH/api/sources/{source_id}/config
Edit a source's behavior config. Retrieval-time fields take effect live; chunking changes require an explicit re-ingest (surfaced as requires_reingest).
Token scope: sources:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
source_id | path | string | yes |
JSON body (SourceConfigModel):
| Field | Type | Required | Description |
|---|---|---|---|
chunking | object | no | Ingest-time chunking config. |
kind | string | no | Behavior selector (e.g. classic) |
retrieval | object | no | Query-time retrieval config. |
GET/api/sources/{source_id}/graph
Bounded knowledge-graph overview for a graphrag source: top nodes by degree and the edges among them (read access: owner or shared). Returns empty lists when no graph has been built yet.
Token scope: sources:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
source_id | path | string | yes |
GET/api/sources/{source_id}/graph/node/{node_id}
A graph node's description and its linked chunks (read access: owner or shared).
Token scope: sources:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
source_id | path | string | yes | |
node_id | path | string | yes |
GET/api/sources/{source_id}/graph/nodes
List one page of a source's graph nodes with type facets.
Paged, searchable list of a graphrag source's nodes, highest degree first, plus type facets over all its nodes (read access: owner or shared). Query params: q (name substring), type (type key), page (1-based), per_page (1-100, default 25). Args: source_id: The source id from the URL. Returns: Response: ``{success, nodes, total, page, per_page, types}``, or 401/404/400 on missing auth, no read access or a failure. ``page`` is clamped to ``1..GRAPH_NODE_LIST_MAX_PAGE`` and ``per_page`` to ``1..GRAPH_NODE_LIST_MAX_LIMIT``. A graph store that is not configured or has no tables yet reads as an empty page, like the overview; any other store query failure is a 400, never an empty 200.
Token scope: sources:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
source_id | path | string | yes |
POST/api/sources/{source_id}/graphrag/enable
Enable GraphRAG on a source: flips its config to graphrag mode and enqueues graph extraction over its embedded chunks. Requires VECTOR_STORE=pgvector and GRAPHRAG_ENABLED. Write access required (owner/editor). The config kind cannot be set to graphrag via the config PATCH endpoint.
Token scope: sources:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
source_id | path | string | yes |
POST/api/sources/{source_id}/search
Run the real retrieval pipeline against one source and return the ranked chunks it produces, optionally under an ad-hoc retrieval config. Read-only: nothing is saved.
Token scope: chat:run
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
source_id | path | string | yes |
JSON body (SourceSearchModel):
| Field | Type | Required | Description |
|---|---|---|---|
query | string | yes | The query to retrieve for. |
retrieval | object | no | Ad-hoc retrieval config to test with. Omit to use the source's saved config. Never persisted. |
POST/api/sources/{source_id}/wiki/convert
Convert an ingested source into a wiki. A blank source is enabled inline; a source with files runs a conversion task (poll its status for the per-file summary). Write access required (owner/editor).
Token scope: sources:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
source_id | path | string | yes |
GET/api/sources/{source_id}/wiki/page
Fetch a single wiki page's content fresh from storage.
Token scope: sources:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
source_id | path | string | yes | |
path | query | string | no | Page path (e.g. /index.md) |
PUT/api/sources/{source_id}/wiki/page
Create or overwrite a wiki page (human edit). Write access required; a stale expected_version returns 409.
Token scope: sources:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
source_id | path | string | yes |
JSON body (WikiPageEditModel):
| Field | Type | Required | Description |
|---|---|---|---|
content | string | yes | Markdown content. |
expected_version | integer | no | Optimistic-lock version from the last read. |
path | string | yes | Page path. |
GET/api/sources/{source_id}/wiki/pages
List a wiki source's pages (read access: owner or shared).
Token scope: sources:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
source_id | path | string | yes |
GET/api/sources/{source_id}/wiki/settings
A wiki's settings. Anyone who can see the wiki may read them; returns allow_outside_edits plus the caller's access.
Token scope: sources:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
source_id | path | string | yes |
PUT/api/sources/{source_id}/wiki/settings
Change a wiki's settings (owner only, manage_settings). Body: {"allow_outside_edits": bool}: whether runs from an agent's API key or widget may edit the wiki.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
source_id | path | string | yes |
POST/api/sync_source
Trigger an immediate sync for a source.
Token scope: sources:write
JSON body (SyncSourceModel):
| Field | Type | Required | Description |
|---|---|---|---|
source_id | string | yes | Source ID. |
GET/api/task_status
Get celery job status.
Token scope: chat:run or sources:read or sources:write
JSON body (TaskStatusModel):
| Field | Type | Required | Description |
|---|---|---|---|
task_id | string | yes | Task ID. |
PUT/api/update_chunk
Updates an existing chunk in the document.
Token scope: sources:write
JSON body (UpdateChunkModel):
| Field | Type | Required | Description |
|---|---|---|---|
chunk_id | string | yes | Chunk ID to update. |
id | string | yes | Document ID. |
metadata | object | no | Updated metadata associated with the chunk. |
text | string | no | New text of the chunk. |
POST/api/upload
Uploads a file to be vectorized and indexed. Honors an optional ``Idempotency-Key`` header: a repeat request with the same key within 24h returns the original cached response without re-enqueuing.
Token scope: sources:write
JSON body (UploadModel):
| Field | Type | Required | Description |
|---|---|---|---|
file | object | yes | File(s) to upload. |
name | string | yes | Job name. |
user | string | yes | User ID. |
Teams
Team management and resource sharing.
GET/api/admin/teams
Global-admin oversight: every team with member counts.
Not available to personal access tokens
GET/api/resource_settings
A resource's sharing switches.
Anyone with access may read them. Query: ``resource_type``, ``resource_id``. Returns ``settings`` as ``[{key, value, default}]`` in display order, plus the caller's ``access`` and ``allowed_actions``.
Token scope: teams:read
PUT/api/resource_settings
Change a resource's sharing switches.
Needs ``manage_settings`` (owner). Body: ``{"resource_type", "resource_id", "settings": {key: bool}}``. An unknown key or a non-boolean value is a 400. Returns the GET shape.
Not available to personal access tokens
GET/api/resource_shares
List the teams a resource is shared with.
Needs ``share`` on it. Powers the share dialog (current shares + unshare), so only someone who may change the sharing can enumerate it: 404 when the resource isn't visible, 403 when the caller's role can't share.
Token scope: teams:read
GET/api/teams
List the teams the caller belongs to, each annotated with their role.
Token scope: teams:read
POST/api/teams
Create a team (self-serve)
The creator becomes its first team_admin.
Not available to personal access tokens
GET/api/teams/{team_id}
Team detail with members and the caller's role.
Requires membership.
Token scope: teams:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
team_id | path | string | yes |
PUT/api/teams/{team_id}
Update team name/description.
Requires team_admin.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
team_id | path | string | yes |
DELETE/api/teams/{team_id}
Delete the team.
Owner-only (a global admin overrides).
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
team_id | path | string | yes |
GET/api/teams/{team_id}/grants
List resources shared with this team.
Requires membership. Each row carries the resource's name, owner and people labels (email when on file, else null) and ``caller`` β the caller's own live ``{access, allowed_actions}`` on that resource (null if none). A plain member sees whole-team grants and grants aimed at them; a team_admin, or someone with ``share`` on the resource, sees every grant.
Token scope: teams:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
team_id | path | string | yes |
POST/api/teams/{team_id}/grants
Share a resource with this team, or change an existing grant's level.
Needs ``share`` on the resource (the owner, or an editor when the owner turned on ``editors_can_share``) and membership of the team. The grant records the real owner as ``owner_id`` and the caller as ``granted_by``.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
team_id | path | string | yes |
DELETE/api/teams/{team_id}/grants
Unshare a resource from this team.
Allowed with ``share`` on the resource β no membership needed, so an owner who left the team can still pull their resource back β or for a team_admin of this team. ``target_user_id`` picks one member's grant (absent β the whole-team grant). Identifiers come from query params (some proxies strip DELETE bodies), with a JSON-body fallback.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
team_id | path | string | yes |
GET/api/teams/{team_id}/members
List members.
Requires membership.
Token scope: teams:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
team_id | path | string | yes |
POST/api/teams/{team_id}/members
Add a member by email (preferred) or raw user_id.
Requires team_admin.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
team_id | path | string | yes |
PUT/api/teams/{team_id}/members/{member_id}
Change a member's role.
Requires team_admin. Guards the last admin.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
team_id | path | string | yes | |
member_id | path | string | yes |
DELETE/api/teams/{team_id}/members/{member_id}
Remove a member.
team_admin removes anyone; a member may remove self (leave). Guards the last admin.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
team_id | path | string | yes | |
member_id | path | string | yes |
POST/api/teams/{team_id}/transfer_owner
Transfer team ownership.
Owner-only (global admin overrides). The new owner must already be a member; they are promoted to team_admin.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
team_id | path | string | yes |
Tools
Tool management operations.
GET/api/artifact/{artifact_id}
Get artifact data by artifact ID. Returns all todos for the tool when fetching a todo artifact.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
artifact_id | path | string | yes |
GET/api/available_tools
Get available tools for a user.
Token scope: tools:read
POST/api/create_tool
Create a new tool.
Token scope: tools:write
JSON body (CreateToolModel):
| Field | Type | Required | Description |
|---|---|---|---|
config | object | yes | Configuration of the tool. |
customName | string | no | Custom name for the tool. |
description | string | yes | Tool description. |
displayName | string | yes | Display name for the tool. |
name | string | yes | Name of the tool. |
status | boolean | yes | Status of the tool. |
POST/api/delete_tool
Delete a tool by ID.
Token scope: tools:write
JSON body (DeleteToolModel):
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Tool ID. |
GET/api/get_tools
Get tools created by a user.
Token scope: tools:read
GET/api/mcp_server/auth_status
Batch check auth status for all MCP tools. Lightweight DB-only check β no network calls to MCP servers.
Not available to personal access tokens
GET/api/mcp_server/callback
Handle OAuth callback by providing the authorization code and state.
Not available to personal access tokens
JSON body (MCPServerCallbackModel):
| Field | Type | Required | Description |
|---|---|---|---|
code | string | yes | Authorization code. |
error | string | no | Error message (if any) |
state | string | yes | State parameter. |
POST/api/mcp_server/save
Create or update MCP server with automatic tool discovery.
Token scope: tools:write
JSON body (MCPServerSaveModel):
| Field | Type | Required | Description |
|---|---|---|---|
config | object | yes | MCP server configuration. |
displayName | string | yes | Display name for the MCP server. |
id | string | no | Tool ID for updates (optional) |
status | boolean | no | Tool status. Default: true. |
POST/api/mcp_server/test
Test MCP server connection with provided configuration.
Token scope: tools:write
JSON body (MCPServerTestModel):
| Field | Type | Required | Description |
|---|---|---|---|
config | object | yes | MCP server configuration to test. |
id | string | no | Stored tool to test with (empty secrets reuse its stored ones) |
POST/api/parse_spec
Parse an API specification (OpenAPI 3.x or Swagger 2.0) and return actions.
Token scope: tools:write
POST/api/update_tool
Update a tool's names, actions, config or chat switch.
Update a tool by ID The tool type (``name``) never changes. ``actions`` are checked against the stored ones like ``/api/update_tool_actions``: nothing is added and fixed values are the owner's. A connection-backed MCP server is moved only through ``/api/mcp_server/save``. Returns: ``{"success": true}``, or 400 / 403 / 404 with a message.
Token scope: tools:write
JSON body (UpdateToolModel):
| Field | Type | Required | Description |
|---|---|---|---|
actions | array of object | no | Actions the tool can perform. |
config | object | no | Configuration of the tool. |
customName | string | no | Custom name for the tool. |
description | string | no | Tool description. |
displayName | string | no | Display name for the tool. |
id | string | yes | Tool ID. |
name | string | no | Name of the tool. |
status | boolean | no | Status of the tool. |
POST/api/update_tool_actions
Update the actions of a tool.
Token scope: tools:write
JSON body (UpdateToolActionsModel):
| Field | Type | Required | Description |
|---|---|---|---|
actions | array of object | yes | Actions the tool can perform. |
id | string | yes | Tool ID. |
POST/api/update_tool_config
Replace a tool's config, keeping stored secrets the client left out.
Update the configuration of a tool A connection-backed tool's new key goes to its connection (the owner's to change) and its server cannot be moved here; an api_tool's fixed values are the owner's. Returns: ``{"success": true}``, or 400 / 403 / 404 with a message.
Token scope: tools:write
JSON body (UpdateToolConfigModel):
| Field | Type | Required | Description |
|---|---|---|---|
config | object | yes | Configuration of the tool. |
id | string | yes | Tool ID. |
POST/api/update_tool_status
Update the status of a tool.
Token scope: tools:write
JSON body (UpdateToolStatusModel):
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Tool ID. |
status | boolean | yes | Status of the tool. |
Workflows
POST/api/workflows
Create a new workflow with nodes and edges.
Token scope: workflows:write
GET/api/workflows/{workflow_id}
Get workflow details with nodes and edges.
Token scope: workflows:read
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
workflow_id | path | string | yes |
PUT/api/workflows/{workflow_id}
Update workflow and replace nodes/edges.
Token scope: workflows:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
workflow_id | path | string | yes |
DELETE/api/workflows/{workflow_id}
Delete workflow and its graph.
Token scope: workflows:write
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
workflow_id | path | string | yes |
Connectors
Connector operations.
GET/api/connectors/auth
Get connector OAuth authorization URL.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
provider | query | string | no | Connector provider (e.g., google_drive) |
GET/api/connectors/callback
Handle OAuth callback for external connectors.
Handle OAuth callback for external connectors.
Not available to personal access tokens
GET/api/connectors/callback-status
Return HTML page with connector authentication status.
Return HTML page with connector authentication status.
Not available to personal access tokens
POST/api/connectors/disconnect
Disconnect a connector session.
Not available to personal access tokens
JSON body (ConnectorDisconnectModel):
| Field | Type | Required | Description |
|---|---|---|---|
provider | string | yes | |
session_token | string | no |
POST/api/connectors/files
List files from a connector provider (supports pagination and search)
Not available to personal access tokens
JSON body (ConnectorFilesModel):
| Field | Type | Required | Description |
|---|---|---|---|
connection_id | string | no | |
folder_id | string | no | |
limit | integer | no | |
page_token | string | no | |
provider | string | yes | |
search_query | string | no | |
session_token | string | no | Legacy; use connection_id. |
POST/api/connectors/sync
Sync connector source to check for modifications.
Not available to personal access tokens
JSON body (ConnectorSyncModel):
| Field | Type | Required | Description |
|---|---|---|---|
connection_id | string | no | Connection to sync with; defaults to the source's own (ignored for team editors, whose sync uses the owner's connection) |
session_token | string | no | Legacy; use connection_id. |
source_id | string | yes | Source ID to sync. |
POST/api/connectors/validate-session
Validate a connection and return the account and a short-lived access token.
Not available to personal access tokens
JSON body (ConnectorValidateSessionModel):
| Field | Type | Required | Description |
|---|---|---|---|
connection_id | string | no | |
provider | string | yes | |
session_token | string | no | Legacy; use connection_id. |
Connections
Connectors and connections.
GET/api/connections
The caller's connections with status and linked resource counts.
Not available to personal access tokens
POST/api/connections
Create a connection from pasted credentials: {connector_key, credentials, label?}. Same credentials reuse the same connection.
Not available to personal access tokens
POST/api/connections/claim
One-time link of a legacy browser session token ({provider, session_token}) to the caller's connection. Removed next release.
Not available to personal access tokens
PUT/api/connections/tools/{tool_id}/credential-mode
Whose account a shared connection-backed tool uses: {mode: owner | member}. Owner only; refused when an admin forces a mode for the connector.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
tool_id | path | string | yes |
GET/api/connections/{connection_id}
One connection with the sources it syncs and the tools it provides.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes |
PATCH/api/connections/{connection_id}
Name an account: {name}. An empty name clears it. Owner only.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes |
DELETE/api/connections/{connection_id}
Remove a connection: {sources: keep | delete, tools: delete | keep}. Kept sources keep their content and stop syncing.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes |
POST/api/connections/{connection_id}/disconnect
Delete a connection's stored credentials; its sources and tools stay.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes |
GET/api/connections/{connection_id}/linear
Linear: the teams and projects the connection can see, for the sync picker. Read through Linear's MCP server with the connection's sign-in.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes |
POST/api/connections/{connection_id}/picker-token
A short-lived access token for a browser-side file picker. Owner only; never a refresh token.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes |
POST/api/connections/{connection_id}/reconnect
OAuth: returns an authorization URL for the same account. API key: accepts {credentials} and replaces the stored ones.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes |
POST/api/connections/{connection_id}/refresh-tools
MCP: re-scan the server's actions and return what was added and removed.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes |
GET/api/connections/{connection_id}/repositories
GitHub: the repositories the connection can read, for the sync picker. install_url is where a GitHub App sign-in chooses more repositories.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes |
POST/api/connections/{connection_id}/setup
Apply the connect wizard's choices: {create_tools, allow_writes?, tool_permissions?, sync?: {items, frequency, name?, config?}}. allow_writes points GitHub's tool at its write endpoint. config is the synced source's retrieval settings, validated like an upload's. Honours an Idempotency-Key header for the sync.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes |
PUT/api/connections/{connection_id}/tools/{tool_id}/parameters
Fix or release an action's parameters: {action, parameters: {name: value | null}}. A value is sent on every call and hidden from the model; null lets the model decide. Owner only.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes | |
tool_id | path | string | yes |
PUT/api/connections/{connection_id}/tools/{tool_id}/permissions
Set per-action permissions: {permissions: {action: always | ask | off}}.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes | |
tool_id | path | string | yes |
PUT/api/connections/{connection_id}/writes
GitHub: let agents make changes through this connection, or only read: {allow}. Re-reads the tool's actions from the matching endpoint. Owner only.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes |
GET/api/connectors/catalog
Every connector with its availability and the caller's connection summary.
Not available to personal access tokens
Admin
Admin-only management endpoints.
GET/api/admin/activity
Merged audit feed, newest first, with filters and a total.
Not available to personal access tokens
GET/api/admin/activity/events
Distinct ``(event, category)`` pairs this instance has recorded.
The filter UI offers these instead of a free-text box, so an operator never has to guess that denied logins are ``oidc_login_denied``.
Not available to personal access tokens
GET/api/admin/activity/export
Stream the filtered feed as CSV or NDJSON.
Streamed, not buffered: a compliance export of a busy instance should not be built in memory first. Capped at ``_EXPORT_MAX_ROWS``, and the ``X-Export-Max-Rows`` header reports the cap that was in effect so a truncated export is not mistaken for a complete one.
Not available to personal access tokens
GET/api/admin/admins
List all admins with earliest grant time + grant sources.
Not available to personal access tokens
GET/api/admin/audit
Global auth-events feed, newest first.
Filter by event/user/since.
Not available to personal access tokens
GET/api/admin/connectors
Every connector with its policy, setup state and connection count.
Not available to personal access tokens
PUT/api/admin/connectors
Update policies: {policies: {key: {enabled?, credential_mode?, allow_writes?}}, allow_custom_mcp?}.
Not available to personal access tokens
GET/api/admin/devices/audit
Global remote-device command audit feed.
Filter by decision/user/since.
Not available to personal access tokens
GET/api/admin/overview
Top-line KPIs for the dashboard home.
Not available to personal access tokens
GET/api/admin/quotas
Every stored policy, grouped by layer, plus the models cost limits cannot see.
Not available to personal access tokens
PUT/api/admin/quotas/instance
Set the instance default for one bucket.
Not available to personal access tokens
DELETE/api/admin/quotas/instance
Remove the instance default for ``?bucket=``, or for every bucket.
Not available to personal access tokens
GET/api/admin/quotas/teams/{team_id}
The per-member allowance of one team.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
team_id | path | string | yes |
PUT/api/admin/quotas/teams/{team_id}
Set the allowance each member of the team gets.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
team_id | path | string | yes |
DELETE/api/admin/quotas/teams/{team_id}
Remove the team's allowance for ``?bucket=``, or for every bucket.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
team_id | path | string | yes |
GET/api/admin/quotas/users/{user_id}
A user's overrides and the limits and usage they resolve to.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | yes |
PUT/api/admin/quotas/users/{user_id}
Set one user's override, which beats team allowances and the default.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | yes |
DELETE/api/admin/quotas/users/{user_id}
Remove the user's override for ``?bucket=``, or for every bucket.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | yes |
GET/api/admin/usage
Global usage: time-bucketed series, totals, spend, latency, top users.
Every bucket carries both tokens and USD cost. Quota policies have always been settable in dollars; until now nothing showed the spend they were capping.
Not available to personal access tokens
GET/api/admin/users
List users, paginated, most-recently-seen first.
Each row carries ``last_seen`` (max auth-event time). Admin status is intentionally not joined here; the dashboard cross-references GET /api/admin/admins for badges.
Not available to personal access tokens
GET/api/admin/users/{user_id}
Per-user drill-down: profile, roles, recent auth events, counts.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | yes |
PATCH/api/admin/users/{user_id}
Activate/deactivate a user.
Deactivation also revokes live sessions.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | yes |
POST/api/admin/users/{user_id}/revoke-sessions
Force-logout: revoke the user's live OIDC sessions (best-effort)
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | yes |
POST/api/admin/users/{user_id}/role
Grant the admin role to ``user_id`` (manual source)
Idempotent.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | yes |
DELETE/api/admin/users/{user_id}/role
Revoke the manual admin grant.
Refuses to remove the last admin.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | yes |
GET/api/admin/users/{user_id}/usage
One user's spend: daily series plus a split by model and by flow.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | yes |
Personal access tokens
Personal access tokens.
DELETE/api/admin/tokens/{token_id}
Revoke any user's token.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
token_id | path | string | yes |
GET/api/admin/users/{user_id}/tokens
List a user's tokens, revoked ones included.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | yes |
GET/api/user/tokens
List the caller's tokens with the scope catalog and the server's token policy.
Not available to personal access tokens
POST/api/user/tokens
Create a token.
The plaintext ``token`` is returned here and never again.
Not available to personal access tokens
DELETE/api/user/tokens/{token_id}
Revoke one of the caller's tokens.
Takes effect on the next request.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
token_id | path | string | yes |
POST/api/user/tokens/{token_id}/regenerate
Issue a new secret for a token and reset its expiry.
Name, scopes and restrictions stay; the old secret stops working at once. ``expires_in_days`` is optional and defaults to the lifetime the token was last issued with. An expired token can be renewed this way; a revoked one cannot. The plaintext ``token`` is returned here and never again.
Not available to personal access tokens
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
token_id | path | string | yes |