ONLYOFFICE DocSpace AI API
The browsable version of this reference, with a request builder and code samples, is published at https://api.onlyoffice.com/docspace/api-backend/usage-api/.
All URIs are relative to https://yourportal.onlyoffice.com, where the host is the address of your DocSpace instance.
AI
| Method | HTTP request | Description |
|---|---|---|
| aiApproveToolCall | POST /api/2.0/ai/ai/approve-tool-call | Approve tool call |
| aiDenyToolCall | POST /api/2.0/ai/ai/deny-tool-call | Deny tool call |
| aiRegenerateStream | POST /api/2.0/ai/ai/regenerate-stream | Regenerate stream |
| aiSend | POST /api/2.0/ai/ai/send | Run an AI action |
| aiSendCustom | POST /api/2.0/ai/ai/send-custom | Send custom |
| aiSendWithStream | POST /api/2.0/ai/ai/send-with-stream | Send with stream |
| aiSendWithStreamOpenAI | POST /api/2.0/ai/ai/send-with-stream-openai | Stream a chat in OpenAI format |
Agents
| Method | HTTP request | Description |
|---|---|---|
| aiAgentsCreate | POST /api/2.0/ai/agents | Create an agent |
| aiAgentsDelete | DELETE /api/2.0/ai/agents/{id} | Delete an agent |
| aiAgentsGet | GET /api/2.0/ai/agents/{id} | Get an agent |
| aiAgentsList | GET /api/2.0/ai/agents | List agents |
| aiAgentsNews | GET /api/2.0/ai/agents/news | List agent news items |
| aiAgentsResetQuota | PUT /api/2.0/ai/agents/resetquota | Reset agents' quota |
| aiAgentsUpdate | PUT /api/2.0/ai/agents/{id} | Update an agent |
| aiAgentsUpdateQuota | PUT /api/2.0/ai/agents/agentquota | Update agents' quota |
Assignments
| Method | HTTP request | Description |
|---|---|---|
| aiAssignmentsAssign | PUT /api/2.0/ai/assignments/assign | Bind a profile to an action |
| aiAssignmentsBulkAssign | PUT /api/2.0/ai/assignments/bulk-assign | Bulk assign |
| aiAssignmentsCascadeProfileDelete | DELETE /api/2.0/ai/assignments/cascade-profile-delete | Cascade profile delete |
| aiAssignmentsGetAllAssignments | GET /api/2.0/ai/assignments/get-all-assignments | Get all assignments |
| aiAssignmentsGetAssignment | GET /api/2.0/ai/assignments/get-assignment | Get assignment |
| aiAssignmentsResolveForAction | GET /api/2.0/ai/assignments/resolve-for-action | Resolve for action |
| aiAssignmentsTryResolveForAction | GET /api/2.0/ai/assignments/try-resolve-for-action | Try resolve for action |
| aiAssignmentsUnassign | DELETE /api/2.0/ai/assignments/unassign | Clear an action's profile |
Attachments
| Method | HTTP request | Description |
|---|---|---|
| aiAttachmentsDelete | DELETE /api/2.0/ai/attachments/delete | Delete one attachment |
| aiAttachmentsDeleteMany | DELETE /api/2.0/ai/attachments/delete-many | Delete many |
| aiAttachmentsGet | POST /api/2.0/ai/attachments/get | Get one attachment |
| aiAttachmentsGetMany | POST /api/2.0/ai/attachments/get-many | Get many |
| aiAttachmentsGetSuggestedQuestions | POST /api/2.0/ai/attachments/suggested-questions | Get suggested questions |
| aiAttachmentsLinkToMessage | POST /api/2.0/ai/attachments/link-to-message | Link to message |
| aiAttachmentsSaveFile | POST /api/2.0/ai/attachments/save-file | Save file |
| aiAttachmentsSaveFilesMany | POST /api/2.0/ai/attachments/save-files-many | Save files many |
Context
| Method | HTTP request | Description |
|---|---|---|
| aiContextGetContextFolders | GET /api/2.0/ai/context/get-context-folders | Get context folders |
| aiContextGetRoomSkill | GET /api/2.0/ai/context/get-room-skill | Get room skill |
| aiContextGetRoomSkills | GET /api/2.0/ai/context/get-room-skills | Get room skills |
Editor tools
| Method | HTTP request | Description |
|---|---|---|
| aiEditorToolsCall | POST /api/2.0/ai/editor-tools/call | Call an editor tool |
| aiEditorToolsList | GET /api/2.0/ai/editor-tools/list | List editor tools |
Export
| Method | HTTP request | Description |
|---|---|---|
| aiExportTextToDocx | POST /api/2.0/ai/text-to-docx | Start markdown export |
OpenAI passthrough
| Method | HTTP request | Description |
|---|---|---|
| aiOpenaiChatCompletions | POST /api/2.0/ai/openai/{profileId}/v1/chat/completions | OpenAI chat completions passthrough |
| aiOpenaiImagesGenerations | POST /api/2.0/ai/openai/{profileId}/v1/images/generations | OpenAI image generation passthrough |
Preferences
| Method | HTTP request | Description |
|---|---|---|
| aiPreferencesClearDeepMode | DELETE /api/2.0/ai/preferences/clear-deep-mode | Clear deep mode |
| aiPreferencesGetDeepMode | GET /api/2.0/ai/preferences/get-deep-mode | Get deep mode |
| aiPreferencesGetReasoningLevel | GET /api/2.0/ai/preferences/get-reasoning-level | Get reasoning level |
| aiPreferencesGetToolPermissionMode | GET /api/2.0/ai/preferences/get-tool-permission-mode | Get tool permission mode |
| aiPreferencesIsDeepModeSet | GET /api/2.0/ai/preferences/is-deep-mode-set | Is deep mode set |
| aiPreferencesSetDeepMode | PUT /api/2.0/ai/preferences/set-deep-mode | Set deep mode |
| aiPreferencesSetReasoningLevel | PUT /api/2.0/ai/preferences/set-reasoning-level | Set reasoning level |
| aiPreferencesSetToolPermissionMode | PUT /api/2.0/ai/preferences/set-tool-permission-mode | Set tool permission mode |
Profiles
| Method | HTTP request | Description |
|---|---|---|
| aiProfilesCreate | POST /api/2.0/ai/profiles/create | Create a provider profile |
| aiProfilesDelete | DELETE /api/2.0/ai/profiles/delete | Delete a provider profile |
| aiProfilesGetById | GET /api/2.0/ai/profiles/get-by-id | Get a provider profile |
| aiProfilesList | GET /api/2.0/ai/profiles/list | List provider profiles |
| aiProfilesListModels | GET /api/2.0/ai/profiles/list-models | List models |
| aiProfilesListProviderModels | POST /api/2.0/ai/profiles/list-provider-models | List provider models |
| aiProfilesTestConnection | POST /api/2.0/ai/profiles/test-connection | Test a profile's provider |
| aiProfilesUpdate | PUT /api/2.0/ai/profiles/update | Update a provider profile |
Prompts
| Method | HTTP request | Description |
|---|---|---|
| aiPromptsCreate | POST /api/2.0/ai/prompts/create | Save a prompt |
| aiPromptsCreateFolder | POST /api/2.0/ai/prompts/create-folder | Create folder |
| aiPromptsDelete | DELETE /api/2.0/ai/prompts/delete | Delete a saved prompt |
| aiPromptsDeleteFolder | DELETE /api/2.0/ai/prompts/delete-folder | Delete folder |
| aiPromptsExport | GET /api/2.0/ai/prompts/export | Export the prompt library |
| aiPromptsGetById | GET /api/2.0/ai/prompts/get-by-id | Get a saved prompt |
| aiPromptsGetFolderById | GET /api/2.0/ai/prompts/get-folder-by-id | Get a prompt folder |
| aiPromptsImportBundle | POST /api/2.0/ai/prompts/import-bundle | Import bundle |
| aiPromptsList | GET /api/2.0/ai/prompts/list | List saved prompts |
| aiPromptsListFolders | GET /api/2.0/ai/prompts/list-folders | List folders |
| aiPromptsMove | PUT /api/2.0/ai/prompts/move | Move a prompt to a folder |
| aiPromptsRenameFolder | PUT /api/2.0/ai/prompts/rename-folder | Rename folder |
| aiPromptsUpdate | PUT /api/2.0/ai/prompts/update | Update a saved prompt |
Settings
| Method | HTTP request | Description |
|---|---|---|
| aiSettingsGet | GET /api/2.0/ai/config | Get AI settings |
| aiSettingsGetToolMode | GET /api/2.0/ai/config/tool-mode | Get the tool permission mode |
| aiSettingsGetUser | GET /api/2.0/ai/config/user | Get user AI settings |
| aiSettingsGetVectorization | GET /api/2.0/ai/config/vectorization | Get vectorization settings |
| aiSettingsSetToolMode | PUT /api/2.0/ai/config/tool-mode | Set the tool permission mode |
| aiSettingsSetUser | PUT /api/2.0/ai/config/user | Update user AI settings |
| aiSettingsSetVectorization | PUT /api/2.0/ai/config/vectorization | Update vectorization settings |
Threads
| Method | HTTP request | Description |
|---|---|---|
| aiThreadsAppendUserMessage | POST /api/2.0/ai/threads/append-user-message | Append user message |
| aiThreadsClearMessages | DELETE /api/2.0/ai/threads/clear-messages | Clear messages |
| aiThreadsCreate | POST /api/2.0/ai/threads/create | Create a chat thread |
| aiThreadsDelete | DELETE /api/2.0/ai/threads/delete | Delete a chat thread |
| aiThreadsDeleteMessage | DELETE /api/2.0/ai/threads/delete-message | Delete message |
| aiThreadsGetById | GET /api/2.0/ai/threads/get-by-id | Get a chat thread |
| aiThreadsGetMessageById | GET /api/2.0/ai/threads/get-message-by-id | Get one chat message |
| aiThreadsList | GET /api/2.0/ai/threads/list | List chat threads |
| aiThreadsOpenOrCreate | POST /api/2.0/ai/threads/open-or-create | Open or create |
| aiThreadsReadMessages | GET /api/2.0/ai/threads/read-messages | Read messages |
| aiThreadsRegenerateTitle | POST /api/2.0/ai/threads/regenerate-title | Regenerate title |
| aiThreadsRename | PUT /api/2.0/ai/threads/rename | Rename a chat thread |
| aiThreadsTouch | POST /api/2.0/ai/threads/touch | Bump a thread's activity |
| aiThreadsUpdateMessage | PUT /api/2.0/ai/threads/update-message | Update message |
Tools
| Method | HTTP request | Description |
|---|---|---|
| aiToolsAddCustomServer | POST /api/2.0/ai/tools/add-custom-server | Add custom server |
| aiToolsGetAllowAlways | GET /api/2.0/ai/tools/get-allow-always | Get allow always |
| aiToolsGetCustomServer | GET /api/2.0/ai/tools/get-custom-server | Get custom server |
| aiToolsGetDisabled | GET /api/2.0/ai/tools/get-disabled | Get disabled |
| aiToolsIsAllowAlways | GET /api/2.0/ai/tools/is-allow-always | Is allow always |
| aiToolsIsToolDisabled | GET /api/2.0/ai/tools/is-tool-disabled | Is tool disabled |
| aiToolsListCustomServers | GET /api/2.0/ai/tools/list-custom-servers | List custom servers |
| aiToolsListSystemTools | GET /api/2.0/ai/tools/list-system-tools | List system tools |
| aiToolsRemoveCustomServer | DELETE /api/2.0/ai/tools/remove-custom-server | Remove custom server |
| aiToolsReplaceAllCustomServers | PUT /api/2.0/ai/tools/replace-all-custom-servers | Replace all custom servers |
| aiToolsSetAllowAlways | PUT /api/2.0/ai/tools/set-allow-always | Set allow always |
| aiToolsSetDisabled | PUT /api/2.0/ai/tools/set-disabled | Set disabled |
| aiToolsUpdateCustomServer | PUT /api/2.0/ai/tools/update-custom-server | Update custom server |
Vectorization
| Method | HTTP request | Description |
|---|---|---|
| aiVectorizationStartTask | POST /api/2.0/ai/vectorization/tasks | Start a vectorization task |
Web search
| Method | HTTP request | Description |
|---|---|---|
| aiWebSearchClear | DELETE /api/2.0/ai/web-search/clear | Clear the web-search configuration |
| aiWebSearchConfigure | PUT /api/2.0/ai/web-search/configure | Configure and verify web search |
| aiWebSearchGetActiveConfig | GET /api/2.0/ai/web-search/get-active-config | Get active config |
| aiWebSearchIsConfigured | GET /api/2.0/ai/web-search/is-configured | Is configured |
| aiWebSearchPassthroughContents | POST /api/2.0/ai/websearch/v1/contents | Web page contents passthrough |
| aiWebSearchPassthroughSearch | POST /api/2.0/ai/websearch/v1/search | Web search passthrough |
| aiWebSearchSetActiveConfig | PUT /api/2.0/ai/web-search/set-active-config | Set active config |
| aiWebSearchTestConnection | POST /api/2.0/ai/web-search/test-connection | Test a web-search provider |
Authorization
cookieAuth
- Type: API key
- API key parameter name: asc_auth_key
- Location:
bearerAuth
- Type: HTTP Bearer Token authentication
asc_auth_key
- Type: API key
- API key parameter name: asc_auth_key
- Location:
Basic
- Type: HTTP basic authentication
Bearer
- Type: HTTP Bearer Token authentication (JWT)
ApiKeyBearer
- Type: API key
- API key parameter name: ApiKeyBearer
- Location: HTTP header
OAuth2
- Type: OAuth
- Flow: accessCode
- Authorization URL:
- Scopes:
- read: Read access to protected resources
- write: Write access to protected resources
OpenId
x-signature
- Type: API key
- API key parameter name: x-signature
- Location: