Skip to Content
APIπŸ“– REST API Reference

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 when AUTH_TYPE is 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 write scope includes the matching read scope. 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

Answer related operations.

POST/api/answer

Provide a response based on the question and retriever.

Token scope: chat:run

JSON body (AnswerModel):

FieldTypeRequiredDescription
active_docsstringnoActive documents.
agent_idstringnoAgent ID.
api_keystringnoAPI key.
chunksintegernoNumber of chunks. Default: 6.
conversation_idstringnoExisting conversation ID (loads history)
historyarray of stringnoConversation history (only for new conversations)
isNoneDocbooleannoFlag indicating if no document is used.
model_idstringnoModel ID to use for this request.
passthroughobjectnoDynamic parameters to inject into prompt template.
prompt_idstringnoPrompt ID. Default: "default".
questionstringyesQuestion to be asked.
retrieverstringnoRetriever type.
save_conversationbooleannoDeprecated, no effect: conversations always persist. Use `visibility` to control sidebar listing.
visibilitystringno'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):

FieldTypeRequiredDescription
api_keystringyesAPI key for authentication.
chunksintegernoNumber of results to return. Default: 5.
questionstringyesSearch query.

POST/stream

Stream a response based on the question and retriever.

Token scope: chat:run

JSON body (StreamModel):

FieldTypeRequiredDescription
active_docsstringnoActive documents.
agent_idstringnoAgent ID.
api_keystringnoAPI key.
attachmentsarray of stringnoList of attachment IDs.
chunksintegernoNumber of chunks. Default: 6.
conversation_idstringnoExisting conversation ID (loads history)
historyarray of stringnoConversation history (only for new conversations)
indexintegernoIndex of the query to update.
isNoneDocbooleannoFlag indicating if no document is used.
model_idstringnoModel ID to use for this request.
passthroughobjectnoDynamic parameters to inject into prompt template.
prompt_idstringnoPrompt ID. Default: "default".
questionstringyesQuestion to be asked.
retrieverstringnoRetriever type.
save_conversationbooleannoDeprecated, no effect: conversations always persist. Use `visibility` to control sidebar listing.
visibilitystringno'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):

FieldTypeRequiredDescription
api_key_idstringnoAPI Key ID.
filter_optionstringnoFilter 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):

FieldTypeRequiredDescription
api_key_idstringnoAPI Key ID.
filter_optionstringnoFilter 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):

FieldTypeRequiredDescription
api_key_idstringnoAPI Key ID.
filter_optionstringnoFilter 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):

FieldTypeRequiredDescription
api_key_idstringnoAPI Key ID.
filter_optionstringnoFilter option for analytics. One of: last_hour, last_24_hour, last_7_days, last_15_days, last_30_days. Default: "last_30_days".
group_bystringnoSecond grouping dimension for the series. One of: none, model, agent, source. Default: "none".
include_side_channelbooleannoInclude 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):

FieldTypeRequiredDescription
api_key_idstringnoAPI Key ID.
filter_optionstringnoFilter 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):

FieldTypeRequiredDescription
api_key_idstringnoAPI Key ID.
event_typestringnoFilter by event source. One of: chat, schedule, webhook, workflow, system, search, graph.
levelstringnoFilter by log level. One of: info, error, warning.
pageintegernoPage number for pagination. Default: 1.
page_sizeintegernoNumber of logs per page. Default: 10.
searchstringnoSubstring 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

ParameterInTypeRequiredDescription
message_idquerystringnoAssistant message id.
request_idquerystringnoRequest id (chat turn, scheduled run)
activity_idquerystringnoAgent activity id (webhook and system rows)
workflow_run_idquerystringnoWorkflow run id.
idquerystringnoTrace id.
api_key_idquerystringnoAgent 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

ParameterInTypeRequiredDescription
artifact_idpathstringyes

DELETE/api/artifacts/{artifact_id}

Delete an artifact and all its versions (owner only)

Not available to personal access tokens

ParameterInTypeRequiredDescription
artifact_idpathstringyes

POST/api/artifacts/{artifact_id}/restore

Restore a prior version by appending it as the new current version.

Not available to personal access tokens

