chatagent-platform Api API

多租户 RAG 聊天智能体平台。鉴权分层:`X-Admin-Token`(平台)、`X-API-Key`(租户)、`X-End-User`(代理终端用户)、`Authorization: Bearer `(平台登录终端用户)、`X-Act-Tenant`(admin 以租户身份)、可选 `X-Space-Id`。详见管理端「API 文档」页。

Operations 406

Showing the first 250 of 406. The full set is in the contract, and via get_provider_operations.

GET /internal/tls-allow Tls Allow #
GET /tenant/custom-domain/feature Custom Domain Feature #
GET /tenant/custom-domain Get Custom Domain #
PUT /tenant/custom-domain Set Custom Domain #
DELETE /tenant/custom-domain Delete Custom Domain #
POST /tenant/custom-domain/check Check Custom Domain #
GET /health Health #
GET /readyz Readyz #
GET / Root #
GET /auth/methods Auth Methods #
POST /auth/register Register #
GET /auth/verify Verify Email #
POST /auth/resend-verification Resend Verification #
POST /auth/forgot-password Forgot Password #
POST /auth/reset-password Reset Password #
GET /auth/oauth/{provider}/start Oauth Start #
GET /auth/oauth/{provider}/callback Oauth Callback #
POST /auth/login Login #
GET /me/stream Me Stream #
POST /me/reminders Create My Reminder #
GET /me/reminders My Reminders #
POST /me/reminders/{rid}/cancel Cancel My Reminder #
DELETE /me/reminders/{rid} Delete My Reminder #
GET /me Me #
GET /me/features My Features #
GET /me/remembered My Remembered #
DELETE /me/remembered/{agent_name} Forget Me #
GET /me/profile My Profile #
PATCH /me/profile Update My Profile #
GET /me/agents My Available Agents #
GET /me/spaces My Spaces #
POST /me/spaces Create My Space #
PATCH /me/spaces/{sid} Rename My Space #
DELETE /me/spaces/{sid} Delete My Space #
POST /me/spaces/{sid}/merge Merge My Space #
POST /me/spaces/{sid}/agents Add My Space Agent #
DELETE /me/spaces/{sid}/agents/{name} Remove My Space Agent #
GET /me/spaces/{sid}/sessions My Space Sessions #
GET /me/spaces/{sid}/sessions/search My Search Sessions #
PATCH /me/sessions/{sid} Rename My Session #
DELETE /me/sessions/{sid} Delete My Session #
POST /me/sessions/{sid}/read Mark My Session Read #
DELETE /me/sessions/{sid}/messages/{mid} Delete My Message #
PATCH /me/sessions/{sid}/messages/{mid} Edit My Message #
POST /me/sessions/{sid}/messages/{mid}/branch Branch My Session #
GET /me/sessions/{sid}/messages My Session Messages #
GET /me/sessions/{sid}/attachments My Session Attachments #
GET /me/attachments/{aid} My Attachment Blob #
POST /me/telegram/bind-code Create Tg Bind Code #
GET /me/telegram/status Tg Status #
DELETE /me/telegram/binding Tg Unbind #
POST /me/whatsapp/bind-code Create Wa Bind Code #
GET /me/whatsapp/status Wa Bind Status #
DELETE /me/whatsapp/binding Wa Unbind #
GET /me/documents List My Documents #
PATCH /me/documents/{doc_id}/tags Set My Document Tags #
POST /me/documents/{doc_id}/reingest Reingest My Document #
DELETE /me/documents/{doc_id} Delete My Document #
GET /me/documents/{doc_id}/detail My Document Detail #
GET /me/memories List My Memories #
DELETE /me/memories/{mid} Delete My Memory #
GET /me/graph My Knowledge Graph #
GET /me/writing/runs List Runs #
GET /me/writing/runs/{run_id} Get Run #
GET /me/writing/runs/{run_id}/events Get Events #
GET /me/writing/runs/{run_id}/markdown Get Markdown #
GET /me/writing/stats Stats #
GET /me/monitors My Monitors #
POST /me/monitors Create Draft #
POST /me/monitors/manual Create Manual #
POST /me/monitors/stream Create Draft Stream #
POST /me/monitors/probe Probe One #
POST /me/monitors/{plan_id}/confirm Confirm #
DELETE /me/monitors/{plan_id} Delete Monitor #
POST /me/monitors/{plan_id}/run-now Run Now #
GET /me/monitors/{plan_id}/reports My Reports #
PATCH /me/monitors/{plan_id}/title Rename #
PATCH /me/monitors/{plan_id}/cron Set Cron #
GET /me/monitors/{plan_id}/live Live Progress #
POST /me/monitors/{plan_id}/revise Revise #
GET /me/monitors/{plan_id}/plan Read Plan #
POST /me/monitors/{plan_id}/preview Preview #
POST /me/monitors/{plan_id}/preview-stream Preview Stream #
PATCH /me/monitors/{plan_id}/sources/{source_id} Toggle Source #
GET /me/monitor-reports/{token} Read Report #
GET /me/monitor-reports/{token}/kb-buttons Kb Buttons #
POST /me/monitor-reports/{token}/kb/{item_id} Add Kb #
POST /me/monitors/{plan_id}/missed Missed #
POST /me/monitors/{plan_id}/keywords Accept Keywords #
GET /admin/debug/stream Debug Stream #
POST /admin/tenants Create Tenant Endpoint #
GET /admin/tenants List Tenants #
GET /admin/tenants/{tid} Get Tenant #
PATCH /admin/tenants/{tid} Patch Tenant #
DELETE /admin/tenants/{tid} Delete Tenant #
GET /admin/tenants/{tid}/keys List Keys #
POST /admin/tenants/{tid}/keys Issue Key #
POST /admin/tenants/{tid}/keys/{kid}/revoke Revoke Key #
DELETE /admin/tenants/{tid}/keys/{kid} Delete Key #
GET /admin/tenants/{tid}/accounts List Accounts #
POST /admin/tenants/{tid}/accounts Add Account #
POST /admin/tenants/{tid}/accounts/{aid}/password Reset Account Password #
DELETE /admin/tenants/{tid}/accounts/{aid} Delete Account #
GET /admin/tenants/{tid}/oauth List Oauth #
PUT /admin/tenants/{tid}/oauth/{provider} Set Oauth #
DELETE /admin/tenants/{tid}/oauth/{provider} Delete Oauth #
PUT /admin/tenants/{tid}/oauth/{provider}/enabled Set Oauth Enabled #
GET /admin/overview Overview #
GET /admin/audit Audit #
GET /admin/planner/summary Planner Summary #
PUT /admin/tenants/{tid}/planner Put Tenant Planner #
GET /admin/models List Models #
POST /admin/models Create Model #
POST /admin/models/fetch-models Fetch Models #
GET /admin/models/{mid} Get Model #
PATCH /admin/models/{mid} Patch Model #
DELETE /admin/models/{mid} Delete Model #
POST /admin/models/{mid}/test Test Model #
GET /admin/models/usage/by-server Usage By Server #
GET /admin/models/usage/daily Usage Daily #
GET /admin/platform-skills List Platform Skills #
PUT /admin/platform-skills/{name} Upsert Platform Skill #
DELETE /admin/platform-skills/{name} Remove Platform Skill #
POST /admin/platform-skills/{name}/anchors/regenerate Regenerate Anchors #
GET /admin/platform-skills/diagnose Diagnose #
POST /admin/platform-skills/activate Activate #
GET /tenant/changelog Changelog #
GET /admin/web-cache List Cache #
DELETE /admin/web-cache/{cid} Delete One #
POST /admin/web-cache/purge Purge #
GET /tenant/settings Get Settings Ep #
PATCH /tenant/settings Patch Settings Ep #
GET /tenant/quota Get Quota Ep #
PUT /tenant/settings/smtp Set Smtp Ep #
POST /tenant/settings/smtp/test Test Smtp Ep #
PUT /tenant/oauth/{provider} Set Oauth Ep #
DELETE /tenant/oauth/{provider} Delete Oauth Ep #
PUT /tenant/oauth/{provider}/enabled Set Oauth Enabled Ep #
GET /tenant/keys List My Keys #
POST /tenant/keys Issue My Key #
POST /tenant/keys/{kid}/revoke Revoke My Key #
DELETE /tenant/keys/{kid} Delete My Key #
GET /tenant/me Tenant Me #
GET /tenant/privacy Get Privacy #
PUT /tenant/privacy Set Privacy #
POST /tenant/settings/logo Upload Brand Logo #
GET /tenant/audit Tenant Audit #
GET /tenant/audit.csv Tenant Audit Csv #
GET /t/{alias} Tenant Login Page #
GET /t/{alias}/{agent_ref} Tenant Agent Page #
GET /t/{alias}/console/agents Tenant Console Agents #
GET /brand/{tenant_id}/logo Tenant Logo #
GET /img/{tenant_id}/{image_id} Tenant Image #
GET /agents List Tenant Agents #
GET /agents/{name} Get Agent #
POST /agents/{name} Create Agent #
PUT /agents/{name} Update Agent #
PATCH /agents/{name} Patch Agent #
DELETE /agents/{name} Remove Agent #
POST /agents/import Import Agent #
POST /agents/{name}/clone Clone Agent #
GET /agents/{name}/export Export Agent #
GET /agents/{name}/alias Get Agent Alias #
PUT /agents/{name}/alias Set Agent Alias #
GET /agents/{name}/revisions List Agent Revisions #
POST /agents/{name}/revisions/{rev_id}/restore Restore Agent Revision #
POST /agents/{name}/shares Create Agent Share #
GET /agents/{name}/shares List Agent Shares #
PATCH /agents/{name}/shares/{token} Update Agent Share #
DELETE /agents/{name}/shares/{token} Revoke Agent Share #
POST /agents/{name}/shares/{token}/secret Rotate Share Secret #
GET /agents/{name}/pwa Get Agent Pwa #
PATCH /agents/{name}/pwa Patch Agent Pwa #
POST /agents/{name}/pwa/icon Upload Agent Pwa Icon #
DELETE /agents/{name}/pwa/icon Clear Agent Pwa Icon #
POST /agents/{name}/test-trigger Test Trigger #
POST /agents/{name}/test-planner-trigger Test Planner Trigger #
POST /agents/{name}/preview-plan Preview Plan #
POST /assist/improve-prompt Improve Prompt Endpoint #
POST /assist/diagnose-prompt Diagnose Prompt Endpoint #
GET /skills List Tenant Skills #
GET /skills/{name} Get Skill #
POST /skills/{name} Create Skill #
PUT /skills/{name} Update Skill #
PATCH /skills/{name} Patch Skill #
DELETE /skills/{name} Remove Skill #
GET /skills/{name}/revisions List Skill Revisions #
POST /skills/{name}/revisions/{rev_id}/restore Restore Skill Revision #
GET /writing-types List Types #
GET /writing-types/{name} Get Type #
POST /writing-types/{name} Create Type #
PUT /writing-types/{name} Replace Type #
PATCH /writing-types/{name} Patch Type #
DELETE /writing-types/{name} Delete Type #
POST /writing-types/{name}/publish Publish Type #
GET /writing-types/{name}/revisions List Revisions #
GET /storylines List Storylines #
POST /storylines Create Storyline #
GET /storylines/feature Storyline Feature #
GET /storylines/{storyline_id} Get Storyline #
PUT /storylines/{storyline_id} Update Storyline #
DELETE /storylines/{storyline_id} Delete Storyline #
POST /storylines/{storyline_id}/clone Clone Storyline #
GET /storylines/{storyline_id}/export Export Storyline #
POST /storylines/import Import Storyline #
POST /storylines/{storyline_id}/validate Validate Storyline #
POST /storylines/{storyline_id}/publish Publish Storyline #
POST /storylines/{storyline_id}/unpublish Unpublish Storyline #
GET /storylines/{storyline_id}/revisions List Revisions #
GET /storylines/{storyline_id}/enrollments List Enrollments #
GET /storylines/{storyline_id}/funnel Storyline Funnel #
POST /storylines/{storyline_id}/enrollments/migrate Migrate Enrollments #
POST /storyline/callback Storyline Callback #
GET /knowledge-bases List Tenant Kbs #
GET /knowledge-bases/{name} Get Tenant Kb #
POST /knowledge-bases/{name} Create Kb #
PUT /knowledge-bases/{name} Update Kb #
PATCH /knowledge-bases/{name} Patch Kb #
DELETE /knowledge-bases/{name} Remove Kb #
POST /knowledge-bases/{name}/documents/inspect Inspect Upload #
POST /knowledge-bases/{name}/purge Purge Kb #
GET /knowledge-bases/{name}/documents List Documents #
POST /knowledge-bases/{name}/documents Add Text Document #
POST /knowledge-bases/{name}/documents/upload Upload Kb Document #
POST /knowledge-bases/{name}/documents/upload/stream Upload Kb Archive Stream #
PATCH /knowledge-bases/{name}/documents/{doc_id}/tags Set Kb Document Tags #
DELETE /knowledge-bases/{name}/documents/{doc_id} Remove Kb Document #
POST /knowledge-bases/{name}/search Search Kb #
GET /knowledge-bases/{name}/documents/{doc_id}/chunks List Document Chunks #
GET /knowledge-bases/{name}/chunks/{chunk_id} Get Kb Chunk #
PATCH /knowledge-bases/{name}/chunks/{chunk_id} Edit Kb Chunk #
POST /knowledge-bases/{name}/chunks/search Search Kb Chunks #
POST /knowledge-bases/{name}/index/build Build Kb Index #
GET /knowledge-bases/{name}/index Get Kb Index #
POST /knowledge-bases/{name}/index/schema Patch Kb Index Schema #
POST /images Upload Image #
GET /knowledge-bases/{name}/products Get Products #
POST /knowledge-bases/{name}/products Create Product #
PUT /knowledge-bases/{name}/products/{product_id} Update Product #
DELETE /knowledge-bases/{name}/products/{product_id} Remove Product #
POST /knowledge-bases/{name}/products/import Import Feed #
GET /manage/sessions/{sid}/attachments Session Attachments #
GET /manage/attachments/{aid} Attachment Blob #
POST /console/login Login #
GET /console/me Me #
POST /console/change-password Change Password #
GET /console/prefs Get Prefs #
PUT /console/prefs Put Prefs #
GET /console/oidc/start Oidc Start #
GET /console/oidc/callback Oidc Callback #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/agent4-io:chatagent-platform-api-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

agent4-io-api-openapi.json Raw ↑
{"openapi":"3.1.0","info":{"title":"chatagent-platform","summary":"通用跨行业多租户 RAG 聊天智能体平台","description":"多租户 RAG 聊天智能体平台。鉴权分层:`X-Admin-Token`(平台)、`X-API-Key`(租户)、`X-End-User`(代理终端用户)、`Authorization: Bearer <jwt>`(平台登录终端用户)、`X-Act-Tenant`(admin 以租户身份)、可选 `X-Space-Id`。详见管理端「API 文档」页。","version":"0.1.0"},"paths":{"/internal/tls-allow":{"get":{"tags":["custom-domains"],"summary":"Tls Allow","description":"Caddy on_demand_tls 的 `ask`:200 = 给这个域名签证书,404 = 拒绝握手。\n\n没有它,任何人把域名解析过来我们就免费替他签证书并托管 —— 等于给陌生人跑 CDN。\n\n**只服务 Caddy 自己的进程内请求**。Caddy 与 app 同机(host network),它的 ask 子请求\n直连 127.0.0.1 且**不带** X-Forwarded-For;被它反代进来的公网请求同样来自 127.0.0.1,\n但一定带 X-Forwarded-For —— 这个头的有无就是内外的分界线。光看来源 IP 分不出这两者。","operationId":"tls_allow_internal_tls_allow_get","parameters":[{"name":"domain","in":"query","required":false,"schema":{"type":"string","default":"","title":"Domain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tenant/custom-domain/feature":{"get":{"tags":["custom-domain"],"summary":"Custom Domain Feature","description":"控制台入口预检:未开通且未绑定时,租户 Settings 隐藏整张绑定卡片(2026-08-01 用户定案,\n取代旧的\"显示升级提示\"策略)。已绑定的即使关了开关也要显示——降级不下线,得能看/能解绑。","operationId":"custom_domain_feature_tenant_custom_domain_feature_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Custom Domain Feature Tenant Custom Domain Feature Get"}}}}}}},"/tenant/custom-domain":{"get":{"tags":["custom-domain"],"summary":"Get Custom Domain","operationId":"get_custom_domain_tenant_custom_domain_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CustomDomainOut"},{"type":"null"}],"title":"Response Get Custom Domain Tenant Custom Domain Get"}}}}}},"put":{"tags":["custom-domain"],"summary":"Set Custom Domain","operationId":"set_custom_domain_tenant_custom_domain_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["custom-domain"],"summary":"Delete Custom Domain","operationId":"delete_custom_domain_tenant_custom_domain_delete","responses":{"204":{"description":"Successful Response"}}}},"/tenant/custom-domain/check":{"post":{"tags":["custom-domain"],"summary":"Check Custom Domain","operationId":"check_custom_domain_tenant_custom_domain_check_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainOut"}}}}}}},"/health":{"get":{"tags":["health"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Health Get"}}}}}}},"/readyz":{"get":{"tags":["health"],"summary":"Readyz","operationId":"readyz_readyz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"tags":["meta"],"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Root  Get"}}}}}}},"/auth/methods":{"get":{"tags":["end-user-auth"],"summary":"Auth Methods","description":"登录页据此决定显示哪些登录方式:只有租户实际启用/配置的才显示。\n\n公开端点(tenant_id 是公开标识)。auth_mode=proxy 的租户没有平台原生登录,\npassword/oauth 都为空。社交按钮只列该租户有有效凭证的 provider(见 oauth.available_providers)。","operationId":"auth_methods_auth_methods_get","parameters":[{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthMethodsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/register":{"post":{"tags":["end-user-auth"],"summary":"Register","operationId":"register_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/verify":{"get":{"tags":["end-user-auth"],"summary":"Verify Email","operationId":"verify_email_auth_verify_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/resend-verification":{"post":{"tags":["end-user-auth"],"summary":"Resend Verification","operationId":"resend_verification_auth_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__auth_end_user__EmailIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Resend Verification Auth Resend Verification Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/forgot-password":{"post":{"tags":["end-user-auth"],"summary":"Forgot Password","operationId":"forgot_password_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__auth_end_user__EmailIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Forgot Password Auth Forgot Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/reset-password":{"post":{"tags":["end-user-auth"],"summary":"Reset Password","operationId":"reset_password_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Reset Password Auth Reset Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/oauth/{provider}/start":{"get":{"tags":["end-user-auth"],"summary":"Oauth Start","operationId":"oauth_start_auth_oauth__provider__start_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"tenant_id","in":"query","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"redirect","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/oauth/{provider}/callback":{"get":{"tags":["end-user-auth"],"summary":"Oauth Callback","operationId":"oauth_callback_auth_oauth__provider__callback_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"tags":["end-user-auth"],"summary":"Login","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__auth_end_user__LoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/stream":{"get":{"tags":["auth","auth"],"summary":"Me Stream","description":"常驻 SSE 通道:服务端把本 (user, space) 的主动推送(如到点的延后跟进)实时下发给网页。\n\n前端用 fetch 读取器带 bearer/X-Space-Id 打开(EventSource 不能带 header)。按配置周期性 ping 保活。","operationId":"me_stream_me_stream_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/me/reminders":{"post":{"tags":["auth","auth"],"summary":"Create My Reminder","description":"**手动**建一条提醒。\n\n在这之前,提醒只能由模型调 `schedule_reminder` 建出来——用户想自己加一条,界面上没有任何\n地方可点。而\"我知道我要什么,让我直接填\"是一条**确定性**的路:不经自然语言解析,\n填错了当场就有话说,不会变成一个永远不触发的东西。\n\n规则(时区怎么解释、上限、什么算过去)与工具那条路**共用同一份**\n(`app/push/reminders.py`)——抄一遍的话,两处错开的那天不会有任何报错。","operationId":"create_my_reminder_me_reminders_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewReminderIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyReminderOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["auth","auth"],"summary":"My Reminders","description":"本用户的定时提醒/闹钟(游标分页,最近创建在前;正文不返回)。","operationId":"my_reminders_me_reminders_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyReminderPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/reminders/{rid}/cancel":{"post":{"tags":["auth","auth"],"summary":"Cancel My Reminder","description":"取消本人一个待触发(pending)提醒(保留记录,置为已取消)。","operationId":"cancel_my_reminder_me_reminders__rid__cancel_post","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/reminders/{rid}":{"delete":{"tags":["auth","auth"],"summary":"Delete My Reminder","description":"彻底删除本人一个提醒(任意状态,从列表移除)。","operationId":"delete_my_reminder_me_reminders__rid__delete","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me":{"get":{"tags":["auth","auth"],"summary":"Me","operationId":"me_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Me Me Get"}}}}}}},"/me/features":{"get":{"tags":["auth","auth"],"summary":"My Features","description":"客户端能力探测:目前只有 stt(是否可用语音输入 = 存在启用的 stt 后端)。","operationId":"my_features_me_features_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Response My Features Me Features Get"}}}}}}},"/me/remembered":{"get":{"tags":["auth","auth"],"summary":"My Remembered","description":"看 Agent 记住了我什么。\n\nGDPR 第 15 条(访问权)。注册前的匿名咨询也会以要点摘要的形式结转到这里\n(见 app/chat/handoff.py),用户理应看得到。","operationId":"my_remembered_me_remembered_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MyRememberedOut"},"type":"array","title":"Response My Remembered Me Remembered Get"}}}}}}},"/me/remembered/{agent_name}":{"delete":{"tags":["auth","auth"],"summary":"Forget Me","description":"让 Agent 忘掉关于我的画像。\n\nGDPR 第 17 条(删除权)。**只删画像,不动会话记录**——那是两件事,用户想清掉「你记住的\n我是谁」时,通常并不是要销毁自己的历史对话;会话另有删除入口。","operationId":"forget_me_me_remembered__agent_name__delete","parameters":[{"name":"agent_name","in":"path","required":true,"schema":{"type":"string","title":"Agent Name"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/profile":{"get":{"tags":["auth","auth"],"summary":"My Profile","description":"本用户的称呼/联系方式/城市/时区偏好;附上按当前 IP 检测到的建议值(best-effort)。","operationId":"my_profile_me_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyProfileOut"}}}}}},"patch":{"tags":["auth","auth"],"summary":"Update My Profile","description":"设置称呼/联系方式/城市/时区;空串或 null 清空。邮箱/电话字段级加密存。","operationId":"update_my_profile_me_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyProfileIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/agents":{"get":{"tags":["auth","auth"],"summary":"My Available Agents","description":"本租户已发布的 agent(可加入空间对话的候选)。","operationId":"my_available_agents_me_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response My Available Agents Me Agents Get"}}}}}}},"/me/spaces":{"get":{"tags":["auth","auth"],"summary":"My Spaces","operationId":"my_spaces_me_spaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MySpaceOut"},"type":"array","title":"Response My Spaces Me Spaces Get"}}}}}},"post":{"tags":["auth","auth"],"summary":"Create My Space","operationId":"create_my_space_me_spaces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MySpaceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/spaces/{sid}":{"patch":{"tags":["auth","auth"],"summary":"Rename My Space","operationId":"rename_my_space_me_spaces__sid__patch","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MySpaceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["auth","auth"],"summary":"Delete My Space","operationId":"delete_my_space_me_spaces__sid__delete","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/spaces/{sid}/merge":{"post":{"tags":["auth","auth"],"summary":"Merge My Space","description":"把 sid 空间下的所有数据迁入 target 空间后删除 sid。\n\n内容按 (user, space) 字段级加密(space_id 参与 AAD),迁移需**逐条重加密**到目标空间的 space_id。\n整个操作在一个事务内;任一步失败则回滚,不会损坏数据。","operationId":"merge_my_space_me_spaces__sid__merge_post","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceMergeIn"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/spaces/{sid}/agents":{"post":{"tags":["auth","auth"],"summary":"Add My Space Agent","operationId":"add_my_space_agent_me_spaces__sid__agents_post","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceAgentIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Add My Space Agent Me Spaces  Sid  Agents Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/spaces/{sid}/agents/{name}":{"delete":{"tags":["auth","auth"],"summary":"Remove My Space Agent","operationId":"remove_my_space_agent_me_spaces__sid__agents__name__delete","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/spaces/{sid}/sessions":{"get":{"tags":["auth","auth"],"summary":"My Space Sessions","description":"本用户在某空间的会话列表(最新在前,游标分页——历史很长时懒加载)。","operationId":"my_space_sessions_me_spaces__sid__sessions_get","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MySessionPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/spaces/{sid}/sessions/search":{"get":{"tags":["auth","auth"],"summary":"My Search Sessions","description":"检索本用户在该空间的历史会话。核心与分享页同一实现(app/chat/session_search.py):\n语义走标题向量,关键词查询时解密——隐私模式租户只有关键词层。","operationId":"my_search_sessions_me_spaces__sid__sessions_search_get","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MySessionSearchHit"},"title":"Response My Search Sessions Me Spaces  Sid  Sessions Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/sessions/{sid}":{"patch":{"tags":["auth","auth"],"summary":"Rename My Session","description":"用户手动重命名会话;置 title_by_user=True 后 AI 不再自动覆盖(见 docs/18)。","operationId":"rename_my_session_me_sessions__sid__patch","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTitleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MySessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["auth","auth"],"summary":"Delete My Session","description":"删除本用户的一个会话(级联清其消息与附件)。","operationId":"delete_my_session_me_sessions__sid__delete","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/sessions/{sid}/read":{"post":{"tags":["auth","auth"],"summary":"Mark My Session Read","description":"把这条会话标成**读到此刻为止**(2026-08-20)。\n\n落到服务端,所以换一台设备也算数——这正是主人问的那件事:在这之前挂件把它放在\nlocalStorage、网页版只放在内存里,同一条会话在手机上是已读、在电脑上还是未读。\n\n**不收前端传来的数字。** 客户端说\"我读到第 12 条\"是没法验证的,而它一旦说大了,\n真正的新消息就被永久地标成已读、再也不会提醒。这里自己数一次当前条数——\n\"打开即读完\"是这个动作**唯一**的语义。\n\n幂等:读过再读一次,写进去的还是同一个数。","operationId":"mark_my_session_read_me_sessions__sid__read_post","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MySessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/sessions/{sid}/messages/{mid}":{"delete":{"tags":["auth","auth"],"summary":"Delete My Message","description":"删除本用户某会话里的单条消息(避免不必要的上下文污染)。","operationId":"delete_my_message_me_sessions__sid__messages__mid__delete","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}},{"name":"mid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["auth","auth"],"summary":"Edit My Message","description":"编辑本用户某条消息的正文(重新加密存储)。若编辑的是用户消息,后台按新内容重提取派生记忆。","operationId":"edit_my_message_me_sessions__sid__messages__mid__patch","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}},{"name":"mid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageEditIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyMessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/sessions/{sid}/messages/{mid}/branch":{"post":{"tags":["auth","auth"],"summary":"Branch My Session","description":"从某条消息处分叉。\n\n**含不含被点的那一条,取决于它是谁说的**(见 `branch_session`):助手那条含,用户那条\n不含——后者的意思是\"这个问题换个问法\",原文由 `prefill` 带回去填进输入框。","operationId":"branch_my_session_me_sessions__sid__messages__mid__branch_post","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}},{"name":"mid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mid"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MySessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/sessions/{sid}/messages":{"get":{"tags":["auth","auth"],"summary":"My Session Messages","description":"本用户某会话的消息(时序,解密自己的内容)。","operationId":"my_session_messages_me_sessions__sid__messages_get","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MyMessageOut"},"title":"Response My Session Messages Me Sessions  Sid  Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/sessions/{sid}/attachments":{"get":{"tags":["auth","auth"],"summary":"My Session Attachments","description":"本用户某会话的图片附件(时序,仅元信息;原图经 /me/attachments/{id} 解密取回)。","operationId":"my_session_attachments_me_sessions__sid__attachments_get","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MyAttachmentOut"},"title":"Response My Session Attachments Me Sessions  Sid  Attachments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/attachments/{aid}":{"get":{"tags":["auth","auth"],"summary":"My Attachment Blob","description":"解密并回传本用户的附件原图(按 owner 校验)。","operationId":"my_attachment_blob_me_attachments__aid__get","parameters":[{"name":"aid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Aid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/telegram/bind-code":{"post":{"tags":["auth","auth"],"summary":"Create Tg Bind Code","description":"为当前登录用户签发一次性绑定码 + 二维码深链,用于扫码把 Telegram 关联到本账号。","operationId":"create_tg_bind_code_me_telegram_bind_code_post","parameters":[{"name":"agent","in":"query","required":true,"schema":{"type":"string","title":"Agent"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TgBindOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/telegram/status":{"get":{"tags":["auth","auth"],"summary":"Tg Status","operationId":"tg_status_me_telegram_status_get","parameters":[{"name":"agent","in":"query","required":true,"schema":{"type":"string","title":"Agent"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TgStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/telegram/binding":{"delete":{"tags":["auth","auth"],"summary":"Tg Unbind","description":"解绑:删除指向本账号的 Telegram 身份(对方下次发消息会回落为匿名 telegram:<id>)。","operationId":"tg_unbind_me_telegram_binding_delete","responses":{"204":{"description":"Successful Response"}}}},"/me/whatsapp/bind-code":{"post":{"tags":["auth","auth"],"summary":"Create Wa Bind Code","operationId":"create_wa_bind_code_me_whatsapp_bind_code_post","parameters":[{"name":"agent","in":"query","required":true,"schema":{"type":"string","title":"Agent"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaBindOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/whatsapp/status":{"get":{"tags":["auth","auth"],"summary":"Wa Bind Status","operationId":"wa_bind_status_me_whatsapp_status_get","parameters":[{"name":"agent","in":"query","required":true,"schema":{"type":"string","title":"Agent"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaBindStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/whatsapp/binding":

# --- truncated at 32 KB (463 KB total) ---
# Full source: https://artifacts.apis.io/agent4-io/openapi/_original/agent4-io-api-openapi.json