{"info":{"description":"API for DocsGPT","title":"DocsGPT API","version":"1.0"},"paths":{"/api/activity/history":{"get":{"description":"The caller's finished runs of every kind, newest first: scheduled, webhook and workflow runs, background jobs, and monitor wakes, with one status vocabulary.\nReturns:\n    A Flask response with `runs` and `has_more`, or 400 for an\n    unknown `kind` or `status`.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_activity_history","parameters":[{"schema":{"type":"string"},"description":"One of schedule, webhook, workflow, job, monitor; all when left out.","in":"query","name":"kind"},{"schema":{"type":"string"},"description":"One of success, failed, timeout, skipped, cancelled (failed includes timed out); all when left out.","in":"query","name":"status"},{"schema":{"type":"string"},"description":"Text matched against the run, agent and conversation names.","in":"query","name":"q"},{"schema":{"type":"string"},"description":"How far back to look (default 30, at most 90).","in":"query","name":"days"},{"schema":{"type":"string"},"description":"Rows per page (default 50, at most 200).","in":"query","name":"limit"},{"schema":{"type":"string"},"description":"Rows to skip.","in":"query","name":"offset"}],"responses":{"200":{"description":"Success"}},"summary":"Return one page of the caller's finished runs","tags":["activity"],"x-pat-denied":true}},"/api/activity/now":{"get":{"description":"What runs for the caller now (chat answers, background jobs, scheduled, webhook and workflow runs, ingests), what waits for them (tool approvals, schedules paused after failures), what runs in the next 24 hours, and the 24-hour counts.\nReturns:\n    A Flask response with `running`, `needs_you`, `up_next`,\n    `approval_conversations`, `failed_conversations` and `stats`.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_activity_now","responses":{"200":{"description":"Success"}},"summary":"Return the caller's Now snapshot","tags":["activity"],"x-pat-denied":true}},"/api/activity/planned":{"get":{"description":"The caller's calendar for a window: planned schedule runs (from cron or run_at), past and in-flight runs with their status, coming knowledge syncs (one event per frequency each time it fires, kind sync), and monitors as date ranges. The window may span at most 62 days. A frequent schedule with more events than one schedule may list is summed up per day in tz: one event per day and routine state, with count and until.\nReturns:\n    A Flask response with `from`, `to`, `events` (schedule and\n    sync events, by `kind`), `monitors` and `truncated`, or 400\n    for a bad window or time zone.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_activity_planned","parameters":[{"schema":{"type":"string"},"description":"Window start, ISO 8601.","in":"query","name":"from","required":true},{"schema":{"type":"string"},"description":"Window end (exclusive), ISO 8601.","in":"query","name":"to","required":true},{"schema":{"type":"string"},"description":"The viewer's IANA time zone, which days are split in (default UTC).","in":"query","name":"tz"}],"responses":{"200":{"description":"Success"}},"summary":"Return the caller's calendar window","tags":["activity"],"x-pat-denied":true}},"/api/add_chunk":{"post":{"description":"Adds a new chunk to the document. 409 (code source_busy) while a sync or page change on the source runs.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"post_add_chunk","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"Adds a new chunk to the document","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddChunkModel"}}},"required":true}}},"/api/admin/activity":{"get":{"operationId":"get_admin_activity_resource","responses":{"200":{"description":"Success"}},"summary":"Merged audit feed, newest first, with filters and a total","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."}},"/api/admin/activity/events":{"get":{"description":"The filter UI offers these instead of a free-text box, so an operator\nnever has to guess that denied logins are `oidc_login_denied`.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_admin_activity_catalogue_resource","responses":{"200":{"description":"Success"}},"summary":"Distinct ``(event, category)`` pairs this instance has recorded","tags":["admin"],"x-pat-denied":true}},"/api/admin/activity/export":{"get":{"description":"Streamed, not buffered: a compliance export of a busy instance should\nnot be built in memory first. Capped at `_EXPORT_MAX_ROWS`, and the\n`X-Export-Max-Rows` header reports the cap that was in effect so a\ntruncated export is not mistaken for a complete one.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_admin_activity_export_resource","responses":{"200":{"description":"Success"}},"summary":"Stream the filtered feed as CSV or NDJSON","tags":["admin"],"x-pat-denied":true}},"/api/admin/admins":{"get":{"operationId":"get_admin_admins_resource","responses":{"200":{"description":"Success"}},"summary":"List all admins with earliest grant time + grant sources","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."}},"/api/admin/audit":{"get":{"description":"Filter by event/user/since.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_admin_audit_resource","responses":{"200":{"description":"Success"}},"summary":"Global auth-events feed, newest first","tags":["admin"],"x-pat-denied":true}},"/api/admin/connectors":{"get":{"operationId":"get_admin_connectors_resource","responses":{"200":{"description":"Success"}},"summary":"Every connector with its policy, setup state and connection count","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."},"put":{"operationId":"put_admin_connectors_resource","responses":{"200":{"description":"Success"}},"summary":"Update policies: {policies: {key: {enabled?, credential_mode?, allow_writes?}}, allow_custom_mcp?}","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."}},"/api/admin/decisions":{"get":{"operationId":"get_admin_decisions_resource","responses":{"200":{"description":"Success"}},"summary":"The decision model as this API process sees it","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."}},"/api/admin/defaults/agents":{"get":{"operationId":"get_admin_agent_defaults_resource","responses":{"200":{"description":"Success"}},"summary":"The guardrails new agents start with, and what the injection model costs on this server","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."},"put":{"operationId":"put_admin_agent_defaults_resource","responses":{"200":{"description":"Success"}},"summary":"Store the body's `guardrails` object as the default for new agents; existing agents keep their own","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."}},"/api/admin/defaults/sources":{"get":{"operationId":"get_admin_source_defaults_resource","responses":{"200":{"description":"Success"}},"summary":"The default retrieval settings for new sources, and what relevance costs on this server","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."},"put":{"operationId":"put_admin_source_defaults_resource","responses":{"200":{"description":"Success"}},"summary":"Store the body's `retrieval` object as the default for new sources; existing sources keep their own","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."}},"/api/admin/devices/audit":{"get":{"description":"Filter by decision/user/since.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_admin_device_audit_resource","responses":{"200":{"description":"Success"}},"summary":"Global remote-device command audit feed","tags":["admin"],"x-pat-denied":true}},"/api/admin/guardrails":{"get":{"operationId":"get_admin_guardrails_resource","responses":{"200":{"description":"Success"}},"summary":"The floor every agent follows, whether MCP tool descriptions are scored, and the injection model's cost","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."},"put":{"operationId":"put_admin_guardrails_resource","responses":{"200":{"description":"Success"}},"summary":"Store the body's `floor` (an agent guardrails object, or null for none) and/or `mcp_description_warnings`","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."}},"/api/admin/overview":{"get":{"operationId":"get_admin_overview_resource","responses":{"200":{"description":"Success"}},"summary":"Top-line KPIs for the dashboard home","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."}},"/api/admin/quotas":{"get":{"description":"Query args (all optional; without them every row is returned):\n    teams_q: Case-insensitive substring of the team name or slug.\n    users_q: Case-insensitive substring of the user's subject id or email.\n    teams_page / users_page: 1-based page of that list; only a list whose\n        page arg is given is paginated.\n    page_size: Teams or users per page, clamped to 1-100 (default 20); a\n        page carries every bucket row of each of them.\n\n`teams_total` and `users_total` count the teams and users after\nfiltering and before paging. Rows keep the repository order (subject,\nthen bucket).\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_admin_quotas_resource","responses":{"200":{"description":"Success"}},"summary":"Every stored policy, grouped by layer, plus the models cost limits cannot see","tags":["admin"],"x-pat-denied":true}},"/api/admin/quotas/instance":{"delete":{"operationId":"delete_admin_instance_quota_resource","responses":{"200":{"description":"Success"}},"summary":"Remove the instance default for ``?bucket=``, or for every bucket","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."},"put":{"operationId":"put_admin_instance_quota_resource","responses":{"200":{"description":"Success"}},"summary":"Set the instance default for one bucket","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."}},"/api/admin/quotas/teams/{team_id}":{"delete":{"operationId":"delete_admin_team_quota_resource","responses":{"200":{"description":"Success"}},"summary":"Remove the team's allowance for ``?bucket=``, or for every bucket","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."},"get":{"operationId":"get_admin_team_quota_resource","responses":{"200":{"description":"Success"}},"summary":"The per-member allowance of one team","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."},"parameters":[{"schema":{"type":"string"},"in":"path","name":"team_id","required":true}],"put":{"operationId":"put_admin_team_quota_resource","responses":{"200":{"description":"Success"}},"summary":"Set the allowance each member of the team gets","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."}},"/api/admin/quotas/users/{user_id}":{"delete":{"operationId":"delete_admin_user_quota_resource","responses":{"200":{"description":"Success"}},"summary":"Remove the user's override for ``?bucket=``, or for every bucket","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."},"get":{"operationId":"get_admin_user_quota_resource","responses":{"200":{"description":"Success"}},"summary":"A user's overrides and the limits and usage they resolve to","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."},"parameters":[{"schema":{"type":"string"},"in":"path","name":"user_id","required":true}],"put":{"operationId":"put_admin_user_quota_resource","responses":{"200":{"description":"Success"}},"summary":"Set one user's override, which beats team allowances and the default","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."}},"/api/admin/teams":{"get":{"description":"With no query args every team is returned. Any of these switches to a\nbounded search (same row shape):\n    q: Case-insensitive substring of the team name or slug.\n    without_quota: `1` keeps only teams with no team `all`-bucket\n        quota policy.\n    limit: The most rows to return, clamped to 1-100 (default 20).\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_all_teams","responses":{"200":{"description":"Success"}},"summary":"Global-admin oversight: every team with member counts, or a picker search","tags":["teams"],"x-pat-denied":true}},"/api/admin/tokens/{token_id}":{"delete":{"operationId":"delete_admin_token","responses":{"200":{"description":"Success"}},"summary":"Revoke any user's token","tags":["tokens"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."},"parameters":[{"schema":{"type":"string"},"in":"path","name":"token_id","required":true}]},"/api/admin/usage":{"get":{"description":"Every bucket carries both tokens and USD cost. Quota policies have\nalways been settable in dollars; until now nothing showed the spend\nthey were capping.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_admin_usage_resource","responses":{"200":{"description":"Success"}},"summary":"Global usage: time-bucketed series, totals, spend, latency, top users","tags":["admin"],"x-pat-denied":true}},"/api/admin/users":{"get":{"description":"Each row carries `last_seen` (max auth-event time) and the stored\n`email` (null when none is on file); `?user_id=` matches either.\nAdmin status is intentionally not joined here; the dashboard\ncross-references GET /api/admin/admins for badges.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_admin_users_resource","responses":{"200":{"description":"Success"}},"summary":"List users, paginated, most-recently-seen first","tags":["admin"],"x-pat-denied":true}},"/api/admin/users/{user_id}":{"get":{"operationId":"get_admin_user_resource","responses":{"200":{"description":"Success"}},"summary":"Per-user drill-down: profile, roles, recent auth events, counts","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."},"parameters":[{"schema":{"type":"string"},"in":"path","name":"user_id","required":true}],"patch":{"description":"Deactivation also revokes live sessions.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"patch_admin_user_resource","responses":{"200":{"description":"Success"}},"summary":"Activate/deactivate a user","tags":["admin"],"x-pat-denied":true}},"/api/admin/users/{user_id}/revoke-sessions":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"user_id","required":true}],"post":{"operationId":"post_admin_user_sessions_resource","responses":{"200":{"description":"Success"}},"summary":"Force-logout: revoke the user's live OIDC sessions (best-effort)","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."}},"/api/admin/users/{user_id}/role":{"delete":{"description":"Refuses to remove the last admin.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"delete_admin_user_role_resource","responses":{"200":{"description":"Success"}},"summary":"Revoke the manual admin grant","tags":["admin"],"x-pat-denied":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"user_id","required":true}],"post":{"description":"Idempotent.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_admin_user_role_resource","responses":{"200":{"description":"Success"}},"summary":"Grant the admin role to ``user_id`` (manual source)","tags":["admin"],"x-pat-denied":true}},"/api/admin/users/{user_id}/tokens":{"get":{"operationId":"get_admin_user_tokens","responses":{"200":{"description":"Success"}},"summary":"List a user's tokens, revoked ones included","tags":["tokens"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."},"parameters":[{"schema":{"type":"string"},"in":"path","name":"user_id","required":true}]},"/api/admin/users/{user_id}/usage":{"get":{"operationId":"get_admin_user_usage_resource","responses":{"200":{"description":"Success"}},"summary":"One user's spend: daily series plus a split by model and by flow","tags":["admin"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."},"parameters":[{"schema":{"type":"string"},"in":"path","name":"user_id","required":true}]},"/api/adopt_agent":{"post":{"description":"Adopt an agent by ID.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:write`.","operationId":"post_adopt_agent","parameters":[{"schema":{"type":"string"},"description":"Agent ID","in":"query","name":"id"}],"responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-scopes":["agents:write"],"summary":"Adopt an agent by ID"}},"/api/agent_starters":{"post":{"description":"List the starters (suggested first questions) of the agent an API key belongs to. Returns {\"starters\": [...]}, empty when the agent has none.\nReturns:\n    `{\"starters\": [...]}` with 200; 400 when `api_key` is missing\n    and 401 when it belongs to no agent.\n\n[Personal access token](/API/personal-access-tokens) scope: `chat:run`.","operationId":"post_agent_starters_resource","responses":{"200":{"description":"The agent's starters"},"400":{"description":"api_key is missing"},"401":{"description":"Invalid API key"}},"summary":"Return the agent's starters","tags":["answer"],"x-pat-scopes":["chat:run"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentStartersModel"}}},"required":true}}},"/api/agent_webhook":{"get":{"description":"Generate webhook URL for the agent.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:keys`.","operationId":"get_agent_webhook","parameters":[{"schema":{"type":"string"},"description":"ID of the agent","in":"query","name":"id"}],"responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-scopes":["agents:keys"],"summary":"Generate webhook URL for the agent"}},"/api/agents/defaults":{"get":{"description":"The guardrails a new agent starts with (set by an admin under Admin > Defaults), for prefilling the new-agent form: `{guardrails: {...}}`, the built-in defaults when none are set.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:read`.","operationId":"get_agent_defaults","responses":{"200":{"description":"Success"}},"tags":["guardrails"],"x-pat-scopes":["agents:read"],"summary":"GET /api/agents/defaults"}},"/api/agents/folders/":{"get":{"description":"Get all folders for the user.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:read`.","operationId":"get_agent_folders","responses":{"200":{"description":"Success"}},"tags":["agents_folders"],"x-pat-scopes":["agents:read"],"summary":"Get all folders for the user"},"post":{"description":"Create a new folder.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:write`.","operationId":"post_agent_folders","responses":{"200":{"description":"Success"}},"tags":["agents_folders"],"x-pat-scopes":["agents:write"],"summary":"Create a new folder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFolder"}}},"required":true}}},"/api/agents/folders/bulk_move":{"post":{"description":"Move multiple agents to a folder.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:write`.","operationId":"post_bulk_move_agents","responses":{"200":{"description":"Success"}},"tags":["agents_folders"],"x-pat-scopes":["agents:write"],"summary":"Move multiple agents to a folder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMoveAgents"}}},"required":true}}},"/api/agents/folders/move_agent":{"post":{"description":"Move an agent to a folder or remove from folder.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:write`.","operationId":"post_move_agent_to_folder","responses":{"200":{"description":"Success"}},"tags":["agents_folders"],"x-pat-scopes":["agents:write"],"summary":"Move an agent to a folder or remove from folder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveAgent"}}},"required":true}}},"/api/agents/folders/{folder_id}":{"delete":{"description":"Delete a folder.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:write`.","operationId":"delete_agent_folder","responses":{"200":{"description":"Success"}},"tags":["agents_folders"],"x-pat-scopes":["agents:write"],"summary":"Delete a folder"},"get":{"description":"Get a specific folder with its agents.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:read`.","operationId":"get_agent_folder","responses":{"200":{"description":"Success"}},"tags":["agents_folders"],"x-pat-scopes":["agents:read"],"summary":"Get a specific folder with its agents"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"folder_id","required":true}],"put":{"description":"Update a folder.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:write`.","operationId":"put_agent_folder","responses":{"200":{"description":"Success"}},"tags":["agents_folders"],"x-pat-scopes":["agents:write"],"summary":"Update a folder"}},"/api/agents/{agent_id}/schedules":{"get":{"description":"List schedules for an agent (recurring + one-time).\n\n[Personal access token](/API/personal-access-tokens) scope: `schedules:read`.","operationId":"get_agent_schedules","responses":{"200":{"description":"Success"}},"tags":["schedules"],"x-pat-scopes":["schedules:read"],"summary":"List schedules for an agent (recurring + one-time)"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"agent_id","required":true}],"post":{"description":"Create a schedule (recurring or one-time) for an agent.\n\n[Personal access token](/API/personal-access-tokens) scope: `schedules:write`.","operationId":"post_agent_schedules","responses":{"200":{"description":"Success"}},"tags":["schedules"],"x-pat-scopes":["schedules:write"],"summary":"Create a schedule (recurring or one-time) for an agent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCreate"}}},"required":true}}},"/api/agents/{agent_id}/schedules/stats":{"get":{"description":"Run stats for an agent's schedules over a recent window.\nArgs:\n    agent_id: Agent id from the URL.\n\nReturns:\n    A Flask response with `days`, `runs`, `failed`, `tokens`\n    and `latest_failure` (or an error envelope).\n\n[Personal access token](/API/personal-access-tokens) scope: `schedules:read`.","operationId":"get_agent_schedule_stats","parameters":[{"schema":{"type":"string"},"description":"Window in days (default 30, clamped to 1..365)","in":"query","name":"days"}],"responses":{"200":{"description":"Success"}},"summary":"Return run count, failures, tokens and latest failure for an agent","tags":["schedules"],"x-pat-scopes":["schedules:read"]},"parameters":[{"schema":{"type":"string"},"in":"path","name":"agent_id","required":true}]},"/api/analytics/topic_folders":{"get":{"description":"The folders of an agent's sources, largest first: one per documentation section, described by up to five page titles. They fill the agent's topic question after its own topics; the settings list them so the owner can hide or edit them. Needs edit access to the agent.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:read`.","operationId":"get_get_topic_folders","parameters":[{"schema":{"type":"string"},"description":"Agent id","in":"query","name":"agent_id"}],"responses":{"200":{"description":"Success"}},"tags":["analytics"],"x-pat-scopes":["agents:read"],"summary":"GET /api/analytics/topic_folders"}},"/api/analytics/topics":{"get":{"description":"Every topic an agent's conversations are labelled with, sorted by name, each with the Logs 'label' filter that selects it: topic:&lt;name> for a topic that doesn't overlap (its own topics and source folders), tag:&lt;id> for one that can. Needs the agent's logs; an agent the caller can't see gives an empty list.\n\n[Personal access token](/API/personal-access-tokens) scope: `analytics:read`.","operationId":"get_get_agent_topics","parameters":[{"schema":{"type":"string"},"description":"Agent id","in":"query","name":"agent_id"}],"responses":{"200":{"description":"Success"}},"tags":["analytics"],"x-pat-scopes":["analytics:read"],"summary":"GET /api/analytics/topics"}},"/api/answer":{"post":{"description":"Provide a response based on the question and retriever.\n\n[Personal access token](/API/personal-access-tokens) scope: `chat:run`.","operationId":"post_answer_resource","responses":{"200":{"description":"Success"}},"tags":["answer"],"x-pat-scopes":["chat:run"],"summary":"Provide a response based on the question and retriever","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerModel"}}},"required":true}}},"/api/approvals/{token}":{"get":{"description":"What an approval link asks: its title, question, details, options and whether it was decided. Public (the token is the credential); reading it changes nothing.\n\nPublic: the token in the path authorizes the request, so it needs no sign-in or other credential.","operationId":"get_approval_link","parameters":[{"schema":{"type":"string"},"description":"The link's token.","in":"path","name":"token","required":true}],"responses":{"200":{"description":"Success"}},"security":[],"tags":["approvals"],"x-pat-denied":true,"summary":"GET /api/approvals/{token}"},"post":{"description":"Decide an approval link: {decision, comment?}, where decision is one of its options. The first decision wins and resumes the conversation that asked; later ones get 409. 404 for an unknown, expired or revoked link, 400 for an option it doesn't offer, 429 when rate limited.\n\nPublic: the token in the path authorizes the request, so it needs no sign-in or other credential.","operationId":"post_approval_link","parameters":[{"schema":{"type":"string"},"description":"The link's token.","in":"path","name":"token","required":true}],"responses":{"200":{"description":"Success"}},"security":[],"tags":["approvals"],"x-pat-denied":true,"summary":"POST /api/approvals/{token}"}},"/api/artifact/{artifact_id}":{"get":{"description":"Get artifact data by artifact ID. Returns all todos for the tool when fetching a todo artifact.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_artifact_artifact_id_","responses":{"200":{"description":"Success"}},"tags":["tools"],"x-pat-denied":true,"summary":"Get artifact data by artifact ID"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"artifact_id","required":true}]},"/api/artifacts":{"get":{"description":"List artifacts for a conversation, workflow run, or the caller.\n\n[Personal access token](/API/personal-access-tokens) scope: `artifacts:read`.","operationId":"get_list_artifacts","responses":{"200":{"description":"Success"}},"tags":["artifacts"],"x-pat-scopes":["artifacts:read"],"summary":"List artifacts for a conversation, workflow run, or the caller"}},"/api/artifacts/{artifact_id}":{"delete":{"description":"Delete an artifact and all its versions (owner only)\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"delete_get_artifact","responses":{"200":{"description":"Success"}},"tags":["artifacts"],"x-pat-denied":true,"summary":"Delete an artifact and all its versions (owner only)"},"get":{"description":"Get an artifact's metadata, version list, and current spec.\n\n[Personal access token](/API/personal-access-tokens) scope: `artifacts:read`.","operationId":"get_artifacts_artifact_id_","responses":{"200":{"description":"Success"}},"tags":["artifacts"],"x-pat-scopes":["artifacts:read"],"summary":"Get an artifact's metadata, version list, and current spec"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"artifact_id","required":true}]},"/api/artifacts/{artifact_id}/restore":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"artifact_id","required":true}],"post":{"description":"Restore a prior version by appending it as the new current version.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_restore_artifact","responses":{"200":{"description":"Success"}},"tags":["artifacts"],"x-pat-denied":true,"summary":"Restore a prior version by appending it as the new current version"}},"/api/artifacts/{artifact_id}/versions/{version}":{"get":{"description":"Get a single artifact version's metadata and spec.\n\n[Personal access token](/API/personal-access-tokens) scope: `artifacts:read`.","operationId":"get_get_artifact_version","responses":{"200":{"description":"Success"}},"tags":["artifacts"],"x-pat-scopes":["artifacts:read"],"summary":"Get a single artifact version's metadata and spec"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"artifact_id","required":true},{"schema":{"type":"integer"},"in":"path","name":"version","required":true}]},"/api/available_tools":{"get":{"description":"Get available tools for a user.\n\n[Personal access token](/API/personal-access-tokens) scope: `tools:read`.","operationId":"get_available_tools","responses":{"200":{"description":"Success"}},"tags":["tools"],"x-pat-scopes":["tools:read"],"summary":"Get available tools for a user"}},"/api/background_jobs":{"get":{"description":"List the caller's background jobs of one conversation, newest first (no result bodies).\n\n[Personal access token](/API/personal-access-tokens) scope: `conversations:read`.","operationId":"get_background_jobs","parameters":[{"schema":{"type":"string"},"description":"The conversation whose jobs to list.","in":"query","name":"conversation_id","required":true}],"responses":{"200":{"description":"Success"}},"tags":["background_jobs"],"x-pat-scopes":["conversations:read"],"summary":"GET /api/background_jobs"}},"/api/background_jobs/{job_id}":{"get":{"description":"One background job: its state, progress and, once finished, a result preview.\n\n[Personal access token](/API/personal-access-tokens) scope: `conversations:read`.","operationId":"get_background_job","responses":{"200":{"description":"Success"}},"tags":["background_jobs"],"x-pat-scopes":["conversations:read"],"summary":"GET /api/background_jobs/{job_id}"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"job_id","required":true}]},"/api/background_jobs/{job_id}/cancel":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"job_id","required":true}],"post":{"description":"Ask a running background job to stop. It ends as cancelled once its work really stops; a step already under way may still complete.\n\n[Personal access token](/API/personal-access-tokens) scope: `conversations:write`.","operationId":"post_cancel_background_job","responses":{"200":{"description":"Success"}},"tags":["background_jobs"],"x-pat-scopes":["conversations:write"],"summary":"Ask a running background job to stop"}},"/api/combine":{"get":{"description":"Redirects /api/combine to /api/sources for backward compatibility.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_redirect_to_sources","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-denied":true,"summary":"Redirects /api/combine to /api/sources for backward compatibility"}},"/api/connections":{"get":{"description":"The caller's connections with status and linked resource counts.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_connections_list","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"The caller's connections with status and linked resource counts"},"post":{"description":"Create a connection from pasted credentials: {connector_key, credentials, label?}. Same credentials reuse the same connection.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_connections_list","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"POST /api/connections"}},"/api/connections/claim":{"post":{"description":"One-time link of a legacy browser session token ({provider, session_token}) to the caller's connection. Removed next release.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_connection_claim","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"POST /api/connections/claim"}},"/api/connections/tools/{tool_id}/credential-mode":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"tool_id","required":true}],"put":{"description":"Whose account a shared connection-backed tool uses: {mode: owner | member}. Owner only; refused when an admin forces a mode for the connector.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"put_tool_credential_mode","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"PUT /api/connections/tools/{tool_id}/credential-mode"}},"/api/connections/{connection_id}":{"delete":{"description":"Remove a connection: {sources: keep | delete, tools: delete | keep}. Kept sources keep their content and stop syncing.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"delete_connection_detail","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"Remove a connection: {sources: keep | delete, tools: delete | keep}"},"get":{"description":"One connection with the sources it syncs and the tools it provides.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_connection_detail","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"One connection with the sources it syncs and the tools it provides"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"connection_id","required":true}],"patch":{"description":"Name an account: {name}. An empty name clears it. Owner only.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"patch_connection_detail","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"Name an account: {name}"}},"/api/connections/{connection_id}/disconnect":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connection_id","required":true}],"post":{"description":"Delete a connection's stored credentials; its sources and tools stay.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_connection_disconnect","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"Delete a connection's stored credentials; its sources and tools stay"}},"/api/connections/{connection_id}/linear":{"get":{"description":"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.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_linear_workspace","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"GET /api/connections/{connection_id}/linear"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"connection_id","required":true}]},"/api/connections/{connection_id}/picker-token":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connection_id","required":true}],"post":{"description":"A short-lived access token for a browser-side file picker. Owner only; never a refresh token.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_connection_picker_token","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"A short-lived access token for a browser-side file picker"}},"/api/connections/{connection_id}/reconnect":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connection_id","required":true}],"post":{"description":"OAuth: returns an authorization URL for the same account. API key: accepts {credentials} and replaces the stored ones.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_connection_reconnect","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"OAuth: returns an authorization URL for the same account"}},"/api/connections/{connection_id}/refresh-tools":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connection_id","required":true}],"post":{"description":"MCP: re-scan the server's actions and return what was added and removed.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_connection_refresh_tools","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"POST /api/connections/{connection_id}/refresh-tools"}},"/api/connections/{connection_id}/repositories":{"get":{"description":"GitHub: the repositories the connection can read, for the sync picker. install_url is where a GitHub App sign-in chooses more repositories.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_connection_repositories","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"GitHub: the repositories the connection can read, for the sync picker"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"connection_id","required":true}]},"/api/connections/{connection_id}/setup":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connection_id","required":true}],"post":{"description":"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.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_connection_setup","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"POST /api/connections/{connection_id}/setup"}},"/api/connections/{connection_id}/tools/{tool_id}/parameters":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connection_id","required":true},{"schema":{"type":"string"},"in":"path","name":"tool_id","required":true}],"put":{"description":"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.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"put_connection_tool_parameters","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"PUT /api/connections/{connection_id}/tools/{tool_id}/parameters"}},"/api/connections/{connection_id}/tools/{tool_id}/permissions":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connection_id","required":true},{"schema":{"type":"string"},"in":"path","name":"tool_id","required":true}],"put":{"description":"Set per-action permissions: {permissions: {action: always | ask | off}}.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"put_connection_tool_permissions","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"PUT /api/connections/{connection_id}/tools/{tool_id}/permissions"}},"/api/connections/{connection_id}/writes":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"connection_id","required":true}],"put":{"description":"GitHub: let agents make changes through this connection, or only read: {allow}. Re-reads the tool's actions from the matching endpoint. Owner only.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"put_connection_writes","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"PUT /api/connections/{connection_id}/writes"}},"/api/connectors/auth":{"get":{"description":"Get connector OAuth authorization URL.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_connector_auth","parameters":[{"schema":{"type":"string"},"description":"Connector provider (e.g., google_drive)","in":"query","name":"provider"}],"responses":{"200":{"description":"Success"}},"tags":["connectors"],"x-pat-denied":true,"summary":"Get connector OAuth authorization URL"}},"/api/connectors/auth/complete":{"post":{"description":"Finish a connector sign-in: the app's callback page posts the provider's code and state.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_connector_auth_complete","responses":{"200":{"description":"Success"}},"tags":["connectors"],"x-pat-denied":true,"summary":"POST /api/connectors/auth/complete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorAuthCompleteModel"}}},"required":true}}},"/api/connectors/callback":{"get":{"description":"OAuth redirect URI for external connectors; forwards to the app's callback page.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_connectors_callback","responses":{"200":{"description":"Success"}},"summary":"Forward the provider's answer to the app page that finishes the sign-in","tags":["connectors"],"x-pat-denied":true}},"/api/connectors/callback-status":{"get":{"description":"Return HTML page with connector authentication status.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_connector_callback_status","responses":{"200":{"description":"Success"}},"summary":"Return HTML page with connector authentication status","tags":["connectors"],"x-pat-denied":true}},"/api/connectors/catalog":{"get":{"description":"Every connector with its availability and the caller's connection summary.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_connector_catalog","responses":{"200":{"description":"Success"}},"tags":["connections"],"x-pat-denied":true,"summary":"GET /api/connectors/catalog"}},"/api/connectors/disconnect":{"post":{"description":"Disconnect a connector session.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_connector_disconnect","responses":{"200":{"description":"Success"}},"tags":["connectors"],"x-pat-denied":true,"summary":"Disconnect a connector session","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorDisconnectModel"}}},"required":true}}},"/api/connectors/files":{"post":{"description":"List files from a connector provider (supports pagination and search)\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_connector_files","responses":{"200":{"description":"Success"}},"tags":["connectors"],"x-pat-denied":true,"summary":"List files from a connector provider (supports pagination and search)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorFilesModel"}}},"required":true}}},"/api/connectors/sync":{"post":{"description":"Sync connector source to check for modifications. A 409 with code connection_missing when the source has no connection (it was removed) and none is named, as for a team editor, who can't name one; code reconnect_needed when a team editor's sync finds the source's connection signed out.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_connector_sync","responses":{"200":{"description":"Success"}},"tags":["connectors"],"x-pat-denied":true,"summary":"Sync connector source to check for modifications","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorSyncModel"}}},"required":true}}},"/api/connectors/validate-session":{"post":{"description":"Validate a connection and return the account and a short-lived access token.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_connector_validate_session","responses":{"200":{"description":"Success"}},"tags":["connectors"],"x-pat-denied":true,"summary":"POST /api/connectors/validate-session","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorValidateSessionModel"}}},"required":true}}},"/api/conversations/{conversation_id}/read":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"conversation_id","required":true}],"post":{"description":"Clear the conversation's unread mark (the user opened it). Idempotent.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_conversation_read","responses":{"200":{"description":"Success"}},"tags":["notifications"],"x-pat-denied":true,"summary":"Clear the conversation's unread mark (the user opened it)"}},"/api/create_agent":{"post":{"description":"Create a new agent. JSON or multipart (multipart for an image). 201 {id, key, image, workflow_id (workflow agents)}. A workflow agent may send workflow_graph to create its workflow in the same request; a graph that fails validation is 400 {success: false, message, error, errors}.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:write`.","operationId":"post_create_agent","responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-scopes":["agents:write"],"summary":"Create a new agent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentModel"}}},"required":true}}},"/api/create_prompt":{"post":{"description":"Create a new prompt.\n\n[Personal access token](/API/personal-access-tokens) scope: `prompts:write`.","operationId":"post_create_prompt","responses":{"200":{"description":"Success"}},"tags":["prompts"],"x-pat-scopes":["prompts:write"],"summary":"Create a new prompt","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePromptModel"}}},"required":true}}},"/api/create_tool":{"post":{"description":"Create a new tool.\n\n[Personal access token](/API/personal-access-tokens) scope: `tools:write`.","operationId":"post_create_tool","responses":{"200":{"description":"Success"}},"tags":["tools"],"x-pat-scopes":["tools:write"],"summary":"Create a new tool","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateToolModel"}}},"required":true}}},"/api/delete_agent":{"delete":{"description":"Delete an agent by ID.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:write`.","operationId":"delete_delete_agent","parameters":[{"schema":{"type":"string"},"description":"ID of the agent","in":"query","name":"id"}],"responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-scopes":["agents:write"],"summary":"Delete an agent by ID"}},"/api/delete_all_conversations":{"get":{"description":"Deletes all conversations for a specific user.\n\n[Personal access token](/API/personal-access-tokens) scope: `conversations:write`.","operationId":"get_delete_all_conversations","responses":{"200":{"description":"Success"}},"tags":["conversations"],"x-pat-scopes":["conversations:write"],"summary":"Deletes all conversations for a specific user"}},"/api/delete_chunk":{"delete":{"description":"Deletes a specific chunk from the document. 409 (code source_busy) while a sync or page change on the source runs.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"delete_delete_chunk","parameters":[{"schema":{"type":"string"},"description":"The document ID","in":"query","name":"id"},{"schema":{"type":"string"},"description":"The ID of the chunk to delete","in":"query","name":"chunk_id"}],"responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"Deletes a specific chunk from the document"}},"/api/delete_conversation":{"post":{"description":"Deletes a conversation by ID.\n\n[Personal access token](/API/personal-access-tokens) scope: `conversations:write`.","operationId":"post_delete_conversation","parameters":[{"schema":{"type":"string"},"description":"The ID of the conversation to delete","in":"query","name":"id"}],"responses":{"200":{"description":"Success"}},"tags":["conversations"],"x-pat-scopes":["conversations:write"],"summary":"Deletes a conversation by ID"}},"/api/delete_old":{"get":{"description":"Deletes a source: its index, stored files and row. 409 (code source_busy) while a sync or page change on the source runs; nothing is deleted.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"get_delete_old_indexes","parameters":[{"schema":{"type":"string"},"description":"The source ID to delete","in":"query","name":"source_id"}],"responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"Deletes a source: its index, stored files and row"}},"/api/delete_prompt":{"post":{"description":"Delete a prompt by ID.\n\n[Personal access token](/API/personal-access-tokens) scope: `prompts:write`.","operationId":"post_delete_prompt","responses":{"200":{"description":"Success"}},"tags":["prompts"],"x-pat-scopes":["prompts:write"],"summary":"Delete a prompt by ID","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePromptModel"}}},"required":true}}},"/api/delete_tool":{"post":{"description":"Delete a tool by ID.\n\n[Personal access token](/API/personal-access-tokens) scope: `tools:write`.","operationId":"post_delete_tool","responses":{"200":{"description":"Success"}},"tags":["tools"],"x-pat-scopes":["tools:write"],"summary":"Delete a tool by ID","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteToolModel"}}},"required":true}}},"/api/directory_structure":{"get":{"description":"Get the directory structure for a document.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:read`.","operationId":"get_directory_structure","parameters":[{"schema":{"type":"string"},"description":"The document ID","in":"query","name":"id"}],"responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:read"],"summary":"Get the directory structure for a document"}},"/api/export_agent":{"get":{"description":"Export an agent as YAML.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:read`.","operationId":"get_export_agent","parameters":[{"schema":{"type":"string"},"description":"Agent ID","in":"query","name":"id"}],"responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-scopes":["agents:read"],"summary":"Export an agent as YAML"}},"/api/feedback":{"post":{"description":"Submit feedback for a conversation.\n\n[Personal access token](/API/personal-access-tokens) scope: `conversations:write`.","operationId":"post_submit_feedback","responses":{"200":{"description":"Success"}},"tags":["conversations"],"x-pat-scopes":["conversations:write"],"summary":"Submit feedback for a conversation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackModel"}}},"required":true}}},"/api/get_agent":{"get":{"description":"Get agent by ID.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:read`.","operationId":"get_get_agent","parameters":[{"schema":{"type":"string"},"description":"Agent ID","in":"query","name":"id"}],"responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-scopes":["agents:read"],"summary":"Get agent by ID"}},"/api/get_agents":{"get":{"description":"Retrieve agents for the user.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:read`.","operationId":"get_get_agents","responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-scopes":["agents:read"],"summary":"Retrieve agents for the user"}},"/api/get_chunks":{"get":{"description":"Retrieves chunks from a document, optionally filtered by file path and search term.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:read`.","operationId":"get_get_chunks","parameters":[{"schema":{"type":"string"},"description":"The document ID","in":"query","name":"id"},{"schema":{"type":"string"},"description":"Page number for pagination","in":"query","name":"page"},{"schema":{"type":"string"},"description":"Number of chunks per page","in":"query","name":"per_page"},{"schema":{"type":"string"},"description":"Optional: Filter chunks by relative file path","in":"query","name":"path"},{"schema":{"type":"string"},"description":"Optional: Search term to filter chunks by title or content","in":"query","name":"search"},{"schema":{"type":"string"},"description":"Optional: `flagged` keeps the chunks whose cached prompt-injection score is suspected or high (marked safe ones included)","in":"query","name":"injection"}],"responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:read"],"summary":"GET /api/get_chunks"}},"/api/get_conversation_insights":{"post":{"description":"Insights from the decision model's labels: per label and option the expected count and its rate with a 95% interval widened by the label's calibration error, each label's tier, the same per time bucket, label coverage and the language mix. answer_status rates are over requests (not over greetings). 'available' is the operator switch (DECISION_ANALYTICS_ENABLED with the model available); 'enabled' is that and the agent's own analytics switch. The sweep labels only the last 'backfill_days' (from 'labelling_from'), so coverage splits unlabelled answers into 'unlabelled_recent_turns' (still to be labelled) and 'unlabelled_older_turns' (never labelled without a backfill). For an agent, 'one_pick' lists the options of its topic question (empty when it asks none) and 'overlapping' its topics that can overlap; each one's totals are under 'tag:&lt;id>'. Topics ('topic_effective') are reported for an agent only: each agent has its own list. 'series' is in 'bucket_unit': the filter's own unit while its buckets average 10 analyzed answers, else the next coarser one (minute to hour, hour to day, day to week). A week is named by its first day in the window and carries its last as 'bucket_end'. 'previous' holds answer_status, reaction and sentiment totals over the period of the same length just before the window.\n\n[Personal access token](/API/personal-access-tokens) scope: `analytics:read`.","operationId":"post_get_conversation_insights","responses":{"200":{"description":"Success"}},"tags":["analytics"],"x-pat-scopes":["analytics:read"],"summary":"POST /api/get_conversation_insights","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetConversationInsightsModel"}}},"required":true}}},"/api/get_conversations":{"get":{"description":"Retrieve the user's sidebar conversations (visibility = listed), newest first, ordered by `date` DESC then `id` DESC. Each item carries `date` (ISO-8601). To page older conversations, pass the last item's `date` and `id` as `before` and `before_id`. Invalid params are ignored.\n\n[Personal access token](/API/personal-access-tokens) scope: `conversations:read`.","operationId":"get_get_conversations","parameters":[{"schema":{"type":"string"},"description":"Maximum number of results (default 30, clamped to 1-100)","in":"query","name":"limit"},{"schema":{"type":"string"},"description":"Keyset cursor: ISO-8601 `date` of the last item seen (needs before_id)","in":"query","name":"before"},{"schema":{"type":"string"},"description":"Keyset cursor: `id` of the last item seen (needs before)","in":"query","name":"before_id"}],"responses":{"200":{"description":"Success"}},"tags":["conversations"],"x-pat-scopes":["conversations:read"],"summary":"GET /api/get_conversations"}},"/api/get_docs_gaps":{"post":{"description":"Docs gaps: answers that fell short because the docs do not cover the question, as expected counts (sums of the decision model's probabilities) per group, with the group's rate over its answers and a 95% interval, the window just before for the trend, and up to five example questions (gaps at even odds or better). Groups with under half an expected gap are left out; key null means no source was retrieved. previous_labelled counts the labelled answers in the window before, so a group with no earlier gaps can be told from a window that was never labelled; by page, each row's source names the source most of its answers retrieved the page from (null if unknown).\n\n[Personal access token](/API/personal-access-tokens) scope: `analytics:read`.","operationId":"post_get_docs_gaps","responses":{"200":{"description":"Success"}},"tags":["analytics"],"x-pat-scopes":["analytics:read"],"summary":"POST /api/get_docs_gaps","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDocsGapsModel"}}},"required":true}}},"/api/get_feedback_analytics":{"post":{"description":"Get feedback analytics data.\n\n[Personal access token](/API/personal-access-tokens) scope: `analytics:read`.","operationId":"post_get_feedback_analytics","responses":{"200":{"description":"Success"}},"tags":["analytics"],"x-pat-scopes":["analytics:read"],"summary":"Get feedback analytics data","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFeedbackAnalyticsModel"}}},"required":true}}},"/api/get_message_analytics":{"post":{"description":"Get message analytics based on filter option.\n\n[Personal access token](/API/personal-access-tokens) scope: `analytics:read`.","operationId":"post_get_message_analytics","responses":{"200":{"description":"Success"}},"tags":["analytics"],"x-pat-scopes":["analytics:read"],"summary":"Get message analytics based on filter option","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMessageAnalyticsModel"}}},"required":true}}},"/api/get_prompts":{"get":{"description":"Get all prompts for the user.\n\n[Personal access token](/API/personal-access-tokens) scope: `prompts:read`.","operationId":"get_get_prompts","responses":{"200":{"description":"Success"}},"tags":["prompts"],"x-pat-scopes":["prompts:read"],"summary":"Get all prompts for the user"}},"/api/get_schedule_analytics":{"post":{"description":"Get scheduled agent run outcomes over time.\n\n[Personal access token](/API/personal-access-tokens) scope: `analytics:read`.","operationId":"post_get_schedule_analytics","responses":{"200":{"description":"Success"}},"tags":["analytics"],"x-pat-scopes":["analytics:read"],"summary":"Get scheduled agent run outcomes over time","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetScheduleAnalyticsModel"}}},"required":true}}},"/api/get_single_conversation":{"get":{"description":"Retrieve a single conversation by ID.\n\n[Personal access token](/API/personal-access-tokens) scope: `conversations:read`.","operationId":"get_get_single_conversation","parameters":[{"schema":{"type":"string"},"description":"The conversation ID","in":"query","name":"id"}],"responses":{"200":{"description":"Success"}},"tags":["conversations"],"x-pat-scopes":["conversations:read"],"summary":"Retrieve a single conversation by ID"}},"/api/get_single_prompt":{"get":{"description":"Get a single prompt by ID.\n\n[Personal access token](/API/personal-access-tokens) scope: `prompts:read`.","operationId":"get_get_single_prompt","parameters":[{"schema":{"type":"string"},"description":"ID of the prompt","in":"query","name":"id"}],"responses":{"200":{"description":"Success"}},"tags":["prompts"],"x-pat-scopes":["prompts:read"],"summary":"Get a single prompt by ID"}},"/api/get_token_analytics":{"post":{"description":"Get token analytics data.\n\n[Personal access token](/API/personal-access-tokens) scope: `analytics:read`.","operationId":"post_get_token_analytics","responses":{"200":{"description":"Success"}},"tags":["analytics"],"x-pat-scopes":["analytics:read"],"summary":"Get token analytics data","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTokenAnalyticsModel"}}},"required":true}}},"/api/get_tool_analytics":{"post":{"description":"Get tool call analytics from the tool execution journal.\n\n[Personal access token](/API/personal-access-tokens) scope: `analytics:read`.","operationId":"post_get_tool_analytics","responses":{"200":{"description":"Success"}},"tags":["analytics"],"x-pat-scopes":["analytics:read"],"summary":"Get tool call analytics from the tool execution journal","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetToolAnalyticsModel"}}},"required":true}}},"/api/get_tools":{"get":{"description":"Get tools created by a user.\n\n[Personal access token](/API/personal-access-tokens) scope: `tools:read`.","operationId":"get_get_tools","responses":{"200":{"description":"Success"}},"tags":["tools"],"x-pat-scopes":["tools:read"],"summary":"Get tools created by a user"}},"/api/get_user_logs":{"post":{"description":"Get user activity logs with pagination. Merges chat answers (user_logs), request errors (stack_logs) and scheduled agent runs (schedule_runs) into one timeline. Runs are ordered by their start time; ones still going (answers, scheduled, workflow and webhook runs) carry running: true until their finished row replaces them. Finished chat rows carry 'labels', the analytics label keys at ANALYTICS_FILTER_MIN_PROBABILITY or better, and 'tag_names' names the tags on the page.\n\n[Personal access token](/API/personal-access-tokens) scope: `analytics:read`.","operationId":"post_get_user_logs","responses":{"200":{"description":"Success"}},"tags":["analytics"],"x-pat-scopes":["analytics:read"],"summary":"Get user activity logs with pagination","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserLogsModel"}}},"required":true}}},"/api/guardrails/catalog":{"get":{"description":"List available guardrail checks and their capabilities.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:read`.","operationId":"get_guardrail_catalog","responses":{"200":{"description":"Success"}},"tags":["guardrails"],"x-pat-scopes":["agents:read"],"summary":"List available guardrail checks and their capabilities"}},"/api/guardrails/events":{"get":{"description":"List guardrail decisions recorded for an agent.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:read`.","operationId":"get_guardrail_events","parameters":[{"schema":{"type":"string"},"description":"Agent ID","in":"query","name":"agent_id"},{"schema":{"type":"string"},"description":"Max rows (default 100)","in":"query","name":"limit"},{"schema":{"type":"string"},"description":"Row offset","in":"query","name":"offset"},{"schema":{"type":"string"},"description":"Trailing window in days, clamped to 1-365 (optional; invalid values are ignored)","in":"query","name":"days"},{"schema":{"type":"string"},"description":"Exact check name (optional)","in":"query","name":"check"},{"schema":{"type":"string"},"description":"One of block, redact, flag, not_evaluated (optional; unknown values are ignored)","in":"query","name":"outcome"}],"responses":{"200":{"description":"Success"}},"tags":["guardrails"],"x-pat-scopes":["agents:read"],"summary":"List guardrail decisions recorded for an agent"}},"/api/guardrails/summary":{"get":{"description":"Aggregate guardrail activity for the caller.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:read`.","operationId":"get_guardrail_summary","parameters":[{"schema":{"type":"string"},"description":"Trailing window in days (default 30)","in":"query","name":"days"},{"schema":{"type":"string"},"description":"Scope the aggregate to one agent (optional)","in":"query","name":"agent_id"}],"responses":{"200":{"description":"Success"}},"tags":["guardrails"],"x-pat-scopes":["agents:read"],"summary":"Aggregate guardrail activity for the caller"}},"/api/images/{agent_id}/{capability}":{"get":{"description":"Serve an agent image using an opaque capability URL.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_serve_image","responses":{"200":{"description":"Success"}},"tags":["attachments"],"x-pat-denied":true,"summary":"Serve an agent image using an opaque capability URL"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"agent_id","required":true},{"schema":{"type":"string"},"in":"path","name":"capability","required":true}]},"/api/import_agent":{"post":{"description":"Import an agent from YAML: create a draft, or update the agent matched by id or slug.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:write`.","operationId":"post_import_agent","responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-scopes":["agents:write"],"summary":"POST /api/import_agent"}},"/api/import_agent/plan":{"post":{"description":"Dry-run an agent YAML import and return the resolution plan.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:write`.","operationId":"post_import_agent_plan","responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-scopes":["agents:write"],"summary":"Dry-run an agent YAML import and return the resolution plan"}},"/api/manage_source_files":{"post":{"description":"Add files, remove files, remove directories, or replace the whole file set (sync) of an existing source. The source is then re-ingested: only added, removed and edited files are re-embedded.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"post_manage_source_files","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"POST /api/manage_source_files","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManageSourceFilesModel"}}},"required":true}}},"/api/manage_sync":{"post":{"description":"Manage sync frequency for sources.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"post_manage_sync","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"Manage sync frequency for sources","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManageSyncModel"}}},"required":true}}},"/api/mcp_apps/call":{"post":{"description":"Run a tool an MCP App view calls. Only tools visible to the app; a tool that needs approval answers 409 needs_approval until the call is sent approved.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_mcp_app_call","responses":{"200":{"description":"Success"}},"tags":["mcp_apps"],"x-pat-denied":true,"summary":"Run a tool an MCP App view calls","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpAppCallModel"}}},"required":true}}},"/api/mcp_apps/resource":{"post":{"description":"Read an MCP App view's HTML and its declared CSP and permissions.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_mcp_app_resource","responses":{"200":{"description":"Success"}},"tags":["mcp_apps"],"x-pat-denied":true,"summary":"Read an MCP App view's HTML and its declared CSP and permissions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpAppResourceModel"}}},"required":true}}},"/api/mcp_apps/result":{"post":{"description":"Read back the tool result an MCP App view was handed live, for a reopened conversation. The caller needs the access that reloading the conversation needs.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_mcp_app_result","responses":{"200":{"description":"Success"}},"tags":["mcp_apps"],"x-pat-denied":true,"summary":"POST /api/mcp_apps/result","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpAppResultModel"}}},"required":true}}},"/api/mcp_apps/sandbox":{"get":{"description":"The sandbox page an MCP App view runs in, served with a CSP built from the view's declared domains. Only on the sandbox origin (MCP_APPS_SANDBOX_URL), never one of the app's.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_mcp_app_sandbox","parameters":[{"schema":{"type":"string"},"description":"The view's _meta.ui.csp, as JSON","in":"query","name":"csp"}],"responses":{"200":{"description":"Success"}},"tags":["mcp_apps"],"x-pat-denied":true,"summary":"GET /api/mcp_apps/sandbox"}},"/api/mcp_server/auth_status":{"get":{"description":"Batch check auth status for all MCP tools. Lightweight DB-only check — no network calls to MCP servers.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_mcp_auth_status","responses":{"200":{"description":"Success"}},"tags":["tools"],"x-pat-denied":true,"summary":"Batch check auth status for all MCP tools"}},"/api/mcp_server/callback":{"get":{"description":"Handle OAuth callback by providing the authorization code and state.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_mcpo_auth_callback","responses":{"200":{"description":"Success"}},"tags":["tools"],"x-pat-denied":true,"summary":"Handle OAuth callback by providing the authorization code and state","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPServerCallbackModel"}}},"required":true}}},"/api/mcp_server/oauth_cancel":{"post":{"description":"Cancel an MCP OAuth sign-in the caller started, so the worker stops waiting for its callback.\n\n[Personal access token](/API/personal-access-tokens) scope: `tools:write`.","operationId":"post_mcpo_auth_cancel","responses":{"200":{"description":"Success"}},"tags":["tools"],"x-pat-scopes":["tools:write"],"summary":"POST /api/mcp_server/oauth_cancel","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPOAuthCancelModel"}}},"required":true}}},"/api/mcp_server/save":{"post":{"description":"Create or update MCP server with automatic tool discovery. While Admin > Guardrails warns on tool descriptions, each discovered action is scored for prompt injection and stored with `injection: {p, scorer}`; the response's `injection` is `{flagged: [names], unscored: [names]}` (null while the warnings are off). Nothing is deactivated.\n\n[Personal access token](/API/personal-access-tokens) scope: `tools:write`.","operationId":"post_mcp_server_save","responses":{"200":{"description":"Success"}},"tags":["tools"],"x-pat-scopes":["tools:write"],"summary":"Create or update MCP server with automatic tool discovery","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPServerSaveModel"}}},"required":true}}},"/api/mcp_server/test":{"post":{"description":"Test MCP server connection with provided configuration.\n\n[Personal access token](/API/personal-access-tokens) scope: `tools:write`.","operationId":"post_test_mcp_server_config","responses":{"200":{"description":"Success"}},"tags":["tools"],"x-pat-scopes":["tools:write"],"summary":"Test MCP server connection with provided configuration","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPServerTestModel"}}},"required":true}}},"/api/messages/{message_id}/cancel":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"message_id","required":true}],"post":{"description":"Stop the caller's chat answer that is still being written. The stream ends as if its client had disconnected and keeps what it wrote. Answers 202 once the request is stored; the stream sees it within a few seconds, or when a long tool call returns.\nArgs:\n    message_id: The answer's message id.\n\nReturns:\n    202 when the stop was requested, 404 when the caller has no such\n    message, 409 when it is not running (finished, or paused for a\n    tool approval), 503 without Redis.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_message_cancel","responses":{"200":{"description":"Success"}},"summary":"Ask a running answer to stop","tags":["activity"],"x-pat-denied":true}},"/api/messages/{message_id}/tail":{"get":{"description":"Current state of one conversation_messages row, scoped to the authenticated user. Used to reconnect to an in-flight stream after a refresh.\n\n[Personal access token](/API/personal-access-tokens) scope: `chat:run` or `conversations:read`.","operationId":"get_get_message_tail","parameters":[{"schema":{"type":"string"},"description":"Message UUID","in":"path","name":"message_id","required":true}],"responses":{"200":{"description":"Success"}},"tags":["conversations"],"x-pat-scopes":["chat:run","conversations:read"],"summary":"GET /api/messages/{message_id}/tail"}},"/api/models":{"get":{"description":"When the request is authenticated, the response includes the\nuser's own BYOM registrations alongside the built-in catalog.\n\n[Personal access token](/API/personal-access-tokens) scope: `chat:run` or `models:read`.","operationId":"get_models_list_resource","responses":{"200":{"description":"Success"}},"summary":"Get list of available models with their capabilities","tags":["models"],"x-pat-scopes":["chat:run","models:read"]}},"/api/monitors":{"get":{"description":"The caller's monitors, newest first: what each watches, its interval, last check, wakes left, expiry and links (never tokens or secrets).\n\n[Personal access token](/API/personal-access-tokens) scope: `conversations:read`.","operationId":"get_monitors","parameters":[{"schema":{"type":"string"},"description":"Only this conversation's monitors.","in":"query","name":"conversation_id"},{"schema":{"type":"string"},"description":"live (active and paused) or all (the default).","in":"query","name":"status"}],"responses":{"200":{"description":"Success"}},"tags":["monitors"],"x-pat-scopes":["conversations:read"],"summary":"GET /api/monitors"}},"/api/monitors/{monitor_id}":{"get":{"description":"One of the caller's monitors.\n\n[Personal access token](/API/personal-access-tokens) scope: `conversations:read`.","operationId":"get_monitor_detail","responses":{"200":{"description":"Success"}},"tags":["monitors"],"x-pat-scopes":["conversations:read"],"summary":"One of the caller's monitors"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"monitor_id","required":true}]},"/api/monitors/{monitor_id}/secret":{"get":{"description":"The signing secret of one of the caller's webhook monitors, so the owner can configure the sender. Only the owner's session may read it (never an access token); the model only ever sees its reference. Rate limited, audited, never cached or logged. 404 when the monitor has no live signed link, or its secret was never set.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_monitor_secret","responses":{"200":{"description":"Success"}},"tags":["monitors"],"x-pat-denied":true,"summary":"GET /api/monitors/{monitor_id}/secret"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"monitor_id","required":true}],"put":{"description":"Set the signing secret of one of the caller's webhook monitors: {secret}. For Stripe and Slack, which create their own signing secret, this is how the link gets it; for any other signed scheme it replaces the generated one. Only the owner's session may set it (never an access token). Rate limited, audited without the value, never logged. 400 for a value that can't be this scheme's secret, 404 when the monitor has no live signed link.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"put_monitor_secret","responses":{"200":{"description":"Success"}},"tags":["monitors"],"x-pat-denied":true,"summary":"PUT /api/monitors/{monitor_id}/secret"}},"/api/monitors/{monitor_id}/secret/exposure":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"monitor_id","required":true}],"put":{"description":"Show (or stop showing) one of the caller's webhook monitors' raw signing secret to the assistant: {exposed: true|false}. Shown, monitor_list gives the assistant the value, which then goes to the model provider. Only the owner's session may change it (never an access token, never the assistant). Rate limited and audited. 404 when the monitor has no live signed link with a secret.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"put_monitor_secret_exposure","responses":{"200":{"description":"Success"}},"tags":["monitors"],"x-pat-denied":true,"summary":"PUT /api/monitors/{monitor_id}/secret/exposure"}},"/api/monitors/{monitor_id}/{action}":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"monitor_id","required":true}],"post":{"description":"Pause, resume or cancel one of the caller's monitors. Cancelling revokes its links and any approval its source was given; resuming a polled monitor checks it again right away. 409 when the monitor is not in a state the action applies to.\n\n[Personal access token](/API/personal-access-tokens) scope: `conversations:write`.","operationId":"post_monitor_action","parameters":[{"schema":{"type":"string"},"description":"pause, resume or cancel","in":"path","name":"action","required":true}],"responses":{"200":{"description":"Success"}},"tags":["monitors"],"x-pat-scopes":["conversations:write"],"summary":"Pause, resume or cancel one of the caller's monitors"}},"/api/parse_spec":{"post":{"description":"Parse an API specification (OpenAPI 3.x or Swagger 2.0) and return actions.\n\n[Personal access token](/API/personal-access-tokens) scope: `tools:write`.","operationId":"post_parse_spec","responses":{"200":{"description":"Success"}},"tags":["tools"],"x-pat-scopes":["tools:write"],"summary":"POST /api/parse_spec"}},"/api/pin_agent":{"post":{"description":"Pin or unpin an agent.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:write`.","operationId":"post_pin_agent","parameters":[{"schema":{"type":"string"},"description":"ID of the agent","in":"query","name":"id"}],"responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-scopes":["agents:write"],"summary":"Pin or unpin an agent"}},"/api/pinned_agents":{"get":{"description":"Get pinned agents for the user.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:read`.","operationId":"get_pinned_agents","responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-scopes":["agents:read"],"summary":"Get pinned agents for the user"}},"/api/presence":{"post":{"description":"Report what one tab shows: sent when its visibility or route changes and every ~20 s while visible. A report counts for 45 s; `closing: true` forgets the tab at once. A user is not notified about a conversation a visible tab of theirs shows.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_presence","responses":{"200":{"description":"Success"}},"tags":["notifications"],"x-pat-denied":true,"summary":"POST /api/presence","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresenceReport"}}},"required":true}}},"/api/push/public_key":{"get":{"description":"Whether Web Push is configured, and the VAPID public key browsers subscribe with (`applicationServerKey`, raw base64url).\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_push_public_key","responses":{"200":{"description":"Success"}},"tags":["notifications"],"x-pat-denied":true,"summary":"GET /api/push/public_key"}},"/api/push/subscriptions":{"delete":{"description":"Forget this browser's Web Push subscription: `{endpoint}` in the body, or `?endpoint=`.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"delete_push_subscriptions","parameters":[{"schema":{"type":"string"},"description":"The subscription's endpoint, when not in the body","in":"query","name":"endpoint"}],"responses":{"200":{"description":"Success"}},"tags":["notifications"],"x-pat-denied":true,"summary":"DELETE /api/push/subscriptions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushUnsubscribe"}}},"required":true}},"post":{"description":"Save this browser's Web Push subscription (the browser's `PushSubscription` JSON) for the caller. The endpoint must be https on a known push service. Saving a known endpoint moves it to the caller. 503 when Web Push is not configured.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_push_subscriptions","responses":{"200":{"description":"Success"}},"tags":["notifications"],"x-pat-denied":true,"summary":"POST /api/push/subscriptions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscription"}}},"required":true}}},"/api/regenerate_agent_key/{agent_id}":{"post":{"description":"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.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:keys`.","operationId":"post_regenerate_agent_key","parameters":[{"schema":{"type":"string"},"description":"ID of the agent","in":"path","name":"agent_id","required":true}],"responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-scopes":["agents:keys"],"summary":"Rotate an agent's API key"}},"/api/remote":{"post":{"description":"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.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"post_upload_remote","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"Uploads remote source for vectorization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteUploadModel"}}},"required":true}}},"/api/remove_shared_agent":{"delete":{"description":"Remove a shared agent from the current user's shared list.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:write`.","operationId":"delete_remove_shared_agent","parameters":[{"schema":{"type":"string"},"description":"ID of the shared agent","in":"query","name":"id"}],"responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-scopes":["agents:write"],"summary":"Remove a shared agent from the current user's shared list"}},"/api/resource_settings":{"get":{"description":"Anyone with access may read them.\n\nQuery: `resource_type`, `resource_id`. Returns `settings` as\n`[{key, value, default}]` in display order, plus the caller's\n`access` and `allowed_actions`.\n\n[Personal access token](/API/personal-access-tokens) scope: `teams:read`.","operationId":"get_resource_settings","responses":{"200":{"description":"Success"}},"summary":"A resource's sharing switches","tags":["teams"],"x-pat-scopes":["teams:read"]},"put":{"description":"Needs `manage_settings` (owner).\n\nBody: `{\"resource_type\", \"resource_id\", \"settings\": {key: bool}}`.\nAn unknown key or a non-boolean value is a 400. Returns the GET shape.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"put_resource_settings","responses":{"200":{"description":"Success"}},"summary":"Change a resource's sharing switches","tags":["teams"],"x-pat-denied":true}},"/api/resource_shares":{"get":{"description":"Needs `share` on it.\n\nPowers the share dialog (current shares + unshare), so only someone who\nmay change the sharing can enumerate it: 404 when the resource isn't\nvisible, 403 when the caller's role can't share.\n\n[Personal access token](/API/personal-access-tokens) scope: `teams:read`.","operationId":"get_resource_shares","responses":{"200":{"description":"Success"}},"summary":"List the teams a resource is shared with","tags":["teams"],"x-pat-scopes":["teams:read"]}},"/api/schedules":{"get":{"description":"List the caller's schedules across every agent: their own, agentless ones created in chat, and those of teammates' agents they manage through a team (team: true). Monitors are not included.\nReturns:\n    A Flask response with `schedules`: schedule rows plus\n    `agent_name`, `agent_image` (a signed URL, never a storage\n    path), `origin_conversation_name` and `team` (a schedule of a\n    teammate's agent the caller manages through a team).\n\n[Personal access token](/API/personal-access-tokens) scope: `schedules:read`.","operationId":"get_user_schedules","responses":{"200":{"description":"Success"}},"summary":"Return the caller's schedules with agent and origin-chat names","tags":["schedules"],"x-pat-scopes":["schedules:read"]}},"/api/schedules/{schedule_id}":{"delete":{"description":"Cancel / delete a schedule.\n\n[Personal access token](/API/personal-access-tokens) scope: `schedules:write`.","operationId":"delete_schedule_resource","responses":{"200":{"description":"Success"}},"tags":["schedules"],"x-pat-scopes":["schedules:write"],"summary":"Cancel / delete a schedule"},"get":{"description":"Get schedule by id.\n\n[Personal access token](/API/personal-access-tokens) scope: `schedules:read`.","operationId":"get_schedule_resource","responses":{"200":{"description":"Success"}},"tags":["schedules"],"x-pat-scopes":["schedules:read"],"summary":"Get schedule by id"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"schedule_id","required":true}],"patch":{"description":"Pause / resume a schedule.\n\n[Personal access token](/API/personal-access-tokens) scope: `schedules:write`.","operationId":"patch_schedule_resource","responses":{"200":{"description":"Success"}},"tags":["schedules"],"x-pat-scopes":["schedules:write"],"summary":"Pause / resume a schedule"},"put":{"description":"Edit a schedule's editable fields.\n\n[Personal access token](/API/personal-access-tokens) scope: `schedules:write`.","operationId":"put_schedule_resource","responses":{"200":{"description":"Success"}},"tags":["schedules"],"x-pat-scopes":["schedules:write"],"summary":"Edit a schedule's editable fields"}},"/api/schedules/{schedule_id}/run":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"schedule_id","required":true}],"post":{"description":"Run a schedule immediately (trigger_source='manual').\n\n[Personal access token](/API/personal-access-tokens) scope: `schedules:write`.","operationId":"post_schedule_run_now","responses":{"200":{"description":"Success"}},"tags":["schedules"],"x-pat-scopes":["schedules:write"],"summary":"Run a schedule immediately (trigger_source='manual')"}},"/api/schedules/{schedule_id}/runs":{"get":{"description":"Paginated run log for a schedule.\n\n[Personal access token](/API/personal-access-tokens) scope: `schedules:read`.","operationId":"get_schedule_run_list","parameters":[{"schema":{"type":"string"},"description":"Page size (default 50)","in":"query","name":"limit"},{"schema":{"type":"string"},"description":"Page offset","in":"query","name":"offset"}],"responses":{"200":{"description":"Success"}},"tags":["schedules"],"x-pat-scopes":["schedules:read"],"summary":"Paginated run log for a schedule"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"schedule_id","required":true}]},"/api/schedules/{schedule_id}/runs/{run_id}":{"get":{"description":"Full output / error for a single run.\n\n[Personal access token](/API/personal-access-tokens) scope: `schedules:read`.","operationId":"get_schedule_run_detail","responses":{"200":{"description":"Success"}},"tags":["schedules"],"x-pat-scopes":["schedules:read"],"summary":"Full output / error for a single run"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"schedule_id","required":true},{"schema":{"type":"string"},"in":"path","name":"run_id","required":true}]},"/api/search":{"post":{"description":"Search for relevant documents based on query.\n\n[Personal access token](/API/personal-access-tokens) scope: `chat:run`.","operationId":"post_search_resource","responses":{"200":{"description":"Success"}},"tags":["answer"],"x-pat-scopes":["chat:run"],"summary":"Search for relevant documents based on query","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchModel"}}},"required":true}}},"/api/search_conversations":{"get":{"description":"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.\n\n[Personal access token](/API/personal-access-tokens) scope: `conversations:read`.","operationId":"get_search_conversations","parameters":[{"schema":{"type":"string"},"description":"Search term (required)","in":"query","name":"q"},{"schema":{"type":"string"},"description":"Maximum number of results to return (default 30, max 100)","in":"query","name":"limit"}],"responses":{"200":{"description":"Success"}},"tags":["conversations"],"x-pat-scopes":["conversations:read"],"summary":"GET /api/search_conversations"}},"/api/share":{"post":{"description":"Share a conversation.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_share_conversation","responses":{"200":{"description":"Success"}},"tags":["sharing"],"x-pat-denied":true,"summary":"Share a conversation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareConversationModel"}}},"required":true}}},"/api/share_agent":{"put":{"description":"Share or unshare an agent.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:write`.","operationId":"put_share_agent","responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-scopes":["agents:write"],"summary":"Share or unshare an agent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareAgentModel"}}},"required":true}}},"/api/shared_agent":{"get":{"description":"Get a shared agent by token or ID.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_shared_agent","parameters":[{"schema":{"type":"string"},"description":"Shared token of the agent","in":"query","name":"token"}],"responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-denied":true,"summary":"Get a shared agent by token or ID"}},"/api/shared_agents":{"get":{"description":"Get shared agents explicitly shared with the user.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:read`.","operationId":"get_shared_agents","responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-scopes":["agents:read"],"summary":"Get shared agents explicitly shared with the user"}},"/api/shared_conversation/{identifier}":{"get":{"description":"Get publicly shared conversations by identifier.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_get_publicly_shared_conversations","responses":{"200":{"description":"Success"}},"tags":["sharing"],"x-pat-denied":true,"summary":"Get publicly shared conversations by identifier"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"identifier","required":true}]},"/api/sources":{"get":{"description":"Provide JSON file with combined available indexes.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:read`.","operationId":"get_combined_json","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:read"],"summary":"Provide JSON file with combined available indexes"}},"/api/sources/defaults":{"get":{"description":"The retrieval settings a new source starts with (set by an admin under Admin > Defaults), for prefilling create forms: `{retrieval: {...}}`, the built-in defaults when none are set.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:read`.","operationId":"get_source_defaults_resource","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:read"],"summary":"GET /api/sources/defaults"}},"/api/sources/from_attachments":{"post":{"description":"Creates a Knowledge source from chat attachments the caller already uploaded. The stored originals are copied into a new source and ingested like an upload (a zip contributes its files); the files together may not exceed the upload request limit (413). Returns the source id and the ingest task id; progress arrives as `source.ingest.*` events for that source id. Honors an optional `Idempotency-Key` header: a repeat request with the same key within 24h returns the first request's source and task ids without copying the files or queueing a second ingest.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"post_source_from_attachments","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"POST /api/sources/from_attachments","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceFromAttachmentsModel"}}},"required":true}}},"/api/sources/paginated":{"get":{"description":"Get sources with pagination, sorting and filtering. Each row carries `used_by` (the agents using it). `kind_counts` counts every kind with the search and usage filters applied; `usage_counts` counts all/in_use/unused with the search and kind filters applied.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:read`.","operationId":"get_paginated_sources","parameters":[{"schema":{"type":"string"},"description":"Page number, from 1","in":"query","name":"page"},{"schema":{"type":"string"},"description":"Rows per page","in":"query","name":"rows"},{"schema":{"type":"string"},"description":"date (default), name, tokens, type, created_at or updated_at","in":"query","name":"sort"},{"schema":{"type":"string"},"description":"asc or desc (default)","in":"query","name":"order"},{"schema":{"type":"string"},"description":"Substring of the name, case-insensitive","in":"query","name":"search"},{"schema":{"type":"string"},"description":"all (default), files, websites, synced, wikis, or shared (sources a team shares with the caller, of any kind)","in":"query","name":"kind"},{"schema":{"type":"string"},"description":"all (default), in_use (some agent uses it) or unused","in":"query","name":"usage"}],"responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:read"],"summary":"Get sources with pagination, sorting and filtering"}},"/api/sources/reingest":{"post":{"description":"Re-run ingestion for a source — e.g. to recover a stalled embed flagged by the reconciler, or to apply a chunking change. A source with no stored files (Website, crawler, connector) is synced from its stored config instead; either way the answer is `{success, task_id}` and the task's source.ingest events carry that task_id. A connector source can be refused with a 409: code connection_missing when its connection was removed, reconnect_needed when the owner must sign it in again. Honours an Idempotency-Key header: a repeat with the same key runs nothing new, and a rebuild's repeat answers with the first request's task_id.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"post_reingest_source","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"POST /api/sources/reingest","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReingestSourceModel"}}},"required":true}}},"/api/sources/wiki":{"post":{"description":"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.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"post_create_wiki_source","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"Create an LLM-editable wiki source","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWikiModel"}}},"required":true}}},"/api/sources/{source_id}/chunk":{"get":{"description":"The chunk behind a citation, found by its content key, else by its excerpt, with what the reader needs about its source. 404 when the caller cannot see the source, or with reason chunk_missing when neither finds the chunk (the source was edited); 501 with reason unsupported when the vector store cannot look chunks up.\nArgs:\n    source_id: The source the citation names.\n\nReturns:\n    Response: `{\"success\", \"chunk\", \"source\", \"page_path\"}`, or an\n    error with `reason` `chunk_missing` (404) or `unsupported`\n    (501) the reader tells apart from a source out of reach.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:read`.","operationId":"get_chunk_by_key","parameters":[{"schema":{"type":"string"},"description":"The citation's `chunk_key`: the MD5 of the chunk text","in":"query","name":"chunk_key"},{"schema":{"type":"string"},"description":"Optional: the start of the cited passage, searched when the key misses","in":"query","name":"excerpt"}],"responses":{"200":{"description":"Success"}},"summary":"Return the cited chunk and its source","tags":["sources"],"x-pat-scopes":["sources:read"]},"parameters":[{"schema":{"type":"string"},"in":"path","name":"source_id","required":true}]},"/api/sources/{source_id}/config":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"source_id","required":true}],"patch":{"description":"Edit a source's behavior config. Retrieval-time fields take effect live; chunking changes require an explicit re-ingest (surfaced as requires_reingest). A section the body leaves out (chunking, retrieval, graph) keeps its saved value, so a body with only `retrieval` saves just that.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"patch_source_config_resource","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"Edit a source's behavior config","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceConfigModel"}}},"required":true}}},"/api/sources/{source_id}/graph":{"get":{"description":"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.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:read`.","operationId":"get_source_graph","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:read"],"summary":"GET /api/sources/{source_id}/graph"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"source_id","required":true}]},"/api/sources/{source_id}/graph/node/{node_id}":{"get":{"description":"A graph node's description and its linked chunks (read access: owner or shared).\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:read`.","operationId":"get_source_graph_node","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:read"],"summary":"GET /api/sources/{source_id}/graph/node/{node_id}"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"source_id","required":true},{"schema":{"type":"string"},"in":"path","name":"node_id","required":true}]},"/api/sources/{source_id}/graph/nodes":{"get":{"description":"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).\nArgs:\n    source_id: The source id from the URL.\n\nReturns:\n    Response: `{success, nodes, total, page, per_page, types}`, or\n    401/404/400 on missing auth, no read access or a failure. `page`\n    is clamped to `1..GRAPH_NODE_LIST_MAX_PAGE` and `per_page` to\n    `1..GRAPH_NODE_LIST_MAX_LIMIT`. A graph store that is not\n    configured or has no tables yet reads as an empty page, like the\n    overview; any other store query failure is a 400, never an empty\n    200.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:read`.","operationId":"get_source_graph_nodes","responses":{"200":{"description":"Success"}},"summary":"List one page of a source's graph nodes with type facets","tags":["sources"],"x-pat-scopes":["sources:read"]},"parameters":[{"schema":{"type":"string"},"in":"path","name":"source_id","required":true}]},"/api/sources/{source_id}/graphrag/enable":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"source_id","required":true}],"post":{"description":"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.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"post_enable_source_graph_rag","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"POST /api/sources/{source_id}/graphrag/enable"}},"/api/sources/{source_id}/injection_review":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"source_id","required":true}],"post":{"description":"Mark a flagged chunk safe from prompt-injection screening for agents using this source, or undo that. Needs chunk-edit access. Keyed by the chunk text, so editing the chunk drops the mark. At most 1000 chunks per source. Returns `{success, content_hash, allowed, count}`.\nArgs:\n    source_id: The source.\n\nReturns:\n    Response: `{\"success\", \"content_hash\", \"allowed\", \"count\"}`, a\n    400 for a bad body or a full allowlist, or the access error.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"post_injection_review","responses":{"200":{"description":"Success"}},"summary":"Add a chunk text's hash to the source's owner allowlist, or remove it","tags":["sources"],"x-pat-scopes":["sources:write"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InjectionReviewModel"}}},"required":true}}},"/api/sources/{source_id}/search":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"source_id","required":true}],"post":{"description":"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.\n\n[Personal access token](/API/personal-access-tokens) scope: `chat:run`.","operationId":"post_source_search","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["chat:run"],"summary":"POST /api/sources/{source_id}/search","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceSearchModel"}}},"required":true}}},"/api/sources/{source_id}/wiki/convert":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"source_id","required":true}],"post":{"description":"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).\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"post_convert_source_to_wiki","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"Convert an ingested source into a wiki"}},"/api/sources/{source_id}/wiki/page":{"get":{"description":"Fetch a single wiki page's content fresh from storage.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:read`.","operationId":"get_wiki_page","parameters":[{"schema":{"type":"string"},"description":"Page path (e.g. /index.md)","in":"query","name":"path"}],"responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:read"],"summary":"Fetch a single wiki page's content fresh from storage"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"source_id","required":true}],"put":{"description":"Create or overwrite a wiki page (human edit). Write access required; a stale expected_version returns 409.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"put_wiki_page","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"Create or overwrite a wiki page (human edit)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WikiPageEditModel"}}},"required":true}}},"/api/sources/{source_id}/wiki/pages":{"get":{"description":"List a wiki source's pages (read access: owner or shared).\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:read`.","operationId":"get_wiki_pages","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:read"],"summary":"List a wiki source's pages (read access: owner or shared)"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"source_id","required":true}]},"/api/sources/{source_id}/wiki/settings":{"get":{"description":"A wiki's settings. Anyone who can see the wiki may read them; returns allow_outside_edits plus the caller's access.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:read`.","operationId":"get_wiki_settings","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:read"],"summary":"A wiki's settings"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"source_id","required":true}],"put":{"description":"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.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"put_wiki_settings","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-denied":true,"summary":"Change a wiki's settings (owner only, manage_settings)"}},"/api/store_attachment":{"post":{"description":"Stores one or multiple attachments without vectorization or training. Supports user or API key authentication.\n\n[Personal access token](/API/personal-access-tokens) scope: `chat:run`.","operationId":"post_store_attachment","responses":{"200":{"description":"Success"}},"tags":["attachments"],"x-pat-scopes":["chat:run"],"summary":"Stores one or multiple attachments without vectorization or training","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentModel"}}},"required":true}}},"/api/stt":{"post":{"description":"Transcribe an uploaded audio file.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_speech_to_text","responses":{"200":{"description":"Success"}},"tags":["attachments"],"x-pat-denied":true,"summary":"Transcribe an uploaded audio file","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeechToTextModel"}}},"required":true}}},"/api/stt/live/chunk":{"post":{"description":"Transcribe a chunk for a live speech-to-text session.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_live_speech_to_text_chunk","responses":{"200":{"description":"Success"}},"tags":["attachments"],"x-pat-denied":true,"summary":"Transcribe a chunk for a live speech-to-text session","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSpeechToTextChunkModel"}}},"required":true}}},"/api/stt/live/finish":{"post":{"description":"Finish a live speech-to-text session.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_live_speech_to_text_finish","responses":{"200":{"description":"Success"}},"tags":["attachments"],"x-pat-denied":true,"summary":"Finish a live speech-to-text session"}},"/api/stt/live/start":{"post":{"description":"Start a live speech-to-text session.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_live_speech_to_text_start","responses":{"200":{"description":"Success"}},"tags":["attachments"],"x-pat-denied":true,"summary":"Start a live speech-to-text session"}},"/api/sync_source":{"post":{"description":"Trigger an immediate sync for a source.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"post_sync_source","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"Trigger an immediate sync for a source","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncSourceModel"}}},"required":true}}},"/api/task_status":{"get":{"description":"Get celery job status.\n\n[Personal access token](/API/personal-access-tokens) scope: `chat:run` or `sources:read` or `sources:write`.","operationId":"get_task_status","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["chat:run","sources:read","sources:write"],"summary":"Get celery job status","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskStatusModel"}}},"required":true}}},"/api/teams":{"get":{"operationId":"get_teams","responses":{"200":{"description":"Success"}},"summary":"List the teams the caller belongs to, each annotated with their role","tags":["teams"],"x-pat-scopes":["teams:read"],"description":"[Personal access token](/API/personal-access-tokens) scope: `teams:read`."},"post":{"description":"The creator becomes its first team_admin.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_teams","responses":{"200":{"description":"Success"}},"summary":"Create a team (self-serve)","tags":["teams"],"x-pat-denied":true}},"/api/teams/{team_id}":{"delete":{"description":"Owner-only (a global admin overrides).\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"delete_team","responses":{"200":{"description":"Success"}},"summary":"Delete the team","tags":["teams"],"x-pat-denied":true},"get":{"description":"Requires membership.\n\n[Personal access token](/API/personal-access-tokens) scope: `teams:read`.","operationId":"get_team","responses":{"200":{"description":"Success"}},"summary":"Team detail with members and the caller's role","tags":["teams"],"x-pat-scopes":["teams:read"]},"parameters":[{"schema":{"type":"string"},"in":"path","name":"team_id","required":true}],"put":{"description":"Requires team_admin.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"put_team","responses":{"200":{"description":"Success"}},"summary":"Update team name/description","tags":["teams"],"x-pat-denied":true}},"/api/teams/{team_id}/grants":{"delete":{"description":"Allowed with `share` on the resource — no membership needed, so an\nowner who left the team can still pull their resource back — or for a\nteam_admin of this team. `target_user_id` picks one member's grant\n(absent → the whole-team grant). Identifiers come from query params\n(some proxies strip DELETE bodies), with a JSON-body fallback.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"delete_team_grants","responses":{"200":{"description":"Success"}},"summary":"Unshare a resource from this team","tags":["teams"],"x-pat-denied":true},"get":{"description":"Requires membership.\n\nEach row carries the resource's name, owner and people labels (email\nwhen on file, else null) and `caller` — the caller's own live\n`{access, allowed_actions}` on that resource (null if none). A plain\nmember sees whole-team grants and grants aimed at them; a team_admin,\nor someone with `share` on the resource, sees every grant.\n\n[Personal access token](/API/personal-access-tokens) scope: `teams:read`.","operationId":"get_team_grants","responses":{"200":{"description":"Success"}},"summary":"List resources shared with this team","tags":["teams"],"x-pat-scopes":["teams:read"]},"parameters":[{"schema":{"type":"string"},"in":"path","name":"team_id","required":true}],"post":{"description":"Needs `share` on the resource (the owner, or an editor when the owner\nturned on `editors_can_share`) and membership of the team. The grant\nrecords the real owner as `owner_id` and the caller as `granted_by`.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_team_grants","responses":{"200":{"description":"Success"}},"summary":"Share a resource with this team, or change an existing grant's level","tags":["teams"],"x-pat-denied":true}},"/api/teams/{team_id}/members":{"get":{"description":"Requires membership.\n\nOptional query args: `q` (case-insensitive substring over email and\nuser id), `page` (1-based) and `page_size` (1..100; paginates only\nwhen given). `total` is the row count after the `q` filter.\n\n[Personal access token](/API/personal-access-tokens) scope: `teams:read`.","operationId":"get_team_members","responses":{"200":{"description":"Success"}},"summary":"List members","tags":["teams"],"x-pat-scopes":["teams:read"]},"parameters":[{"schema":{"type":"string"},"in":"path","name":"team_id","required":true}],"post":{"description":"Requires team_admin.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_team_members","responses":{"200":{"description":"Success"}},"summary":"Add a member by email (preferred) or raw user_id","tags":["teams"],"x-pat-denied":true}},"/api/teams/{team_id}/members/{member_id}":{"delete":{"description":"team_admin removes anyone; a member may remove self\n(leave). Guards the last admin.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"delete_team_member","responses":{"200":{"description":"Success"}},"summary":"Remove a member","tags":["teams"],"x-pat-denied":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"team_id","required":true},{"schema":{"type":"string"},"in":"path","name":"member_id","required":true}],"put":{"description":"Requires team_admin. Guards the last admin.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"put_team_member","responses":{"200":{"description":"Success"}},"summary":"Change a member's role","tags":["teams"],"x-pat-denied":true}},"/api/teams/{team_id}/transfer_owner":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"team_id","required":true}],"post":{"description":"Owner-only (global admin overrides).\n\nThe new owner must already be a member; they are promoted to team_admin.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_team_owner_transfer","responses":{"200":{"description":"Success"}},"summary":"Transfer team ownership","tags":["teams"],"x-pat-denied":true}},"/api/template_agents":{"get":{"description":"Get template/premade agents.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:read`.","operationId":"get_get_template_agents","responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-scopes":["agents:read"],"summary":"Get template/premade agents"}},"/api/traces":{"get":{"description":"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.\n\n[Personal access token](/API/personal-access-tokens) scope: `analytics:read`.","operationId":"get_get_traces","parameters":[{"schema":{"type":"string"},"description":"Assistant message id","in":"query","name":"message_id"},{"schema":{"type":"string"},"description":"Request id (chat turn, scheduled run)","in":"query","name":"request_id"},{"schema":{"type":"string"},"description":"Agent activity id (webhook and system rows)","in":"query","name":"activity_id"},{"schema":{"type":"string"},"description":"Workflow run id","in":"query","name":"workflow_run_id"},{"schema":{"type":"string"},"description":"Trace id","in":"query","name":"id"},{"schema":{"type":"string"},"description":"Agent id to scope to","in":"query","name":"api_key_id"}],"responses":{"200":{"description":"Success"}},"tags":["analytics"],"x-pat-scopes":["analytics:read"],"summary":"Stored execution traces (span timelines) for one Logs row"}},"/api/triggers/{token}":{"get":{"description":"A GET call, taken only by a link created with methods [\"POST\", \"GET\"]: the query parameters are the delivery (a dotted key nests). A HEAD, a prefetch (Purpose / Sec-Purpose: prefetch) or a known link-preview or crawler User-Agent gets 200 {ignored} and changes nothing. 202 when accepted, 405 for a POST-only link, 404 for an unknown, expired, revoked or used-up one, 429 when rate limited.\n\nPublic: the token in the path authorizes the request, so it needs no sign-in or other credential.","operationId":"get_trigger_link","parameters":[{"schema":{"type":"string"},"description":"The link's token.","in":"path","name":"token","required":true}],"responses":{"200":{"description":"Success"}},"security":[],"tags":["triggers"],"x-pat-denied":true,"summary":"GET /api/triggers/{token}"},"post":{"description":"Deliver an event to a monitor's webhook trigger link. Public: the token is the credential. Accepts JSON, form or text up to TRIGGER_MAX_PAYLOAD_BYTES. Signed links verify Standard Webhooks (webhook-id/webhook-timestamp/webhook-signature, 5 minute tolerance), GitHub X-Hub-Signature-256, X-Signature: sha256=&lt;hex>, Stripe-Signature (t=..,v1=.., 5 minute tolerance), Slack X-Slack-Signature with X-Slack-Request-Timestamp (5 minute tolerance; a url_verification challenge is answered with 200 {challenge}), a static token header (X-Webhook-Token unless the link names another) or Authorization: Bearer. Deduplicated on Idempotency-Key, webhook-id, X-GitHub-Delivery or the Stripe/Slack event id, else the body hash. 202 when accepted; 404 for an unknown, expired, revoked or used-up link; 401 for a bad signature; 413 for a large body; 429 past TRIGGER_RATE_PER_MINUTE.\n\nPublic: the token in the path authorizes the request, so it needs no sign-in or other credential.","operationId":"post_trigger_link","parameters":[{"schema":{"type":"string"},"description":"The link's token.","in":"path","name":"token","required":true}],"responses":{"200":{"description":"Success"}},"security":[],"tags":["triggers"],"x-pat-denied":true,"summary":"Deliver an event to a monitor's webhook trigger link"}},"/api/tts":{"post":{"description":"Synthesize audio speech from text.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_text_to_speech","responses":{"200":{"description":"Success"}},"tags":["attachments"],"x-pat-denied":true,"summary":"Synthesize audio speech from text","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextToSpeechModel"}}},"required":true}}},"/api/update_agent/{agent_id}":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"agent_id","required":true}],"put":{"description":"Update an existing agent. JSON or multipart (multipart for an image). 200 {success, id, message, image, key (when first published), workflow_id (workflow agents)}. A workflow agent may send workflow_graph to write its next graph version in the same transaction (or create its workflow); confirm_sponsor covers the agent's and the graph's resources. Publishing a draft without a graph validates the stored one.\n\n[Personal access token](/API/personal-access-tokens) scope: `agents:write`.","operationId":"put_update_agent","responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-scopes":["agents:write"],"summary":"Update an existing agent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentModel"}}},"required":true}}},"/api/update_chunk":{"put":{"description":"Updates an existing chunk in the document. 409 (code source_busy) while a sync or page change on the source runs.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"put_update_chunk","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"Updates an existing chunk in the document","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChunkModel"}}},"required":true}}},"/api/update_conversation_name":{"post":{"description":"Updates the name of a conversation.\n\n[Personal access token](/API/personal-access-tokens) scope: `conversations:write`.","operationId":"post_update_conversation_name","responses":{"200":{"description":"Success"}},"tags":["conversations"],"x-pat-scopes":["conversations:write"],"summary":"Updates the name of a conversation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConversationModel"}}},"required":true}}},"/api/update_prompt":{"post":{"description":"Update an existing prompt.\n\n[Personal access token](/API/personal-access-tokens) scope: `prompts:write`.","operationId":"post_update_prompt","responses":{"200":{"description":"Success"}},"tags":["prompts"],"x-pat-scopes":["prompts:write"],"summary":"Update an existing prompt","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePromptModel"}}},"required":true}}},"/api/update_tool":{"post":{"description":"Update a tool by ID\nThe tool type (`name`) never changes. `actions` are checked\nagainst the stored ones like `/api/update_tool_actions`: nothing\nis added and fixed values are the owner's. A connection-backed MCP\nserver is moved only through `/api/mcp_server/save`.\n\nReturns:\n    `{\"success\": true}`, or 400 / 403 / 404 with a message.\n\n[Personal access token](/API/personal-access-tokens) scope: `tools:write`.","operationId":"post_update_tool","responses":{"200":{"description":"Success"}},"summary":"Update a tool's names, actions, config or chat switch","tags":["tools"],"x-pat-scopes":["tools:write"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateToolModel"}}},"required":true}}},"/api/update_tool_actions":{"post":{"description":"Update the actions of a tool.\n\n[Personal access token](/API/personal-access-tokens) scope: `tools:write`.","operationId":"post_update_tool_actions","responses":{"200":{"description":"Success"}},"tags":["tools"],"x-pat-scopes":["tools:write"],"summary":"Update the actions of a tool","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateToolActionsModel"}}},"required":true}}},"/api/update_tool_config":{"post":{"description":"Update the configuration of a tool\nA connection-backed tool's new key goes to its connection (the\nowner's to change) and its server cannot be moved here; an api_tool's\nfixed values are the owner's.\n\nReturns:\n    `{\"success\": true}`, or 400 / 403 / 404 with a message.\n\n[Personal access token](/API/personal-access-tokens) scope: `tools:write`.","operationId":"post_update_tool_config","responses":{"200":{"description":"Success"}},"summary":"Replace a tool's config, keeping stored secrets the client left out","tags":["tools"],"x-pat-scopes":["tools:write"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateToolConfigModel"}}},"required":true}}},"/api/update_tool_status":{"post":{"description":"Update the status of a tool.\n\n[Personal access token](/API/personal-access-tokens) scope: `tools:write`.","operationId":"post_update_tool_status","responses":{"200":{"description":"Success"}},"tags":["tools"],"x-pat-scopes":["tools:write"],"summary":"Update the status of a tool","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateToolStatusModel"}}},"required":true}}},"/api/upload":{"post":{"description":"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.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"post_upload_file","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"Uploads a file to be vectorized and indexed","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadModel"}}},"required":true}}},"/api/user/me":{"get":{"operationId":"get_me_resource","responses":{"200":{"description":"Success"}},"summary":"Return ``{user_id, roles, email?, name?, picture?}`` for the caller","tags":["me"],"x-pat-scopes":[],"description":"Any valid [personal access token](/API/personal-access-tokens) can call it."}},"/api/user/models":{"get":{"description":"List the current user's BYOM custom models.\n\n[Personal access token](/API/personal-access-tokens) scope: `models:read`.","operationId":"get_user_models_collection_resource","responses":{"200":{"description":"Success"}},"tags":["models"],"x-pat-scopes":["models:read"],"summary":"List the current user's BYOM custom models"},"post":{"description":"Register a new BYOM custom model.\n\n[Personal access token](/API/personal-access-tokens) scope: `models:write`.","operationId":"post_user_models_collection_resource","responses":{"200":{"description":"Success"}},"tags":["models"],"x-pat-scopes":["models:write"],"summary":"Register a new BYOM custom model"}},"/api/user/models/test":{"post":{"description":"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.\n\n[Personal access token](/API/personal-access-tokens) scope: `models:write`.","operationId":"post_user_model_test_payload_resource","responses":{"200":{"description":"Success"}},"tags":["models"],"x-pat-scopes":["models:write"],"summary":"POST /api/user/models/test"}},"/api/user/models/{model_id}":{"delete":{"description":"Delete a BYOM custom model.\n\n[Personal access token](/API/personal-access-tokens) scope: `models:write`.","operationId":"delete_user_model_resource","responses":{"200":{"description":"Success"}},"tags":["models"],"x-pat-scopes":["models:write"],"summary":"Delete a BYOM custom model"},"get":{"description":"Get one BYOM custom model.\n\n[Personal access token](/API/personal-access-tokens) scope: `models:read`.","operationId":"get_user_model_resource","responses":{"200":{"description":"Success"}},"tags":["models"],"x-pat-scopes":["models:read"],"summary":"Get one BYOM custom model"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"model_id","required":true}],"patch":{"description":"Update a BYOM custom model (partial)\n\n[Personal access token](/API/personal-access-tokens) scope: `models:write`.","operationId":"patch_user_model_resource","responses":{"200":{"description":"Success"}},"tags":["models"],"x-pat-scopes":["models:write"],"summary":"Update a BYOM custom model (partial)"}},"/api/user/models/{model_id}/test":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"model_id","required":true}],"post":{"description":"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.\n\n[Personal access token](/API/personal-access-tokens) scope: `models:write`.","operationId":"post_user_model_test_resource","responses":{"200":{"description":"Success"}},"tags":["models"],"x-pat-scopes":["models:write"],"summary":"Test a saved BYOM record"}},"/api/user/preferences":{"get":{"description":"The caller's preferences: {success, chat_prompt_id, chat_prompt_set}. chat_prompt_id is default when none was set or the stored prompt was deleted or is no longer shared with the caller. chat_prompt_set is true once a chat prompt was ever stored, default included, even when it now reads as default.\n\n[Personal access token](/API/personal-access-tokens) scope: `prompts:read`.","operationId":"get_preferences_resource","responses":{"200":{"description":"Success"}},"summary":"Return ``{success, chat_prompt_id, chat_prompt_set}`` for the caller","tags":["me"],"x-pat-scopes":["prompts:read"]},"put":{"description":"Set the prompt the caller's chats use: {success, chat_prompt_id, applied}. With only_if_unset and a chat prompt already stored, nothing is written, applied is false and chat_prompt_id is the stored one as GET reads it. 400 for a value that is neither a preset nor a prompt id, or a non-boolean only_if_unset; 403 for only_if_unset from a token restricted to specific prompts; 404 when the caller can't read the prompt; 500 when the read or write fails.\nReturns:\n    Response: `{success, chat_prompt_id, applied}`; `applied` is\n    false only when `only_if_unset` found a stored chat prompt, whose\n    readable value `chat_prompt_id` then carries.\n\n[Personal access token](/API/personal-access-tokens) scope: `prompts:write`.","operationId":"put_preferences_resource","responses":{"200":{"description":"Success"}},"summary":"Store ``chat_prompt_id`` after checking the caller may use that prompt","tags":["me"],"x-pat-scopes":["prompts:write"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPreferencesModel"}}},"required":true}}},"/api/user/quota":{"get":{"operationId":"get_my_quota_resource","responses":{"200":{"description":"Success"}},"summary":"Return the caller's limited buckets: ``{bucket, tokens, cost, resets_at}`` each","tags":["me"],"x-pat-scopes":[],"description":"Any valid [personal access token](/API/personal-access-tokens) can call it."}},"/api/user/tokens":{"get":{"operationId":"get_personal_access_tokens","responses":{"200":{"description":"Success"}},"summary":"List the caller's tokens with the scope catalog and the server's token policy","tags":["tokens"],"x-pat-denied":true,"description":"Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session."},"post":{"description":"The plaintext `token` is returned here and never again.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_personal_access_tokens","responses":{"200":{"description":"Success"}},"summary":"Create a token","tags":["tokens"],"x-pat-denied":true}},"/api/user/tokens/{token_id}":{"delete":{"description":"Takes effect on the next request.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"delete_personal_access_token","responses":{"200":{"description":"Success"}},"summary":"Revoke one of the caller's tokens","tags":["tokens"],"x-pat-denied":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"token_id","required":true}]},"/api/user/tokens/{token_id}/regenerate":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"token_id","required":true}],"post":{"description":"Name, scopes and restrictions stay; the old secret stops working at\nonce. `expires_in_days` is optional and defaults to the lifetime the\ntoken was last issued with. An expired token can be renewed this way; a\nrevoked one cannot. The plaintext `token` is returned here and never again.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_personal_access_token_regenerate","responses":{"200":{"description":"Success"}},"summary":"Issue a new secret for a token and reset its expiry","tags":["tokens"],"x-pat-denied":true}},"/api/user/tokens/{token_id}/tool":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"token_id","required":true}],"post":{"description":"The body carries the token's plaintext `token`, which only the caller\nholds (it was just shown to them), and `base_url`, where the API is\nreached. The tool gets an action for each endpoint the token may call\n(see `docsgpt.api.pat.agent_tool`), with the token sealed as their\n`Authorization` header. Deletes, and asking another agent, start\nswitched off; the response names them in `inactive`.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_personal_access_token_tool","responses":{"200":{"description":"Success"}},"summary":"Create an API tool that lets agents work in this account with the token","tags":["tokens"],"x-pat-denied":true}},"/api/webhooks/agents/{webhook_token}":{"get":{"description":"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.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"get_agent_webhook_listener","responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-denied":true,"summary":"Webhook listener for agent events (GET)"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"webhook_token","required":true}],"post":{"description":"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.\n\nNot available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.","operationId":"post_agent_webhook_listener","responses":{"200":{"description":"Success"}},"tags":["agents"],"x-pat-denied":true,"summary":"Webhook listener for agent events (POST)"}},"/api/website":{"get":{"description":"A Website source's config, sync schedule and last ingest report. entry_paths lists the tree paths of the pages a mode: page entry lists (by its address, or one that redirected to the page); the other pages were found by a site's crawl.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:read`.","operationId":"get_website_settings","parameters":[{"schema":{"type":"string"},"description":"Source ID","in":"query","name":"id"}],"responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:read"],"summary":"A Website source's config, sync schedule and last ingest report"},"post":{"description":"Save a Website source's entries, skips, link setting and sync schedule. Applies at the next sync. An address the save adds is checked as in /api/website/pages: one that isn't a web address (user:password@ credentials, a malformed host, a control character) is a 400 with code invalid_address, as is a new skip rule with a control character; a new path with one is a 400 with code invalid_config. What the source already stores is saved as it is.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"post_website_settings","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"Save a Website source's entries, skips, link setting and sync schedule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsiteSettingsModel"}}},"required":true}}},"/api/website/pages":{"post":{"description":"Add pages or sites to a Website source; they stay in every sync. Pages are fetched and appended now (mode append). A site rebuilds the source like a sync (mode sync), and so does a page whose host makes a single-host source span several hosts (every page moves under a host folder), or any add on a vector store that can't change single chunks. Only what the source doesn't list yet is added and fetched: a page it lists under any spelling, or a site with the same address and settings; when that leaves nothing, a 400 with code already_listed and nothing is queued. Refused with code page_limit when the source would hold more than WEB_MAX_PAGES pages; a 500 with code queue_failed when the entries were saved but the task couldn't be queued (the next sync fetches them).\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"post_add_website_pages","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"Add pages or sites to a Website source; they stay in every sync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddWebsitePagesModel"}}},"required":true}}},"/api/website/refresh":{"post":{"description":"Re-fetch one page of a Website source now; if it can't be fetched, its content is kept. A page found by a site's crawl that now leads outside the site's scope or to a skipped address is removed, as the next sync would drop it (the task's failed event carries reason out_of_scope). A 500 with code queue_failed when the task couldn't be queued.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"post_refresh_website_page","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"POST /api/website/refresh","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshWebsitePageModel"}}},"required":true}}},"/api/website/remove":{"post":{"description":"Remove pages or a folder from a Website source. The config changes now: a page added by address leaves the list; one found by a site's crawl (or a whole folder) is skipped in later syncs. Their chunks and tree entries go in a background task (task_id), after any running sync; a 500 with code queue_failed when the config was saved but the task couldn't be queued. A page an older url, crawler or sitemap source stored without its address is matched by the address on its chunks; when none is found it is still removed, by its path, and the config is left as it is.\n\n[Personal access token](/API/personal-access-tokens) scope: `sources:write`.","operationId":"post_remove_website_pages","responses":{"200":{"description":"Success"}},"tags":["sources"],"x-pat-scopes":["sources:write"],"summary":"Remove pages or a folder from a Website source","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveWebsitePagesModel"}}},"required":true}}},"/api/workflow_runs":{"get":{"description":"List the workflow runs you started, newest first.\n\n[Personal access token](/API/personal-access-tokens) scope: `runs:read`.","operationId":"get_workflow_run_list","parameters":[{"schema":{"type":"string"},"description":"Only runs of this agent","in":"query","name":"agent_id"},{"schema":{"type":"string"},"description":"Only runs started at or after this ISO 8601 moment","in":"query","name":"since"},{"schema":{"type":"string"},"description":"Only runs in this status: pending, running, completed or failed","in":"query","name":"status"},{"schema":{"type":"string"},"description":"Most runs to return, 1 to 100 (default 20)","in":"query","name":"limit"}],"responses":{"200":{"description":"Success"}},"tags":["workflow_runs"],"x-pat-scopes":["runs:read"],"summary":"List the workflow runs you started, newest first"}},"/api/workflow_runs/{run_id}":{"get":{"description":"One workflow run you started: status and timing, plus its steps, final state and produced files on request.\n\n[Personal access token](/API/personal-access-tokens) scope: `runs:read`.","operationId":"get_workflow_run_detail","parameters":[{"schema":{"type":"string"},"description":"Comma-separated extras: steps, state, artifacts","in":"query","name":"include"},{"schema":{"type":"string"},"description":"Return only this key of the final state, in full","in":"query","name":"state_key"}],"responses":{"200":{"description":"Success"}},"tags":["workflow_runs"],"x-pat-scopes":["runs:read"],"summary":"GET /api/workflow_runs/{run_id}"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"run_id","required":true}]},"/api/workflow_runs/{run_id}/steps/{step_index}":{"get":{"description":"One step of a workflow run you started, with its full output and state changes: what a summarized workflow_step stream event (its step_index) left out.\n\n[Personal access token](/API/personal-access-tokens) scope: `runs:read`.","operationId":"get_workflow_run_step","responses":{"200":{"description":"Success"}},"tags":["workflow_runs"],"x-pat-scopes":["runs:read"],"summary":"GET /api/workflow_runs/{run_id}/steps/{step_index}"},"parameters":[{"schema":{"type":"string"},"in":"path","name":"run_id","required":true},{"schema":{"type":"integer"},"in":"path","name":"step_index","required":true}]},"/api/workflows":{"post":{"operationId":"post_workflow_list","responses":{"200":{"description":"Success"}},"summary":"Create a new workflow with nodes and edges","tags":["workflows"],"x-pat-scopes":["workflows:write"],"description":"[Personal access token](/API/personal-access-tokens) scope: `workflows:write`."}},"/api/workflows/{workflow_id}":{"delete":{"operationId":"delete_workflow_detail","responses":{"200":{"description":"Success"}},"summary":"Delete workflow and its graph","tags":["workflows"],"x-pat-scopes":["workflows:write"],"description":"[Personal access token](/API/personal-access-tokens) scope: `workflows:write`."},"get":{"operationId":"get_workflow_detail","responses":{"200":{"description":"Success"}},"summary":"Get workflow details with nodes and edges","tags":["workflows"],"x-pat-scopes":["workflows:read"],"description":"[Personal access token](/API/personal-access-tokens) scope: `workflows:read`."},"parameters":[{"schema":{"type":"string"},"in":"path","name":"workflow_id","required":true}],"put":{"operationId":"put_workflow_detail","responses":{"200":{"description":"Success"}},"summary":"Update workflow and replace nodes/edges","tags":["workflows"],"x-pat-scopes":["workflows:write"],"description":"[Personal access token](/API/personal-access-tokens) scope: `workflows:write`."}},"/stream":{"post":{"description":"Stream a response based on the question and retriever.\n\n[Personal access token](/API/personal-access-tokens) scope: `chat:run`.","operationId":"post_stream_resource","responses":{"200":{"description":"Success"}},"tags":["answer"],"x-pat-scopes":["chat:run"],"summary":"Stream a response based on the question and retriever","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamModel"}}},"required":true}}}},"tags":[{"description":"Default namespace","name":"default","x-displayName":"Default"},{"description":"Answer related operations","name":"answer","x-displayName":"Answer"},{"description":"What runs now and what is planned","name":"activity","x-displayName":"Activity"},{"description":"Analytics and reporting operations","name":"analytics","x-displayName":"Analytics"},{"description":"Artifact operations","name":"artifacts","x-displayName":"Artifacts"},{"description":"File attachments and media operations","name":"attachments","x-displayName":"Attachments"},{"description":"Background jobs of tool calls","name":"background_jobs","x-displayName":"Background jobs"},{"description":"Conversation management operations","name":"conversations","x-displayName":"Conversations"},{"description":"Current user identity and roles","name":"me","x-displayName":"Current user"},{"description":"MCP Apps: interactive tool views in chat","name":"mcp_apps","x-displayName":"MCP apps"},{"description":"Available models","name":"models","x-displayName":"Models"},{"description":"Presence, Web Push subscriptions and unread conversations","name":"notifications","x-displayName":"Notifications"},{"description":"Agent management operations","name":"agents","x-displayName":"Agents"},{"description":"Agent folder management","name":"agents_folders","x-displayName":"Agent folders"},{"description":"Agent guardrail configuration and audit","name":"guardrails","x-displayName":"Guardrails"},{"description":"Public webhook trigger links of monitors","name":"triggers","x-displayName":"Triggers"},{"description":"Public human approval links of monitors","name":"approvals","x-displayName":"Approvals"},{"description":"The caller's monitors (Settings > Monitors)","name":"monitors","x-displayName":"Monitors"},{"description":"Prompt management operations","name":"prompts","x-displayName":"Prompts"},{"description":"Agent schedule management","name":"schedules","x-displayName":"Schedules"},{"description":"Conversation sharing operations","name":"sharing","x-displayName":"Sharing"},{"description":"Source document management operations","name":"sources","x-displayName":"Sources"},{"description":"Team management and resource sharing","name":"teams","x-displayName":"Teams"},{"description":"Tool management operations","name":"tools","x-displayName":"Tools"},{"name":"workflows","x-displayName":"Workflows"},{"description":"Workflow run results","name":"workflow_runs","x-displayName":"Workflow runs"},{"description":"Connector operations","name":"connectors","x-displayName":"Connectors"},{"description":"Connectors and connections","name":"connections","x-displayName":"Connections"},{"description":"Admin-only management endpoints","name":"admin","x-displayName":"Admin"},{"description":"Personal access tokens","name":"tokens","x-displayName":"Personal access tokens"}],"openapi":"3.2.0","servers":[{"url":"{instance}","description":"Your DocsGPT API","variables":{"instance":{"default":"http://localhost:7091"}}}],"components":{"schemas":{"AddChunkModel":{"properties":{"id":{"description":"Document ID","type":"string"},"metadata":{"description":"Metadata associated with the chunk","type":"object"},"text":{"description":"Text of the chunk","type":"string"}},"required":["id","text"],"type":"object"},"AddWebsitePagesModel":{"properties":{"entries":{"description":"Pages or sites to add (as in /api/website)","items":{"type":"object"},"type":"array"},"source_id":{"description":"Source ID","type":"string"}},"required":["entries","source_id"],"type":"object"},"AgentStartersModel":{"properties":{"api_key":{"description":"The agent's API key","type":"string"}},"required":["api_key"],"type":"object"},"AnswerModel":{"properties":{"active_docs":{"description":"Active documents","type":"string"},"agent_id":{"description":"Agent ID","type":"string"},"api_key":{"description":"API key","type":"string"},"chunks":{"default":6,"description":"Number of chunks","type":"integer"},"conversation_id":{"description":"Existing conversation ID (loads history)","type":"string"},"history":{"description":"Conversation history (only for new conversations)","items":{"type":"string"},"type":"array"},"isNoneDoc":{"description":"Flag indicating if no document is used","type":"boolean"},"model_id":{"description":"Model ID to use for this request","type":"string"},"passthrough":{"description":"Dynamic parameters to inject into prompt template","type":"object"},"prompt_id":{"default":"default","description":"Prompt ID","type":"string"},"question":{"description":"Question to be asked","type":"string"},"retriever":{"description":"Retriever type","type":"string"},"save_conversation":{"description":"Deprecated, no effect: conversations always persist. Use `visibility` to control sidebar listing.","type":"boolean"},"visibility":{"default":"hidden","description":"'listed' shows the conversation in the owner's sidebar; any other value (or omitting it) persists it hidden.","type":"string"}},"required":["question"],"type":"object"},"AttachmentModel":{"properties":{"api_key":{"description":"API key (optional)","type":"string"},"file":{"description":"File(s) to upload","type":"object"}},"required":["file"],"type":"object"},"BulkMoveAgents":{"properties":{"agent_ids":{"description":"List of agent IDs","items":{"type":"string"},"type":"array"},"folder_id":{"description":"Target folder ID","type":"string"}},"required":["agent_ids"],"type":"object"},"ConnectorAuthCompleteModel":{"properties":{"code":{"description":"The provider's authorization code","type":"string"},"state":{"description":"The state the provider echoed","type":"string"}},"required":["code","state"],"type":"object"},"ConnectorDisconnectModel":{"properties":{"provider":{"type":"string"},"session_token":{"type":"string"}},"required":["provider"],"type":"object"},"ConnectorFilesModel":{"properties":{"connection_id":{"type":"string"},"folder_id":{"type":"string"},"limit":{"type":"integer"},"page_token":{"type":"string"},"provider":{"type":"string"},"search_query":{"type":"string"},"session_token":{"description":"Legacy; use connection_id","type":"string"}},"required":["provider"],"type":"object"},"ConnectorSyncModel":{"properties":{"connection_id":{"description":"Connection to sync with; defaults to the source's own (ignored for team editors, whose sync always uses the source's own connection)","type":"string"},"session_token":{"description":"Legacy; use connection_id","type":"string"},"source_id":{"description":"Source ID to sync","type":"string"}},"required":["source_id"],"type":"object"},"ConnectorValidateSessionModel":{"properties":{"connection_id":{"type":"string"},"provider":{"type":"string"},"session_token":{"description":"Legacy; use connection_id","type":"string"}},"required":["provider"],"type":"object"},"CreateAgentModel":{"properties":{"agent_type":{"description":"Type of the agent (classic, react, workflow). Defaults to 'classic' for backwards compatibility.","type":"string"},"allow_system_prompt_override":{"description":"Allow API callers to override the system prompt via the v1 endpoint","type":"boolean"},"chunks":{"description":"Chunks count","type":"integer"},"default_model_id":{"description":"Default model ID for this agent","type":"string"},"description":{"description":"Description of the agent","type":"string"},"folder_id":{"description":"Folder ID to organize the agent","type":"string"},"image":{"description":"Image file upload","type":"object"},"json_schema":{"description":"JSON schema for enforcing structured output format","type":"object"},"limited_request_mode":{"description":"Whether the agent is in limited request mode","type":"boolean"},"limited_token_mode":{"description":"Whether the agent is in limited token mode","type":"boolean"},"models":{"description":"List of available model IDs for this agent","items":{"type":"string"},"type":"array"},"name":{"description":"Name of the agent","type":"string"},"prompt_id":{"description":"Prompt id, or a preset: default, creative or strict","type":"string"},"request_limit":{"description":"Request limit for the agent in limited mode","type":"integer"},"retriever":{"description":"Retriever ID","type":"string"},"source":{"description":"Source ID (legacy single source)","type":"string"},"sources":{"description":"List of source identifiers for multiple sources","items":{"type":"string"},"type":"array"},"starters":{"description":"Up to 4 questions a new chat with the agent offers, each at most 200 characters; trimmed, blanks and case-insensitive duplicates dropped. Multipart sends a JSON string","items":{"type":"string"},"type":"array"},"status":{"description":"Status of the agent (draft or published)","type":"string"},"token_limit":{"description":"Token limit for the agent in limited mode","type":"integer"},"tools":{"description":"List of tool identifiers","items":{"type":"string"},"type":"array"},"workflow":{"description":"Workflow ID for workflow-type agents","type":"string"},"workflow_graph":{"description":"Workflow agents only, instead of workflow: the graph saved with the agent in the same transaction, {nodes, edges, retry_defaults?} (a JSON string in a multipart form). A draft only its builder runs is checked for shape only; a published agent, one a key, webhook, schedule or public link runs, or one sharing its workflow with such an agent gets the full validation. Needs workflows:write for a token.","type":"object"}},"required":["description","name","status"],"type":"object"},"CreateFolder":{"properties":{"name":{"description":"Folder name","type":"string"},"parent_id":{"description":"Parent folder ID","type":"string"}},"required":["name"],"type":"object"},"CreatePromptModel":{"properties":{"content":{"description":"Content of the prompt","type":"string"},"name":{"description":"Name of the prompt","type":"string"}},"required":["content","name"],"type":"object"},"CreateToolModel":{"properties":{"config":{"description":"Configuration of the tool","type":"object"},"customName":{"description":"Custom name for the tool","type":"string"},"description":{"description":"Tool description","type":"string"},"displayName":{"description":"Display name for the tool","type":"string"},"name":{"description":"Name of the tool","type":"string"},"status":{"description":"Status of the tool","type":"boolean"}},"required":["config","description","displayName","name","status"],"type":"object"},"CreateWikiModel":{"properties":{"initial_content":{"description":"Optional markdown seed for /index.md","type":"string"},"name":{"description":"Wiki source name","type":"string"}},"required":["name"],"type":"object"},"DeletePromptModel":{"properties":{"id":{"description":"Prompt ID to delete","type":"string"}},"required":["id"],"type":"object"},"DeleteToolModel":{"properties":{"id":{"description":"Tool ID","type":"string"}},"required":["id"],"type":"object"},"FeedbackModel":{"properties":{"answer":{"description":"The AI answer","type":"string"},"api_key":{"description":"Optional API key","type":"string"},"conversation_id":{"description":"id of the particular conversation","type":"string"},"feedback":{"description":"User feedback","type":"string"},"question":{"description":"The user question","type":"string"},"question_index":{"description":"The question number in that particular conversation","type":"integer"}},"required":["conversation_id","feedback","question_index"],"type":"object"},"GetConversationInsightsModel":{"properties":{"api_key_id":{"description":"Agent id","type":"string"},"filter_option":{"default":"last_30_days","description":"Filter option for analytics","enum":["last_hour","last_24_hour","last_7_days","last_15_days","last_30_days"],"type":"string","examples":["last_hour"]}},"type":"object"},"GetDocsGapsModel":{"properties":{"api_key_id":{"description":"Agent id","type":"string"},"filter_option":{"default":"last_30_days","description":"Filter option for analytics","enum":["last_hour","last_24_hour","last_7_days","last_15_days","last_30_days"],"type":"string","examples":["last_hour"]},"group_by":{"default":"page","description":"Group by the effective topic, or by the source or page of the turn's first retrieved chunk","enum":["topic","source","page"],"type":"string","examples":["topic"]},"limit":{"default":25,"description":"Most groups returned (1-50)","type":"integer"}},"type":"object"},"GetFeedbackAnalyticsModel":{"properties":{"api_key_id":{"description":"API Key ID","type":"string"},"filter_option":{"default":"last_30_days","description":"Filter option for analytics","enum":["last_hour","last_24_hour","last_7_days","last_15_days","last_30_days"],"type":"string","examples":["last_hour"]}},"type":"object"},"GetMessageAnalyticsModel":{"properties":{"api_key_id":{"description":"API Key ID","type":"string"},"filter_option":{"default":"last_30_days","description":"Filter option for analytics","enum":["last_hour","last_24_hour","last_7_days","last_15_days","last_30_days"],"type":"string","examples":["last_hour"]}},"type":"object"},"GetScheduleAnalyticsModel":{"properties":{"api_key_id":{"description":"API Key ID","type":"string"},"filter_option":{"default":"last_30_days","description":"Filter option for analytics","enum":["last_hour","last_24_hour","last_7_days","last_15_days","last_30_days"],"type":"string","examples":["last_hour"]}},"type":"object"},"GetTokenAnalyticsModel":{"properties":{"api_key_id":{"description":"API Key ID","type":"string"},"filter_option":{"default":"last_30_days","description":"Filter option for analytics","enum":["last_hour","last_24_hour","last_7_days","last_15_days","last_30_days"],"type":"string","examples":["last_hour"]},"group_by":{"default":"none","description":"Second grouping dimension for the series","enum":["none","model","agent","source"],"type":"string","examples":["none"]},"include_side_channel":{"default":true,"description":"Include non-user-initiated token usage (title generation, compression, RAG condensing, fallback)","type":"boolean"}},"type":"object"},"GetToolAnalyticsModel":{"properties":{"api_key_id":{"description":"API Key ID","type":"string"},"filter_option":{"default":"last_30_days","description":"Filter option for analytics","enum":["last_hour","last_24_hour","last_7_days","last_15_days","last_30_days"],"type":"string","examples":["last_hour"]}},"type":"object"},"GetUserLogsModel":{"properties":{"api_key_id":{"description":"API Key ID","type":"string"},"conversation_id":{"description":"Only rows of this conversation (chat turns and scheduled runs)","type":"string"},"date_from":{"description":"Rows at or after this ISO 8601 moment","type":"string"},"date_to":{"description":"Rows before this ISO 8601 moment","type":"string"},"event_type":{"description":"Filter by event source","enum":["chat","schedule","webhook","workflow","system","search","graph"],"type":"string","examples":["chat"]},"feedback":{"description":"Only chat turns rated this way","enum":["like","dislike"],"type":"string","examples":["like"]},"label":{"description":"Only chat turns the decision model labelled this way at ANALYTICS_FILTER_MIN_PROBABILITY or better: one of docs_gap, not_answered, negative_reaction, negative_sentiment, frustrated, asks_human, tag:&lt;id> (a topic of the turn's conversation that can overlap) or topic:&lt;name> (the turn's own topic)","type":"string"},"level":{"description":"Filter by log level","enum":["info","error","warning"],"type":"string","examples":["info"]},"page":{"default":1,"description":"Page number for pagination","type":"integer"},"page_size":{"default":10,"description":"Number of logs per page","type":"integer"},"passthrough":{"description":"Only chat turns whose passthrough values match every given key, compared as text, e.g. {\"user_id\": \"42\"}","type":"object"},"search":{"description":"Substring filter on the summary","type":"string"}},"type":"object"},"InjectionReviewModel":{"properties":{"content_hash":{"description":"The chunk's `injection.content_hash` (sha256 of its text)","type":"string"},"decision":{"description":"`allow` marks the chunk safe from prompt-injection screening; `clear` undoes it","enum":["allow","clear"],"type":"string","examples":["allow"]}},"required":["content_hash","decision"],"type":"object"},"LiveSpeechToTextChunkModel":{"properties":{"chunk_index":{"description":"Sequential chunk index","type":"integer"},"file":{"description":"Audio chunk","type":"object"},"is_silence":{"description":"Whether the latest capture window was mostly silence","type":"boolean"},"session_id":{"description":"Live transcription session ID","type":"string"}},"required":["chunk_index","file","session_id"],"type":"object"},"MCPOAuthCancelModel":{"properties":{"task_id":{"description":"OAuth task to cancel","type":"string"}},"required":["task_id"],"type":"object"},"MCPServerCallbackModel":{"properties":{"code":{"description":"Authorization code","type":"string"},"error":{"description":"Error message (if any)","type":"string"},"state":{"description":"State parameter","type":"string"}},"required":["code","state"],"type":"object"},"MCPServerSaveModel":{"properties":{"config":{"description":"MCP server configuration","type":"object"},"displayName":{"description":"Display name for the MCP server","type":"string"},"id":{"description":"Tool ID for updates (optional)","type":"string"},"status":{"default":true,"description":"Tool status","type":"boolean"}},"required":["config","displayName"],"type":"object"},"MCPServerTestModel":{"properties":{"config":{"description":"MCP server configuration to test","type":"object"},"id":{"description":"Stored tool to test with (empty secrets reuse its stored ones)","type":"string"}},"required":["config"],"type":"object"},"ManageSourceFilesModel":{"properties":{"directory_path":{"description":"Directory path to remove (for remove_directory operation)","type":"string"},"file":{"description":"Files to add (for add operation) or the new file set (for sync)","type":"object"},"file_paths":{"description":"File paths to remove (for remove operation)","items":{"type":"string"},"type":"array"},"operation":{"description":"Operation: 'add', 'remove', 'remove_directory', or 'sync' (the uploaded files and ZIPs become the source's whole file set; files not in the upload are removed)","type":"string"},"parent_dir":{"description":"Parent directory path relative to source root","type":"string"},"source_id":{"description":"Source ID to modify","type":"string"}},"required":["operation","source_id"],"type":"object"},"ManageSyncModel":{"properties":{"source_id":{"description":"Source ID","type":"string"},"sync_frequency":{"description":"Sync frequency (never, daily, weekly, monthly)","type":"string"}},"required":["source_id","sync_frequency"],"type":"object"},"McpAppCallModel":{"properties":{"approved":{"description":"The user approved this call, for a tool that needs approval","type":"boolean"},"arguments":{"description":"Its arguments","type":"object"},"name":{"description":"The tool the view calls","type":"string"},"tool_id":{"description":"The MCP tool row the view belongs to","type":"string"}},"required":["name","tool_id"],"type":"object"},"McpAppResourceModel":{"properties":{"tool_id":{"description":"The MCP tool row the call ran on","type":"string"},"uri":{"description":"The view's ui:// resource","type":"string"}},"required":["tool_id","uri"],"type":"object"},"McpAppResultModel":{"properties":{"call_id":{"description":"The call that drew the view","type":"string"},"message_id":{"description":"The message the call belongs to","type":"string"}},"required":["call_id","message_id"],"type":"object"},"MoveAgent":{"properties":{"agent_id":{"description":"Agent ID to move","type":"string"},"folder_id":{"description":"Target folder ID (null to remove from folder)","type":"string"}},"required":["agent_id"],"type":"object"},"PresenceReport":{"properties":{"closing":{"description":"The tab is closing; forget it","type":"boolean"},"conversation_id":{"description":"The conversation the tab shows, or null","type":"string"},"tab_id":{"description":"The tab's own random id (1-64 of A-Z a-z 0-9 _ . : -)","type":"string"},"visible":{"description":"Whether the tab is visible","type":"boolean"}},"required":["tab_id","visible"],"type":"object"},"PushSubscription":{"properties":{"endpoint":{"description":"The push service URL (https, a known push service)","type":"string"},"expirationTime":{"description":"Ignored","type":"object"},"keys":{"description":"{p256dh, auth}, base64url, as the browser gives them","type":"object"}},"required":["endpoint","keys"],"type":"object"},"PushUnsubscribe":{"properties":{"endpoint":{"type":"string"}},"required":["endpoint"],"type":"object"},"RefreshWebsitePageModel":{"properties":{"file_path":{"description":"Tree path of the page","type":"string"},"source_id":{"description":"Source ID","type":"string"},"url":{"description":"The page's address, as its tree leaf shows it; when given, the page is found by it wherever a sync moved it","type":"string"}},"required":["file_path","source_id"],"type":"object"},"ReingestSourceModel":{"properties":{"source_id":{"description":"Source ID","type":"string"}},"required":["source_id"],"type":"object"},"RemoteUploadModel":{"properties":{"data":{"description":"JSON loader config. For source=website: {entries: [{url, mode: page|site, max_pages, path_prefix, include_subdomains, discovery: auto|sitemap|links, sitemap_url}], skip: [url or https://host/path/*], keep_links}","type":"string"},"name":{"description":"Job name","type":"string"},"repo_url":{"description":"GitHub repository URL","type":"string"},"source":{"description":"Source of the data","type":"string"},"sync_frequency":{"description":"How often to re-fetch: never (default), daily, weekly or monthly","type":"string"},"user":{"description":"User ID","type":"string"}},"required":["data","name","source","user"],"type":"object"},"RemoveWebsitePagesModel":{"properties":{"directory_path":{"description":"Tree path of a folder to remove","type":"string"},"file_paths":{"description":"Tree paths of pages to remove, up to 1000","items":{"type":"string"},"type":"array"},"source_id":{"description":"Source ID","type":"string"}},"required":["source_id"],"type":"object"},"ScheduleCreate":{"properties":{"cron":{"description":"Required when trigger_type == 'recurring'","type":"string"},"end_at":{"description":"ISO 8601","type":"string"},"instruction":{"type":"string"},"model_id":{"type":"string"},"name":{"type":"string"},"run_at":{"description":"ISO 8601 — required when trigger_type == 'once'","type":"string"},"timezone":{"type":"string"},"token_budget":{"type":"integer"},"tool_allowlist":{"items":{"type":"string"},"type":"array"},"trigger_type":{"description":"'recurring' (default) or 'once'","type":"string"}},"required":["instruction"],"type":"object"},"SearchModel":{"properties":{"api_key":{"description":"API key for authentication","type":"string"},"chunks":{"default":5,"description":"Number of results to return","type":"integer"},"question":{"description":"Search query","type":"string"}},"required":["api_key","question"],"type":"object"},"ShareAgentModel":{"properties":{"id":{"description":"ID of the agent","type":"string"},"shared":{"description":"Share or unshare the agent","type":"boolean"},"username":{"description":"Name of the user","type":"string"}},"required":["id","shared"],"type":"object"},"ShareConversationModel":{"properties":{"chunks":{"description":"Chunks count (optional)","type":"integer"},"conversation_id":{"description":"Conversation ID","type":"string"},"prompt_id":{"description":"Prompt ID (optional)","type":"string"},"user":{"description":"User ID (optional)","type":"string"}},"required":["conversation_id"],"type":"object"},"SourceConfigModel":{"properties":{"chunking":{"description":"Ingest-time chunking config","type":"object"},"kind":{"description":"Behavior selector (e.g. classic)","type":"string"},"retrieval":{"description":"Query-time retrieval config","type":"object"}},"type":"object"},"SourceFromAttachmentsModel":{"properties":{"attachment_ids":{"description":"Ids of the caller's chat attachments, in the order to list them","items":{"type":"string"},"type":"array"},"name":{"description":"Name of the new source; defaults to the first file's name and a count","type":"string"}},"required":["attachment_ids"],"type":"object"},"SourceSearchModel":{"properties":{"compare":{"description":"Also return `candidates`: every chunk the stages received, in retriever order, with its relevance and whether it was kept.","type":"boolean"},"query":{"description":"The query to retrieve for","type":"string"},"retrieval":{"description":"Ad-hoc retrieval config to test with. Omit to use the source's saved config. Never persisted.","type":"object"}},"required":["query"],"type":"object"},"SpeechToTextModel":{"properties":{"file":{"description":"Audio file","type":"object"},"language":{"description":"Optional transcription language hint","type":"string"}},"required":["file"],"type":"object"},"StreamModel":{"properties":{"active_docs":{"description":"Active documents","type":"string"},"agent_id":{"description":"Agent ID","type":"string"},"api_key":{"description":"API key","type":"string"},"attachments":{"description":"List of attachment IDs","items":{"type":"string"},"type":"array"},"chunks":{"default":6,"description":"Number of chunks","type":"integer"},"conversation_id":{"description":"Existing conversation ID (loads history)","type":"string"},"history":{"description":"Conversation history (only for new conversations)","items":{"type":"string"},"type":"array"},"index":{"description":"Index of the query to update","type":"integer"},"isNoneDoc":{"description":"Flag indicating if no document is used","type":"boolean"},"model_id":{"description":"Model ID to use for this request","type":"string"},"passthrough":{"description":"Dynamic parameters to inject into prompt template","type":"object"},"prompt_id":{"default":"default","description":"Prompt ID","type":"string"},"question":{"description":"Question to be asked","type":"string"},"retriever":{"description":"Retriever type","type":"string"},"save_conversation":{"description":"Deprecated, no effect: conversations always persist. Use `visibility` to control sidebar listing.","type":"boolean"},"visibility":{"default":"hidden","description":"'listed' shows the conversation in the owner's sidebar; any other value (or omitting it) persists it hidden.","type":"string"}},"required":["question"],"type":"object"},"SyncSourceModel":{"properties":{"source_id":{"description":"Source ID","type":"string"}},"required":["source_id"],"type":"object"},"TaskStatusModel":{"properties":{"task_id":{"description":"Task ID","type":"string"}},"required":["task_id"],"type":"object"},"TextToSpeechModel":{"properties":{"text":{"description":"Text to be synthesized as audio","type":"string"}},"required":["text"],"type":"object"},"UpdateAgentModel":{"properties":{"agent_type":{"description":"Type of the agent (classic, react, workflow). Defaults to 'classic' for backwards compatibility.","type":"string"},"allow_system_prompt_override":{"description":"Allow API callers to override the system prompt via the v1 endpoint","type":"boolean"},"chunks":{"description":"Chunks count","type":"integer"},"default_model_id":{"description":"Default model ID for this agent","type":"string"},"description":{"description":"New description of the agent","type":"string"},"folder_id":{"description":"Folder ID to organize the agent","type":"string"},"image":{"description":"Image file upload","type":"object"},"json_schema":{"description":"JSON schema for enforcing structured output format","type":"object"},"limited_request_mode":{"description":"Whether the agent is in limited request mode","type":"boolean"},"limited_token_mode":{"description":"Whether the agent is in limited token mode","type":"boolean"},"models":{"description":"List of available model IDs for this agent","items":{"type":"string"},"type":"array"},"name":{"description":"New name of the agent","type":"string"},"prompt_id":{"description":"Prompt id, or a preset: default, creative or strict","type":"string"},"request_limit":{"description":"Request limit for the agent in limited mode","type":"integer"},"retriever":{"description":"Retriever ID","type":"string"},"source":{"description":"Source ID (legacy single source)","type":"string"},"sources":{"description":"List of source identifiers for multiple sources","items":{"type":"string"},"type":"array"},"starters":{"description":"Up to 4 questions a new chat with the agent offers, each at most 200 characters; trimmed, blanks and case-insensitive duplicates dropped. Multipart sends a JSON string","items":{"type":"string"},"type":"array"},"status":{"description":"Status of the agent (draft or published)","type":"string"},"token_limit":{"description":"Token limit for the agent in limited mode","type":"integer"},"tools":{"description":"List of tool identifiers","items":{"type":"string"},"type":"array"},"workflow":{"description":"Workflow ID for workflow-type agents","type":"string"},"workflow_graph":{"description":"Workflow agents only, instead of workflow: the graph saved with the agent in the same transaction, {nodes, edges, retry_defaults?} (a JSON string in a multipart form). A draft only its builder runs is checked for shape only; a published agent, one a key, webhook, schedule or public link runs, or one sharing its workflow with such an agent gets the full validation. Needs workflows:write for a token.","type":"object"}},"required":["description","name","status"],"type":"object"},"UpdateChunkModel":{"properties":{"chunk_id":{"description":"Chunk ID to update","type":"string"},"id":{"description":"Document ID","type":"string"},"metadata":{"description":"Updated metadata associated with the chunk","type":"object"},"text":{"description":"New text of the chunk","type":"string"}},"required":["chunk_id","id"],"type":"object"},"UpdateConversationModel":{"properties":{"id":{"description":"Conversation ID","type":"string"},"name":{"description":"New name of the conversation","type":"string"}},"required":["id","name"],"type":"object"},"UpdatePromptModel":{"properties":{"content":{"description":"New content of the prompt","type":"string"},"id":{"description":"Prompt ID to update","type":"string"},"name":{"description":"New name of the prompt","type":"string"}},"required":["content","id","name"],"type":"object"},"UpdateToolActionsModel":{"properties":{"actions":{"description":"Actions the tool can perform","items":{"type":"object"},"type":"array"},"id":{"description":"Tool ID","type":"string"}},"required":["actions","id"],"type":"object"},"UpdateToolConfigModel":{"properties":{"config":{"description":"Configuration of the tool","type":"object"},"id":{"description":"Tool ID","type":"string"}},"required":["config","id"],"type":"object"},"UpdateToolModel":{"properties":{"actions":{"description":"Actions the tool can perform","items":{"type":"object"},"type":"array"},"config":{"description":"Configuration of the tool","type":"object"},"customName":{"description":"Custom name for the tool","type":"string"},"description":{"description":"Tool description","type":"string"},"displayName":{"description":"Display name for the tool","type":"string"},"id":{"description":"Tool ID","type":"string"},"name":{"description":"Name of the tool","type":"string"},"status":{"description":"Status of the tool","type":"boolean"}},"required":["id"],"type":"object"},"UpdateToolStatusModel":{"properties":{"id":{"description":"Tool ID","type":"string"},"status":{"description":"Status of the tool","type":"boolean"}},"required":["id","status"],"type":"object"},"UploadModel":{"properties":{"file":{"description":"File(s) to upload","type":"object"},"name":{"description":"Job name","type":"string"},"user":{"description":"User ID","type":"string"}},"required":["file","name","user"],"type":"object"},"UserPreferencesModel":{"properties":{"chat_prompt_id":{"description":"The prompt chats use: default, creative, strict, or the id of a prompt the caller can read","type":"string"},"only_if_unset":{"description":"Store it only when no chat prompt was ever stored (moving a browser's old choice); otherwise the stored one is kept and returned. Refused to a token restricted to specific prompts","type":"boolean"}},"required":["chat_prompt_id"],"type":"object"},"WebsiteSettingsModel":{"properties":{"entries":{"description":"What the source fetches: {url, mode: page|site, max_pages, path_prefix, include_subdomains, discovery: auto|sitemap|links, sitemap_url}","items":{"type":"object"},"type":"array"},"keep_links":{"description":"Keep the URL of links inside sentences in page text; left out, the stored setting is kept","type":"boolean"},"skip":{"description":"Pages (url) or sections (https://host/path/*) to leave out; left out, the stored list is kept, and [] clears it","items":{"type":"string"},"type":"array"},"source_id":{"description":"Source ID","type":"string"},"sync_frequency":{"description":"never, daily, weekly or monthly","type":"string"}},"required":["entries","source_id"],"type":"object"},"WikiPageEditModel":{"properties":{"content":{"description":"Markdown content","type":"string"},"expected_version":{"description":"Optimistic-lock version from the last read","type":"integer"},"path":{"description":"Page path","type":"string"}},"required":["content","path"],"type":"object"}},"responses":{"MaskError":{"description":"When any error occurs on mask"},"ParseError":{"description":"When a mask can't be parsed"},"RequestEntityTooLarge":{"description":"Keep Flask-RESTX from replacing the configured upload-limit response"}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A session token or a personal access token. Leave it empty when the instance runs without authentication (`AUTH_TYPE` unset)."}}},"security":[{"bearer":[]}]}