ParameterInTypeRequiredDescription
artifact_idpathstringyes

GET/api/artifacts/{artifact_id}/versions/{version}

Get a single artifact version's metadata and spec.

Not available to personal access tokens

ParameterInTypeRequiredDescription
artifact_idpathstringyes
versionpathintegeryes

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

ParameterInTypeRequiredDescription
agent_idpathstringyes
capabilitypathstringyes

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):

FieldTypeRequiredDescription
api_keystringnoAPI key (optional)
fileobjectyesFile(s) to upload.

POST/api/stt

Transcribe an uploaded audio file.

Not available to personal access tokens

JSON body (SpeechToTextModel):

FieldTypeRequiredDescription
fileobjectyesAudio file.
languagestringnoOptional 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):

FieldTypeRequiredDescription
chunk_indexintegeryesSequential chunk index.
fileobjectyesAudio chunk.
is_silencebooleannoWhether the latest capture window was mostly silence.
session_idstringyesLive 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):

FieldTypeRequiredDescription
textstringyesText 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

ParameterInTypeRequiredDescription
idquerystringnoThe ID of the conversation to delete.

POST/api/feedback

Submit feedback for a conversation.

Token scope: conversations:write

JSON body (FeedbackModel):

FieldTypeRequiredDescription
answerstringnoThe AI answer.
api_keystringnoOptional API key.
conversation_idstringyesid of the particular conversation.
feedbackstringyesUser feedback.
questionstringnoThe user question.
question_indexintegeryesThe 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

ParameterInTypeRequiredDescription
idquerystringnoThe 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

ParameterInTypeRequiredDescription
message_idpathstringyesMessage 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

ParameterInTypeRequiredDescription
qquerystringnoSearch term (required)
limitquerystringnoMaximum 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):

FieldTypeRequiredDescription
idstringyesConversation ID.
namestringyesNew 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

ParameterInTypeRequiredDescription
model_idpathstringyes

PATCH/api/user/models/{model_id}

Update a BYOM custom model (partial)

Token scope: models:write

ParameterInTypeRequiredDescription
model_idpathstringyes

DELETE/api/user/models/{model_id}

Delete a BYOM custom model.

Token scope: models:write

ParameterInTypeRequiredDescription
model_idpathstringyes

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

ParameterInTypeRequiredDescription
model_idpathstringyes

Agents

Agent management operations.

POST/api/adopt_agent

Adopt an agent by ID.

Token scope: agents:write

ParameterInTypeRequiredDescription
idquerystringnoAgent ID.

GET/api/agent_webhook

Generate webhook URL for the agent.

Token scope: agents:keys

ParameterInTypeRequiredDescription
idquerystringnoID of the agent.

POST/api/create_agent

Create a new agent.

Token scope: agents:write

JSON body (CreateAgentModel):

FieldTypeRequiredDescription
agent_typestringnoType of the agent (classic, react, workflow). Defaults to 'classic' for backwards compatibility.
allow_system_prompt_overridebooleannoAllow API callers to override the system prompt via the v1 endpoint.
chunksintegernoChunks count.
default_model_idstringnoDefault model ID for this agent.
descriptionstringyesDescription of the agent.
folder_idstringnoFolder ID to organize the agent.
imageobjectnoImage file upload.
json_schemaobjectnoJSON schema for enforcing structured output format.
limited_request_modebooleannoWhether the agent is in limited request mode.
limited_token_modebooleannoWhether the agent is in limited token mode.
modelsarray of stringnoList of available model IDs for this agent.
namestringyesName of the agent.
prompt_idstringnoPrompt ID.
request_limitintegernoRequest limit for the agent in limited mode.
retrieverstringnoRetriever ID.
sourcestringnoSource ID (legacy single source)
sourcesarray of stringnoList of source identifiers for multiple sources.
statusstringyesStatus of the agent (draft or published)
token_limitintegernoToken limit for the agent in limited mode.
toolsarray of stringnoList of tool identifiers.
workflowstringnoWorkflow ID for workflow-type agents.

DELETE/api/delete_agent

Delete an agent by ID.

Token scope: agents:write

ParameterInTypeRequiredDescription
idquerystringnoID of the agent.

GET/api/export_agent

Export an agent as YAML.

Token scope: agents:read

ParameterInTypeRequiredDescription
idquerystringnoAgent ID.

GET/api/get_agent

Get agent by ID.

Token scope: agents:read

ParameterInTypeRequiredDescription
idquerystringnoAgent 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

ParameterInTypeRequiredDescription
idquerystringnoID 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

ParameterInTypeRequiredDescription
agent_idpathstringyesID of the agent.

DELETE/api/remove_shared_agent

Remove a shared agent from the current user's shared list.

Token scope: agents:write

ParameterInTypeRequiredDescription
idquerystringnoID of the shared agent.

PUT/api/share_agent

Share or unshare an agent.

Token scope: agents:write

JSON body (ShareAgentModel):

FieldTypeRequiredDescription
idstringyesID of the agent.
sharedbooleanyesShare or unshare the agent.
usernamestringnoName of the user.

GET/api/shared_agent

Get a shared agent by token or ID.

Not available to personal access tokens

ParameterInTypeRequiredDescription
tokenquerystringnoShared 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

ParameterInTypeRequiredDescription
agent_idpathstringyes

JSON body (UpdateAgentModel):

FieldTypeRequiredDescription
agent_typestringnoType of the agent (classic, react, workflow). Defaults to 'classic' for backwards compatibility.
allow_system_prompt_overridebooleannoAllow API callers to override the system prompt via the v1 endpoint.
chunksintegernoChunks count.
default_model_idstringnoDefault model ID for this agent.
descriptionstringyesNew description of the agent.
folder_idstringnoFolder ID to organize the agent.
imageobjectnoImage file upload.
json_schemaobjectnoJSON schema for enforcing structured output format.
limited_request_modebooleannoWhether the agent is in limited request mode.
limited_token_modebooleannoWhether the agent is in limited token mode.
modelsarray of stringnoList of available model IDs for this agent.
namestringyesNew name of the agent.
prompt_idstringnoPrompt ID.
request_limitintegernoRequest limit for the agent in limited mode.
retrieverstringnoRetriever ID.
sourcestringnoSource ID (legacy single source)
sourcesarray of stringnoList of source identifiers for multiple sources.
statusstringyesStatus of the agent (draft or published)
token_limitintegernoToken limit for the agent in limited mode.
toolsarray of stringnoList of tool identifiers.
workflowstringnoWorkflow 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

ParameterInTypeRequiredDescription
webhook_tokenpathstringyes

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

ParameterInTypeRequiredDescription
webhook_tokenpathstringyes

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):

FieldTypeRequiredDescription
namestringyesFolder name.
parent_idstringnoParent folder ID.

POST/api/agents/folders/bulk_move

Move multiple agents to a folder.

Token scope: agents:write

JSON body (BulkMoveAgents):

FieldTypeRequiredDescription
agent_idsarray of stringyesList of agent IDs.
folder_idstringnoTarget 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):

FieldTypeRequiredDescription
agent_idstringyesAgent ID to move.
folder_idstringnoTarget folder ID (null to remove from folder)

GET/api/agents/folders/{folder_id}

Get a specific folder with its agents.

Token scope: agents:read

ParameterInTypeRequiredDescription
folder_idpathstringyes

PUT/api/agents/folders/{folder_id}

Update a folder.

Token scope: agents:write

ParameterInTypeRequiredDescription
folder_idpathstringyes

DELETE/api/agents/folders/{folder_id}

Delete a folder.

Token scope: agents:write

ParameterInTypeRequiredDescription
folder_idpathstringyes

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

ParameterInTypeRequiredDescription
agent_idquerystringnoAgent ID.
limitquerystringnoMax rows (default 100)
offsetquerystringnoRow offset.

GET/api/guardrails/summary

Aggregate guardrail activity for the caller.

Token scope: agents:read

ParameterInTypeRequiredDescription
daysquerystringnoTrailing window in days (default 30)
agent_idquerystringnoScope 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):

FieldTypeRequiredDescription
contentstringyesContent of the prompt.
namestringyesName of the prompt.

POST/api/delete_prompt

Delete a prompt by ID.

Token scope: prompts:write

JSON body (DeletePromptModel):

FieldTypeRequiredDescription
idstringyesPrompt 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

ParameterInTypeRequiredDescription
idquerystringnoID of the prompt.

POST/api/update_prompt

Update an existing prompt.

Token scope: prompts:write

JSON body (UpdatePromptModel):

FieldTypeRequiredDescription
contentstringyesNew content of the prompt.
idstringyesPrompt ID to update.
namestringyesNew 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

ParameterInTypeRequiredDescription
agent_idpathstringyes

POST/api/agents/{agent_id}/schedules

Create a schedule (recurring or one-time) for an agent.

Token scope: schedules:write

ParameterInTypeRequiredDescription
agent_idpathstringyes

JSON body (ScheduleCreate):

FieldTypeRequiredDescription
cronstringnoRequired when trigger_type == 'recurring'.
end_atstringnoISO 8601.
instructionstringyes
model_idstringno
namestringno
run_atstringnoISO 8601 β€” required when trigger_type == 'once'.
timezonestringno
token_budgetintegerno
tool_allowlistarray of stringno
trigger_typestringno'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

ParameterInTypeRequiredDescription
agent_idpathstringyes
daysquerystringnoWindow in days (default 30, clamped to 1..365)

GET/api/schedules/{schedule_id}

Get schedule by id.

Token scope: schedules:read

ParameterInTypeRequiredDescription
schedule_idpathstringyes

PUT/api/schedules/{schedule_id}

Edit a schedule's editable fields.

Token scope: schedules:write

ParameterInTypeRequiredDescription
schedule_idpathstringyes

PATCH/api/schedules/{schedule_id}

Pause / resume a schedule.

Token scope: schedules:write

ParameterInTypeRequiredDescription
schedule_idpathstringyes

DELETE/api/schedules/{schedule_id}

Cancel / delete a schedule.

Token scope: schedules:write

ParameterInTypeRequiredDescription
schedule_idpathstringyes

POST/api/schedules/{schedule_id}/run

Run a schedule immediately (trigger_source='manual').

Token scope: schedules:write

ParameterInTypeRequiredDescription
schedule_idpathstringyes

GET/api/schedules/{schedule_id}/runs

Paginated run log for a schedule.

Token scope: schedules:read

ParameterInTypeRequiredDescription
schedule_idpathstringyes
limitquerystringnoPage size (default 50)
offsetquerystringnoPage offset.

GET/api/schedules/{schedule_id}/runs/{run_id}

Full output / error for a single run.

Token scope: schedules:read

ParameterInTypeRequiredDescription
schedule_idpathstringyes
run_idpathstringyes

Sharing

Conversation sharing operations.

POST/api/share

Share a conversation.

Not available to personal access tokens

JSON body (ShareConversationModel):

FieldTypeRequiredDescription
chunksintegernoChunks count (optional)
conversation_idstringyesConversation ID.
prompt_idstringnoPrompt ID (optional)
userstringnoUser ID (optional)

GET/api/shared_conversation/{identifier}

Get publicly shared conversations by identifier.

Not available to personal access tokens

ParameterInTypeRequiredDescription
identifierpathstringyes

Sources

Source document management operations.

POST/api/add_chunk

Adds a new chunk to the document.

Token scope: sources:write

JSON body (AddChunkModel):

FieldTypeRequiredDescription
idstringyesDocument ID.
metadataobjectnoMetadata associated with the chunk.
textstringyesText 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

ParameterInTypeRequiredDescription
idquerystringnoThe document ID.
chunk_idquerystringnoThe ID of the chunk to delete.

GET/api/delete_old

Deletes old indexes and associated files.

Token scope: sources:write

ParameterInTypeRequiredDescription
source_idquerystringnoThe source ID to delete.

GET/api/directory_structure

Get the directory structure for a document.

Token scope: sources:read

ParameterInTypeRequiredDescription
idquerystringnoThe document ID.

GET/api/get_chunks

Retrieves chunks from a document, optionally filtered by file path and search term.

Token scope: sources:read

ParameterInTypeRequiredDescription
idquerystringnoThe document ID.
pagequerystringnoPage number for pagination.
per_pagequerystringnoNumber of chunks per page.
pathquerystringnoOptional: Filter chunks by relative file path.
searchquerystringnoOptional: 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):

FieldTypeRequiredDescription
directory_pathstringnoDirectory path to remove (for remove_directory operation)
fileobjectnoFiles to add (for add operation)
file_pathsarray of stringnoFile paths to remove (for remove operation)
operationstringyesOperation: 'add', 'remove', or 'remove_directory'.
parent_dirstringnoParent directory path relative to source root.
source_idstringyesSource ID to modify.

POST/api/manage_sync

Manage sync frequency for sources.

Token scope: sources:write

JSON body (ManageSyncModel):

FieldTypeRequiredDescription
source_idstringyesSource ID.
sync_frequencystringyesSync 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):

FieldTypeRequiredDescription
datastringyesData to process.
namestringyesJob name.
repo_urlstringnoGitHub repository URL.
sourcestringyesSource of the data.
userstringyesUser 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):

FieldTypeRequiredDescription
source_idstringyesSource 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):

FieldTypeRequiredDescription
initial_contentstringnoOptional markdown seed for /index.md.
namestringyesWiki 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

ParameterInTypeRequiredDescription
source_idpathstringyes

JSON body (SourceConfigModel):

FieldTypeRequiredDescription
chunkingobjectnoIngest-time chunking config.
kindstringnoBehavior selector (e.g. classic)
retrievalobjectnoQuery-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

ParameterInTypeRequiredDescription
source_idpathstringyes

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

ParameterInTypeRequiredDescription
source_idpathstringyes
node_idpathstringyes

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

ParameterInTypeRequiredDescription
source_idpathstringyes

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

ParameterInTypeRequiredDescription
source_idpathstringyes

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

ParameterInTypeRequiredDescription
source_idpathstringyes

JSON body (SourceSearchModel):

FieldTypeRequiredDescription
querystringyesThe query to retrieve for.
retrievalobjectnoAd-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

ParameterInTypeRequiredDescription
source_idpathstringyes

GET/api/sources/{source_id}/wiki/page

Fetch a single wiki page's content fresh from storage.

Token scope: sources:read

ParameterInTypeRequiredDescription
source_idpathstringyes
pathquerystringnoPage 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

ParameterInTypeRequiredDescription
source_idpathstringyes

JSON body (WikiPageEditModel):

FieldTypeRequiredDescription
contentstringyesMarkdown content.
expected_versionintegernoOptimistic-lock version from the last read.
pathstringyesPage path.

GET/api/sources/{source_id}/wiki/pages

List a wiki source's pages (read access: owner or shared).

Token scope: sources:read

ParameterInTypeRequiredDescription
source_idpathstringyes

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

ParameterInTypeRequiredDescription
source_idpathstringyes

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

ParameterInTypeRequiredDescription
source_idpathstringyes

POST/api/sync_source

Trigger an immediate sync for a source.

Token scope: sources:write

JSON body (SyncSourceModel):

FieldTypeRequiredDescription
source_idstringyesSource ID.

GET/api/task_status

Get celery job status.

Token scope: chat:run or sources:read or sources:write

JSON body (TaskStatusModel):

FieldTypeRequiredDescription
task_idstringyesTask ID.

PUT/api/update_chunk

Updates an existing chunk in the document.

Token scope: sources:write

JSON body (UpdateChunkModel):

FieldTypeRequiredDescription
chunk_idstringyesChunk ID to update.
idstringyesDocument ID.
metadataobjectnoUpdated metadata associated with the chunk.
textstringnoNew 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):

FieldTypeRequiredDescription
fileobjectyesFile(s) to upload.
namestringyesJob name.
userstringyesUser 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

ParameterInTypeRequiredDescription
team_idpathstringyes

PUT/api/teams/{team_id}

Update team name/description.

Requires team_admin.

Not available to personal access tokens

ParameterInTypeRequiredDescription
team_idpathstringyes

DELETE/api/teams/{team_id}

Delete the team.

Owner-only (a global admin overrides).

Not available to personal access tokens

ParameterInTypeRequiredDescription
team_idpathstringyes

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

ParameterInTypeRequiredDescription
team_idpathstringyes

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

ParameterInTypeRequiredDescription
team_idpathstringyes

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

ParameterInTypeRequiredDescription
team_idpathstringyes

GET/api/teams/{team_id}/members

List members.

Requires membership.

Token scope: teams:read

ParameterInTypeRequiredDescription
team_idpathstringyes

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

ParameterInTypeRequiredDescription
team_idpathstringyes

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

ParameterInTypeRequiredDescription
team_idpathstringyes
member_idpathstringyes

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

ParameterInTypeRequiredDescription
team_idpathstringyes
member_idpathstringyes

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

ParameterInTypeRequiredDescription
team_idpathstringyes

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

ParameterInTypeRequiredDescription
artifact_idpathstringyes

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):

FieldTypeRequiredDescription
configobjectyesConfiguration of the tool.
customNamestringnoCustom name for the tool.
descriptionstringyesTool description.
displayNamestringyesDisplay name for the tool.
namestringyesName of the tool.
statusbooleanyesStatus of the tool.

POST/api/delete_tool

Delete a tool by ID.

Token scope: tools:write

JSON body (DeleteToolModel):

FieldTypeRequiredDescription
idstringyesTool 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):

FieldTypeRequiredDescription
codestringyesAuthorization code.
errorstringnoError message (if any)
statestringyesState parameter.

POST/api/mcp_server/save

Create or update MCP server with automatic tool discovery.

Token scope: tools:write

JSON body (MCPServerSaveModel):

FieldTypeRequiredDescription
configobjectyesMCP server configuration.
displayNamestringyesDisplay name for the MCP server.
idstringnoTool ID for updates (optional)
statusbooleannoTool status. Default: true.

POST/api/mcp_server/test

Test MCP server connection with provided configuration.

Token scope: tools:write

JSON body (MCPServerTestModel):

FieldTypeRequiredDescription
configobjectyesMCP server configuration to test.
idstringnoStored 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):

FieldTypeRequiredDescription
actionsarray of objectnoActions the tool can perform.
configobjectnoConfiguration of the tool.
customNamestringnoCustom name for the tool.
descriptionstringnoTool description.
displayNamestringnoDisplay name for the tool.
idstringyesTool ID.
namestringnoName of the tool.
statusbooleannoStatus of the tool.

POST/api/update_tool_actions

Update the actions of a tool.

Token scope: tools:write

JSON body (UpdateToolActionsModel):

FieldTypeRequiredDescription
actionsarray of objectyesActions the tool can perform.
idstringyesTool 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):

FieldTypeRequiredDescription
configobjectyesConfiguration of the tool.
idstringyesTool ID.

POST/api/update_tool_status

Update the status of a tool.

Token scope: tools:write

JSON body (UpdateToolStatusModel):

FieldTypeRequiredDescription
idstringyesTool ID.
statusbooleanyesStatus 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

ParameterInTypeRequiredDescription
workflow_idpathstringyes

PUT/api/workflows/{workflow_id}

Update workflow and replace nodes/edges.

Token scope: workflows:write

ParameterInTypeRequiredDescription
workflow_idpathstringyes

DELETE/api/workflows/{workflow_id}

Delete workflow and its graph.

Token scope: workflows:write

ParameterInTypeRequiredDescription
workflow_idpathstringyes

Connectors

Connector operations.

GET/api/connectors/auth

Get connector OAuth authorization URL.

Not available to personal access tokens

ParameterInTypeRequiredDescription
providerquerystringnoConnector 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):

FieldTypeRequiredDescription
providerstringyes
session_tokenstringno

POST/api/connectors/files

List files from a connector provider (supports pagination and search)

Not available to personal access tokens

JSON body (ConnectorFilesModel):

FieldTypeRequiredDescription
connection_idstringno
folder_idstringno
limitintegerno
page_tokenstringno
providerstringyes
search_querystringno
session_tokenstringnoLegacy; use connection_id.

POST/api/connectors/sync

Sync connector source to check for modifications.

Not available to personal access tokens

JSON body (ConnectorSyncModel):

FieldTypeRequiredDescription
connection_idstringnoConnection to sync with; defaults to the source's own (ignored for team editors, whose sync uses the owner's connection)
session_tokenstringnoLegacy; use connection_id.
source_idstringyesSource 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):

FieldTypeRequiredDescription
connection_idstringno
providerstringyes
session_tokenstringnoLegacy; 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

ParameterInTypeRequiredDescription
tool_idpathstringyes

GET/api/connections/{connection_id}

One connection with the sources it syncs and the tools it provides.

Not available to personal access tokens

ParameterInTypeRequiredDescription
connection_idpathstringyes

PATCH/api/connections/{connection_id}

Name an account: {name}. An empty name clears it. Owner only.

Not available to personal access tokens

ParameterInTypeRequiredDescription
connection_idpathstringyes

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

ParameterInTypeRequiredDescription
connection_idpathstringyes

POST/api/connections/{connection_id}/disconnect

Delete a connection's stored credentials; its sources and tools stay.

Not available to personal access tokens

ParameterInTypeRequiredDescription
connection_idpathstringyes

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

ParameterInTypeRequiredDescription
connection_idpathstringyes

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

ParameterInTypeRequiredDescription
connection_idpathstringyes

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

ParameterInTypeRequiredDescription
connection_idpathstringyes

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

ParameterInTypeRequiredDescription
connection_idpathstringyes

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

ParameterInTypeRequiredDescription
connection_idpathstringyes

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

ParameterInTypeRequiredDescription
connection_idpathstringyes

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

ParameterInTypeRequiredDescription
connection_idpathstringyes
tool_idpathstringyes

PUT/api/connections/{connection_id}/tools/{tool_id}/permissions

Set per-action permissions: {permissions: {action: always | ask | off}}.

Not available to personal access tokens

ParameterInTypeRequiredDescription
connection_idpathstringyes
tool_idpathstringyes

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

ParameterInTypeRequiredDescription
connection_idpathstringyes

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

ParameterInTypeRequiredDescription
team_idpathstringyes

PUT/api/admin/quotas/teams/{team_id}

Set the allowance each member of the team gets.

Not available to personal access tokens

ParameterInTypeRequiredDescription
team_idpathstringyes

DELETE/api/admin/quotas/teams/{team_id}

Remove the team's allowance for ``?bucket=``, or for every bucket.

Not available to personal access tokens

ParameterInTypeRequiredDescription
team_idpathstringyes

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

ParameterInTypeRequiredDescription
user_idpathstringyes

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

ParameterInTypeRequiredDescription
user_idpathstringyes

DELETE/api/admin/quotas/users/{user_id}

Remove the user's override for ``?bucket=``, or for every bucket.

Not available to personal access tokens

ParameterInTypeRequiredDescription
user_idpathstringyes

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

ParameterInTypeRequiredDescription
user_idpathstringyes

PATCH/api/admin/users/{user_id}

Activate/deactivate a user.

Deactivation also revokes live sessions.

Not available to personal access tokens

ParameterInTypeRequiredDescription
user_idpathstringyes

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

ParameterInTypeRequiredDescription
user_idpathstringyes

POST/api/admin/users/{user_id}/role

Grant the admin role to ``user_id`` (manual source)

Idempotent.

Not available to personal access tokens

ParameterInTypeRequiredDescription
user_idpathstringyes

DELETE/api/admin/users/{user_id}/role

Revoke the manual admin grant.

Refuses to remove the last admin.

Not available to personal access tokens

ParameterInTypeRequiredDescription
user_idpathstringyes

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

ParameterInTypeRequiredDescription
user_idpathstringyes

Personal access tokens

Personal access tokens.

DELETE/api/admin/tokens/{token_id}

Revoke any user's token.

Not available to personal access tokens

ParameterInTypeRequiredDescription
token_idpathstringyes

GET/api/admin/users/{user_id}/tokens

List a user's tokens, revoked ones included.

Not available to personal access tokens

ParameterInTypeRequiredDescription
user_idpathstringyes

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

ParameterInTypeRequiredDescription
token_idpathstringyes

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

ParameterInTypeRequiredDescription
token_idpathstringyes