跳到主要内容

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.

Endpoints​

ClassMethodHTTP requestDescription
AIAIApiaiAiApproveToolCallPOST /api/2.0/ai/ai/approve-tool-callApprove tool call
AIAIApiaiAiDenyToolCallPOST /api/2.0/ai/ai/deny-tool-callDeny tool call
AIAIApiaiAiRegenerateStreamPOST /api/2.0/ai/ai/regenerate-streamRegenerate stream
AIAIApiaiAiSendPOST /api/2.0/ai/ai/sendRun an AI action
AIAIApiaiAiSendCustomPOST /api/2.0/ai/ai/send-customSend custom
AIAIApiaiAiSendWithStreamPOST /api/2.0/ai/ai/send-with-streamSend with stream
AIAIApiaiAiSendWithStreamOpenAIPOST /api/2.0/ai/ai/send-with-stream-openaiStream a chat in OpenAI format
AIAgentsApiaiAgentsCreatePOST /api/2.0/ai/agentsCreate an agent
AIAgentsApiaiAgentsDeleteDELETE /api/2.0/ai/agents/{id}Delete an agent
AIAgentsApiaiAgentsGetGET /api/2.0/ai/agents/{id}Get an agent
AIAgentsApiaiAgentsListGET /api/2.0/ai/agentsList agents
AIAgentsApiaiAgentsNewsGET /api/2.0/ai/agents/newsList agent news items
AIAgentsApiaiAgentsResetQuotaPUT /api/2.0/ai/agents/resetquotaReset agents' quota
AIAgentsApiaiAgentsUpdatePUT /api/2.0/ai/agents/{id}Update an agent
AIAgentsApiaiAgentsUpdateQuotaPUT /api/2.0/ai/agents/agentquotaUpdate agents' quota
AIAssignmentsApiaiAssignmentsAssignPUT /api/2.0/ai/assignments/assignBind a profile to an action
AIAssignmentsApiaiAssignmentsBulkAssignPUT /api/2.0/ai/assignments/bulk-assignBulk assign
AIAssignmentsApiaiAssignmentsCascadeProfileDeleteDELETE /api/2.0/ai/assignments/cascade-profile-deleteCascade profile delete
AIAssignmentsApiaiAssignmentsGetAllAssignmentsGET /api/2.0/ai/assignments/get-all-assignmentsGet all assignments
AIAssignmentsApiaiAssignmentsGetAssignmentGET /api/2.0/ai/assignments/get-assignmentGet assignment
AIAssignmentsApiaiAssignmentsResolveForActionGET /api/2.0/ai/assignments/resolve-for-actionResolve for action
AIAssignmentsApiaiAssignmentsTryResolveForActionGET /api/2.0/ai/assignments/try-resolve-for-actionTry resolve for action
AIAssignmentsApiaiAssignmentsUnassignDELETE /api/2.0/ai/assignments/unassignClear an action's profile
AIAttachmentsApiaiAttachmentsDeleteDELETE /api/2.0/ai/attachments/deleteDelete one attachment
AIAttachmentsApiaiAttachmentsDeleteManyDELETE /api/2.0/ai/attachments/delete-manyDelete many
AIAttachmentsApiaiAttachmentsGetPOST /api/2.0/ai/attachments/getGet one attachment
AIAttachmentsApiaiAttachmentsGetManyPOST /api/2.0/ai/attachments/get-manyGet many
AIAttachmentsApiaiAttachmentsLinkToMessagePOST /api/2.0/ai/attachments/link-to-messageLink to message
AIAttachmentsApiaiAttachmentsSaveFilePOST /api/2.0/ai/attachments/save-fileSave file
AIAttachmentsApiaiAttachmentsSaveFilesManyPOST /api/2.0/ai/attachments/save-files-manySave files many
AIEditorToolsApiaiEditorToolsCallPOST /api/2.0/ai/editor-tools/callCall an editor tool
AIEditorToolsApiaiEditorToolsListGET /api/2.0/ai/editor-tools/listList editor tools
AIExportApiaiExportTextToDocxPOST /api/2.0/ai/text-to-docxStart markdown → docx export
AIOpenAIPassthroughApiaiOpenaiChatCompletionsPOST /api/2.0/ai/openai/{profileId}/v1/chat/completionsOpenAI chat completions passthrough
AIOpenAIPassthroughApiaiOpenaiImagesGenerationsPOST /api/2.0/ai/openai/{profileId}/v1/images/generationsOpenAI image generation passthrough
AIPreferencesApiaiPreferencesClearDeepModeDELETE /api/2.0/ai/preferences/clear-deep-modeClear deep mode
AIPreferencesApiaiPreferencesGetDeepModeGET /api/2.0/ai/preferences/get-deep-modeGet deep mode
AIPreferencesApiaiPreferencesGetReasoningLevelGET /api/2.0/ai/preferences/get-reasoning-levelGet reasoning level
AIPreferencesApiaiPreferencesIsDeepModeSetGET /api/2.0/ai/preferences/is-deep-mode-setIs deep mode set
AIPreferencesApiaiPreferencesSetDeepModePUT /api/2.0/ai/preferences/set-deep-modeSet deep mode
AIPreferencesApiaiPreferencesSetReasoningLevelPUT /api/2.0/ai/preferences/set-reasoning-levelSet reasoning level
AIProfilesApiaiProfilesCreatePOST /api/2.0/ai/profiles/createCreate a provider profile
AIProfilesApiaiProfilesDeleteDELETE /api/2.0/ai/profiles/deleteDelete a provider profile
AIProfilesApiaiProfilesGetByIdGET /api/2.0/ai/profiles/get-by-idGet a provider profile
AIProfilesApiaiProfilesListGET /api/2.0/ai/profiles/listList provider profiles
AIProfilesApiaiProfilesListModelsGET /api/2.0/ai/profiles/list-modelsList models
AIProfilesApiaiProfilesListProviderModelsPOST /api/2.0/ai/profiles/list-provider-modelsList provider models
AIProfilesApiaiProfilesTestConnectionPOST /api/2.0/ai/profiles/test-connectionTest a profile's provider
AIProfilesApiaiProfilesUpdatePUT /api/2.0/ai/profiles/updateUpdate a provider profile
AIPromptsApiaiPromptsCreatePOST /api/2.0/ai/prompts/createSave a prompt
AIPromptsApiaiPromptsCreateFolderPOST /api/2.0/ai/prompts/create-folderCreate folder
AIPromptsApiaiPromptsDeleteDELETE /api/2.0/ai/prompts/deleteDelete a saved prompt
AIPromptsApiaiPromptsDeleteFolderDELETE /api/2.0/ai/prompts/delete-folderDelete folder
AIPromptsApiaiPromptsExportGET /api/2.0/ai/prompts/exportExport the prompt library
AIPromptsApiaiPromptsGetByIdGET /api/2.0/ai/prompts/get-by-idGet a saved prompt
AIPromptsApiaiPromptsGetFolderByIdGET /api/2.0/ai/prompts/get-folder-by-idGet a prompt folder
AIPromptsApiaiPromptsImportBundlePOST /api/2.0/ai/prompts/import-bundleImport bundle
AIPromptsApiaiPromptsListGET /api/2.0/ai/prompts/listList saved prompts
AIPromptsApiaiPromptsListFoldersGET /api/2.0/ai/prompts/list-foldersList folders
AIPromptsApiaiPromptsMovePUT /api/2.0/ai/prompts/moveMove a prompt to a folder
AIPromptsApiaiPromptsRenameFolderPUT /api/2.0/ai/prompts/rename-folderRename folder
AIPromptsApiaiPromptsUpdatePUT /api/2.0/ai/prompts/updateUpdate a saved prompt
AISettingsApiaiSettingsGetGET /api/2.0/ai/configGet AI settings
AISettingsApiaiSettingsGetUserGET /api/2.0/ai/config/userGet user AI settings
AISettingsApiaiSettingsGetVectorizationGET /api/2.0/ai/config/vectorizationGet vectorization settings
AISettingsApiaiSettingsSetUserPUT /api/2.0/ai/config/userUpdate user AI settings
AISettingsApiaiSettingsSetVectorizationPUT /api/2.0/ai/config/vectorizationUpdate vectorization settings
AIThreadsApiaiThreadsAppendUserMessagePOST /api/2.0/ai/threads/append-user-messageAppend user message
AIThreadsApiaiThreadsClearMessagesDELETE /api/2.0/ai/threads/clear-messagesClear messages
AIThreadsApiaiThreadsCreatePOST /api/2.0/ai/threads/createCreate a chat thread
AIThreadsApiaiThreadsDeleteDELETE /api/2.0/ai/threads/deleteDelete a chat thread
AIThreadsApiaiThreadsDeleteMessageDELETE /api/2.0/ai/threads/delete-messageDelete message
AIThreadsApiaiThreadsGetByIdGET /api/2.0/ai/threads/get-by-idGet a chat thread
AIThreadsApiaiThreadsGetMessageByIdGET /api/2.0/ai/threads/get-message-by-idGet one chat message
AIThreadsApiaiThreadsListGET /api/2.0/ai/threads/listList chat threads
AIThreadsApiaiThreadsOpenOrCreatePOST /api/2.0/ai/threads/open-or-createOpen or create
AIThreadsApiaiThreadsReadMessagesGET /api/2.0/ai/threads/read-messagesRead messages
AIThreadsApiaiThreadsRegenerateTitlePOST /api/2.0/ai/threads/regenerate-titleRegenerate title
AIThreadsApiaiThreadsRenamePUT /api/2.0/ai/threads/renameRename a chat thread
AIThreadsApiaiThreadsTouchPOST /api/2.0/ai/threads/touchBump a thread's activity
AIThreadsApiaiThreadsUpdateMessagePUT /api/2.0/ai/threads/update-messageUpdate message
AIToolsApiaiToolsAddCustomServerPOST /api/2.0/ai/tools/add-custom-serverAdd custom server
AIToolsApiaiToolsGetAllowAlwaysGET /api/2.0/ai/tools/get-allow-alwaysGet allow always
AIToolsApiaiToolsGetCustomServerGET /api/2.0/ai/tools/get-custom-serverGet custom server
AIToolsApiaiToolsGetDisabledGET /api/2.0/ai/tools/get-disabledGet disabled
AIToolsApiaiToolsIsAllowAlwaysGET /api/2.0/ai/tools/is-allow-alwaysIs allow always
AIToolsApiaiToolsIsToolDisabledGET /api/2.0/ai/tools/is-tool-disabledIs tool disabled
AIToolsApiaiToolsListCustomServersGET /api/2.0/ai/tools/list-custom-serversList custom servers
AIToolsApiaiToolsListSystemToolsGET /api/2.0/ai/tools/list-system-toolsList system tools
AIToolsApiaiToolsRemoveCustomServerDELETE /api/2.0/ai/tools/remove-custom-serverRemove custom server
AIToolsApiaiToolsReplaceAllCustomServersPUT /api/2.0/ai/tools/replace-all-custom-serversReplace all custom servers
AIToolsApiaiToolsSetAllowAlwaysPUT /api/2.0/ai/tools/set-allow-alwaysSet allow always
AIToolsApiaiToolsSetDisabledPUT /api/2.0/ai/tools/set-disabledSet disabled
AIToolsApiaiToolsUpdateCustomServerPUT /api/2.0/ai/tools/update-custom-serverUpdate custom server
AIVectorizationApiaiVectorizationStartTaskPOST /api/2.0/ai/vectorization/tasksStart a vectorization task
AIWebSearchApiaiWebSearchClearDELETE /api/2.0/ai/web-search/clearClear the web-search configuration
AIWebSearchApiaiWebSearchConfigurePUT /api/2.0/ai/web-search/configureConfigure and verify web search
AIWebSearchApiaiWebSearchGetActiveConfigGET /api/2.0/ai/web-search/get-active-configGet active config
AIWebSearchApiaiWebSearchIsConfiguredGET /api/2.0/ai/web-search/is-configuredIs configured
AIWebSearchApiaiWebSearchPassthroughContentsPOST /api/2.0/ai/websearch/v1/contentsWeb page contents passthrough
AIWebSearchApiaiWebSearchPassthroughSearchPOST /api/2.0/ai/websearch/v1/searchWeb search passthrough
AIWebSearchApiaiWebSearchSetActiveConfigPUT /api/2.0/ai/web-search/set-active-configSet active config
AIWebSearchApiaiWebSearchTestConnectionPOST /api/2.0/ai/web-search/test-connectionTest a web-search provider

AIAIApi​

aiAiApproveToolCall​

AiChatEvent aiAiApproveToolCall(aiAiApproveToolCall_request)

POST /api/2.0/ai/ai/approve-tool-call

Approve tool call

Resumes a chat round that a tool call has paused, and streams the continuation as newline-delimited ChatEvent objects. The result supplied in the request is persisted onto the assistant message that issued the call, so the tool is not executed here - the caller runs it and reports the outcome. The round continues against the augmented history and may pause again on a further tool call. Call POST api/2.0/ai/ai/deny-tool-call instead to refuse the call and let the model answer without it.

Parameters​

NameInTypeDescriptionNotes
aiAiApproveToolCall_requestbodyaiAiApproveToolCall_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Newline-delimited stream of chat events — one JSON ChatEvent object per line.AiChatEvent-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiChatEvent

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/x-ndjson, application/json

aiAiDenyToolCall​

AiChatEvent aiAiDenyToolCall(AiAiToolCallData)

POST /api/2.0/ai/ai/deny-tool-call

Deny tool call

Refuses the tool call a chat round is paused on and resumes it immediately, streaming the continuation as newline-delimited ChatEvent objects. The literal User deny tool call is persisted in place of the tool result, so the model sees an explicit refusal rather than a missing answer and may reply without the tool or ask for something else. Nothing is executed and no result is accepted from the caller. Use POST api/2.0/ai/ai/approve-tool-call to supply a result instead.

Parameters​

NameInTypeDescriptionNotes
AiAiToolCallDatabodyAiAiToolCallData[required]

Responses​

Status codeDescriptionTypeResponse headers
200Newline-delimited stream of chat events — one JSON ChatEvent object per line.AiChatEvent-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiChatEvent

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/x-ndjson, application/json

aiAiRegenerateStream​

AiChatEvent aiAiRegenerateStream(aiAiRegenerateStream_request)

POST /api/2.0/ai/ai/regenerate-stream

Regenerate stream

Re-rolls the last assistant reply of an existing thread: every message after the last user message - the previous reply and any tool-call hops - is dropped, and a fresh reply is streamed as newline-delimited ChatEvent objects against the unchanged prompt. The thread has to exist already, threadId is required, and no title is generated. The dropped messages are gone for good, so this is a destructive operation on the thread's tail rather than a retry that keeps both answers. Unlike send-with-stream the profile is not verified before the stream opens, so an unusable model surfaces as an error frame inside the 200 rather than as a 4xx.

Parameters​

NameInTypeDescriptionNotes
aiAiRegenerateStream_requestbodyaiAiRegenerateStream_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Newline-delimited stream of chat events — one JSON ChatEvent object per line.AiChatEvent-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiChatEvent

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/x-ndjson, application/json

aiAiSend​

AiThreadMessageLike aiAiSend(aiAiSend_request)

POST /api/2.0/ai/ai/send

Run an AI action

Runs one AI action and returns the whole answer as a single JSON document. The model is the profile bound to actionType, falling back to the Default assignment slot, so this operation accepts no profileId of its own. Nothing is persisted - no thread is opened, no message is stored and no title is generated - which makes it the one to use for a stand-alone completion rather than for a conversation. entityId and contextEntityId set the scope of the round, which decides the workspace context and the custom MCP servers it may reach. For a conversation that keeps its history, use POST api/2.0/ai/ai/send-with-stream instead.

Parameters​

NameInTypeDescriptionNotes
aiAiSend_requestbodyaiAiSend_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200The assistant's reply as one message. Nothing was persisted.AiThreadMessageLike-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiThreadMessageLike

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiAiSendCustom​

AiThreadMessageLike aiAiSendCustom(aiAiSendCustom_request)

POST /api/2.0/ai/ai/send-custom

Send custom

Runs a free-form one-turn call against a system prompt supplied in the request, with no thread, no history and nothing persisted. The model is the explicit profileId when it resolves, otherwise the Default assignment slot. The shape of the answer depends on the body rather than on the route: with isStream set it arrives as a newline-delimited stream of chat events, and without it as a single JSON document, so a client has to handle both. Use POST api/2.0/ai/ai/send when the prompt should come from the portal's own action configuration instead of from the caller.

Parameters​

NameInTypeDescriptionNotes
aiAiSendCustom_requestbodyaiAiSendCustom_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200The assistant's reply as one message, or a newline-delimited stream of chat events when isStream was set. Nothing was persisted.AiThreadMessageLike-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiThreadMessageLike

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiAiSendWithStream​

AiChatEvent aiAiSendWithStream(AiAiSendStreamBody)

POST /api/2.0/ai/ai/send-with-stream

Send with stream

Runs one chat round and streams it back as newline-delimited ChatEvent objects. Omitting threadId opens a new thread, which requires that entityId names a room the caller can open and that a profile resolves for it; the user message and the reply are persisted either way, and a new thread also gets a generated title. The model is settled in a fixed order - an agent's assignment in scope overrides everything, then the explicit profileId, then the one stored on the thread, then the Chat assignment - and the effective profile is checked before the stream opens, so an unknown one fails with 400 rather than as an error buried in a 200. A tool call pauses the round and ends the stream; resume it with POST api/2.0/ai/ai/approve-tool-call or POST api/2.0/ai/ai/deny-tool-call.

Parameters​

NameInTypeDescriptionNotes
AiAiSendStreamBodybodyAiAiSendStreamBody[required]

Responses​

Status codeDescriptionTypeResponse headers
200Newline-delimited stream of chat events — one JSON ChatEvent object per line.AiChatEvent-
400The prompt is empty, more attachments were sent than the limit allows, or no AI profile could be resolved for the requested action.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
402The portal has no paid AI quota left, so the profile bound to this action cannot be dispatched.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404The entityId names a room the caller cannot open, or no live profile is bound to it.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiChatEvent

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/x-ndjson, application/json

aiAiSendWithStreamOpenAI​

AiOpenAIStreamChunk aiAiSendWithStreamOpenAI(AiAiSendStreamBody)

POST /api/2.0/ai/ai/send-with-stream-openai

Stream a chat in OpenAI format

The same chat round as send-with-stream, re-encoded as a server-sent-events stream of OpenAI chat.completion.chunk objects terminated by a [DONE] sentinel. Thread handling, persistence, title generation and the profile pre-flight are identical, and a tool call ends the stream with finish_reason: tool_calls instead of a pause event - resume it through the same approve and deny operations. Unlike send-with-stream it does not reject an empty user message and does not enforce the per-kind attachment cap, so validate both before calling. Choose this route only for a client that already speaks the OpenAI wire format; POST api/2.0/ai/ai/send-with-stream is the native one.

Parameters​

NameInTypeDescriptionNotes
AiAiSendStreamBodybodyAiAiSendStreamBody[required]

Responses​

Status codeDescriptionTypeResponse headers
200Server-sent events stream of OpenAI chat.completion.chunk objects, terminated by a [DONE] sentinel.AiOpenAIStreamChunk-
400The prompt is empty, or no AI profile could be resolved for the requested action.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
402The portal has no paid AI quota left, so the profile bound to this action cannot be dispatched.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiOpenAIStreamChunk

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: text/event-stream, application/json

AIAgentsApi​

aiAgentsCreate​

AiFolderIntegerWrapper aiAgentsCreate(aiAgentsCreate_request)

POST /api/2.0/ai/agents

Create an agent

Creates an AI agent room and binds a model to it, in that order. profileId is required, has to be a UUID, has to name an existing profile, and that profile has to support chat - an image-only model is refused here rather than failing on every later request. prompt is required and is stored on the room as its standing instruction with any markup stripped, so it cannot round-trip HTML into another user's reply. The two steps are not atomic: when the room is created but the model binding fails, the call reports an error and the room is left behind, so re-bind it with PUT api/2.0/ai/agents/{id} rather than creating a second one.

Parameters​

NameInTypeDescriptionNotes
aiAgentsCreate_requestbodyaiAgentsCreate_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200The created agent room, with the model already bound to it.AiFolderIntegerWrapper-
400profileId is missing, is not a UUID, names no existing profile, or names one that does not support chat; or prompt is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiFolderIntegerWrapper

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiAgentsDelete​

AiFileOperationWrapper aiAgentsDelete(id, aiAgentsDelete_request)

DELETE /api/2.0/ai/agents/{id}

Delete an agent

Deletes an AI agent room. The ID has to be the room's integer identifier, and the body is forwarded to the DocSpace AI service unchanged, so it accepts the same options as deleting an ordinary room - deleteAfter among them. Deletion is asynchronous there: the answer is a file-operation payload to poll, not a completed result. The agent's model binding is deliberately left behind, because the upstream assignment API has no per-entry delete, so an orphaned assignment row survives the room.

Parameters​

NameInTypeDescriptionNotes
idpathStringThe agent identifier.[required] [example: 1234]
aiAgentsDelete_requestbodyaiAgentsDelete_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200The queued file operation. Deletion runs asynchronously, so poll DocSpace for its outcome.AiFileOperationWrapper-
400The agent ID is not a positive integer.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiFileOperationWrapper

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiAgentsGet​

aiAgentsGet_200_response aiAgentsGet(id)

GET /api/2.0/ai/agents/{id}

Get an agent

Returns one AI agent room, enriched with the profileId currently bound to it so an edit form can prefill its model selector. The ID is the room's integer identifier, and a non-integer value is refused rather than passed on to fail opaquely upstream. The binding lives in an assignment rather than on the room, so it is looked up separately: a missing or unreadable assignment simply leaves profileId out of the answer instead of failing the call. The standing instruction comes back on the room as chatSettings.prompt.

Parameters​

NameInTypeDescriptionNotes
idpathStringThe agent identifier.[required] [example: 1234]

Responses​

Status codeDescriptionTypeResponse headers
200The agent room, with profileId added when a model is bound to it.aiAgentsGet_200_response-
400The agent ID is not a positive integer.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

aiAgentsGet_200_response

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiAgentsList​

AiFolderContentIntegerWrapper aiAgentsList(subjectId, subjectOwnerId, excludeSubject, tags, withoutTags, quotaFilter, filterValue, sortBy, sortOrder, startIndex, count)

GET /api/2.0/ai/agents

List agents

Lists the portal's AI agent rooms. The query is forwarded unchanged to the DocSpace AI service, so it takes the same paging, sorting and filtering parameters as an ordinary room listing, and the answer is that service's folder-content payload rather than a shape of this API's own. Array and object query values are dropped rather than guessed at, so send flat strings. The profile bound to each agent is not included here - read one agent with GET api/2.0/ai/agents/{id} for that.

Parameters​

NameInTypeDescriptionNotes
subjectIdqueryStringShow only the agent rooms this user takes part in.[optional] [example: 00000000-0000-0000-0000-000000000000]
subjectOwnerIdqueryStringShow only the agent rooms owned by this user.[optional] [example: 00000000-0000-0000-0000-000000000000]
excludeSubjectqueryBooleanInvert the user filter: leave out what subjectId selects instead of keeping it.[optional] [example: false]
tagsqueryStringShow only the agent rooms carrying these tags, comma-separated.[optional] [example: ai,assistant]
withoutTagsqueryBooleanShow only the agent rooms that carry no tags at all.[optional] [example: false]
quotaFilterqueryIntegerFilter by quota kind: 0 for all, 1 for the default quota, 2 for a custom one.[optional] [example: 0]
filterValuequeryStringShow only the agent rooms whose title matches this text.[optional] [example: assistant]
sortByqueryStringField to sort by, for example DateAndTime.[optional] [example: DateAndTime]
sortOrderqueryStringSort direction, ascending or descending.[optional] [example: descending]
startIndexqueryIntegerIndex of the first entry to return; 0 starts at the beginning.[optional] [example: 0]
countqueryIntegerHow many entries to return. The internal service applies its own default.[optional] [example: 25]

Responses​

Status codeDescriptionTypeResponse headers
200The agent rooms, in the DocSpace AI service's folder-content envelope.AiFolderContentIntegerWrapper-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiFolderContentIntegerWrapper

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiAgentsNews​

AiNewItemsAgentNewItemsArrayWrapper aiAgentsNews()

GET /api/2.0/ai/agents/news

List agent news items

Lists the unread items across the caller's AI agent rooms, so a badge can be rendered without walking each room. It takes no parameters and is scoped to the caller by the DocSpace AI service. The answer is that service's new-items payload. This is a read-only operation and does not mark anything as seen.

Parameters​

This endpoint does not need any parameter.

Responses​

Status codeDescriptionTypeResponse headers
200The unread items of the caller's agent rooms.AiNewItemsAgentNewItemsArrayWrapper-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiNewItemsAgentNewItemsArrayWrapper

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiAgentsResetQuota​

AiFolderIntegerArrayWrapper aiAgentsResetQuota(aiAgentsResetQuota_request)

PUT /api/2.0/ai/agents/resetquota

Reset agents' quota

Returns the listed AI agent rooms to the portal's default storage quota, forwarding roomIds to the DocSpace AI service unchanged. The answer is that service's payload, one updated room per entry. This is the counterpart of PUT api/2.0/ai/agents/agentquota and takes no quota value of its own. Rooms already on the default are unaffected.

Parameters​

NameInTypeDescriptionNotes
aiAgentsResetQuota_requestbodyaiAgentsResetQuota_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200The updated agent rooms, one entry each.AiFolderIntegerArrayWrapper-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiFolderIntegerArrayWrapper

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiAgentsUpdate​

AiFolderIntegerWrapper aiAgentsUpdate(id, aiAgentsUpdate_request)

PUT /api/2.0/ai/agents/{id}

Update an agent

Changes an AI agent room - its title, tags or standing instruction - and optionally rebinds its model. The ID has to be the room's integer identifier. profileId is not part of the room contract: it is taken out of the forwarded body and applied afterwards as the agent's assignment, and it has to be a UUID naming an existing chat-capable profile. An instruction sent as chatSettings.prompt has its markup stripped, as on create; note that when chatSettings is present the upstream service still requires the rest of that object to be valid, so send it whole.

Parameters​

NameInTypeDescriptionNotes
idpathStringThe agent identifier.[required] [example: 1234]
aiAgentsUpdate_requestbodyaiAgentsUpdate_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200The updated agent room.AiFolderIntegerWrapper-
400The agent ID is not a positive integer, or profileId is not a UUID, names no existing profile, or names one that does not support chat.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiFolderIntegerWrapper

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiAgentsUpdateQuota​

AiFolderIntegerArrayWrapper aiAgentsUpdateQuota(aiAgentsUpdateQuota_request)

PUT /api/2.0/ai/agents/agentquota

Update agents' quota

Sets the storage quota of the listed AI agent rooms in one call, forwarding roomIds and quota to the DocSpace AI service unchanged. The answer is that service's payload, one updated room per entry. A quota applies to the room's stored files, not to the model usage of its chats. Use PUT api/2.0/ai/agents/resetquota to return rooms to the portal default instead of naming a number.

Parameters​

NameInTypeDescriptionNotes
aiAgentsUpdateQuota_requestbodyaiAgentsUpdateQuota_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200The updated agent rooms, one entry each.AiFolderIntegerArrayWrapper-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiFolderIntegerArrayWrapper

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

AIAssignmentsApi​

aiAssignmentsAssign​

AiAssignmentMutationResult aiAssignmentsAssign(aiAssignmentsAssign_request)

PUT /api/2.0/ai/assignments/assign

Bind a profile to an action

Binds a profile to one AI action portal-wide, creating the assignment or replacing it in place, and returns the result. Both actionType and profileId are required. The profile's declared capabilities are checked against the action, so a model that cannot generate images cannot be bound to ImageGeneration - the Default slot is exempt, because it stands in for every action. There is no room-scoped form of this write: a room's own binding is created by the agent that owns it, while reads accept an entityId.

Parameters​

NameInTypeDescriptionNotes
aiAssignmentsAssign_requestbodyaiAssignmentsAssign_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the binding was stored. A failure is reported in error rather than as a status.AiAssignmentMutationResult-
400actionType or profileId is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiAssignmentMutationResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiAssignmentsBulkAssign​

AiBulkAssignmentResult aiAssignmentsBulkAssign(request_body)

PUT /api/2.0/ai/assignments/bulk-assign

Bulk assign

Applies many action-to-profile bindings in one write, which is how a settings screen saves the whole set. The body is a plain map of action type to profile ID, and every entry is validated before anything is written: one unknown action or one non-string profile ID rejects the request whole, so the set is never left half-applied. Each entry behaves as the single assign operation does, capability checks included. The answer carries the resulting assignment set.

Parameters​

NameInTypeDescriptionNotes
request_bodybodyMapA map of action type to profile ID. Every key has to be a known action type and every value a profile ID; one bad entry rejects the whole map.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the set was stored, with errors listing the entries that were refused.AiBulkAssignmentResult-
400The body is not a map of action type to profile ID, or one of its keys is not a known action type.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiBulkAssignmentResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiAssignmentsCascadeProfileDelete​

AiSuccessResponse aiAssignmentsCascadeProfileDelete(aiAssignmentsCascadeProfileDelete_request)

DELETE /api/2.0/ai/assignments/cascade-profile-delete

Cascade profile delete

Detaches a profile from every assignment that points at it, which is the cleanup step before the profile itself is removed. The Default slot is promoted to the first remaining profile, or dropped when none is left, and every other slot holding the profile is cleared. profileId is required and may be sent in the body or as a query parameter. DELETE api/2.0/ai/profiles/delete already does this, so call it directly only when the profile is being removed by some other means.

Parameters​

NameInTypeDescriptionNotes
aiAssignmentsCascadeProfileDelete_requestbodyaiAssignmentsCascadeProfileDelete_requestThe profile to detach from every assignment. May be sent as the profileId query parameter instead of in the body.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms no assignment points at the profile any more.AiSuccessResponse-
400profileId is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiAssignmentsGetAllAssignments​

Map aiAssignmentsGetAllAssignments(entityId)

GET /api/2.0/ai/assignments/get-all-assignments

Get all assignments

Returns every action-to-profile binding of a scope as one map, which is what a settings screen loads. entityId narrows it to a room and has to name one the caller can open; a room that is not an agent room degrades to the portal-wide set rather than answering empty, and omitting the parameter reads the portal-wide set directly. Actions with no binding are simply absent from the map. The Default slot is reported as an entry of its own rather than being folded into the others.

Parameters​

NameInTypeDescriptionNotes
entityIdqueryStringThe DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope.[optional] [example: 1234]

Responses​

Status codeDescriptionTypeResponse headers
200The scope's bindings as a map of action type to profile ID. An action with no binding is absent.Map-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404The referenced object does not exist, or the caller cannot access it - the two are deliberately indistinguishable, so a room the caller may not open answers 404 rather than 403.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

Map

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiAssignmentsGetAssignment​

String aiAssignmentsGetAssignment(actionType)

GET /api/2.0/ai/assignments/get-assignment

Get assignment

Returns the profile bound to one AI action, without applying the Default fallback - an empty answer means this action has no profile of its own, not that nothing is configured. actionType is required and is read from the query. Use GET api/2.0/ai/assignments/resolve-for-action to learn which profile would actually serve the action. This reads the portal-wide binding and accepts no entityId.

Parameters​

NameInTypeDescriptionNotes
actionTypequeryStringThe AI action the request applies to - one of Default, Chat, Code, Summarization, Translation, TextAnalyze, ImageGeneration, OCR, Vision.[required] [example: Chat]

Responses​

Status codeDescriptionTypeResponse headers
200The profile bound to the action, or an empty result when it has none of its own.String-
400actionType is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

String

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiAssignmentsResolveForAction​

AiResolvedAssignment aiAssignmentsResolveForAction(actionType, entityId)

GET /api/2.0/ai/assignments/resolve-for-action

Resolve for action

Returns the profile that will serve one AI action, falling back to the Default slot when the action has no profile of its own. actionType is required and has to be one of the known actions - an unknown or misspelled value is rejected rather than resolved to the default. entityId narrows the lookup to a room, and a room with no assignment of its own degrades to the portal-wide one. This fails when neither slot is set or the bound profile is gone, so use GET api/2.0/ai/assignments/try-resolve-for-action when an unconfigured portal should answer empty instead.

Parameters​

NameInTypeDescriptionNotes
actionTypequeryStringThe AI action the request applies to - one of Default, Chat, Code, Summarization, Translation, TextAnalyze, ImageGeneration, OCR, Vision.[required] [example: Chat]
entityIdqueryStringThe DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope.[optional] [example: 1234]

Responses​

Status codeDescriptionTypeResponse headers
200The profile that will serve the action.AiResolvedAssignment-
400actionType is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiResolvedAssignment

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiAssignmentsTryResolveForAction​

AiResolvedAssignment aiAssignmentsTryResolveForAction(actionType, entityId)

GET /api/2.0/ai/assignments/try-resolve-for-action

Try resolve for action

Returns the profile that will serve one AI action, exactly as GET api/2.0/ai/assignments/resolve-for-action does, but answers with an empty result rather than failing when nothing is configured. actionType is required and is validated the same way, and entityId narrows the lookup to a room. This is the operation to call when the absence of a profile is a normal state to render - a settings screen, or a feature that hides itself. Both operations are read-only.

Parameters​

NameInTypeDescriptionNotes
actionTypequeryStringThe AI action the request applies to - one of Default, Chat, Code, Summarization, Translation, TextAnalyze, ImageGeneration, OCR, Vision.[required] [example: Chat]
entityIdqueryStringThe DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope.[optional] [example: 1234]

Responses​

Status codeDescriptionTypeResponse headers
200The profile that will serve the action, or an empty result when none is configured.AiResolvedAssignment-
400actionType is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiResolvedAssignment

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiAssignmentsUnassign​

AiSuccessResponse aiAssignmentsUnassign(body)

DELETE /api/2.0/ai/assignments/unassign

Clear an action's profile

Clears the portal-wide binding of one AI action, after which the action falls back to the Default slot. actionType is required and may be sent in the body or as a query parameter. An action whose slot is already empty is not reported as an error - the call answers success either way, so it is safe to repeat. Clearing Default itself leaves the actions that relied on it unresolvable.

Parameters​

NameInTypeDescriptionNotes
bodybodyString[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the action now has no profile of its own.AiSuccessResponse-
400actionType is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

AIAttachmentsApi​

aiAttachmentsDelete​

AiSuccessResponse aiAttachmentsDelete(body)

DELETE /api/2.0/ai/attachments/delete

Delete one attachment

Permanently deletes one attachment, whether it is still a draft or already bound to a message. The ID is not validated here, so a malformed one surfaces as an error relayed from storage rather than as a 400, and an ID that does not exist answers success without deleting anything. Deleting a bound attachment leaves the message in place without it. The deletion cannot be undone.

Parameters​

NameInTypeDescriptionNotes
bodybodyStringThe ID of the attachment to delete, as a bare JSON string.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the request was accepted, whether or not anything was deleted.AiSuccessResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiAttachmentsDeleteMany​

AiSuccessResponse aiAttachmentsDeleteMany(request_body)

DELETE /api/2.0/ai/attachments/delete-many

Delete many

Permanently deletes several attachments in one round trip. ids is optional and an absent value is treated as an empty list, so a malformed request quietly deletes nothing instead of failing. IDs that do not exist are skipped without being reported, so the answer confirms only that the call was accepted. The deletions cannot be undone.

Parameters​

NameInTypeDescriptionNotes
request_bodybodyListThe IDs of the attachments to delete, as a bare JSON array of strings.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the request was accepted, whether or not anything was deleted.AiSuccessResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiAttachmentsGet​

AiAttachment aiAttachmentsGet(body)

POST /api/2.0/ai/attachments/get

Get one attachment

Returns one attachment by its ID, whether it is still a draft or already bound to a message. The ID is required and has to be a non-empty string. An ID that no longer exists is not reported as 404: the answer is a null body with status 200, so treat a missing payload as no such attachment. Use POST api/2.0/ai/attachments/get-many to read several at once.

Parameters​

NameInTypeDescriptionNotes
bodybodyStringThe ID of the attachment to read, as a bare JSON string.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The attachment, or a null body when no attachment has that ID.AiAttachment-
400The attachment ID is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiAttachment

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiAttachmentsGetMany​

List aiAttachmentsGetMany(request_body)

POST /api/2.0/ai/attachments/get-many

Get many

Returns several attachments in one call, aligned by position with the ids that were sent, so the answer can be zipped straight onto the request. An ID that no longer exists leaves its slot empty rather than shortening the list, which is how a caller tells which of them are gone. ids has to be present and non-empty - an empty batch is rejected rather than answered with an empty list. Nothing is changed by the call.

Parameters​

NameInTypeDescriptionNotes
request_bodybodyListThe IDs of the attachments to read, as a bare JSON array of strings. The answer is aligned with this array by position.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The attachments, aligned by position with the IDs that were sent. A missing one leaves its slot empty.List-
400The list of attachment IDs is malformed.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

List

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiAttachmentsLinkToMessage​

AiSuccessResponse aiAttachmentsLinkToMessage(aiAttachmentsLinkToMessage_request)

POST /api/2.0/ai/attachments/link-to-message

Link to message

Binds draft attachments to the chat message that owns them, after that message has been persisted, so that deleting the message removes them too. All three of ids, messageId and threadId are required, and the references are verified rather than trusted: an unknown message answers 404, a message that belongs to a different thread answers 400, and attachments that no longer exist answer 404 naming each missing ID. That verification exists because the underlying binding call skips unknown IDs silently, which used to report success for a link that had not happened. Drafts stay unbound until this succeeds.

Parameters​

NameInTypeDescriptionNotes
aiAttachmentsLinkToMessage_requestbodyaiAttachmentsLinkToMessage_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the attachments are now bound to the message.AiSuccessResponse-
400The attachment or message reference is malformed.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404The message or the attachment does not exist.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiAttachmentsSaveFile​

AiAttachment aiAttachmentsSaveFile(aiAttachmentsSaveFile_request)

POST /api/2.0/ai/attachments/save-file

Save file

Stores one file attachment as a draft and returns it, so its ID can be attached to a message later. input carries the host path - the DocSpace entry ID the AI backend resolves server-side - the text content already extracted from that file, the ONLYOFFICE numeric file type, and optionally a title; the text is what the model reads, so this operation does not open the file itself. Archives are refused outright, whatever their declared name says. Drafts are not bound to a conversation until POST api/2.0/ai/attachments/link-to-message is called, so an unlinked draft outlives the round that created it.

Parameters​

NameInTypeDescriptionNotes
aiAttachmentsSaveFile_requestbodyaiAttachmentsSaveFile_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200The stored draft, whose ID links it to a message later.AiAttachment-
400The attachment payload is malformed.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiAttachment

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiAttachmentsSaveFilesMany​

List aiAttachmentsSaveFilesMany(aiAttachmentsSaveFilesMany_request)

POST /api/2.0/ai/attachments/save-files-many

Save files many

Stores several file attachments as drafts in one round trip and returns them in the order they were sent. Each entry is validated exactly as the single-file operation validates its input, and the first bad one rejects the whole batch with its index named in the message - nothing is stored. inputs has to be present and an array: an absent or null value is a malformed request rather than an empty batch, and only an explicit empty array means no files. Follow up with POST api/2.0/ai/attachments/link-to-message to bind the drafts to a message.

Parameters​

NameInTypeDescriptionNotes
aiAttachmentsSaveFilesMany_requestbodyaiAttachmentsSaveFilesMany_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200The stored drafts, in the order they were sent.List-
400inputs is not an array, or one of its entries is malformed.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

List

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

AIEditorToolsApi​

aiEditorToolsCall​

aiEditorToolsCall_200_response aiEditorToolsCall(aiEditorToolsCall_request)

POST /api/2.0/ai/editor-tools/call

Call an editor tool

Executes one DocSpace tool on behalf of the document editor's AI plugin, server-side and under the caller's own credentials, so the browser never holds the transport. name has to be one of the tools GET api/2.0/ai/editor-tools/list reports; anything else, including a tool the editor is not allowed to reach, is refused. The result is always returned as a string - a structured result is serialised - because the plugin relays it to the model verbatim. A tool that fails does so inside that string as an error payload rather than as an HTTP status, so check the content before trusting it.

Parameters​

NameInTypeDescriptionNotes
aiEditorToolsCall_requestbodyaiEditorToolsCall_requestThe tool to run: name from GET api/2.0/ai/editor-tools/list, arguments matching that tool's input schema, and an optional entityId for the room to run it in.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The tool's output as a string. A tool that failed reports it inside that string.aiEditorToolsCall_200_response-
400The tool name is not one this portal exposes.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

aiEditorToolsCall_200_response

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiEditorToolsList​

aiEditorToolsList_200_response aiEditorToolsList()

GET /api/2.0/ai/editor-tools/list

List editor tools

Returns the catalogue of DocSpace tools the document editor's AI plugin may offer the model - the same composed set the DocSpace chat sees, minus the two web-search tools the editor already reaches through its own passthrough. entityId scopes the catalogue to a room, which decides the room-specific tools it contains. Each entry carries exactly four fields: the tool name, its description, its input schema, and whether calling it requires an approval dialog; nothing else is exposed, because the raw listings of system servers carry transport details that must not reach a browser. The approval flag follows the same policy the chat engine applies, and a read-only tool comes back needing none - execute a tool with POST api/2.0/ai/editor-tools/call, which accepts only the names this catalogue reports.

Parameters​

This endpoint does not need any parameter.

Responses​

Status codeDescriptionTypeResponse headers
200The tools the editor plugin may offer the model, four fields each.aiEditorToolsList_200_response-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

aiEditorToolsList_200_response

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

AIExportApi​

aiExportTextToDocx​

aiExportTextToDocx_202_response aiExportTextToDocx(aiExportTextToDocx_request)

POST /api/2.0/ai/text-to-docx

Start markdown → docx export

Queues a markdown-to-docx export and answers 202 as soon as the job is accepted, without waiting for it. title, content and folderId are all required, and a content of only whitespace counts as missing even though it is not empty. The conversion runs in the AI worker, which saves the .docx into the target folder - an agent room resolves to its own result-storage subfolder - so there is nothing to poll here: completion arrives as the ordinary folder-modified socket event. This route accepts a body of up to 15 MB rather than the 100 KB the rest of the API allows, because a whole thread transcript is sent in one request.

Parameters​

NameInTypeDescriptionNotes
aiExportTextToDocx_requestbodyaiExportTextToDocx_request[required]

Responses​

Status codeDescriptionTypeResponse headers
202Confirms the export was queued. The .docx arrives in the target folder later, announced by a folder-modified socket event.aiExportTextToDocx_202_response-
400title, content or folderId is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The transcript is larger than 15 MB, this route's own parser limit.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

aiExportTextToDocx_202_response

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

AIOpenAIPassthroughApi​

aiOpenaiChatCompletions​

Map aiOpenaiChatCompletions(profileId, request_body)

POST /api/2.0/ai/openai/{profileId}/v1/chat/completions

OpenAI chat completions passthrough

OpenAI-compatible chat completions for the document editor's AI plugin. The profile is resolved server-side, its credentials are attached, and the body is forwarded to the provider verbatim - the payload is owned by the plugin's SDK on one end and the provider on the other. A client disconnect cancels the provider call.

Parameters​

NameInTypeDescriptionNotes
profileIdpathStringThe AI provider profile identifier.[required] [example: 00000000-0000-0000-0000-000000000000]
request_bodybodyMapAn OpenAI Chat Completions request, forwarded to the provider byte for byte. The shape is the provider's, not this API's, so consult the provider's own reference; the model and the credentials come from the profile in the path and must not be sent here.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The provider's own response, relayed verbatim with its status and content type.Map-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.aiOpenaiChatCompletions_403_response-
404No profile with this identifier exists for the caller.aiOpenaiChatCompletions_403_response-
413The request body is larger than this route accepts.aiOpenaiChatCompletions_403_response-
429Relayed verbatim from the AI provider, which is rate-limiting this portal's key.aiOpenaiChatCompletions_403_response-
500Unhandled failure. The reason is logged server-side and never echoed back.aiOpenaiChatCompletions_403_response-
502The AI provider could not be reached, or answered with a failure of its own.aiOpenaiChatCompletions_403_response-

Return type​

Map

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiOpenaiImagesGenerations​

Map aiOpenaiImagesGenerations(profileId, request_body)

POST /api/2.0/ai/openai/{profileId}/v1/images/generations

OpenAI image generation passthrough

OpenAI-compatible image generation for the document editor's AI plugin, working exactly as the chat-completions passthrough does: the profile named by profileId is resolved server-side, its credentials are attached, and the body reaches the provider unchanged. The provider's status and body are relayed verbatim, so its 429 and its own error envelope surface as they stand. A body larger than this route accepts is refused before it is forwarded. A client disconnect aborts the provider call.

Parameters​

NameInTypeDescriptionNotes
profileIdpathStringThe AI provider profile identifier.[required] [example: 00000000-0000-0000-0000-000000000000]
request_bodybodyMapAn OpenAI image-generation request, forwarded to the provider byte for byte. The shape is the provider's, not this API's, and the credentials come from the profile in the path.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The provider's own response, relayed verbatim with its status and content type.Map-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.aiOpenaiChatCompletions_403_response-
404No profile with this identifier exists for the caller.aiOpenaiChatCompletions_403_response-
413The request body is larger than this route accepts.aiOpenaiChatCompletions_403_response-
429Relayed verbatim from the AI provider, which is rate-limiting this portal's key.aiOpenaiChatCompletions_403_response-
500Unhandled failure. The reason is logged server-side and never echoed back.aiOpenaiChatCompletions_403_response-
502The AI provider could not be reached, or answered with a failure of its own.aiOpenaiChatCompletions_403_response-

Return type​

Map

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

AIPreferencesApi​

aiPreferencesClearDeepMode​

AiSuccessResponse aiPreferencesClearDeepMode(body)

DELETE /api/2.0/ai/preferences/clear-deep-mode

Clear deep mode

Removes the stored extended-thinking setting of a scope (the depth and, with it, the deep-mode toggle), after which reads fall back to the configured default rather than to false. entityId picks a room and omitting it clears the portal-wide preference. Clearing a scope that has no stored value is not an error. This differs from storing false, which is an explicit choice a later read reports as set.

Parameters​

NameInTypeDescriptionNotes
bodybodyStringThe ID of the room whose preference is cleared, as a bare JSON string. Send an empty body to clear the portal-wide preference.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the scope has no preference of its own and now inherits the default.AiSuccessResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiPreferencesGetDeepMode​

Boolean aiPreferencesGetDeepMode(entityId)

GET /api/2.0/ai/preferences/get-deep-mode

Get deep mode

Returns the deep-mode toggle of a scope, as a bare boolean: whether the stored extended-thinking depth is above off. entityId picks a room and omitting it reads the portal-wide preference. A scope that has never had a value stored falls back to the configured default, so the answer never distinguishes off from unset - ask GET api/2.0/ai/preferences/is-deep-mode-set for that. This is a read-only operation.

Parameters​

NameInTypeDescriptionNotes
entityIdqueryStringThe DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope.[optional] [example: 1234]

Responses​

Status codeDescriptionTypeResponse headers
200Whether deep mode is on, falling back to the configured default when the scope has no value of its own.Boolean-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

Boolean

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiPreferencesGetReasoningLevel​

AiAiReasoningLevel aiPreferencesGetReasoningLevel(entityId)

GET /api/2.0/ai/preferences/get-reasoning-level

Get reasoning level

Returns the effective extended-thinking depth of the scope: off while deep mode is off, otherwise the persisted depth (low, medium, high, max), falling back to the default depth (medium) when none has been stored. entityId picks a room and omitting it reads the portal-wide preference. Providers clamp the depth to what the model accepts.

Parameters​

NameInTypeDescriptionNotes
entityIdqueryStringThe DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope.[optional] [example: 1234]

Responses​

Status codeDescriptionTypeResponse headers
200Success.AiAiReasoningLevel-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiAiReasoningLevel

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiPreferencesIsDeepModeSet​

Boolean aiPreferencesIsDeepModeSet(entityId)

GET /api/2.0/ai/preferences/is-deep-mode-set

Is deep mode set

Tells whether a scope has an explicitly persisted extended-thinking setting of its own, as opposed to inheriting the configured default. entityId picks a room and omitting it asks about the portal-wide preference. A true answer means a value was stored, whether that value is on or off - read the value itself with GET api/2.0/ai/preferences/get-deep-mode. This is the check a settings screen uses to show an explicit override rather than an inherited state.

Parameters​

NameInTypeDescriptionNotes
entityIdqueryStringThe DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope.[optional] [example: 1234]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the scope has a preference of its own, whichever way that preference is set.Boolean-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

Boolean

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiPreferencesSetDeepMode​

AiSuccessResponse aiPreferencesSetDeepMode(aiPreferencesSetDeepMode_request)

PUT /api/2.0/ai/preferences/set-deep-mode

Set deep mode

Stores the deep-mode toggle of a scope. false stores the off depth; true keeps the depth already stored and falls back to the default depth (medium) when none is. value has to be a real boolean: a string, a number or an absent value is rejected rather than coerced, so the string false cannot silently switch the setting on and an empty request cannot silently switch it off. entityId picks a room and omitting it writes the portal-wide preference. It is idempotent, so there is no need to read the current value first.

Parameters​

NameInTypeDescriptionNotes
aiPreferencesSetDeepMode_requestbodyaiPreferencesSetDeepMode_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the preference was stored.AiSuccessResponse-
400value is missing or is not a boolean.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiPreferencesSetReasoningLevel​

AiSuccessResponse aiPreferencesSetReasoningLevel(aiPreferencesSetReasoningLevel_request)

PUT /api/2.0/ai/preferences/set-reasoning-level

Set reasoning level

Persists the extended-thinking depth of the scope as its single stored value: a depth turns deep mode on at that depth, off turns it off and replaces the stored depth (a later deep-mode true without a depth lands on medium). entityId picks a room and omitting it writes the portal-wide preference. Idempotent.

Parameters​

NameInTypeDescriptionNotes
aiPreferencesSetReasoningLevel_requestbodyaiPreferencesSetReasoningLevel_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Success.AiSuccessResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

AIProfilesApi​

aiProfilesCreate​

AiProfileMutationResult aiProfilesCreate(AiCreateProfileInput)

POST /api/2.0/ai/profiles/create

Create a provider profile

Creates an AI provider profile - the endpoint, credentials and model that a chat round runs on - and returns it. The name has to be unique, the credentials are probed against the live provider before anything is stored, and the portal's first profile also takes the Default assignment slot. Two inputs are refused outright: a baseUrl pointing at a private network address, and providerType: external, which delegates transport to the host application and therefore cannot work for a profile the server manages. On a portal running the AI gateway, profiles are managed centrally and this operation answers 403.

Parameters​

NameInTypeDescriptionNotes
AiCreateProfileInputbodyAiCreateProfileInput[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the profile was created, with it in profile. A refusal is reported in error rather than as a status.AiProfileMutationResult-
400The provider URL is missing, malformed, or points at a private network address.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI profiles are read-only on this portal because they are managed by the AI gateway.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiProfileMutationResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiProfilesDelete​

AiSuccessResponse aiProfilesDelete(body)

DELETE /api/2.0/ai/profiles/delete

Delete a provider profile

Deletes an AI provider profile and cleans up every assignment pointing at it: the Default slot moves to the first remaining profile and the other slots are left unbound. The ID is required and may be sent in the body or as a query parameter. An unknown ID is not reported - the call answers success without deleting anything. Threads already bound to the profile keep the stored reference, so a round on such a thread falls back to whatever the scope resolves to.

Parameters​

NameInTypeDescriptionNotes
bodybodyStringThe ID of the profile to delete, as a bare JSON string.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the request was accepted, whether or not a profile was deleted.AiSuccessResponse-
400The profile ID is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiProfilesGetById​

aiProfilesGetById_200_response aiProfilesGetById(id)

GET /api/2.0/ai/profiles/get-by-id

Get a provider profile

Returns one AI provider profile by its ID, with its secrets stripped: neither the API key nor the custom headers are ever sent back, on any portal. The ID is required and is read from the query, and an unknown one answers 404. The baseUrl in the answer is the one that was stored, not the internal gateway address a round actually dials, so it cannot be used to reach the provider directly. Use GET api/2.0/ai/profiles/list to enumerate profiles instead of reading them one by one.

Parameters​

NameInTypeDescriptionNotes
idqueryStringThe AI provider profile identifier.[required] [example: 00000000-0000-0000-0000-000000000000]

Responses​

Status codeDescriptionTypeResponse headers
200The profile, with its key and headers stripped.aiProfilesGetById_200_response-
400The profile ID is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404No profile has this ID.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

aiProfilesGetById_200_response

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiProfilesList​

List aiProfilesList()

GET /api/2.0/ai/profiles/list

List provider profiles

Lists the portal's AI provider profiles with their secrets stripped, the same way the single-profile read does. It takes no parameters and is not paginated, because a portal holds few profiles. On a portal running the AI gateway the answer is synthesised from the gateway's own catalogue rather than from stored records. The IDs in the answer are what the assignment operations and every round's profileId accept.

Parameters​

This endpoint does not need any parameter.

Responses​

Status codeDescriptionTypeResponse headers
200The portal's profiles, with their keys and headers stripped.List-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

List

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiProfilesListModels​

List aiProfilesListModels(profileId)

GET /api/2.0/ai/profiles/list-models

List models

Lists the models a stored profile's provider currently offers, asking the provider itself rather than reading a cached list. profileId is required and is read from the query. A failure is reported with the provider's own verdict: an unusable key comes back as 400 and a provider that is unreachable or broken as 502, while a missing profile or a caller without access keeps the status the portal gave it. Use POST api/2.0/ai/profiles/list-provider-models to probe an endpoint that has no profile yet.

Parameters​

NameInTypeDescriptionNotes
profileIdqueryStringThe AI provider profile identifier.[required] [example: 00000000-0000-0000-0000-000000000000]

Responses​

Status codeDescriptionTypeResponse headers
200The models the profile's provider currently offers.List-
400profileId is missing, or the provider rejected the profile's API key.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-
502The AI provider could not be reached, or answered with a failure of its own.AiErrorResponse-

Return type​

List

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiProfilesListProviderModels​

List aiProfilesListProviderModels(aiProfilesListProviderModels_request)

POST /api/2.0/ai/profiles/list-provider-models

List provider models

Lists the models an endpoint offers for credentials supplied in the request, before any profile exists - this is what a provider-setup form calls to fill its model picker. providerType and baseUrl are both required, and a 400 for either names the offending input in a field member so the form can highlight it; a baseUrl pointing at a private network address is refused as well. For providerType: onlyoffice the answer comes from the portal gateway's catalogue, which carries richer capability data than the provider's own listing and matches what GET api/2.0/ai/profiles/list reports; a portal without that gateway falls back to asking the provider. A provider that is unreachable or broken is reported as 502, and one that rejects the key as 400.

Parameters​

NameInTypeDescriptionNotes
aiProfilesListProviderModels_requestbodyaiProfilesListProviderModels_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200The models the endpoint offers for the supplied credentials.List-
400baseUrl is missing, points at a private network address, or the provider rejected the supplied API key.aiProfilesListProviderModels_400_response-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-
502The AI provider could not be reached, or answered with a failure of its own.AiErrorResponse-

Return type​

List

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiProfilesTestConnection​

aiProfilesTestConnection_200_response aiProfilesTestConnection(body)

POST /api/2.0/ai/profiles/test-connection

Test a profile's provider

Probes a stored profile's credentials against its provider and reports the outcome in the answer, writing nothing - this is what a Test button calls so that a failure does not commit anything. profileId is required and may be sent in the body or as a query parameter. The result is carried in the body rather than in the status, so a failed probe still answers 200 and the caller has to read the payload. To validate credentials that are not stored yet, use POST api/2.0/ai/profiles/list-provider-models.

Parameters​

NameInTypeDescriptionNotes
bodybodyStringThe ID of the profile to probe, as a bare JSON string.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The outcome of the probe. A failed probe is reported here, not as a status.aiProfilesTestConnection_200_response-
400profileId is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

aiProfilesTestConnection_200_response

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiProfilesUpdate​

AiProfileMutationResult aiProfilesUpdate(AiProfile)

PUT /api/2.0/ai/profiles/update

Update a provider profile

Replaces a stored AI provider profile and returns it, re-checking name uniqueness and probing the credentials against the live provider again. The same two inputs are refused as on create - a private-network baseUrl and providerType: external - and the whole profile is overwritten by the one supplied rather than merged. On a portal running the AI gateway this answers 403, because profiles are managed centrally there. A profile that is bound to an action or an agent keeps those bindings.

Parameters​

NameInTypeDescriptionNotes
AiProfilebodyAiProfile[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the profile was updated, with the stored profile in profile.AiProfileMutationResult-
400The provider URL is missing, malformed, or points at a private network address.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI profiles are read-only on this portal because they are managed by the AI gateway.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiProfileMutationResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

AIPromptsApi​

aiPromptsCreate​

AiPromptMutationResult aiPromptsCreate(AiCreatePromptInput)

POST /api/2.0/ai/prompts/create

Save a prompt

Saves a new prompt in the caller's own prompt library and returns it. The name has to be non-empty and unique inside its folder, and folderId has to name an existing folder - omit it to save the prompt at the root. Prompts are per-user: another user's library is never visible here, and no permission beyond having AI enabled is needed. The answer carries the stored prompt including the ID to use with the update, move and delete operations.

Parameters​

NameInTypeDescriptionNotes
AiCreatePromptInputbodyAiCreatePromptInput[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the prompt was saved, with it in prompt.AiPromptMutationResult-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiPromptMutationResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiPromptsCreateFolder​

AiFolderMutationResult aiPromptsCreateFolder(body)

POST /api/2.0/ai/prompts/create-folder

Create folder

Creates a folder in the caller's prompt library and returns it. The name has to be non-empty and unique across that library. Folders do not nest: there is one flat level, so a folder cannot be created inside another. The answer carries the folder ID to use as folderId when saving or moving prompts.

Parameters​

NameInTypeDescriptionNotes
bodybodyStringThe name of the folder to create, as a bare JSON string.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the folder was created, with it in folder.AiFolderMutationResult-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiFolderMutationResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiPromptsDelete​

AiSuccessResponse aiPromptsDelete(body)

DELETE /api/2.0/ai/prompts/delete

Delete a saved prompt

Deletes one saved prompt from the caller's library. The ID may be sent in the body or as a query parameter, and it is required. An ID that does not exist, or that belongs to another user, is not reported: the call answers success without deleting anything. The deletion is permanent.

Parameters​

NameInTypeDescriptionNotes
bodybodyStringThe ID of the prompt to delete, as a bare JSON string.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the request was accepted, whether or not a prompt was deleted.AiSuccessResponse-
400The prompt ID is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiPromptsDeleteFolder​

AiSuccessResponse aiPromptsDeleteFolder(body)

DELETE /api/2.0/ai/prompts/delete-folder

Delete folder

Deletes a folder together with every prompt inside it, permanently. The ID is required and may be sent in the body or as a query parameter. Unlike deleting a prompt, this checks first: a folder that does not exist, and one that belongs to another user, both answer 404 - the two cases are deliberately indistinguishable, so a foreign folder cannot be probed. Move the prompts out with PUT api/2.0/ai/prompts/move first if they should survive.

Parameters​

NameInTypeDescriptionNotes
bodybodyStringThe ID of the folder to delete, as a bare JSON string.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the folder and the prompts inside it are gone.AiSuccessResponse-
400The folder ID is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404No prompt folder has this ID.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiPromptsExport​

AiPromptBundle aiPromptsExport()

GET /api/2.0/ai/prompts/export

Export the prompt library

Builds a versioned bundle of every prompt and folder in the caller's library and returns it, with no parameters. The bundle is self-contained: it carries its own format version so an older export can still be read back, and it is the input POST api/2.0/ai/prompts/import-bundle expects. This is also the only way to read the whole library at once, since listing is folder-scoped. Nothing is changed by the call.

Parameters​

This endpoint does not need any parameter.

Responses​

Status codeDescriptionTypeResponse headers
200The whole library as a versioned bundle, ready to import.AiPromptBundle-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiPromptBundle

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiPromptsGetById​

AiPrompt aiPromptsGetById(id)

GET /api/2.0/ai/prompts/get-by-id

Get a saved prompt

Returns one saved prompt by its ID. The ID is required and is read from the query. An ID that is unknown, or that belongs to another user, is not reported as 404: the answer is an empty body with status 200, so treat a missing payload as no such prompt. Prompt IDs come from GET api/2.0/ai/prompts/list or from the answer of the create operation.

Parameters​

NameInTypeDescriptionNotes
idqueryStringThe saved prompt identifier.[required] [example: 33333333-3333-3333-3333-333333333333]

Responses​

Status codeDescriptionTypeResponse headers
200The prompt, or an empty body when no prompt of the caller's has that ID.AiPrompt-
400The prompt ID is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiPrompt

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiPromptsGetFolderById​

AiPromptFolder aiPromptsGetFolderById(id)

GET /api/2.0/ai/prompts/get-folder-by-id

Get a prompt folder

Returns one folder of the caller's prompt library by its ID, without the prompts inside it. The ID is required and is read from the query. An unknown or foreign ID is not reported as 404: the answer is an empty body with status 200. This differs from the delete operation on the same ID, which does answer 404.

Parameters​

NameInTypeDescriptionNotes
idqueryStringThe prompt folder identifier.[required] [example: 44444444-4444-4444-4444-444444444444]

Responses​

Status codeDescriptionTypeResponse headers
200The folder, or an empty body when no folder of the caller's has that ID.AiPromptFolder-
400The folder ID is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiPromptFolder

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiPromptsImportBundle​

AiImportResult aiPromptsImportBundle(aiPromptsImportBundle_request)

POST /api/2.0/ai/prompts/import-bundle

Import bundle

Writes a bundle produced by GET api/2.0/ai/prompts/export back into the caller's library. mode decides how: replace deletes the current prompts and folders before writing, and merge writes the bundle on top of what is already there. The folder references inside the bundle are validated before anything is written, so a corrupt bundle is rejected whole rather than applied halfway. replace is destructive and cannot be undone - export first if the current library matters.

Parameters​

NameInTypeDescriptionNotes
aiPromptsImportBundle_requestbodyaiPromptsImportBundle_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the bundle was written, how many prompts it imported, and what was refused.AiImportResult-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiImportResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiPromptsList​

List aiPromptsList(folderId)

GET /api/2.0/ai/prompts/list

List saved prompts

Lists the caller's saved prompts, newest first. folderId scopes the answer to one folder, and omitting it - or sending it empty - lists the prompts that sit at the root rather than every prompt, because the client fetcher cannot tell an absent value from a null one. There is therefore no way to ask for the whole library in one call: walk the folders from GET api/2.0/ai/prompts/list-folders, or take everything at once with GET api/2.0/ai/prompts/export. The prompts of other users are never included.

Parameters​

NameInTypeDescriptionNotes
folderIdqueryStringThe prompt folder identifier. Omit to list the prompts that sit outside any folder.[optional] [example: 44444444-4444-4444-4444-444444444444]

Responses​

Status codeDescriptionTypeResponse headers
200The prompts of the scope, newest first.List-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

List

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiPromptsListFolders​

List aiPromptsListFolders()

GET /api/2.0/ai/prompts/list-folders

List folders

Lists every folder of the caller's prompt library, newest first, with no parameters and no pagination. Folders are flat, so the answer is a single list rather than a tree. The prompts inside them are not included - read those with GET api/2.0/ai/prompts/list per folder. Another user's folders are never listed.

Parameters​

This endpoint does not need any parameter.

Responses​

Status codeDescriptionTypeResponse headers
200Every folder of the caller's library, newest first.List-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

List

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiPromptsMove​

AiPromptMutationResult aiPromptsMove(aiPromptsMove_request)

PUT /api/2.0/ai/prompts/move

Move a prompt to a folder

Moves a saved prompt into another folder, or to the root when folderId is omitted or null. The name is re-validated in the target folder, so the move fails when a prompt of that name already sits there - rename it first with PUT api/2.0/ai/prompts/update. Nothing about the prompt other than its folder changes. The answer carries the moved prompt.

Parameters​

NameInTypeDescriptionNotes
aiPromptsMove_requestbodyaiPromptsMove_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the prompt was moved, with the moved prompt in prompt.AiPromptMutationResult-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiPromptMutationResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiPromptsRenameFolder​

AiFolderMutationResult aiPromptsRenameFolder(aiPromptsRenameFolder_request)

PUT /api/2.0/ai/prompts/rename-folder

Rename folder

Renames a folder in the caller's prompt library, validating the new name against the folders already there. The prompts inside it are untouched and keep their IDs. The answer carries the renamed folder. A name that another folder already uses is rejected.

Parameters​

NameInTypeDescriptionNotes
aiPromptsRenameFolder_requestbodyaiPromptsRenameFolder_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the folder was renamed, with the stored folder in folder.AiFolderMutationResult-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiFolderMutationResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiPromptsUpdate​

AiPromptMutationResult aiPromptsUpdate(aiPromptsUpdate_request)

PUT /api/2.0/ai/prompts/update

Update a saved prompt

Changes a saved prompt and returns the stored result. Only the fields present in updates are written, so a partial object leaves the rest of the prompt alone. The name and the folder reference are re-validated whenever either changes, which means an update can fail on a name another prompt in the same folder already uses. Use PUT api/2.0/ai/prompts/move to change only the folder.

Parameters​

NameInTypeDescriptionNotes
aiPromptsUpdate_requestbodyaiPromptsUpdate_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the prompt was updated, with the stored prompt in prompt.AiPromptMutationResult-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiPromptMutationResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

AISettingsApi​

aiSettingsGet​

AiAiSettingsWrapper aiSettingsGet()

GET /api/2.0/ai/config

Get AI settings

Reports the portal's AI configuration and whether AI is usable at all, which is the first call a client makes before offering any AI feature. It takes no parameters and is proxied unchanged to the DocSpace AI service, so the answer is that service's settings payload. Among other things it says whether the portal runs on the central AI gateway, which decides whether provider profiles can be edited here at all. This is a read-only operation.

Parameters​

This endpoint does not need any parameter.

Responses​

Status codeDescriptionTypeResponse headers
200The portal's AI configuration and whether AI is usable at all.AiAiSettingsWrapper-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiAiSettingsWrapper

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiSettingsGetUser​

AiAiUserSettingsWrapper aiSettingsGetUser()

GET /api/2.0/ai/config/user

Get user AI settings

Returns the AI settings of the calling user, as opposed to the portal-wide ones. It takes no parameters - the user is the authenticated caller, and there is no way to read somebody else's settings - and is proxied unchanged to the DocSpace AI service. Use GET api/2.0/ai/config for the portal-wide configuration. This is a read-only operation.

Parameters​

This endpoint does not need any parameter.

Responses​

Status codeDescriptionTypeResponse headers
200The calling user's AI settings.AiAiUserSettingsWrapper-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiAiUserSettingsWrapper

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiSettingsGetVectorization​

AiVectorizationSettingsWrapper aiSettingsGetVectorization()

GET /api/2.0/ai/config/vectorization

Get vectorization settings

Returns the portal's vectorization settings - the embedding provider and the options used when portal content is indexed for retrieval. It takes no parameters and is proxied unchanged to the DocSpace AI service. Vectorization is a portal-wide setting, so there is no room-scoped form of it. Change it with PUT api/2.0/ai/config/vectorization.

Parameters​

This endpoint does not need any parameter.

Responses​

Status codeDescriptionTypeResponse headers
200The portal's vectorization settings.AiVectorizationSettingsWrapper-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiVectorizationSettingsWrapper

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiSettingsSetUser​

AiAiUserSettingsWrapper aiSettingsSetUser(request_body)

PUT /api/2.0/ai/config/user

Update user AI settings

Replaces the AI settings of the calling user and returns the stored result. The body is proxied unchanged to the DocSpace AI service, which validates it, so a rejected value comes back with that service's verdict. Only the caller's own settings can be written. Portal-wide configuration is not touched by this operation.

Parameters​

NameInTypeDescriptionNotes
request_bodybodyMapThe user's AI settings, proxied unchanged to the DocSpace AI service, which owns and validates the shape. Read the current one with GET api/2.0/ai/config/user and send it back changed.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The calling user's stored AI settings.AiAiUserSettingsWrapper-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiAiUserSettingsWrapper

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiSettingsSetVectorization​

AiVectorizationSettingsWrapper aiSettingsSetVectorization(request_body)

PUT /api/2.0/ai/config/vectorization

Update vectorization settings

Replaces the portal's vectorization settings and returns the stored result. The body is proxied unchanged to the DocSpace AI service, which validates it, so a rejected value is reported with that service's own verdict rather than being checked here. Changing the embedding provider does not re-index anything already indexed - start that separately with POST api/2.0/ai/vectorization/tasks. This is a portal-wide setting and requires the permissions the AI service demands for it.

Parameters​

NameInTypeDescriptionNotes
request_bodybodyMapThe portal's vectorization settings, proxied unchanged to the DocSpace AI service, which owns and validates the shape. Read the current one with GET api/2.0/ai/config/vectorization and send it back changed.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The stored vectorization settings.AiVectorizationSettingsWrapper-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiVectorizationSettingsWrapper

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

AIThreadsApi​

aiThreadsAppendUserMessage​

aiThreadsAppendUserMessage_200_response aiThreadsAppendUserMessage(aiThreadsAppendUserMessage_request)

POST /api/2.0/ai/threads/append-user-message

Append user message

Stores a user message in a thread and bumps its last-edit date so the thread resurfaces at the top of the list. The per-kind attachment cap of the composer is enforced here as well, so a direct API call cannot exceed what the UI allows. Passing profileId rebinds the thread to another model, which is how a mid-conversation model switch is recorded. The answer carries the new message's ID; the message is stored as sent and no reply is generated - run a round with POST api/2.0/ai/ai/send-with-stream for that.

Parameters​

NameInTypeDescriptionNotes
aiThreadsAppendUserMessage_requestbodyaiThreadsAppendUserMessage_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200The stored message, with the ID storage assigned to it.aiThreadsAppendUserMessage_200_response-
400The message is longer than the limit allows.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

aiThreadsAppendUserMessage_200_response

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiThreadsClearMessages​

AiSuccessResponse aiThreadsClearMessages(body)

DELETE /api/2.0/ai/threads/clear-messages

Clear messages

Removes every message of a thread while keeping the thread, its title and its model binding, and bumps its last-edit date. The messages are gone for good. Unlike delete this does not verify that the thread exists, so clearing an unknown threadId reports success rather than 404. The answer only confirms the write.

Parameters​

NameInTypeDescriptionNotes
bodybodyStringThe ID of the thread to empty, as a bare JSON string.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the request was accepted. It does not mean the thread existed.AiSuccessResponse-
400threadId is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiThreadsCreate​

AiThread aiThreadsCreate(aiThreadsCreate_request)

POST /api/2.0/ai/threads/create

Create a chat thread

Creates a chat thread with a title supplied by the caller and returns it. A scoped thread requires that entityId names a room the caller can open, and a model has to resolve for the scope - an explicit profileId, or the room's Chat assignment - otherwise there is nothing to run the thread against and the call answers 404. In an agent room the agent's own assignment overrides any profileId sent with the request, so a thread there always starts on the agent's model. Use POST api/2.0/ai/threads/open-or-create instead when the title should be generated from the first user message.

Parameters​

NameInTypeDescriptionNotes
aiThreadsCreate_requestbodyaiThreadsCreate_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200The created thread.AiThread-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404The entityId names a room the caller cannot open, or no live AI profile is bound to it, so there is no model to run the thread against.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiThread

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiThreadsDelete​

AiSuccessResponse aiThreadsDelete(body)

DELETE /api/2.0/ai/threads/delete

Delete a chat thread

Deletes a thread together with every message in it. The thread has to exist: unlike the other operations that take a threadId, this one checks first and answers 404 for an unknown or already-deleted thread rather than reporting success. The deletion is permanent and the messages cannot be recovered. To empty a thread but keep it, use DELETE api/2.0/ai/threads/clear-messages.

Parameters​

NameInTypeDescriptionNotes
bodybodyStringThe ID of the thread to delete, as a bare JSON string.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the thread and its messages are gone.AiSuccessResponse-
400threadId is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404No thread has this ID.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiThreadsDeleteMessage​

AiSuccessResponse aiThreadsDeleteMessage(body)

DELETE /api/2.0/ai/threads/delete-message

Delete message

Deletes one message and leaves the rest of the thread untouched. messageId is required and may be sent either in the body or as a query parameter. An unknown ID is not reported: the call answers success without having deleted anything, so verify with GET api/2.0/ai/threads/read-messages when it matters. The deletion is permanent.

Parameters​

NameInTypeDescriptionNotes
bodybodyStringThe ID of the message to delete, as a bare JSON string.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the request was accepted, whether or not a message was deleted.AiSuccessResponse-
400messageId is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiThreadsGetById​

AiThread aiThreadsGetById(threadId)

GET /api/2.0/ai/threads/get-by-id

Get a chat thread

Returns one thread by its ID, without its messages - read those with GET api/2.0/ai/threads/read-messages. threadId is required and an unknown one answers 404, so the result is never an empty body. The answer carries the thread's title, its model binding and its last-edit date. This is a read-only operation and does not bump that date.

Parameters​

NameInTypeDescriptionNotes
threadIdqueryStringThe chat thread identifier.[required] [example: 11111111-1111-1111-1111-111111111111]

Responses​

Status codeDescriptionTypeResponse headers
200The thread, without its messages.AiThread-
400threadId is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404No thread has this ID.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiThread

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiThreadsGetMessageById​

AiThreadMessageLike aiThreadsGetMessageById(messageId)

GET /api/2.0/ai/threads/get-message-by-id

Get one chat message

Returns one message by its ID, wherever it sits, without needing the thread it belongs to. messageId is required. Unlike GET api/2.0/ai/threads/get-by-id an unknown ID is not reported as 404: the answer is an empty body with status 200, so a client has to treat a missing payload as no such message. Message IDs come from the thread history or from the answer of POST api/2.0/ai/threads/append-user-message.

Parameters​

NameInTypeDescriptionNotes
messageIdqueryStringThe globally unique chat message identifier.[required] [example: 22222222-2222-2222-2222-222222222222]

Responses​

Status codeDescriptionTypeResponse headers
200The message, or an empty body when no message has that ID.AiThreadMessageLike-
400messageId is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiThreadMessageLike

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiThreadsList​

List aiThreadsList(entityId, count, cursor, query)

GET /api/2.0/ai/threads/list

List chat threads

Lists the threads of a scope, most recently edited first, and searches their titles case-insensitively when query is given. Every parameter is optional: omitting entityId lists the global scope, and omitting count lets the engine apply its own page size. Pagination is by cursor, and the cursor is a JSON object passed as a string in the query - {id: <last thread id>, lastEditDate: <its date>} - taken from the last entry of the previous page. A cursor that is not valid JSON, or that lacks an id, is ignored rather than rejected, and the read silently starts from the first page again.

Parameters​

NameInTypeDescriptionNotes
entityIdqueryStringThe DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope.[optional] [example: 1234]
countqueryIntegerThe maximum number of items to return in one page.[optional] [example: 20]
cursorqueryStringThe keyset pagination cursor: the JSON-encoded sort key of the last item already received. Omit for the first page.[optional] [example: {"id":"11111111-1111-1111-1111-111111111111","lastEditDate":1767225600000}]
queryqueryStringThe full-text query the thread list is filtered by.[optional] [example: contract]

Responses​

Status codeDescriptionTypeResponse headers
200The threads of the scope, most recently edited first.List-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

List

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiThreadsOpenOrCreate​

AiOpenOrCreateResult aiThreadsOpenOrCreate(aiThreadsOpenOrCreate_request)

POST /api/2.0/ai/threads/open-or-create

Open or create

Opens a chat thread and returns it with its history, or creates one whose title is generated from the first message supplied in the request. That first message is not persisted: follow up with POST api/2.0/ai/threads/append-user-message to store it, or start the round directly with POST api/2.0/ai/ai/send-with-stream. Unlike create this takes a whole resolved profile object rather than an ID, and a request without one answers 404 because no model could be bound. A supplied entityId has to be a room the caller can open; anything that is not an agent room folds to the global scope instead of being rejected.

Parameters​

NameInTypeDescriptionNotes
aiThreadsOpenOrCreate_requestbodyaiThreadsOpenOrCreate_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200The thread that was opened or created, with its prior messages. A created one carries the generated title.AiOpenOrCreateResult-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404The entityId names a room the caller cannot open, or no live AI profile is bound to it.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiOpenOrCreateResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiThreadsReadMessages​

List aiThreadsReadMessages(threadId, count, cursor, direction)

GET /api/2.0/ai/threads/read-messages

Read messages

Reads the messages of one thread, oldest first, with the same string-encoded JSON cursor as the thread list. direction turns the read around, and only the exact value desc does so - anything else, including a misspelling, reads forward. Omitting threadId is not an error: the call answers 200 with an empty list, so an empty result does not distinguish a thread with no messages from a request that forgot the ID. A malformed cursor is ignored and the read starts from the beginning.

Parameters​

NameInTypeDescriptionNotes
threadIdqueryStringThe chat thread identifier.[required] [example: 11111111-1111-1111-1111-111111111111]
countqueryIntegerThe maximum number of items to return in one page.[optional] [example: 20]
cursorqueryStringThe keyset pagination cursor: the JSON-encoded sort key of the last item already received. Omit for the first page.[optional] [example: {"id":"11111111-1111-1111-1111-111111111111","lastEditDate":1767225600000}]
directionqueryStringThe order the message page is read in. Only desc turns the read around and pages back from the newest message; omit for the forward read.[optional] [example: desc]

Responses​

Status codeDescriptionTypeResponse headers
200The thread's messages, oldest first unless direction reversed them. An empty list also means the request carried no thread ID.List-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

List

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiThreadsRegenerateTitle​

aiThreadsRegenerateTitle_200_response aiThreadsRegenerateTitle(aiThreadsRegenerateTitle_request)

POST /api/2.0/ai/threads/regenerate-title

Regenerate title

Asks the model to produce a title from the thread's first user message, stores it, and returns the new title. Both threadId and a resolved profile object are required; a thread with no user message yet has nothing to title and fails. This costs a model call, unlike POST api/2.0/ai/threads/rename, which just stores the string it is given. An entityMeta sent with the request is only read for its entityId hint - the source itself is resolved server-side under the caller's credentials, so a client cannot attribute the call to somebody else's room.

Parameters​

NameInTypeDescriptionNotes
aiThreadsRegenerateTitle_requestbodyaiThreadsRegenerateTitle_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200The newly generated title, already stored on the thread.aiThreadsRegenerateTitle_200_response-
400threadId is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

aiThreadsRegenerateTitle_200_response

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiThreadsRename​

AiSuccessResponse aiThreadsRename(aiThreadsRename_request)

PUT /api/2.0/ai/threads/rename

Rename a chat thread

Replaces a thread's title with the one supplied and bumps its last-edit date. Both threadId and a title with at least one non-whitespace character are required - a blank title is rejected rather than silently stored, so a thread cannot end up nameless. The answer only confirms the write. To have the model produce a title instead of supplying one, use POST api/2.0/ai/threads/regenerate-title.

Parameters​

NameInTypeDescriptionNotes
aiThreadsRename_requestbodyaiThreadsRename_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the new title was stored.AiSuccessResponse-
400threadId or the new title is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiThreadsTouch​

AiSuccessResponse aiThreadsTouch(aiThreadsTouch_request)

POST /api/2.0/ai/threads/touch

Bump a thread's activity

Bumps a thread's last-edit date without adding a message, which resurfaces it in the list. Passing profileId also rebinds the thread to another model, so this is the operation to call when a model switch alone should count as activity. Nothing else about the thread changes and the answer only confirms the write. It is idempotent: repeating it simply moves the date forward again.

Parameters​

NameInTypeDescriptionNotes
aiThreadsTouch_requestbodyaiThreadsTouch_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the thread's activity date moved forward.AiSuccessResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiThreadsUpdateMessage​

AiSuccessResponse aiThreadsUpdateMessage(aiThreadsUpdateMessage_request)

PUT /api/2.0/ai/threads/update-message

Update message

Replaces the content of one stored message, which is how the edit and regenerate flows change a message outside the streaming lifecycle. The whole message is overwritten by the one supplied rather than merged, so send a complete object. Neither the ID nor the payload is validated here, so a malformed request surfaces as an error relayed from storage rather than as a 400. The answer only confirms the write.

Parameters​

NameInTypeDescriptionNotes
aiThreadsUpdateMessage_requestbodyaiThreadsUpdateMessage_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the replacement was stored.AiSuccessResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

AIToolsApi​

aiToolsAddCustomServer​

AiToolsMutationResult aiToolsAddCustomServer(aiToolsAddCustomServer_request)

POST /api/2.0/ai/tools/add-custom-server

Add custom server

Registers a custom MCP server under the given name so the model may call its tools. The name becomes a URL path segment, so it may not be ., .., or contain a path separator or a control character. config may be omitted in two cases: a name matching a host-configured system server pins the entry to that server's canonical settings as a whitelist marker, and a name already registered portal-wide copies the portal-level configuration into this scope; anything else without a config is rejected. entityId scopes the registration and has to name a room the caller can open - a room that is not an agent room folds to the portal-wide scope, while an unreachable one is refused so it cannot silently rewrite the portal's own registry.

Parameters​

NameInTypeDescriptionNotes
aiToolsAddCustomServer_requestbodyaiToolsAddCustomServer_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the server was registered, with the stored entry.AiToolsMutationResult-
400The server name is missing or is not routable.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404The referenced object does not exist, or the caller cannot access it - the two are deliberately indistinguishable, so a room the caller may not open answers 404 rather than 403.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiToolsMutationResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiToolsGetAllowAlways​

List aiToolsGetAllowAlways(entityId)

GET /api/2.0/ai/tools/get-allow-always

Get allow always

Returns the always-allow list of the scope - the tools whose calls run without pausing the round for approval. entityId picks the scope and omitting it reads the portal-wide setting. An empty answer means every tool call has to be approved through POST api/2.0/ai/ai/approve-tool-call. Use GET api/2.0/ai/tools/is-allow-always to ask about a single tool.

Parameters​

NameInTypeDescriptionNotes
entityIdqueryStringThe DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope.[optional] [example: 1234]

Responses​

Status codeDescriptionTypeResponse headers
200The tools that run without an approval pause. An empty list means every call needs approval.List-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

List

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiToolsGetCustomServer​

Object aiToolsGetCustomServer(name, entityId)

GET /api/2.0/ai/tools/get-custom-server

Get custom server

Returns the stored configuration of one registered custom MCP server. The name is required and is read from the query; entityId picks the scope, and omitting it reads the portal-wide registry. A name that is not registered answers a null body with status 200 rather than 404. The configuration of a system server is returned empty on purpose: those run server-side only, so neither their endpoint nor their credentials are handed to a browser.

Parameters​

NameInTypeDescriptionNotes
namequeryStringThe custom MCP server name.[required] [example: acme-mcp]
entityIdqueryStringThe DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope.[optional] [example: 1234]

Responses​

Status codeDescriptionTypeResponse headers
200The stored configuration, empty for a system server and null when the name is not registered.Object-
400The server name is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

Object

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiToolsGetDisabled​

Map aiToolsGetDisabled(entityId)

GET /api/2.0/ai/tools/get-disabled

Get disabled

Returns the tools switched off in the scope, as a map of server type to tool names. entityId picks the scope and omitting it reads the portal-wide setting. An absent server type means nothing is switched off for it, so an empty answer means every tool is on offer. Use GET api/2.0/ai/tools/is-tool-disabled to ask about one tool instead of reading the whole map.

Parameters​

NameInTypeDescriptionNotes
entityIdqueryStringThe DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope.[optional] [example: 1234]

Responses​

Status codeDescriptionTypeResponse headers
200The switched-off tools as a map of server type to tool names. An absent type means nothing is switched off for it.Map-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

Map

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiToolsIsAllowAlways​

Boolean aiToolsIsAllowAlways(serverType, toolName, entityId)

GET /api/2.0/ai/tools/is-allow-always

Is allow always

Tells whether one named tool runs without an approval pause in the scope. Both serverType and toolName are required and are read from the query; entityId picks the scope. The answer is a bare boolean. A false answer means a call to that tool pauses the round, and the caller resumes it with the approve or deny operation.

Parameters​

NameInTypeDescriptionNotes
serverTypequeryStringThe MCP server type the tool belongs to.[required] [example: docspace]
toolNamequeryStringThe tool name.[required] [example: docspace_get_folder]
entityIdqueryStringThe DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope.[optional] [example: 1234]

Responses​

Status codeDescriptionTypeResponse headers
200Whether that one tool runs without an approval pause.Boolean-
400serverType or toolName is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

Boolean

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiToolsIsToolDisabled​

Boolean aiToolsIsToolDisabled(serverType, toolName, entityId)

GET /api/2.0/ai/tools/is-tool-disabled

Is tool disabled

Tells whether one named tool of one server type is switched off in the scope. Both serverType and toolName are required and are read from the query; entityId picks the scope. The answer is a bare boolean. It reflects only the disable list - a tool that is on offer may still require approval, which GET api/2.0/ai/tools/is-allow-always reports.

Parameters​

NameInTypeDescriptionNotes
serverTypequeryStringThe MCP server type the tool belongs to.[required] [example: docspace]
toolNamequeryStringThe tool name.[required] [example: docspace_get_folder]
entityIdqueryStringThe DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope.[optional] [example: 1234]

Responses​

Status codeDescriptionTypeResponse headers
200Whether that one tool is switched off in the scope.Boolean-
400serverType or toolName is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

Boolean

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiToolsListCustomServers​

Map aiToolsListCustomServers(entityId)

GET /api/2.0/ai/tools/list-custom-servers

List custom servers

Lists the custom MCP servers registered in the scope as a map of name to configuration. entityId picks the scope and omitting it lists the portal-wide registry. The configuration of any entry that names a host-configured system server comes back empty, for the same reason as in the single-server read, and the portal's own built-in MCP server is left out of the list entirely because it is always enabled and cannot be configured. The names in the answer are what the disable and always-allow operations accept as serverType.

Parameters​

NameInTypeDescriptionNotes
entityIdqueryStringThe DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope.[optional] [example: 1234]

Responses​

Status codeDescriptionTypeResponse headers
200The scope's registrations as a map of name to configuration, system entries emptied and the portal's built-in server left out.Map-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

Map

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiToolsListSystemTools​

aiToolsListSystemTools_200_response aiToolsListSystemTools(entityId)

GET /api/2.0/ai/tools/list-system-tools

List system tools

Lists every tool the scope can offer the model, as a map of server type to tool group. The answer merges two sources - the host-configured system servers and the live tools of the scope's registered custom MCP servers - and names the system ones separately in system, so a client can tell the two apart. errors carries the reason a registered server delivered no tools, which is the text to show on a permission card, because the browser cannot reach a server-executed MCP server to find out for itself. The connections are opened server-side, so one request is enough and the client never speaks MCP itself; the portal's own built-in server is left out because it is always enabled.

Parameters​

NameInTypeDescriptionNotes
entityIdqueryStringThe DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope.[optional] [example: 1234]

Responses​

Status codeDescriptionTypeResponse headers
200The scope's tools grouped by server type, the system group keys named in system, and the reason a registered server delivered none in errors.aiToolsListSystemTools_200_response-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

aiToolsListSystemTools_200_response

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiToolsRemoveCustomServer​

AiSuccessResponse aiToolsRemoveCustomServer(aiToolsRemoveCustomServer_request)

DELETE /api/2.0/ai/tools/remove-custom-server

Remove custom server

Unregisters a custom MCP server from the scope, so the model is no longer offered its tools. The name is required and may be sent in the body or as a query parameter, and entityId has to name a room the caller can open. A name that is not registered is not reported: the call answers success without removing anything. The server itself is untouched - only this portal's registration is dropped.

Parameters​

NameInTypeDescriptionNotes
aiToolsRemoveCustomServer_requestbodyaiToolsRemoveCustomServer_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the request was accepted, whether or not a registration was removed.AiSuccessResponse-
400The server name is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404The referenced object does not exist, or the caller cannot access it - the two are deliberately indistinguishable, so a room the caller may not open answers 404 rather than 403.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiToolsReplaceAllCustomServers​

AiToolsBulkResult aiToolsReplaceAllCustomServers(aiToolsReplaceAllCustomServers_request)

PUT /api/2.0/ai/tools/replace-all-custom-servers

Replace all custom servers

Replaces the whole custom MCP server registry of the scope with the supplied map in one write, which makes it the operation a settings screen saves with. map is required: without it the registry would be emptied, so a missing or non-object value is rejected rather than treated as none. Every name in the map is validated as a routable path segment and every configuration is resolved before anything is written, so a map with one bad entry changes nothing. entityId has to name a room the caller can open - this is the operation where an unreachable one would otherwise have wiped the portal-wide registry.

Parameters​

NameInTypeDescriptionNotes
aiToolsReplaceAllCustomServers_requestbodyaiToolsReplaceAllCustomServers_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the registry was replaced, with errors listing what was refused.AiToolsBulkResult-
400The body is not a map of server name to configuration, or a name is not routable.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404The referenced object does not exist, or the caller cannot access it - the two are deliberately indistinguishable, so a room the caller may not open answers 404 rather than 403.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiToolsBulkResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiToolsSetAllowAlways​

AiSuccessResponse aiToolsSetAllowAlways(aiToolsSetAllowAlways_request)

PUT /api/2.0/ai/tools/set-allow-always

Set allow always

Adds one tool to the scope's always-allow list, or takes it off, which decides whether a call to it pauses the round for approval. value is coerced to a boolean, so any truthy value adds and any falsy one removes. Unlike the disable operation, serverType is not validated here: an unknown one is stored and then simply never matches, so a wrong value fails silently. entityId has to name a room the caller can open.

Parameters​

NameInTypeDescriptionNotes
aiToolsSetAllowAlways_requestbodyaiToolsSetAllowAlways_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the always-allow list was updated.AiSuccessResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404The referenced object does not exist, or the caller cannot access it - the two are deliberately indistinguishable, so a room the caller may not open answers 404 rather than 403.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiToolsSetDisabled​

AiSuccessResponse aiToolsSetDisabled(aiToolsSetDisabled_request)

PUT /api/2.0/ai/tools/set-disabled

Set disabled

Switches off the listed tools of one server type in the scope, so the model is no longer offered them. serverType has to be a key the round's tool filter actually matches - a host-configured system server, one of the two DocSpace integration groups, web search, image generation, or one of the scope's registered custom servers - and an unknown value is rejected with the list of valid ones in the message, rather than stored and silently ignored. toolNames replaces the previous selection for that server type, so send the full list and pass an empty one to switch everything back on. entityId has to name a room the caller can open.

Parameters​

NameInTypeDescriptionNotes
aiToolsSetDisabled_requestbodyaiToolsSetDisabled_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the new disable list was stored for that server type.AiSuccessResponse-
400The list of tools to disable is malformed.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404The referenced object does not exist, or the caller cannot access it - the two are deliberately indistinguishable, so a room the caller may not open answers 404 rather than 403.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiToolsUpdateCustomServer​

AiToolsMutationResult aiToolsUpdateCustomServer(aiToolsUpdateCustomServer_request)

PUT /api/2.0/ai/tools/update-custom-server

Update custom server

Replaces the stored configuration of a registered custom MCP server, under the same name and scope rules as the add operation. The name is re-validated as a routable path segment, and an omitted config resolves the same way - to a system server's canonical settings, or to the portal-level entry of that name. entityId has to name a room the caller can open. The answer carries the stored registry entry.

Parameters​

NameInTypeDescriptionNotes
aiToolsUpdateCustomServer_requestbodyaiToolsUpdateCustomServer_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the server was updated, with the stored entry.AiToolsMutationResult-
400The server name is missing or is not routable.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404The referenced object does not exist, or the caller cannot access it - the two are deliberately indistinguishable, so a room the caller may not open answers 404 rather than 403.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiToolsMutationResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

AIVectorizationApi​

aiVectorizationStartTask​

aiVectorizationStartTask_200_response aiVectorizationStartTask(aiVectorizationStartTask_request)

POST /api/2.0/ai/vectorization/tasks

Start a vectorization task

Queues the indexing of the portal files named in the body so their contents can be retrieved during a chat round. The body is proxied unchanged to the DocSpace AI service, which validates it and owns the job. Indexing is asynchronous and fire-and-forget: the answer acknowledges the request without carrying a job handle, so there is nothing to poll and progress is not reported here. The embedding provider used is the one in GET api/2.0/ai/config/vectorization, and changing that setting does not re-index anything already indexed - queue it again for that.

Parameters​

NameInTypeDescriptionNotes
aiVectorizationStartTask_requestbodyaiVectorizationStartTask_requestThe files to index, proxied unchanged to the DocSpace AI service, which owns and validates the shape.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the indexing was queued. It carries no job handle, so there is nothing to poll.aiVectorizationStartTask_200_response-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

aiVectorizationStartTask_200_response

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

AIWebSearchApi​

aiWebSearchClear​

AiSuccessResponse aiWebSearchClear(body)

DELETE /api/2.0/ai/web-search/clear

Clear the web-search configuration

Removes the portal's web-search configuration, after which web search is unavailable everywhere it was not configured separately. This is not scoped: it takes no entityId and any body sent with it is ignored, so it cannot be used to clear one room's configuration. Clearing an already-unconfigured portal is not an error and the call answers success either way. The stored provider key is destroyed with the configuration and has to be entered again.

Parameters​

NameInTypeDescriptionNotes
bodybodyStringIgnored. The operation always clears the portal-wide configuration, so send an empty body; a value here does not scope it to a room.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the portal has no web-search configuration any more.AiSuccessResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiWebSearchConfigure​

AiWebSearchMutationResult aiWebSearchConfigure(aiWebSearchConfigure_request)

PUT /api/2.0/ai/web-search/configure

Configure and verify web search

Validates a web-search configuration against the live provider and stores it only if the provider answers, which makes it the safe way to save a form in one step. entityId scopes the configuration to a room and has to name one the caller can open; omitting it configures the portal. A baseUrl pointing at a private network address is refused. Use PUT api/2.0/ai/web-search/set-active-config when the configuration should be stored without a provider round trip.

Parameters​

NameInTypeDescriptionNotes
aiWebSearchConfigure_requestbodyaiWebSearchConfigure_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the configuration was stored, after the provider answered.AiWebSearchMutationResult-
400The provider URL is missing, malformed, or points at a private network address.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404The referenced object does not exist, or the caller cannot access it - the two are deliberately indistinguishable, so a room the caller may not open answers 404 rather than 403.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiWebSearchMutationResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiWebSearchGetActiveConfig​

AiWebSearchConfig aiWebSearchGetActiveConfig(entityId)

GET /api/2.0/ai/web-search/get-active-config

Get active config

Returns the web-search configuration in force for a scope - the provider, its endpoint and its settings. entityId picks a room and has to name one the caller can open; omitting it reads the portal-wide configuration, and a room with none of its own falls back to that. An unconfigured scope answers an empty result rather than 404. The provider key is not part of the answer, so a client cannot read it back after storing it.

Parameters​

NameInTypeDescriptionNotes
entityIdqueryStringThe DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope.[optional] [example: 1234]

Responses​

Status codeDescriptionTypeResponse headers
200The configuration in force for the scope, without the provider key, or an empty result when web search is not configured.AiWebSearchConfig-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404The referenced object does not exist, or the caller cannot access it - the two are deliberately indistinguishable, so a room the caller may not open answers 404 rather than 403.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiWebSearchConfig

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiWebSearchIsConfigured​

Boolean aiWebSearchIsConfigured(entityId)

GET /api/2.0/ai/web-search/is-configured

Is configured

Tells whether web search is available in a scope, as a bare boolean, which is the cheap check for hiding or showing the feature. entityId picks a room and has to name one the caller can open. It reports the same state as GET api/2.0/ai/web-search/get-active-config without transferring the configuration itself. A true answer means a provider is stored, not that the provider is currently reachable - probe that with POST api/2.0/ai/web-search/test-connection.

Parameters​

NameInTypeDescriptionNotes
entityIdqueryStringThe DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope.[optional] [example: 1234]

Responses​

Status codeDescriptionTypeResponse headers
200Whether a web-search provider is stored for the scope.Boolean-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404The referenced object does not exist, or the caller cannot access it - the two are deliberately indistinguishable, so a room the caller may not open answers 404 rather than 403.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

Boolean

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json

aiWebSearchPassthroughContents​

Map aiWebSearchPassthroughContents(request_body)

POST /api/2.0/ai/websearch/v1/contents

Web page contents passthrough

Fetches the contents of web pages on behalf of the document editor's AI plugin, against the portal's active web-search provider, exactly as the search passthrough does — including the entityId / entityKind billing attribution. The portal-wide configuration is used and a portal without one answers 404. The provider's status, body and content type are relayed verbatim, so its 429 and its failures surface unchanged. This is the follow-up to POST api/2.0/ai/websearch/v1/search, which returns the results whose contents this operation retrieves.

Parameters​

NameInTypeDescriptionNotes
request_bodybodyMapA page-contents request in the shape the portal's active web-search provider expects, forwarded to it unchanged. The endpoint and the key come from the stored configuration.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The provider's own response, relayed verbatim with its status and content type.Map-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404Web search is not configured for this portal.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
429Relayed verbatim from the AI provider, which is rate-limiting this portal's key.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-
502The AI provider could not be reached, or answered with a failure of its own.AiErrorResponse-

Return type​

Map

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiWebSearchPassthroughSearch​

Map aiWebSearchPassthroughSearch(request_body)

POST /api/2.0/ai/websearch/v1/search

Web search passthrough

Runs a web search on behalf of the document editor's AI plugin, which holds only a placeholder configuration - the portal's active provider and its key are resolved here, so neither ever reaches the browser. The portal-wide configuration is used, and a portal without one answers 404. The entityId and entityKind query parameters name the document the search is billed to; with the ONLYOFFICE provider the entry is resolved under the caller's credentials and sent to the gateway as the request metadata (source_id / source_type / source_title), and an entry the caller cannot open sends none. The provider's own status, body and content type are relayed as they stand, so a provider that rate-limits answers 429 and one that is unreachable answers 502. Closing the connection aborts the upstream request.

Parameters​

NameInTypeDescriptionNotes
request_bodybodyMapA search request in the shape the portal's active web-search provider expects, forwarded to it unchanged. The endpoint and the key come from the stored configuration and must not be sent here.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The provider's own response, relayed verbatim with its status and content type.Map-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404Web search is not configured for this portal.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
429Relayed verbatim from the AI provider, which is rate-limiting this portal's key.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-
502The AI provider could not be reached, or answered with a failure of its own.AiErrorResponse-

Return type​

Map

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiWebSearchSetActiveConfig​

AiSuccessResponse aiWebSearchSetActiveConfig(aiWebSearchConfigure_request)

PUT /api/2.0/ai/web-search/set-active-config

Set active config

Stores a web-search configuration without contacting the provider first, for a form that has already validated its input or for restoring a known-good configuration. entityId scopes it to a room and has to name one the caller can open. A baseUrl pointing at a private network address is still refused, because that check is local. Nothing guarantees the stored provider works: follow up with POST api/2.0/ai/web-search/test-connection, or use PUT api/2.0/ai/web-search/configure to have the store gated on a live probe.

Parameters​

NameInTypeDescriptionNotes
aiWebSearchConfigure_requestbodyaiWebSearchConfigure_request[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the configuration was stored, unverified.AiSuccessResponse-
400The provider URL is missing, malformed, or points at a private network address.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
404The referenced object does not exist, or the caller cannot access it - the two are deliberately indistinguishable, so a room the caller may not open answers 404 rather than 403.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

aiWebSearchTestConnection​

aiProfilesTestConnection_200_response aiWebSearchTestConnection(AiWebSearchConfig)

POST /api/2.0/ai/web-search/test-connection

Test a web-search provider

Probes a web-search configuration against the live provider and reports the outcome, storing nothing - this is what a Test button calls so that a failure commits no state. The configuration is taken from the request rather than from storage, so credentials that were never saved can be checked. A baseUrl pointing at a private network address is refused before any request leaves the portal. The verdict is carried in the body rather than in the status, so a failed probe still answers 200 and the caller has to read the payload.

Parameters​

NameInTypeDescriptionNotes
AiWebSearchConfigbodyAiWebSearchConfig[required]

Responses​

Status codeDescriptionTypeResponse headers
200The outcome of the probe. A failed probe is reported here, not as a status.aiProfilesTestConnection_200_response-
400The provider URL is missing, malformed, or points at a private network address.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, or the caller is a guest. Relayed from the DocSpace AI service.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

aiProfilesTestConnection_200_response

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json

Models​

Model AiActionType​

The AI action a request or an assignment applies to. Each action has its own assignment slot; Default is the profile used when an action's own slot is empty.

Possible values:

  • Default
  • Chat
  • Code
  • Summarization
  • Translation
  • TextAnalyze
  • ImageGeneration
  • OCR
  • Vision

Model AiAgentNewItemsDto​

The agent new item's information.

NameTypeDescriptionNotes
agentAiFileEntryBaseDtoThe agent file entry.[required]
itemsListThe list of file entry items.[required] [nullable]

Model AiAiActionArgs​

NameTypeDescriptionNotes
toolsListExtra tools offered to the model for this request.[optional] [example: []]
isReasoningBooleanLegacy extended-thinking switch; stands for medium. reasoningLevel wins when both are set.[optional] [example: false]
reasoningLevelAiAiReasoningLevelDepth of extended thinking for the round; providers clamp it to what the model accepts.[optional] [enum: off, low, medium, high, max]
promptAiAiActionArgs_prompt[optional]

Model AiAiActionArgs.prompt​

Override the action's baked-in system prompt (replace or append).

NameTypeDescriptionNotes
modeString[required] [enum: replace, append]
textString[required]

Model AiAiReasoningLevel​

Provider-neutral extended-thinking depth. off disables thinking where the model allows it.

Possible values:

  • off
  • low
  • medium
  • high
  • max

Model AiAiSendStreamBody​

Shared body of the two streaming send endpoints (sendWithStream and its OpenAI-framed twin) — the Chat action is implied, so there is no actionType.

NameTypeDescriptionNotes
threadIdStringTarget thread; a new one is created (with an auto title) when omitted.[optional] [example: 11111111-1111-1111-1111-111111111111]
userMessageAiThreadMessageLikeThe user turn to send.[required] [example: {role=user, content=Summarise the attached contract.}]
actionArgsAiAiActionArgsPer-request engine options: extra tools, reasoning, prompt override.[optional] [example: {isReasoning=false}]
entityIdStringOptional entity (room) scope for profile resolution.[optional] [example: 1234]
profileIdStringSession-level profile override for this request only.[optional] [example: 00000000-0000-0000-0000-000000000000]

Model AiAiSettingsDto​

The AI module settings.

NameTypeDescriptionNotes
vectorizationEnabledBooleanIndicates whether document vectorization is enabled.[optional] [example: true]
vectorizationNeedResetBooleanIndicates whether the embedding provider API key needs to be reconfigured.[optional] [example: false]
aiReadyBooleanIndicates whether the AI subsystem is fully configured and operational.[optional] [example: true]
embeddingModelStringThe name of the embedding model used for document vectorization.[required] [example: text-embedding-3-small] [nullable]
systemAiEnabledBooleanIndicates whether the system-level AI provider is enabled.[optional] [example: true]
recommendedModelForFormsStringThe identifier of the model recommended for form generation.[optional] [example: gpt-5.4] [nullable]

Model AiAiSettingsWrapper​

The successful API response containing the AiSettingsDto object.

NameTypeDescriptionNotes
responseAiAiSettingsDtoThe AiSettingsDto object returned by the operation.[optional]
countInteger (int32)The total number of items in the response[optional]
linksListList of links related to the response[optional]
statusInteger (int32)HTTP status code of the response[optional]
statusCodeInteger (int32)HTTP status code of the response (duplicate of status)[optional]

Model AiAiToolCallData​

Identifies a pending tool call to resume — mirrors the library ToolCallData (its serializable fields).

NameTypeDescriptionNotes
threadIdStringThread the assistant message belongs to.[required] [example: 11111111-1111-1111-1111-111111111111]
messageIdStringStorage id of the assistant message holding the tool call.[required] [example: 22222222-2222-2222-2222-222222222222]
idxBigDecimalIndex of the tool-call content part inside message.content.[required] [example: 0]
messageAiThreadMessageLikeSnapshot of the assistant message at the time the tool call surfaced.[required] [example: {role=assistant, content=}]
actionArgsAiAiActionArgsPer-request engine options: extra tools, reasoning, prompt override.[optional] [example: {isReasoning=false}]
entityIdStringOptional entity (room) scope for profile resolution.[optional] [example: 1234]
profileIdStringSession-level profile override for this request only.[optional] [example: 00000000-0000-0000-0000-000000000000]

Model AiAiUserSettingsDto​

The per-user AI settings.

NameTypeDescriptionNotes
chatRecommendedModelVisibleBooleanIndicates whether the recommended model banner is visible in the AI chat for the current user.[optional] [example: true]

Model AiAiUserSettingsWrapper​

The successful API response containing the AiUserSettingsDto object.

NameTypeDescriptionNotes
responseAiAiUserSettingsDtoThe AiUserSettingsDto object returned by the operation.[optional]
countInteger (int32)The total number of items in the response[optional]
linksListList of links related to the response[optional]
statusInteger (int32)HTTP status code of the response[optional]
statusCodeInteger (int32)HTTP status code of the response (duplicate of status)[optional]
NameTypeDescriptionNotes
hrefStringURL of the link[optional]
actionStringAction associated with the link[optional]

Model AiApiDateTime​

The API date and time parameters.

NameTypeDescriptionNotes
utcTimeDate (date-time)The time in UTC format.[optional] [example: 2018-01-01T00:00:00.0000000Z]
timeZoneOffsetString (date-span)The time zone offset.[optional] [example: 00:00:00]

Model AiAssignmentMutationResult​

Outcome of AssignmentsEngine.assign / AssignmentsEngine.unassign. Either a success or a field-scoped error suitable for displaying in the profile editor.

NameTypeDescriptionNotes
successBooleanTrue when the assignment was persisted.[required] [example: true]
errorAiTErrorDataWhy the assignment was rejected. Present on failure.[optional]

Model AiAttachment​

Persistent record for a single attachment (file or image) referenced from a user message. Files carry extracted text in content; images carry base64 data in base64. Metadata (title, path, type) is always present for display purposes regardless of whether the heavy payload is loaded.

NameTypeDescriptionNotes
idStringStorage-assigned UUID.[required] [example: 55555555-5555-5555-5555-555555555555]
kindStringfile | image.[required] [example: file] [enum: file, image]
sourceStringOrigin of the attachment. user — uploaded by the user in the composer (the default when unset, for backward compatibility). tool — produced by a tool call (e.g. generate_image). Lets the integrator's adapter route or apply policies (separate bucket, quotas, TTL, CDN) per source.[optional] [example: user] [enum: user, tool]
titleStringDisplay label (filename or user-visible title).[required] [example: contract.docx]
contentStringExtracted text for files.[optional] [example: This agreement is made on 1 January 2026 between …]
base64StringBase64 data URL for images.[optional]
pathStringOriginal host file path (for files).[optional] [example: file_1234]
typeBigDecimalONLYOFFICE file type code (for files).[optional] [example: 7]
messageIdStringOwning message id once linked. Unset while the attachment is a draft.[optional] [example: 22222222-2222-2222-2222-222222222222]
threadIdStringOwning thread id once linked. Unset while the attachment is a draft.[optional] [example: 11111111-1111-1111-1111-111111111111]
entityIdStringOpaque scope token (entity / room) the attachment was created in. Drafts carry it so an entity switch keeps in-flight composer state isolated; once linked to a message the field is redundant with the thread's own entity binding.[optional] [example: 1234]
createdAtBigDecimalStorage-assigned creation timestamp.[required] [example: 1767225600000]
canAnalyzeBooleanWhether the attached form can be analyzed.[optional] [example: false]
formKeysListKeys of the fields inside the form. key is the field identifier, text its human-readable label.[optional] [example: []]

Model AiAttachment.formKeys item​

NameTypeDescriptionNotes
keyString[required]
textString[required]

Model AiBuiltinProviderType​

Union of all 17 built-in AI provider type identifiers. The external provider has no built-in transport — it delegates every HTTP request to PlatformAdapter.externalFetch and parses the response with the inner provider selected by Profile.basedOn.

Possible values:

  • anthropic
  • ollama
  • openai
  • openaicompatible
  • together
  • openrouter
  • genai
  • deepseek
  • xai
  • lm-studio
  • mistral
  • groq
  • zhipu
  • stabilityai
  • gpt4all
  • onlyoffice
  • external

Model AiBulkAssignmentResult​

Outcome of AssignmentsEngine.bulkAssign. Either every entry persisted, or no entries persisted and a per-key error report. The engine validates first and writes second so a single bad entry never leaves the assignment table in a half-written state.

NameTypeDescriptionNotes
successBooleanTrue when every entry was persisted.[required] [example: true]
errorsListWhat was rejected, per action. Present on failure - and then no entry was persisted.[optional] [example: []]

Model AiBulkAssignmentResult.errors item​

NameTypeDescriptionNotes
actionTypeAiActionType[required] [enum: Default, Chat, Code, Summarization, Translation, TextAnalyze, ImageGeneration, OCR, Vision]
errorAiTErrorData[required]

Model AiChatEvent​

Discriminated event emitted by the streaming methods of AIEngine. The engine never invokes user-supplied middleware or callbacks directly — every observable side-effect is encoded as a ChatEvent so the same stream can be replayed over SSE, WebSocket, or in-process. Pause point: tool-call-pending is the only stop. The UI must execute the tool itself (consulting autoAllow to decide between the silent path and the approve dialog) and resume via AIEngine.approveToolCall or AIEngine.denyToolCall. Other variants are pure data: - message-start / message-delta / message-end — assistant reply lifecycle. - message-incomplete — the provider returned an error or incomplete status. - thread-title — auto-generated title ready for a new thread.

NameTypeDescriptionNotes
typeStringEmitted once per sendWithStream call, immediately after the user message has been persisted by storage and before the assistant stream starts. Carries the storage-assigned id and createdAt. The UI uses it to render the user bubble — no client-side optimistic placeholder is needed, which keeps the runtime tree free of phantom nodes from index-fallback ids.[required] [example: message-delta] [enum: user-message-stored, message-start, message-delta, message-end, message-incomplete, tool-call-pending, thread-title]
messageAiThreadMessageLikeThe message the event is about, in the state it has reached.[optional]
messageIdStringThe storage identifier of that message.[optional] [example: 22222222-2222-2222-2222-222222222222]
idxBigDecimalThe zero-based position of the pending tool call within the message.[optional]
threadIdStringThe thread the event belongs to.[optional] [example: 11111111-1111-1111-1111-111111111111]
autoAllowBooleanThe consumer should execute the tool without prompting the user. True when the tool is in the persisted always-allow list, or the tool itself opts in via TMCPItem.requireApproval === false (host tools default to this). For a client-side tool with a server-side engine, this lets the engine return the pending call already flagged auto-allow so the client runs it and streams the result back without a dialog round-trip.[optional]
serverExecutedBooleanSet when the tool is served by a server-side system source: the consumer must NOT execute it locally — only show the approval UI (unless autoAllow) and resume via approveToolCall (no result needed) / denyToolCall. The engine runs it in-engine.[optional]
titleStringThe generated thread title.[optional]
profileIdStringThe profile that generated the title, when one was used.[optional]

Model AiChatSettingsDto​

The chat configuration of an AI room.

NameTypeDescriptionNotes
promptStringThe instruction put in front of every conversation held in the room, which sets the role the assistant takes and the way it answers. Empty when the room was left on the behaviour the portal provides by default.[optional] [example: You are a helpful assistant for project documentation.] [nullable]

Model AiCreateProfileInput​

Input for creating a new profile — the same shape as Profile without the engine-generated fields (id, createdAt).

NameTypeDescriptionNotes
nameStringUser-defined profile display name.[required] [example: OpenAI GPT-4o]
providerTypeAiProviderTypeProvider type for this profile. Use external to delegate all HTTP transport to PlatformAdapter.externalFetch while reusing an existing provider's response parser — see Profile.basedOn for the format selector.[required] [example: openai]
basedOnAiBuiltinProviderTypeSelects the response-format parser used by the external provider. Ignored for any other providerType. Supported values are openai, anthropic, mistral and openrouter. Remaining values (genai, stabilityai, …) are accepted by the type but not yet implemented; passing one raises an error at request time.[optional] [example: openai] [enum: anthropic, ollama, openai, openaicompatible, together, openrouter, genai, deepseek, xai, lm-studio, mistral, groq, zhipu, stabilityai, gpt4all, onlyoffice, external]
baseUrlStringBase URL of the provider API.[required] [example: https://api.openai.com/v1]
keyStringAPI key or token. Optional for local providers.[optional] [example: sk-your-provider-api-key]
headersMapExtra HTTP headers sent with every request to this provider. Merged into the SDK client's default headers; an explicit Authorization here wins over the one derived from key. Honoured by the OpenAI-family providers.[optional] [example: {X-Organization=acme}]
modelIdStringSelected model ID within this provider.[required] [example: gpt-4o]
reasoningBooleanWhether extended thinking is enabled for this profile's model.[optional] [example: false]
reasoningSupportAiReasoningSupportExtended-thinking capabilities of the selected model as reported by the provider's catalogue at save time (see Model.reasoningSupport). When present the composer's Effort row follows it exactly; when absent the provider's id-based table answers. Hosts persist it with the rest of the profile.[optional]
capabilitiesBigDecimalBitmask of capabilities supported by the selected model.[optional] [example: 7]
canUseToolBooleanResult of the live tool-capability probe performed at create time and on changes to modelId / providerType / baseUrl. undefined means the probe has never run for this profile (legacy record).[optional] [example: true]
useResponsesApiBooleanResult of the live Responses-API probe (parallel to canUseTool). true means the model speaks /v1/responses and the OpenAI provider must route through client.responses.create — required for gpt-5+ reasoning models that reject reasoning_effort together with tools on /v1/chat/completions. Probed at create time and whenever modelId / providerType / baseUrl change. undefined means the probe never ran (legacy record) — readers treat that as false.[optional] [example: false]
isCloudProviderBooleanWhether this profile uses a cloud-hosted provider (e.g. ONLYOFFICE DocSpace).[optional] [example: true]
useProxyBooleanRoute every provider request through the host's fetchProxy instead of the global fetch. Useful when the host runs the widget in a sandbox without direct network access (CORS, custom auth, etc.). Has no effect when the PlatformAdapter.fetchProxy is not configured.[optional] [example: false]

Model AiCreatePromptInput​

Input for creating a prompt — the engine generates id/createdAt/updatedAt.

NameTypeDescriptionNotes
nameStringThe prompt name.[required] [example: Contract summary]
textStringThe prompt body.[required] [example: Summarise the key obligations and dates in the attached contract.]
folderIdStringThe folder to file the prompt under. Omit or send null to leave it outside any folder.[optional] [example: 44444444-4444-4444-4444-444444444444] [nullable]

Model AiDistributedTaskStatus​

Possible values:

  • 0 — Created (Created)
  • 1 — Running (Running)
  • 2 — Completed (Completed)
  • 3 — Canceled (Canceled)
  • 4 — Failted (Failted)

Model AiEmbeddingProviderType​

Possible values:

  • 0 — None (None)
  • 1 — OpenAi (OpenAi)
  • 2 — OpenRouter (OpenRouter)
  • 3 — PortalAi (PortalAi)

Model AiEmployeeDto​

The user parameters.

NameTypeDescriptionNotes
idUUID (uuid)The user ID.[optional] [example: 00000000-0000-0000-0000-000000000000]
displayNameStringThe HTML-encoded user's display name formatted according to the default format for the current culture.[optional] [example: Mike Zanyatski] [nullable]
avatarStringThe user avatar.[optional] [example: https://example.com/avatar.jpg] [nullable]
avatarOriginalStringThe user original size avatar.[optional] [example: https://example.com/avatar_original.jpg] [nullable]
avatarMaxStringThe user maximum size avatar.[optional] [example: https://example.com/avatar_max.jpg] [nullable]
avatarMediumStringThe user medium size avatar.[optional] [example: https://example.com/avatar_medium.jpg] [nullable]
avatarSmallStringThe user small size avatar.[optional] [example: https://example.com/avatar_small.jpg] [nullable]
profileUrlStringThe user profile URL.[optional] [example: https://example.com/profile/user123] [nullable]
hasAvatarBooleanSpecifies if the user has an avatar or not.[optional] [example: true]
isAnonimBooleanSpecifies if the user is anonymous or not.[optional] [example: false]

Model AiErrorResponse​

Error body — a single human-readable message.

NameTypeDescriptionNotes
errorStringThe error message, ready to be shown to the caller.[required] [example: threadId required]

Model AiFileEntryBaseDto​

What every file and folder in an answer has in common; the concrete shape is a file or a folder, told apart by the entry type.

NameTypeDescriptionNotes
titleStringThe name shown for the entry. For a file it carries the extension, which is how the format is recognised, and for a room it is the room name.[optional] [example: Some title.txt] [nullable]
accessAiFileShareThe level the calling account holds on this entry, resolved from its own rights, the groups it belongs to and any link it came in through. It is the level itself, not what the account may do with it - the action flags below answer that.[optional] [enum: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
sharedByAiEmployeeDtoWho gave the calling account the access it is using. It is filled in only while the entry is being read through a share, and never for a caller without an account.[optional]
ownedByAiEmployeeDtoWho owns the place the entry is shared from - the creator of the room it lies in, or of the personal section that holds it. It is filled in only while the entry is being read through a share, and never for a caller without an account.[optional]
sharedBooleanWhether at least one external link exists for the entry, whichever kind. It says nothing about accounts and groups - those are counted by the flag for members below.[optional] [example: false]
sharedForUserBooleanWhether at least one account or group has been given rights on the entry directly, as opposed to reaching it through a link or through the room around it.[optional] [example: false]
sharedExternalBooleanWhether one of the entry's links is open to people outside the portal, as opposed to a link that only its own members can follow. This is the flag to watch when the concern is who can reach the content from outside.[optional] [example: false]
parentSharedBooleanWhether the entry is reachable because the room or folder around it is shared, rather than through rights of its own. A copy or a move takes the entry out of that scope.[optional] [example: false]
shortWebUrlURI (uri)A shortened address that opens the entry through the link it is being read with. It is an empty string whenever no link applies, which is the usual case for a member browsing their own rooms.[optional] [example: http://localhost/s/abc123] [nullable]
createdAiApiDateTimeWhen the entry was created, written with the offset of the portal's time zone. For a file restored from an older version this is still the moment the file first appeared.[optional]
createdByAiEmployeeDtoWho created the entry. It is null for a caller without an account, who is told nothing about the portal's members.[optional]
updatedAiApiDateTimeWhen the entry last changed, written with the offset of the portal's time zone. It is never reported as earlier than the creation moment, so the two can be compared safely.[optional]
autoDeleteAiApiDateTimeWhen the entry will disappear on its own, written with the offset of the portal's time zone. It is filled in only where a removal is actually scheduled - something in the trash while the portal cleans it up automatically, or a guest's own documents - so a null means nothing is scheduled rather than that the entry is permanent.[optional]
rootFolderTypeAiFolderTypeThe section the entry ultimately belongs to, which is what tells a personal document from one inside a room, from a template and from something in the trash or the archive.[optional] [enum: 0, 1, 2, 3, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
parentRoomTypeAiFolderTypeThe kind of room the entry lies in, which decides what the room allows - filling forms, public links, indexing. It is null for an entry that is not inside a room at all.[optional] [enum: 0, 1, 2, 3, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
updatedByAiEmployeeDtoWho changed the entry last. It is null for a caller without an account.[optional]
providerItemBooleanSet when the entry is stored on a connected third-party account rather than on the portal, and null when it is stored on the portal. Such an entry is identified by a string rather than a number, and some operations skip it.[optional] [example: true] [nullable]
providerKeyStringWhich third-party service holds the entry, matching the keys accepted by the third-party operations. It is null for an entry stored on the portal.[optional] [example: google-drive] [nullable]
providerIdInteger (int32)The connected account the entry comes from, for telling apart two connections to the same service. It is null for an entry stored on the portal.[optional] [example: 1] [nullable]
orderStringThe place of the entry in a room where the members arrange the content themselves, given as the position of the entry preceded by the positions of the folders leading to it, separated by dots. It is empty when nothing has been arranged.[optional] [example: 1.3.2] [nullable]
isFavoriteBooleanSet when the calling account has marked the entry as a favorite, which is what puts it into the favorites listing. For a file that is not marked it is null rather than false.[optional] [example: true] [nullable]
fileEntryTypeAiFileEntryTypeTells a folder from a file, and so which of the two shapes the rest of the object has. A room is reported as a folder here.[optional] [enum: 1, 2]

Model AiFileEntryDtoInteger​

The part of a file or folder that depends on how the entry is identified: by a number on the portal, or by a string on a connected third-party account.

NameTypeDescriptionNotes
titleStringThe name shown for the entry. For a file it carries the extension, which is how the format is recognised, and for a room it is the room name.[optional]
accessAiFileShareThe level the calling account holds on this entry, resolved from its own rights, the groups it belongs to and any link it came in through. It is the level itself, not what the account may do with it - the action flags below answer that.[optional] [enum: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
sharedByAiEmployeeDtoWho gave the calling account the access it is using. It is filled in only while the entry is being read through a share, and never for a caller without an account.[optional]
ownedByAiEmployeeDtoWho owns the place the entry is shared from - the creator of the room it lies in, or of the personal section that holds it. It is filled in only while the entry is being read through a share, and never for a caller without an account.[optional]
sharedBooleanWhether at least one external link exists for the entry, whichever kind. It says nothing about accounts and groups - those are counted by the flag for members below.[optional]
sharedForUserBooleanWhether at least one account or group has been given rights on the entry directly, as opposed to reaching it through a link or through the room around it.[optional]
sharedExternalBooleanWhether one of the entry's links is open to people outside the portal, as opposed to a link that only its own members can follow. This is the flag to watch when the concern is who can reach the content from outside.[optional]
parentSharedBooleanWhether the entry is reachable because the room or folder around it is shared, rather than through rights of its own. A copy or a move takes the entry out of that scope.[optional]
shortWebUrlURI (uri)A shortened address that opens the entry through the link it is being read with. It is an empty string whenever no link applies, which is the usual case for a member browsing their own rooms.[optional]
createdAiApiDateTimeWhen the entry was created, written with the offset of the portal's time zone. For a file restored from an older version this is still the moment the file first appeared.[optional]
createdByAiEmployeeDtoWho created the entry. It is null for a caller without an account, who is told nothing about the portal's members.[optional]
updatedAiApiDateTimeWhen the entry last changed, written with the offset of the portal's time zone. It is never reported as earlier than the creation moment, so the two can be compared safely.[optional]
autoDeleteAiApiDateTimeWhen the entry will disappear on its own, written with the offset of the portal's time zone. It is filled in only where a removal is actually scheduled - something in the trash while the portal cleans it up automatically, or a guest's own documents - so a null means nothing is scheduled rather than that the entry is permanent.[optional]
rootFolderTypeAiFolderTypeThe section the entry ultimately belongs to, which is what tells a personal document from one inside a room, from a template and from something in the trash or the archive.[optional] [enum: 0, 1, 2, 3, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
parentRoomTypeAiFolderTypeThe kind of room the entry lies in, which decides what the room allows - filling forms, public links, indexing. It is null for an entry that is not inside a room at all.[optional] [enum: 0, 1, 2, 3, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
updatedByAiEmployeeDtoWho changed the entry last. It is null for a caller without an account.[optional]
providerItemBooleanSet when the entry is stored on a connected third-party account rather than on the portal, and null when it is stored on the portal. Such an entry is identified by a string rather than a number, and some operations skip it.[optional]
providerKeyStringWhich third-party service holds the entry, matching the keys accepted by the third-party operations. It is null for an entry stored on the portal.[optional]
providerIdInteger (int32)The connected account the entry comes from, for telling apart two connections to the same service. It is null for an entry stored on the portal.[optional]
orderStringThe place of the entry in a room where the members arrange the content themselves, given as the position of the entry preceded by the positions of the folders leading to it, separated by dots. It is empty when nothing has been arranged.[optional]
isFavoriteBooleanSet when the calling account has marked the entry as a favorite, which is what puts it into the favorites listing. For a file that is not marked it is null rather than false.[optional]
fileEntryTypeAiFileEntryTypeTells a folder from a file, and so which of the two shapes the rest of the object has. A room is reported as a folder here.[optional] [enum: 1, 2]
idInteger (int32)The identifier to pass back to the other operations of this entry. It is a number for storage on the portal and a string for a connected third-party account, and it is unique only within its own kind, so files and folders may carry the same value.[optional]
rootFolderIdInteger (int32)The section the entry ultimately lies in, as an identifier that can be listed like any other folder. For an entry inside a room this is the rooms section, not the room.[optional]
originIdInteger (int32)The folder the entry was deleted from, which is where restoring it puts it back. It is left out of the answer unless the entry is in the trash.[optional]
originRoomIdInteger (int32)The room the entry was deleted from, left out of the answer for anything that was not deleted out of a room.[optional]
originTitleStringThe name of the folder the entry was deleted from, for showing where it would be restored to. It is null for an entry that is not in the trash.[optional] [nullable]
originRoomTitleStringThe name of the room the entry was deleted from, null for anything that was not deleted out of a room.[optional] [nullable]
canShareBooleanWhether the calling account may change who has access to the entry, and so whether offering a sharing dialog for it makes sense. It is false in rooms whose access is fixed by the room itself, such as a private one, even for its manager.[optional]
shareSettingsAiFileEntryDtoInteger_allOf_shareSettings[optional] [nullable]
securityAiFileEntryDtoInteger_allOf_security[optional] [nullable]
availableShareRightsAiFileEntryDtoInteger_allOf_availableShareRights[optional] [nullable]
requestTokenStringThe token of the link the entry is being read through, which is the value the external-share operations expect and which also has to be carried by the download and preview addresses. It is null whenever the entry is not being read through a link.[optional] [nullable]
externalBooleanSet when the link being used was made for this very entry, and false when the entry is reached through a link to the room around it. It is null when no link is involved.[optional] [nullable]
expirationDateAiApiDateTimeWhen the link being used stops working, written with the offset of the portal's time zone. It is null for a link that never expires and whenever no link is involved.[optional]
isLinkExpiredBooleanSet when the link being used has already passed its expiration date, which is why the entry cannot be opened even though it is described here. It is null when no link is involved.[optional] [nullable]

Model AiFileEntryDtoInteger.availableShareRights​

Which access levels may be handed out on this entry, listed per kind of recipient, so that a client offers only levels the entry actually supports - a room for filling forms and a plain folder do not accept the same ones.

NameTypeDescriptionNotes
UserList[optional]
ExternalLinkList[optional]
GroupList[optional]
InvitationLinkList[optional]
PrimaryExternalLinkList[optional]

Model AiFileEntryDtoInteger.security​

What the calling account may do with this entry, one flag per action, and the cheapest way to decide which operations to offer without trying them. The flags already take the room's settings and the account's role into account.

NameTypeDescriptionNotes
ReadBoolean[optional]
CommentBoolean[optional]
FillFormsBoolean[optional]
ReviewBoolean[optional]
CreateBoolean[optional]
CreateFromBoolean[optional]
EditBoolean[optional]
DeleteBoolean[optional]
CustomFilterBoolean[optional]
EditRoomBoolean[optional]
RenameBoolean[optional]
ReadHistoryBoolean[optional]
LockBoolean[optional]
EditHistoryBoolean[optional]
CopyToBoolean[optional]
CopyBoolean[optional]
MoveToBoolean[optional]
MoveBoolean[optional]
PinBoolean[optional]
MuteBoolean[optional]
EditAccessBoolean[optional]
DuplicateBoolean[optional]
SubmitToFormGalleryBoolean[optional]
DownloadBoolean[optional]
ConvertBoolean[optional]
CopySharedLinkBoolean[optional]
ReadLinksBoolean[optional]
ReconnectBoolean[optional]
CreateRoomFromBoolean[optional]
CopyLinkBoolean[optional]
EmbedBoolean[optional]
ChangeOwnerBoolean[optional]
IndexExportBoolean[optional]
StartFillingBoolean[optional]
FillingStatusBoolean[optional]
ResetFillingBoolean[optional]
StopFillingBoolean[optional]
OpenFormBoolean[optional]
EditInternalBoolean[optional]
EditExpirationBoolean[optional]
VectorizationBoolean[optional]
AskAiBoolean[optional]
UseChatBoolean[optional]
UpdateXlsxBoolean[optional]
AnalyzeResponsesBoolean[optional]
CanUseAiBoolean[optional]
HistoryExportBoolean[optional]

Model AiFileEntryDtoInteger.shareSettings​

How many links of each kind currently exist for the entry, counted separately for the primary link and the additional ones. Kinds with no links are left out, and the whole field is null when the caller may not change the access or no link exists at all.

NameTypeDescriptionNotes
UserInteger (int32)[optional]
ExternalLinkInteger (int32)[optional]
GroupInteger (int32)[optional]
InvitationLinkInteger (int32)[optional]
PrimaryExternalLinkInteger (int32)[optional]

Model AiFileEntryType​

Possible values:

  • 1 — Folder (Folder)
  • 2 — File (File)

Model AiFileOperationDto​

One background file operation of the caller, as it stood when the answer was built.

NameTypeDescriptionNotes
idStringThe identifier of the operation, the one to pass to PUT api/2.0/files/fileops/terminate/{id} to stop it. Operations belong to the account that started them, so an identifier of somebody else is never listed here.[required] [example: a1f4c9b2-3d8e-4f77-9b16-2c5de8f0a913] [nullable]
OperationAiFileOperationTypeWhat the operation does with the entries, which also decides what else is reported: only a download fills url, and a deletion leaves files and folders empty.[required] [enum: 0, 1, 2, 3, 4, 5, 6, 7]
progressInteger (int32)How far the operation has come, from 0 to 100. Reaching 100 only means it stopped; whether it did what it was asked for is told by error.[required] [example: 100]
errorStringThe reason the operation could not finish its work, in the language of the request. Empty when nothing went wrong, which is the only way to tell a successful operation from a failed one.[required] [example: Folder not found.] [nullable]
processedStringHow many entries the operation has handled so far, written as a decimal number in a string. It counts items, not percent, and stays behind progress on operations that walk into subfolders.[required] [example: 12] [nullable]
finishedBooleanWhether the operation has stopped running. A finished operation is reported once and then dropped, so the next read of the operation list no longer contains it.[required] [example: true]
urlURI (uri)The address the packed archive can be downloaded from once a bulk download has finished. Empty for every other kind of operation.[optional] [example: https://portal.example.com/filehandler.ashx?action=bulk] [nullable]
filesListThe files the operation produced or moved, in the order it wrote them down. Empty while nothing has been written yet and for a deletion, which reports no entries at all.[optional] [example: [{id=10, title=document.docx}]] [nullable]
foldersListThe folders the operation produced or moved, in the order it wrote them down. Empty while nothing has been written yet and for a deletion.[optional] [example: [{id=20, title=Reports}]] [nullable]
statusAiDistributedTaskStatusThe state of the background task behind the operation, which tells a task that was cancelled or that crashed from one that ran to its end.[optional] [enum: 0, 1, 2, 3, 4]

Model AiFileOperationType​

Possible values:

  • 0 — Move (Move)
  • 1 — Copy (Copy)
  • 2 — Delete (Delete)
  • 3 — Download (Download)
  • 4 — MarkAsRead (MarkAsRead)
  • 5 — Import (Import)
  • 6 — Convert (Convert)
  • 7 — Duplicate (Duplicate)

Model AiFileOperationWrapper​

The successful API response containing the FileOperationDto object.

NameTypeDescriptionNotes
responseAiFileOperationDtoThe FileOperationDto object returned by the operation.[optional]
countInteger (int32)The total number of items in the response[optional]
linksListList of links related to the response[optional]
statusInteger (int32)HTTP status code of the response[optional]
statusCodeInteger (int32)HTTP status code of the response (duplicate of status)[optional]

Model AiFileShare​

Possible values:

  • 0 — None (None)
  • 1 — Read and write (ReadWrite)
  • 2 — Read (Read)
  • 3 — Restrict (Restrict)
  • 4 — Varies (Varies)
  • 5 — Review (Review)
  • 6 — Comment (Comment)
  • 7 — Fill forms (FillForms)
  • 8 — Custom filter (CustomFilter)
  • 9 — Room manager (RoomManager)
  • 10 — Editing (Editing)
  • 11 — Content creator (ContentCreator)

Model AiFolderContentDtoInteger​

One page of the contents of a folder or of a section: its entries split into files and folders, the folder itself, and the counters needed to page through the rest.

NameTypeDescriptionNotes
filesListThe file entries of this page. It is empty when the folder holds no files, when the filters matched none of them, and in the sections that list rooms only.[optional] [example: [{id=10, title=document.docx}]] [nullable]
foldersListThe folder entries of this page. In a section of rooms these entries are the rooms themselves, which is where their type, tags, logo and quota are read from.[optional] [example: [{id=20, title=My Folder}]] [nullable]
currentAiFolderDtoIntegerThe folder or section the page was read from, with its own title, type and access rights. It describes the container, not the entries, and is filled in even when the page is empty.[optional]
pathPartsoas_any_type_not_mapped[required] [nullable]
startIndexInteger (int32)The position of the first entry of this page in the whole result, echoing the requested start index. Add the number of entries received to it to ask for the next page.[optional] [example: 0]
countInteger (int32)How many entries this page carries, files and folders together. A page shorter than the requested size means the result is exhausted.[optional] [example: 4]
totalInteger (int32)How many entries matched before paging was applied, across the whole folder. Page until the start index plus the entries received reaches it.[required] [example: 4]
newInteger (int32)How many entries of this folder are marked as new for the caller. It is 0 for every listing when the account has switched the new-item badges off, so a zero here does not prove that nothing has changed.[optional] [example: 0]

Model AiFolderContentIntegerWrapper​

The successful API response containing the FolderContentDtoInteger object.

NameTypeDescriptionNotes
responseAiFolderContentDtoIntegerThe FolderContentDtoInteger object returned by the operation.[optional]
countInteger (int32)The total number of items in the response[optional]
linksListList of links related to the response[optional]
statusInteger (int32)HTTP status code of the response[optional]
statusCodeInteger (int32)HTTP status code of the response (duplicate of status)[optional]

Model AiFolderDtoInteger​

The folder, with the fields that only a room carries filled in when the folder is a room.

NameTypeDescriptionNotes
titleStringThe name shown for the entry. For a file it carries the extension, which is how the format is recognised, and for a room it is the room name.[optional]
accessAiFileShareThe level the calling account holds on this entry, resolved from its own rights, the groups it belongs to and any link it came in through. It is the level itself, not what the account may do with it - the action flags below answer that.[optional] [enum: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
sharedByAiEmployeeDtoWho gave the calling account the access it is using. It is filled in only while the entry is being read through a share, and never for a caller without an account.[optional]
ownedByAiEmployeeDtoWho owns the place the entry is shared from - the creator of the room it lies in, or of the personal section that holds it. It is filled in only while the entry is being read through a share, and never for a caller without an account.[optional]
sharedBooleanWhether at least one external link exists for the entry, whichever kind. It says nothing about accounts and groups - those are counted by the flag for members below.[optional]
sharedForUserBooleanWhether at least one account or group has been given rights on the entry directly, as opposed to reaching it through a link or through the room around it.[optional]
sharedExternalBooleanWhether one of the entry's links is open to people outside the portal, as opposed to a link that only its own members can follow. This is the flag to watch when the concern is who can reach the content from outside.[optional]
parentSharedBooleanWhether the entry is reachable because the room or folder around it is shared, rather than through rights of its own. A copy or a move takes the entry out of that scope.[optional]
shortWebUrlURI (uri)A shortened address that opens the entry through the link it is being read with. It is an empty string whenever no link applies, which is the usual case for a member browsing their own rooms.[optional]
createdAiApiDateTimeWhen the entry was created, written with the offset of the portal's time zone. For a file restored from an older version this is still the moment the file first appeared.[optional]
createdByAiEmployeeDtoWho created the entry. It is null for a caller without an account, who is told nothing about the portal's members.[optional]
updatedAiApiDateTimeWhen the entry last changed, written with the offset of the portal's time zone. It is never reported as earlier than the creation moment, so the two can be compared safely.[optional]
autoDeleteAiApiDateTimeWhen the entry will disappear on its own, written with the offset of the portal's time zone. It is filled in only where a removal is actually scheduled - something in the trash while the portal cleans it up automatically, or a guest's own documents - so a null means nothing is scheduled rather than that the entry is permanent.[optional]
rootFolderTypeAiFolderTypeThe section the entry ultimately belongs to, which is what tells a personal document from one inside a room, from a template and from something in the trash or the archive.[optional] [enum: 0, 1, 2, 3, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
parentRoomTypeAiFolderTypeThe kind of room the entry lies in, which decides what the room allows - filling forms, public links, indexing. It is null for an entry that is not inside a room at all.[optional] [enum: 0, 1, 2, 3, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
updatedByAiEmployeeDtoWho changed the entry last. It is null for a caller without an account.[optional]
providerItemBooleanSet when the entry is stored on a connected third-party account rather than on the portal, and null when it is stored on the portal. Such an entry is identified by a string rather than a number, and some operations skip it.[optional]
providerKeyStringWhich third-party service holds the entry, matching the keys accepted by the third-party operations. It is null for an entry stored on the portal.[optional]
providerIdInteger (int32)The connected account the entry comes from, for telling apart two connections to the same service. It is null for an entry stored on the portal.[optional]
orderStringThe place of the entry in a room where the members arrange the content themselves, given as the position of the entry preceded by the positions of the folders leading to it, separated by dots. It is empty when nothing has been arranged.[optional]
isFavoriteBooleanSet when the calling account has marked the entry as a favorite, which is what puts it into the favorites listing. For a file that is not marked it is null rather than false.[optional]
fileEntryTypeAiFileEntryTypeTells a folder from a file, and so which of the two shapes the rest of the object has. A room is reported as a folder here.[optional] [enum: 1, 2]
idInteger (int32)The identifier to pass back to the other operations of this entry. It is a number for storage on the portal and a string for a connected third-party account, and it is unique only within its own kind, so files and folders may carry the same value.[optional]
rootFolderIdInteger (int32)The section the entry ultimately lies in, as an identifier that can be listed like any other folder. For an entry inside a room this is the rooms section, not the room.[optional]
originIdInteger (int32)The folder the entry was deleted from, which is where restoring it puts it back. It is left out of the answer unless the entry is in the trash.[optional]
originRoomIdInteger (int32)The room the entry was deleted from, left out of the answer for anything that was not deleted out of a room.[optional]
originTitleStringThe name of the folder the entry was deleted from, for showing where it would be restored to. It is null for an entry that is not in the trash.[optional]
originRoomTitleStringThe name of the room the entry was deleted from, null for anything that was not deleted out of a room.[optional]
canShareBooleanWhether the calling account may change who has access to the entry, and so whether offering a sharing dialog for it makes sense. It is false in rooms whose access is fixed by the room itself, such as a private one, even for its manager.[optional]
shareSettingsAiFileEntryDtoInteger_allOf_shareSettings[optional] [nullable]
securityAiFileEntryDtoInteger_allOf_security[optional] [nullable]
availableShareRightsAiFileEntryDtoInteger_allOf_availableShareRights[optional] [nullable]
requestTokenStringThe token of the link the entry is being read through, which is the value the external-share operations expect and which also has to be carried by the download and preview addresses. It is null whenever the entry is not being read through a link.[optional]
externalBooleanSet when the link being used was made for this very entry, and false when the entry is reached through a link to the room around it. It is null when no link is involved.[optional]
expirationDateAiApiDateTimeWhen the link being used stops working, written with the offset of the portal's time zone. It is null for a link that never expires and whenever no link is involved.[optional]
isLinkExpiredBooleanSet when the link being used has already passed its expiration date, which is why the entry cannot be opened even though it is described here. It is null when no link is involved.[optional]
parentIdInteger (int32)The folder this one is listed in. For a room it is the root of the section the room lives in, and for an entry opened through a sharing link whose real parent the caller may not read it is the root of the section with the entries shared with them.[optional]
filesCountInteger (int32)How many files lie directly in the folder, without counting the subfolders. The roots of the Rooms, room templates and default templates sections always report 0, because the number is not collected for them.[optional]
foldersCountInteger (int32)How many subfolders lie directly in the folder. For an AI room the two service subfolders it always holds are subtracted, so the number matches what a listing of it shows, and the roots of the Rooms and templates sections report 0.[optional]
isShareableBooleanWhether the caller may hand out access to the folder. It is filled in only for the folder a folder-contents answer is about, and is null in every other answer, so null says nothing about the sharing rights.[optional] [nullable]
newInteger (int32)How many entries inside the folder the caller has not opened yet, the number drawn as the badge on it. An account that turned the badges off in its own settings always reads 0 here, so 0 alone does not prove that everything has been seen.[optional]
muteBooleanWhether the caller silenced the notifications of this room: true means no message about its activity reaches them. The choice belongs to the reading account rather than to the room, so two members of one room read different values.[optional]
tagsListThe names of the tags attached to the room. Empty for a folder that is not a room, since only rooms carry tags, and the names are the ones from the portal tag catalogue.[optional] [nullable]
logoAiLogoThe addresses of the room logo in four sizes, together with the colour and the built-in cover that are drawn when no logo was uploaded. A room without a logo answers with four empty addresses rather than with null, and the field is null for a folder that is not a room.[optional]
pinnedBooleanWhether the caller pinned the room to the top of their own room list. Pinning is personal and is lost when the room is archived.[optional]
roomTypeAiRoomTypeThe kind of the room, which decides the default access rules of its members. Null for a folder that is not a room.[optional] [enum: 1, 2, 5, 6, 8, 9]
privateBooleanWhether the room is a private one, which limits it to the accounts invited into it and needs encryption keys set up for each of them.[optional]
indexingBooleanWhether the contents of the room are kept in an explicit numbered order, the one reported as order on each entry, instead of being left to the sorting the reader asks for.[optional]
denyDownloadBooleanWhether downloading and printing the contents of the room is forbidden, which leaves its members with viewing and editing in the editor.[optional]
lifetimeAiRoomDataLifetimeDtoThe rule by which the files of the room are removed once they grow old. Null when the room has no such rule, which is also what is reported after the rule is switched off, because switching it off erases it.[optional]
watermarkAiWatermarkDtoThe watermark stamped over the documents of the room while they are viewed and printed. Null when the room has no watermark, and for every folder that is not a room.[optional]
typeAiFolderTypeThe part the folder plays inside its room: one of the service folders of the form-filling flow, or the knowledge and result storages of an AI room. It stays null for an ordinary folder and for the room itself, so it does not describe folders in general.[optional] [enum: 0, 1, 2, 3, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
inRoomBooleanWhether the caller holds the room through an invitation of their own: true for the account that created it and for a member invited personally, false when the access comes from a group they belong to, and null for a folder that is not a room.[optional] [nullable]
quotaLimitLong (int64)How much space the files of the room may take, in bytes. It is the limit set on this room, or the portal default for rooms when none was set. Null when the tariff of the portal does not count room statistics, when room quotas are switched off, when the room lies in the archive or the trash, or when the caller may only read it.[optional] [nullable]
isCustomQuotaBooleanWhether quotaLimit is a limit set on this room (true) or the portal default for rooms (false). Null exactly when quotaLimit is null.[optional] [nullable]
usedSpaceLong (int64)How much the files of the room take, in bytes, as of the last time the counter was recomputed. The counter is refreshed when a file operation finishes, so a read right after an upload or a deletion can still report the previous figure. Null for a folder that is not a room.[optional] [nullable]
passwordProtectedBooleanWhether the sharing link the folder was opened through asks for a password that has not been entered yet. While it is true the contents stay unreadable; send the password to POST api/2.0/files/share/{key}/password first. Null when the folder was not reached through a link.[optional] [nullable]
expiredBooleanDeprecated, read isLinkExpired instead: whether the sharing link the folder was opened through has run out of its lifetime.[optional] [nullable]
chatSettingsAiChatSettingsDtoThe chat configuration of an AI room. Only the system prompt is reported here, whatever else the room stores, and the field is null for every folder that is not an AI room.[optional]
rootRoomTypeAiRoomTypeThe kind of the room the folder lies in. It is filled in only for the folder a folder-contents answer is about, and only when that room is an AI room, so it is null in every other answer and for every other room kind.[optional] [enum: 1, 2, 5, 6, 8, 9]
saveFormAsXLSXBooleanWhether the answers collected in this form-filling room are also gathered into a spreadsheet next to the completed copies. Filled in for form-filling rooms only.[optional] [nullable]
sendFormToExternalDBBooleanWhether the answers collected in this form-filling room are also pushed into the external database configured for the portal. Filled in for form-filling rooms only.[optional] [nullable]
originalFormIdInteger (int32)The form the completed copies in this folder were filled from, taken from the copy submitted last. Null while the folder holds no completed copy, and for every folder that does not collect them.[optional] [nullable]

Model AiFolderIntegerArrayWrapper​

The successful API response containing the list of FolderDtoInteger objects.

NameTypeDescriptionNotes
responseListThe list of FolderDtoInteger objects returned by the operation.[optional]
countInteger (int32)The total number of items in the response[optional]
linksListList of links related to the response[optional]
statusInteger (int32)HTTP status code of the response[optional]
statusCodeInteger (int32)HTTP status code of the response (duplicate of status)[optional]

Model AiFolderIntegerWrapper​

The successful API response containing the FolderDtoInteger object.

NameTypeDescriptionNotes
responseAiFolderDtoIntegerThe FolderDtoInteger object returned by the operation.[optional]
countInteger (int32)The total number of items in the response[optional]
linksListList of links related to the response[optional]
statusInteger (int32)HTTP status code of the response[optional]
statusCodeInteger (int32)HTTP status code of the response (duplicate of status)[optional]

Model AiFolderMutationResult​

Outcome of createFolder / renameFolder — either the persisted folder or a field-scoped error.

NameTypeDescriptionNotes
successBooleanTrue when the folder was persisted.[required] [example: true]
folderAiPromptFolderThe persisted folder. Present on success.[optional]
errorAiTErrorDataWhy the folder was rejected. Present on failure.[optional]

Model AiFolderType​

Possible values:

  • 0 — Default (DEFAULT)
  • 1 — Coomon (COMMON)
  • 2 — Bunch (BUNCH)
  • 3 — Trash (TRASH)
  • 5 — User (USER)
  • 6 — Share (SHARE)
  • 8 — Projects (Projects)
  • 10 — Favourites (Favorites)
  • 11 — Recent (Recent)
  • 12 — Templates (Templates)
  • 13 — Privacy (Privacy)
  • 14 — Virtual rooms (VirtualRooms)
  • 15 — Filling forms room (FillingFormsRoom)
  • 16 — Editing room (EditingRoom)
  • 19 — Custom room (CustomRoom)
  • 20 — Archive (Archive)
  • 21 — Thirdparty backup (ThirdpartyBackup)
  • 22 — Public room (PublicRoom)
  • 25 — Ready form folder (ReadyFormFolder)
  • 26 — In process form folder (InProcessFormFolder)
  • 27 — Form filling folder done (FormFillingFolderDone)
  • 28 — Form filling folder in progress (FormFillingFolderInProgress)
  • 29 — Virtual Data Room (VirtualDataRoom)
  • 30 — Room templates folder (RoomTemplates)
  • 31 — AI Room (AiRoom)
  • 32 — Knowledge (Knowledge)
  • 33 — Result storage (ResultStorage)
  • 34 — AI Agents (AiAgents)
  • 35 — Default Templates (DefaultTemplates)
  • 36 — Forms (Forms)

Model AiImportError​

Per-entry error reported by PromptsEngine.importBundle.

NameTypeDescriptionNotes
kindStringfolder or prompt, plus the offending name or id.[required] [example: prompt] [enum: folder, prompt]
refStringThe offending entry - its name or its id.[required] [example: 33333333-3333-3333-3333-333333333333]
errorAiTErrorDataWhy the entry was rejected.[required] [example: a prompt of that name already exists]

Model AiImportMode​

Mode passed to PromptsEngine.importBundle.

Possible values:

  • replace
  • merge

Model AiImportResult​

Outcome of PromptsEngine.importBundle. Either every entry persisted with counts, or no entries persisted plus a per-entry error report.

NameTypeDescriptionNotes
successBooleanTrue when the whole bundle was imported.[required] [example: true]
importedAiImportResult_imported[optional]
errorsListWhat was rejected, per entry. Present on failure - and then nothing was imported.[optional] [example: []]

Model AiImportResult.imported​

How many folders and prompts were created. Present on success.

NameTypeDescriptionNotes
foldersBigDecimal[required]
promptsBigDecimal[required]

The room logo information.

NameTypeDescriptionNotes
originalStringThe original logo.[required] [example: https://portal.example.com/logo/original.png] [nullable]
largeStringThe large logo.[required] [example: https://portal.example.com/logo/large.png] [nullable]
mediumStringThe medium logo.[required] [example: https://portal.example.com/logo/medium.png] [nullable]
smallStringThe small logo.[required] [example: https://portal.example.com/logo/small.png] [nullable]
colorStringThe logo color.[optional] [example: #4781D1] [nullable]
coverAiLogoCoverThe logo cover.[optional]

Model AiLogoCover​

The logo cover information.

NameTypeDescriptionNotes
idStringThe logo cover ID.[required] [example: default_cover] [nullable]
dataStringThe logo cover data.[required] [example: base64-image-data...] [nullable]

Model AiModel​

AI model metadata. Describes a single model available from a provider.

NameTypeDescriptionNotes
idStringModel identifier as used by the provider API (e.g. gpt-4o, claude-sonnet-4-20250514).[required] [example: gpt-4o]
nameStringHuman-readable model name for display in the UI.[required] [example: GPT-4o]
providerAiProviderTypeProvider that offers this model.[required] [example: openai]
reasoningBooleanWhether this model supports extended thinking / chain-of-thought reasoning.[optional] [example: false]
reasoningSupportAiReasoningSupportWhat the model can do with extended thinking, when the provider's catalogue says so (OpenRouter and the ONLYOFFICE route report a per-model reasoning object). Copied onto the profile at save time; absent, the widget falls back to the provider's id-based table.[optional]
capabilitiesBigDecimalBitmask of model capabilities (Chat, Image, Vision, Tools, etc.). Used to filter models per ActionType.[optional] [example: 7]

Model AiNewItemsAgentNewItemsArrayWrapper​

The successful API response containing the list of NewItemsDtoAgentNewItemsDto objects.

NameTypeDescriptionNotes
responseListThe list of NewItemsDtoAgentNewItemsDto objects returned by the operation.[optional]
countInteger (int32)The total number of items in the response[optional]
linksListList of links related to the response[optional]
statusInteger (int32)HTTP status code of the response[optional]
statusCodeInteger (int32)HTTP status code of the response (duplicate of status)[optional]

Model AiNewItemsDtoAgentNewItemsDto​

One day of the entries the caller has not opened yet, the groups running from the most recent day backwards.

NameTypeDescriptionNotes
dateAiApiDateTimeThe day the grouped entries were last changed, written with the offset of the portal time zone. The time part is the moment of the newest entry of the group.[required]
itemsListWhat changed on that day, the most recent first. Folders are left out of it, so an entry here is always a file or a room that holds them.[required] [nullable]

Model AiOpenAIChatCompletionChunk​

One chat.completion.chunk of an OpenAI-compatible streaming response. Only the fields this service can populate are emitted - an OpenAI client tolerates the rest as absent.

NameTypeDescriptionNotes
idStringThe completion identifier, stable across every chunk of one response.[required]
objectStringAlways chat.completion.chunk.[required] [enum: chat.completion.chunk]
createdBigDecimalWhen the completion started, in Unix seconds.[required]
modelStringThe model that produced the completion - the resolved profile's model.[required]
choicesListThe choices carried by this chunk. This service emits exactly one.[required]

Model AiOpenAIChoiceDelta​

The incremental part of one choice - what this chunk adds to the assistant message.

NameTypeDescriptionNotes
roleStringSent on the first chunk only, always assistant.[optional] [enum: assistant]
contentStringThe text this chunk appends. Null when the chunk carries no text.[optional] [nullable]
tool_callsListThe tool calls the model requested, emitted in place of text.[optional]

Model AiOpenAIChunkChoice​

One choice of a streaming completion, carrying the part this chunk adds.

NameTypeDescriptionNotes
indexBigDecimalThe zero-based position of the choice. This service emits a single choice, so always 0.[required]
deltaAiOpenAIChoiceDeltaWhat this chunk adds to the choice.[required]
finish_reasonAiOpenAIFinishReasonWhy the completion stopped, or null while it is still streaming.[required] [enum: stop, length, tool_calls, content_filter, null] [nullable]

Model AiOpenAIFinishReason​

OpenAI Chat Completions streaming shapes. toOpenAIChatCompletionStream maps the engine's transport-agnostic ChatEvent stream onto these chunks so a host can expose an OpenAI-compatible POST /v1/chat/completions (stream: true) endpoint backed by the same chat pipeline as the in-app widget. Only the subset of fields the engine can populate is emitted; everything else an OpenAI client tolerates as absent.

Possible values:

  • stop
  • length
  • tool_calls
  • content_filter
  • null

Model AiOpenAIStreamChunk​

A chunk or the terminal error envelope emitted on a failed stream.

NameTypeDescriptionNotes
idStringThe completion identifier, stable across every chunk of one response.[required]
objectStringAlways chat.completion.chunk.[required] [enum: chat.completion.chunk]
createdBigDecimalWhen the completion started, in Unix seconds.[required]
modelStringThe model that produced the completion - the resolved profile's model.[required]
choicesListThe choices carried by this chunk. This service emits exactly one.[required]
errorAiOpenAIStreamError_error[required]

Model AiOpenAIStreamError​

OpenAI streaming error envelope. When the upstream request fails mid-stream the OpenAI API emits a single data: line carrying an error object (no choices), then closes the stream — the official SDK turns this into a thrown APIError. Mirrors that shape so a host exposing an OpenAI-compatible endpoint stays wire-compatible.

NameTypeDescriptionNotes
errorAiOpenAIStreamError_error[required]

Model AiOpenAIStreamError.error​

The error that ended the stream: its message, type, code and the offending parameter.

NameTypeDescriptionNotes
messageString[required]
typeString[required]
codeString[required] [nullable]
paramString[required] [nullable]

Model AiOpenAIToolCallDelta​

The incremental part of one tool call the model requested.

NameTypeDescriptionNotes
indexBigDecimalThe zero-based position of the tool call within the message.[required]
idStringThe tool call identifier, quoted back when its result is submitted.[optional]
typeStringAlways function - the only tool kind the API defines.[optional] [enum: function]
functionAiOpenAIToolCallDelta_function[optional]

Model AiOpenAIToolCallDelta.function​

The call itself: the function name and its JSON-encoded arguments.

NameTypeDescriptionNotes
nameString[optional]
argumentsString[optional]

Model AiOpenOrCreateResult​

Resolved thread state returned by ThreadsEngine.openOrCreate.

NameTypeDescriptionNotes
threadIdStringThe thread that was opened, or the one just created.[required]
titleStringEmpty string for existing threads — the engine doesn't re-fetch.[required]
priorMessagesListThe messages already in the thread - empty for a thread that was just created.[required]

Model AiProfile​

Complete AI provider + model configuration saved by the user. Profiles are the primary way users save and reuse provider configurations.

NameTypeDescriptionNotes
idStringUnique profile identifier (UUID).[required] [example: 00000000-0000-0000-0000-000000000000]
nameStringUser-defined profile display name.[required] [example: OpenAI GPT-4o]
providerTypeAiProviderTypeProvider type for this profile. Use external to delegate all HTTP transport to PlatformAdapter.externalFetch while reusing an existing provider's response parser — see Profile.basedOn for the format selector.[required] [example: openai]
basedOnAiBuiltinProviderTypeSelects the response-format parser used by the external provider. Ignored for any other providerType. Supported values are openai, anthropic, mistral and openrouter. Remaining values (genai, stabilityai, …) are accepted by the type but not yet implemented; passing one raises an error at request time.[optional] [example: openai] [enum: anthropic, ollama, openai, openaicompatible, together, openrouter, genai, deepseek, xai, lm-studio, mistral, groq, zhipu, stabilityai, gpt4all, onlyoffice, external]
baseUrlStringBase URL of the provider API.[required] [example: https://api.openai.com/v1]
keyStringAPI key or token. Optional for local providers.[optional] [example: sk-your-provider-api-key]
headersMapExtra HTTP headers sent with every request to this provider. Merged into the SDK client's default headers; an explicit Authorization here wins over the one derived from key. Honoured by the OpenAI-family providers.[optional] [example: {X-Organization=acme}]
modelIdStringSelected model ID within this provider.[required] [example: gpt-4o]
reasoningBooleanWhether extended thinking is enabled for this profile's model.[optional] [example: false]
reasoningSupportAiReasoningSupportExtended-thinking capabilities of the selected model as reported by the provider's catalogue at save time (see Model.reasoningSupport). When present the composer's Effort row follows it exactly; when absent the provider's id-based table answers. Hosts persist it with the rest of the profile.[optional]
capabilitiesBigDecimalBitmask of capabilities supported by the selected model.[optional] [example: 7]
canUseToolBooleanResult of the live tool-capability probe performed at create time and on changes to modelId / providerType / baseUrl. undefined means the probe has never run for this profile (legacy record).[optional] [example: true]
useResponsesApiBooleanResult of the live Responses-API probe (parallel to canUseTool). true means the model speaks /v1/responses and the OpenAI provider must route through client.responses.create — required for gpt-5+ reasoning models that reject reasoning_effort together with tools on /v1/chat/completions. Probed at create time and whenever modelId / providerType / baseUrl change. undefined means the probe never ran (legacy record) — readers treat that as false.[optional] [example: false]
isCloudProviderBooleanWhether this profile uses a cloud-hosted provider (e.g. ONLYOFFICE DocSpace).[optional] [example: true]
useProxyBooleanRoute every provider request through the host's fetchProxy instead of the global fetch. Useful when the host runs the widget in a sandbox without direct network access (CORS, custom auth, etc.). Has no effect when the PlatformAdapter.fetchProxy is not configured.[optional] [example: false]
createdAtBigDecimalCreation timestamp (ms since epoch). Used to sort the AI models list newest-first.[optional] [example: 1767225600000]

Model AiProfileMutationResult​

Outcome of create / update — either a success carrying the persisted profile, or a failure with a field-level error description from the name check or the provider credential check.

NameTypeDescriptionNotes
successBooleanTrue when the profile was persisted.[required] [example: true]
profileAiProfileThe persisted profile. Present on success.[optional]
errorAiTErrorDataWhy the profile was rejected - the name check or the provider credential check. Present on failure.[optional]

Model AiPrompt​

Saved prompt template that users can quickly insert into the chat.

NameTypeDescriptionNotes
idStringUnique prompt identifier (UUID).[required] [example: 33333333-3333-3333-3333-333333333333]
nameStringPrompt display name shown in the prompt picker.[required] [example: Contract summary]
textStringPrompt template text. May contain placeholder tokens.[required] [example: Summarise the key obligations and dates in the attached contract.]
folderIdStringOptional parent folder ID. undefined means the prompt is at the root level.[optional] [example: 44444444-4444-4444-4444-444444444444]
createdAtBigDecimalTimestamp (ms since epoch) when the prompt was created.[required] [example: 1767225600000]
updatedAtBigDecimalTimestamp (ms since epoch) of the last prompt modification.[required] [example: 1767225600000]

Model AiPromptBundle​

Versioned, self-contained bundle of every saved prompt and folder. Stable wire format — version lets the import path migrate older shapes if the schema ever changes.

NameTypeDescriptionNotes
versionBigDecimalThe bundle format version, so an import can migrate an older export.[required] [example: 1] [enum: 1]
foldersListEvery exported prompt folder.[required] [example: []]
promptsListEvery exported prompt.[required] [example: []]

Model AiPromptFolder​

Folder for organizing saved prompts.

NameTypeDescriptionNotes
idStringUnique folder identifier (UUID).[required] [example: 44444444-4444-4444-4444-444444444444]
nameStringFolder display name.[required] [example: Contract review]
createdAtBigDecimalTimestamp (ms since epoch) when the folder was created.[required] [example: 1767225600000]
updatedAtBigDecimalTimestamp (ms since epoch) of the last folder modification.[required] [example: 1767225600000]

Model AiPromptMutationResult​

Outcome of create / update / move on a prompt — either the persisted prompt or a field-scoped error.

NameTypeDescriptionNotes
successBooleanTrue when the prompt was persisted.[required] [example: true]
promptAiPromptThe persisted prompt. Present on success.[optional]
errorAiTErrorDataWhy the prompt was rejected. Present on failure.[optional]

Model AiProviderType​

Provider type identifier. Accepts all 17 built-in types with autocomplete, plus any custom string for dynamically registered providers.

Model AiReasoningDepth​

A ReasoningLevel above off — a depth the model can think at.

Possible values:

  • low
  • medium
  • high
  • max

Model AiReasoningSupport​

What one model can do with extended thinking. Providers describe each model through this shape so the UI offers only the choices that change the request, and the request builders clamp to the same table.

NameTypeDescriptionNotes
thinksBooleanWhether the model can think at all. False hides the whole control.[required]
canDisableBooleanWhether off really turns thinking off. False means the model thinks always and off only drops to its lowest depth (or leaves the default depth, where there is no knob).[required]
depthsListDepths the model distinguishes, lowest first. Empty when thinking is an on/off switch with no depth (or the model doesn't think). A level not listed is clamped to the nearest one — see clampReasoningLevel.[required]
defaultDepthAiReasoningDepthThe depth the model runs at when nothing asks for one — what a stored off means on a model that cannot be switched off. Known only where a catalogue reports it (OpenRouter's default_effort); otherwise DEFAULT_REASONING_LEVEL clamped to depths is assumed.[optional] [enum: low, medium, high, max]

Model AiResolvedAssignment​

Resolved profile for an action — both the storage row and its ID.

NameTypeDescriptionNotes
profileIdStringThe identifier of the resolved profile.[required]
profileAiProfileThe resolved profile itself.[required]

Model AiRoomDataLifetimeDto​

The rule by which the files of a room are removed once they have been lying in it for too long.

NameTypeDescriptionNotes
deletePermanentlyBooleanDecides what happens to a file that has grown too old: it is erased outright, or it is moved to the trash of the account that created the room, from where it can still be brought back.[optional] [example: false]
periodAiRoomDataLifetimePeriodThe unit the age is counted in. Months and years are counted as calendar ones, so the same number of them covers a different number of days depending on when the clean-up runs.[optional] [enum: 0, 1, 2]
valueInteger (int32)How many periods a file may stay in the room, counted from the moment it was last changed rather than from the moment the rule was set. Files that are already older than this are removed by the next clean-up.[optional] [example: 12] [min: 1] [max: 999] [nullable]
enabledBooleanSwitches the rule on and off. Switching it off erases the rule instead of keeping it aside, so afterwards the room reports no rule at all and the other three values have to be sent again to bring it back.[optional] [example: true] [nullable]

Model AiRoomDataLifetimePeriod​

Possible values:

  • 0 — Day (Day)
  • 1 — Month (Month)
  • 2 — Year (Year)

Model AiRoomType​

Possible values:

  • 1 — Form filling room (FillingFormsRoom)
  • 2 — Collaboration room (EditingRoom)
  • 5 — Custom room (CustomRoom)
  • 6 — Public room (PublicRoom)
  • 8 — Virtual data room (VirtualDataRoom)
  • 9 — AI Room (AiRoom)

Model AiSuccessResponse​

Generic success acknowledgement for mutations that return no data.

NameTypeDescriptionNotes
successBooleanAlways true — the mutation completed.[required] [example: true]

Model AiTErrorData​

A field-scoped validation error: which form field was rejected, and why.

NameTypeDescriptionNotes
fieldStringThe rejected field.[required] [enum: key, url, name]
messageStringThe human-readable reason the field was rejected.[required]

Model AiTMCPItem​

Descriptor for a tool exposed by an MCP server.

NameTypeDescriptionNotes
nameStringTool name as registered on the MCP server (e.g. web_search, insert_text).[required] [example: docspace_get_folder]
descriptionStringHuman-readable description shown to the AI model and in the tools list UI.[required] [example: Read the contents of a DocSpace folder.]
inputSchemaObjectJSON Schema describing the tool's input parameters.[required] [example: {type=object, properties={folderId={type=string}}, required=[folderId]}]
enabledBooleanWhether this tool is currently enabled. Disabled tools are hidden from the AI model.[optional] [example: true]
serverTypeStringServer type (MCP server name / host tool group id) this tool belongs to — the key the persisted disabled map is stored under. Set by the source that enumerated the tool, so a caller-supplied tool can still be attributed to its group after being flattened into a single list: that is what lets the engine apply the disabled map to actionArgs.tools instead of trusting the caller to pre-filter. Wire-serializable, so it survives a remote (server-side) engine.[optional] [example: docspace]
requireApprovalBooleanWhether the consumer must show an approval dialog before this tool runs. The engine reads it when deciding the autoAllow flag on a tool-call-pending event: requireApproval === false auto-allows the call (no dialog), true always prompts. undefined leaves the decision to the persisted always-allow list alone — so MCP / custom-server tools (which never set it) keep prompting as before, while host tools opt into auto-allow by default. Wire-serializable, so it survives a remote (server-side) engine.[optional] [example: false]

Model AiTProvider​

Minimal provider connection configuration. Used to connect to a provider API.

NameTypeDescriptionNotes
typeAiProviderTypeProvider type identifier.[required] [example: openai]
nameStringUser-defined display name for this provider connection.[required] [example: OpenAI GPT-4o]
keyStringAPI key or token. Optional for local providers (Ollama, LM Studio).[optional] [example: sk-your-provider-api-key]
baseUrlStringBase URL of the provider API.[required] [example: https://api.openai.com/v1]

Model AiThread​

Chat conversation metadata. Represents a single chat session (thread).

NameTypeDescriptionNotes
threadIdStringUnique thread identifier (UUID).[required] [example: 11111111-1111-1111-1111-111111111111]
titleStringOptional thread title. Auto-generated from the first message if not set.[optional] [example: Contract review]
lastEditDateBigDecimalTimestamp (ms since epoch) of the last message in this thread. Used for sorting.[optional] [example: 1767225600000]
providerAiTProviderProvider configuration at the time of last message. Used for thread-level provider display.[optional]
modelAiModelModel info at the time of last message.[optional]
profileIdStringID of the profile used for this thread. Links to Profile.id.[optional] [example: 00000000-0000-0000-0000-000000000000]

Model AiThreadMessageLike​

A single chat message as it travels on the wire.

NameTypeDescriptionNotes
idStringStorage-assigned message id (absent on inbound drafts).[optional] [example: 22222222-2222-2222-2222-222222222222]
roleStringMessage author role.[required] [example: user] [enum: user, assistant, system]
contentAiThreadMessageLike_content[required]
createdAtStringCreation timestamp, ISO-8601 on the wire.[optional] [example: 2026-01-01T00:00:00.000Z]
statusAiThreadMessageLike_status[optional]
metadataObjectArbitrary per-message metadata.[optional] [example: {}]
attachmentsListAttachments linked to the message.[optional] [example: [55555555-5555-5555-5555-555555555555]]

Model AiThreadMessageLike.content​

Message content: either plain text or a list of typed content parts (text, image, tool-call, …). Parts are open-ended by content type.

Model AiThreadMessageLike.content.anyOf item​

NameTypeDescriptionNotes
typeString[required]
textString[optional]

Model AiThreadMessageLike.status​

Delivery/generation status of the message.

NameTypeDescriptionNotes
typeString[required]

Model AiToolsBulkResult​

Outcome of ToolsEngine.replaceAllCustomServers — either every entry persisted, or no entries persisted plus a per-key error report.

NameTypeDescriptionNotes
successBooleanTrue when every custom MCP server was persisted.[required] [example: true]
errorsListWhat was rejected, per server. Present on failure - and then no server was persisted.[optional] [example: []]

Model AiToolsBulkResult.errors item​

NameTypeDescriptionNotes
nameString[required]
errorAiTErrorData[required]

Model AiToolsMutationResult​

Outcome of an MCP-server CRUD call. Either success or a field-scoped error suitable for the settings form.

NameTypeDescriptionNotes
successBooleanTrue when the MCP server was persisted.[required] [example: true]
errorAiTErrorDataWhy the MCP server was rejected. Present on failure.[optional]

Model AiVectorizationSettingsDto​

The vectorization settings.

NameTypeDescriptionNotes
typeAiEmbeddingProviderTypeThe type of embedding provider configured for document vectorization.[optional] [enum: 0, 1, 2, 3]
needResetBooleanIndicates whether the embedding provider API key needs to be reconfigured.[optional] [example: false]

Model AiVectorizationSettingsWrapper​

The successful API response containing the VectorizationSettingsDto object.

NameTypeDescriptionNotes
responseAiVectorizationSettingsDtoThe VectorizationSettingsDto object returned by the operation.[optional]
countInteger (int32)The total number of items in the response[optional]
linksListList of links related to the response[optional]
statusInteger (int32)HTTP status code of the response[optional]
statusCodeInteger (int32)HTTP status code of the response (duplicate of status)[optional]

Model AiWatermarkAdditions​

Possible values:

  • 1 — User name (UserName)
  • 2 — User email (UserEmail)
  • 4 — User ip adress (UserIpAdress)
  • 8 — Current date (CurrentDate)
  • 16 — Room name (RoomName)

Model AiWatermarkDto​

The watermark drawn over the documents of a room while they are viewed and printed.

NameTypeDescriptionNotes
additionsAiWatermarkAdditionsWhich details of the reader and of the room are stamped alongside the text. The values combine, so a number that is not a member on its own is the sum of several of them, and 0 means that only the text is stamped.[required] [enum: 1, 2, 4, 8, 16]
textStringThe fixed line drawn over the document, printed before the details selected alongside it. Empty when the room stamps an image instead.[optional] [example: Confidential] [nullable]
rotateInteger (int32)How far the stamp is turned, in degrees, with negative values turning it anticlockwise and 0 drawing it horizontally.[required] [example: -45]
imageScaleInteger (int32)How large the image is drawn, as a percentage of its own size. It is 0 for a text watermark, where nothing is scaled.[required] [example: 100]
imageUrlStringThe address the stamped picture is served from, inside the storage of the room. Empty for a text watermark.[optional] [example: https://portal.example.com/storage/watermark_a1b2c3.png] [nullable]
imageHeightDouble (double)The height the picture is drawn with, in pixels, kept together with the width so that the proportions survive. It is 0 for a text watermark.[required] [example: 100]
imageWidthDouble (double)The width the picture is drawn with, in pixels, kept together with the height so that the proportions survive. It is 0 for a text watermark.[required] [example: 200]

Model AiWebSearchConfig​

Web-search provider configuration. Credentials and provider selection for the built-in web-search tool group.

NameTypeDescriptionNotes
providerStringProvider identifier (e.g. exa).[required] [example: exa]
keyStringAPI key for the provider. Optional for self-hosted or keyless setups.[optional] [example: your-web-search-api-key]
baseUrlStringOptional override for the provider's base URL.[optional] [example: https://api.exa.ai]
isCloudProviderBooleanWhether this provider is cloud-hosted (vs. self-hosted).[optional] [example: true]
headersMapExtra HTTP headers sent with each request to the ONLYOFFICE / cloud backend (e.g. X-Tenant). Merged after the derived Authorization header, so a custom header of the same name wins.[optional] [example: {}]

Model AiWebSearchMutationResult​

Outcome of WebSearchEngine.configure — either the persisted config or a field-scoped error suitable for the settings form.

NameTypeDescriptionNotes
successBooleanTrue when the configuration was persisted.[required] [example: true]
configAiWebSearchConfigThe persisted web-search configuration. Present on success.[optional]
errorAiTErrorDataWhy the configuration was rejected. Present on failure.[optional]

Model FieldError​

Field specific validation error

NameTypeDescriptionNotes
fieldStringThe name of the field that failed validation[optional] [example: policy_url]
codeStringError code for localization purposes[optional] [example: InvalidPolicyUrl]
messageStringHuman readable error message[optional] [example: policy url is expected to be passed as url]

Model ProblemDetail​

RFC 7807 problem details returned by the registration API for failed requests.

NameTypeDescriptionNotes
typeURI (uri)A URI reference that identifies the problem type. This service sets it to the DocSpace API getting-started page.[optional]
titleStringA short, human-readable summary of the problem type, typically the HTTP status reason phrase.[optional]
statusInteger (int32)The HTTP status code for this occurrence of the problem.[optional]
detailStringA human-readable explanation specific to this occurrence of the problem.[optional]
instanceURI (uri)A URI reference that identifies the specific occurrence, set to the request path.[optional]
propertiesMapExtension members carried on the problem. Usually empty; validation failures also surface as the top-level errors array.[optional]
errorsListField-specific validation errors. Present when the request body or parameters failed validation, or when a named scope is not in the tenant catalogue.[optional]

Model aiAgentsCreate request body​

NameTypeDescriptionNotes
profileIdStringProfile id bound to the agent.[required]
promptStringAgent system prompt; stored as the room's chatSettings.prompt.[required]
privateBooleanWhether the agent room is private.[optional]
shareListInitial share entries (FileShareParams).[optional]
attachDefaultToolsBooleanWhether to attach the default DocSpace MCP tool server.[optional]
titleStringAgent (room) title.[optional]
quotaBigDecimalRoom quota in bytes.[optional]
indexingBooleanWhether room content is indexed for search.[optional]
denyDownloadBooleanWhether downloading room content is denied.[optional]
lifetimeObjectRoom data lifetime policy (RoomDataLifetimeDto).[optional]
watermarkObjectWatermark settings (WatermarkRequestDto).[optional]
logoObjectRoom logo (LogoRequest).[optional]
tagsListRoom tags.[optional]
colorStringRoom accent color.[optional]
coverStringRoom cover image id.[optional]

Model aiAgentsDelete request body​

NameTypeDescriptionNotes
deleteAfterBooleanDelete the room after the editing session finishes.[optional]

Model aiAgentsGet 200 response​

NameTypeDescriptionNotes
responseaiAgentsGet_200_response_allOf_response[optional]
countInteger (int32)The total number of items in the response[optional]
linksListList of links related to the response[optional]
statusInteger (int32)HTTP status code of the response[optional]
statusCodeInteger (int32)HTTP status code of the response (duplicate of status)[optional]

Model aiAgentsGet 200 response.response​

NameTypeDescriptionNotes
profileIdStringThe AI profile bound to this agent, added by this service on top of what the internal service returns. Absent when the agent has no profile assigned.[optional] [example: 00000000-0000-0000-0000-000000000000]

Model aiAgentsResetQuota request body​

NameTypeDescriptionNotes
roomIdsListAgent (room) ids to reset to the tenant default quota.[required]

Model aiAgentsUpdateQuota request body​

NameTypeDescriptionNotes
roomIdsListAgent (room) ids to update.[required]
quotaBigDecimalNew quota in bytes; a negative value disables the custom quota.[required]

Model aiAgentsUpdateQuota.request.roomIds item​

A DocSpace room id: an integer for native rooms, a string for third-party-backed ones.

Model aiAgentsUpdate request body​

NameTypeDescriptionNotes
profileIdStringProfile id to rebind (optional).[optional]
chatSettingsObjectChat settings (ChatSettings); requires a valid provider/model.[optional]
sendFormToExternalDBBooleanWhether form results are sent to an external DB.[optional]
saveFormAsXLSXBooleanWhether forms are saved as XLSX.[optional]
titleStringAgent (room) title.[optional]
quotaBigDecimalRoom quota in bytes.[optional]
indexingBooleanWhether room content is indexed for search.[optional]
denyDownloadBooleanWhether downloading room content is denied.[optional]
lifetimeObjectRoom data lifetime policy (RoomDataLifetimeDto).[optional]
watermarkObjectWatermark settings (WatermarkRequestDto).[optional]
logoObjectRoom logo (LogoRequest).[optional]
tagsListRoom tags.[optional]
colorStringRoom accent color.[optional]
coverStringRoom cover image id.[optional]

Model aiAiApproveToolCall request body​

NameTypeDescriptionNotes
resultoas_any_type_not_mapped[required] [nullable]
allowAlwaysBooleanPersist auto-approve for this tool's name.[optional]
threadIdStringThread the assistant message belongs to.[required]
messageIdStringStorage id of the assistant message holding the tool call.[required]
idxBigDecimalIndex of the tool-call content part inside message.content.[required]
messageAiThreadMessageLikeSnapshot of the assistant message at the time the tool call surfaced.[required]
actionArgsAiAiActionArgsPer-request engine options: extra tools, reasoning, prompt override.[optional]
entityIdStringOptional entity (room) scope for profile resolution.[optional]
profileIdStringSession-level profile override for this request only.[optional]

Model aiAiRegenerateStream request body​

NameTypeDescriptionNotes
threadIdStringTarget thread (must already exist).[required]
actionArgsAiAiActionArgsPer-request engine options: extra tools, reasoning, prompt override.[optional]
entityIdStringOptional entity (room) scope for profile resolution.[optional]
profileIdStringSession-level profile override for this request only.[optional]

Model aiAiSendCustom request body​

NameTypeDescriptionNotes
isStreamBooleanStream the reply (ndjson) when true, else return a single message.[required]
systemPromptStringCaller-supplied system prompt for this one-turn call.[required]
userMessageAiThreadMessageLike[required]
actionArgsAiAiActionArgsPer-request engine options: extra tools, reasoning, prompt override.[optional]

Model aiAiSend request body​

NameTypeDescriptionNotes
actionTypeAiActionTypeWhich AI action to run — selects the assignment slot and action.[required] [enum: Default, Chat, Code, Summarization, Translation, TextAnalyze, ImageGeneration, OCR, Vision]
userMessageAiThreadMessageLikeThe user turn to send.[required]
actionArgsAiAiActionArgsPer-request engine options: extra tools, reasoning, prompt override.[optional]
entityIdStringOptional entity (room) scope for profile resolution.[optional]

Model aiAssignmentsAssign request body​

NameTypeDescriptionNotes
actionTypeAiActionTypeAction the assignment applies to.[required] [enum: Default, Chat, Code, Summarization, Translation, TextAnalyze, ImageGeneration, OCR, Vision]
profileIdStringProfile id to bind.[required]

Model aiAssignmentsCascadeProfileDelete request body​

NameTypeDescriptionNotes
profileIdStringThe profile whose assignments are removed. May be sent as the profileId query parameter instead of in the body.[required] [example: 00000000-0000-0000-0000-000000000000]

Model aiAttachmentsLinkToMessage request body​

NameTypeDescriptionNotes
idsListAttachment ids to bind.[required]
messageIdStringOwning message id.[required]
threadIdStringOwning thread id.[required]

Model aiAttachmentsSaveFile request body​

NameTypeDescriptionNotes
inputaiAttachmentsSaveFile_request_input[required]
entityIdStringOptional entity (room) scope.[optional]

Model aiAttachmentsSaveFile.request.input​

A file attachment draft to persist.

NameTypeDescriptionNotes
pathStringStorage path/key of the file.[required]
contentStringFile contents.[required]
typeBigDecimalFile type discriminator.[required]
titleStringOptional display title.[optional]

Model aiAttachmentsSaveFilesMany request body​

NameTypeDescriptionNotes
inputsList[required]
entityIdString[optional]

Model aiEditorToolsCall 200 response​

NameTypeDescriptionNotes
resultStringWhat the tool produced, as text. A structured result is JSON-encoded, and a tool that failed reports its error here rather than through a status code.[required]

Model aiEditorToolsCall request body​

NameTypeDescriptionNotes
nameStringName of the tool to run, as listed by the tools endpoint. A name that is unknown or excluded from the editor is rejected with 400.[required] [example: docspace_get_folder]
argumentsMapArguments for the tool, shaped by that tool's own input schema. Treated as empty when it is not an object.[optional] [example: {"folderId":"1234"}]
entityIdStringRoom the call is scoped to. Left out for a portal-wide call.[optional] [example: 1234]

Model aiEditorToolsList 200 response​

NameTypeDescriptionNotes
toolsListThe tools the editor may offer, flattened across every server.[required]

Model aiEditorToolsList 200 response.tools item​

NameTypeDescriptionNotes
nameStringTool name, as it is passed back to the call endpoint.[required] [example: docspace_search_files]
descriptionStringWhat the tool does, empty when the server declares nothing.[required]
inputSchemaMapJSON Schema of the tool arguments.[required]
requireApprovalBooleanWhether the editor has to ask the user before running the tool. Read-only operations arrive with this off.[required] [example: true]

Model aiExportTextToDocx 202 response​

Accepted-for-processing acknowledgement (conversion is asynchronous).

NameTypeDescriptionNotes
successBoolean[required]

Model aiExportTextToDocx request body​

NameTypeDescriptionNotes
titleStringDocument title (also the file name).[required]
contentStringMarkdown content to convert.[required]
folderIdaiExportTextToDocx_request_folderId[required]

Model aiExportTextToDocx.request.folderId​

Target folder id (int or string).

Model aiOpenaiChatCompletions 403 response​

NameTypeDescriptionNotes
erroraiOpenaiChatCompletions_403_response_error[required]

Model aiOpenaiChatCompletions 403 response.error​

NameTypeDescriptionNotes
messageStringHuman-readable description of the failure.[required]
typeStringOpenAI error class, for example invalid_request_error.[required] [example: invalid_request_error]
codeStringMachine-readable code, when the provider supplies one.[optional] [nullable]
paramStringThe request parameter at fault, when the failure names one.[optional] [nullable]

Model aiPreferencesSetDeepMode request body​

NameTypeDescriptionNotes
valueBooleanNew deep-mode value.[required]
entityIdString[optional]

Model aiPreferencesSetReasoningLevel request body​

NameTypeDescriptionNotes
valueAiAiReasoningLevelNew extended-thinking depth; off turns deep mode off.[required] [enum: off, low, medium, high, max]
entityIdString[optional]

Model aiProfilesGetById 200 response​

NameTypeDescriptionNotes
idStringUnique profile identifier (UUID).[required]
nameStringUser-defined profile display name.[required]
providerTypeAiProviderTypeProvider type for this profile. Use external to delegate all HTTP transport to PlatformAdapter.externalFetch while reusing an existing provider's response parser — see Profile.basedOn for the format selector.[required]
basedOnAiBuiltinProviderTypeSelects the response-format parser used by the external provider. Ignored for any other providerType. Supported values are openai, anthropic, mistral and openrouter. Remaining values (genai, stabilityai, …) are accepted by the type but not yet implemented; passing one raises an error at request time.[optional] [enum: anthropic, ollama, openai, openaicompatible, together, openrouter, genai, deepseek, xai, lm-studio, mistral, groq, zhipu, stabilityai, gpt4all, onlyoffice, external]
baseUrlStringBase URL of the provider API.[required]
modelIdStringSelected model ID within this provider.[required]
reasoningBooleanWhether extended thinking is enabled for this profile's model.[optional]
reasoningSupportAiReasoningSupportExtended-thinking capabilities of the selected model as reported by the provider's catalogue at save time (see Model.reasoningSupport). When present the composer's Effort row follows it exactly; when absent the provider's id-based table answers. Hosts persist it with the rest of the profile.[optional]
capabilitiesBigDecimalBitmask of capabilities supported by the selected model.[optional]
canUseToolBooleanResult of the live tool-capability probe performed at create time and on changes to modelId / providerType / baseUrl. undefined means the probe has never run for this profile (legacy record).[optional]
useResponsesApiBooleanResult of the live Responses-API probe (parallel to canUseTool). true means the model speaks /v1/responses and the OpenAI provider must route through client.responses.create — required for gpt-5+ reasoning models that reject reasoning_effort together with tools on /v1/chat/completions. Probed at create time and whenever modelId / providerType / baseUrl change. undefined means the probe never ran (legacy record) — readers treat that as false.[optional]
isCloudProviderBooleanWhether this profile uses a cloud-hosted provider (e.g. ONLYOFFICE DocSpace).[optional]
useProxyBooleanRoute every provider request through the host's fetchProxy instead of the global fetch. Useful when the host runs the widget in a sandbox without direct network access (CORS, custom auth, etc.). Has no effect when the PlatformAdapter.fetchProxy is not configured.[optional]
createdAtBigDecimalCreation timestamp (ms since epoch). Used to sort the AI models list newest-first.[optional]

Model aiProfilesListProviderModels 400 response​

NameTypeDescriptionNotes
errorStringThe error message, ready to be shown to the caller.[required]
fieldStringName of the request field that was missing or rejected.[required]

Model aiProfilesListProviderModels 400 response.anyOf​

NameTypeDescriptionNotes
errorStringThe error message, ready to be shown to the caller.[required] [example: providerType required]
fieldStringName of the request field that was missing or rejected.[required] [example: providerType]

Model aiProfilesListProviderModels request body​

NameTypeDescriptionNotes
providerTypeAiProviderTypeProvider whose catalog to list.[required]
baseUrlStringProvider API base URL.[required] [example: https://api.openai.com/v1]
apiKeyStringProvider API key. Omit it for a provider that needs none; the request is then made without one.[optional]

Model aiProfilesTestConnection 200 response​

NameTypeDescriptionNotes
messageString[optional]

Model aiProfilesTestConnection 200 response.anyOf​

NameTypeDescriptionNotes
messageString[optional]

Model aiPromptsImportBundle request body​

NameTypeDescriptionNotes
bundleAiPromptBundleBundle to restore.[required]
optionsaiPromptsImportBundle_request_options[optional]

Model aiPromptsImportBundle.request.options​

Import options.

NameTypeDescriptionNotes
modeAiImportMode[optional] [enum: replace, merge]

Model aiPromptsMove request body​

NameTypeDescriptionNotes
idStringPrompt id to move.[required]
folderIdStringTarget folder id, or null for root.[required] [nullable]

Model aiPromptsRenameFolder request body​

NameTypeDescriptionNotes
idStringFolder id to rename.[required]
nameStringNew folder name.[required]

Model aiPromptsUpdate request body​

NameTypeDescriptionNotes
idStringPrompt id to update.[required]
updatesaiPromptsUpdate_request_updates[required]

Model aiPromptsUpdate.request.updates​

Fields to change.

NameTypeDescriptionNotes
nameString[optional]
textString[optional]
folderIdString[optional] [nullable]

Model aiThreadsAppendUserMessage 200 response​

NameTypeDescriptionNotes
messageIdStringIdentifier of the message that was appended to the thread.[required] [example: 22222222-2222-2222-2222-222222222222]

Model aiThreadsAppendUserMessage request body​

NameTypeDescriptionNotes
threadIdString[required]
messageAiThreadMessageLikeMessage to persist (id/createdAt are storage-assigned).[required]
profileIdString[optional]

Model aiThreadsCreate request body​

NameTypeDescriptionNotes
titleStringThread title.[required]
profileIdStringOptional profile to bind.[optional]
entityIdStringOptional entity (room) scope.[optional]

Model aiThreadsOpenOrCreate request body​

NameTypeDescriptionNotes
threadIdString[optional]
profileAiProfileProfile the title generation runs on.[required]
profileIdString[required]
firstMessageAiThreadMessageLikeFirst user message a fresh thread derives its title from.[required]
entityIdStringOpaque scope token persisted on a freshly created thread.[optional]
entityMetaaiThreadsOpenOrCreate_request_entityMeta[optional]

Model aiThreadsOpenOrCreate.request.entityMeta​

Optional entity hint (lib 0.5.64): only entityId is read; the source (source_id / source_type / source_title) is re-resolved server-side before reaching the provider as metadata.

NameTypeDescriptionNotes
entityIdString[optional]
entityTitleString[optional]

Model aiThreadsRegenerateTitle 200 response​

NameTypeDescriptionNotes
titleStringThe regenerated thread title.[required] [example: Quarterly report review]

Model aiThreadsRegenerateTitle request body​

NameTypeDescriptionNotes
threadIdString[required]
profileAiProfileProfile used to regenerate the title.[required]
entityMetaaiThreadsOpenOrCreate_request_entityMeta[optional]

Model aiThreadsRename request body​

NameTypeDescriptionNotes
threadIdString[required]
titleStringNew thread title.[required]

Model aiThreadsTouch request body​

NameTypeDescriptionNotes
threadIdString[required]
profileIdString[optional]

Model aiThreadsUpdateMessage request body​

NameTypeDescriptionNotes
messageIdString[required]
messageAiThreadMessageLikeReplacement message content.[required]

Model aiToolsAddCustomServer request body​

NameTypeDescriptionNotes
nameStringServer name (unique within scope).[required]
configObjectServer transport configuration.[required]
entityIdString[optional]

Model aiToolsListSystemTools 200 response​

NameTypeDescriptionNotes
groupsMapTools by server name, covering both the host-configured system servers and the custom MCP servers registered for this scope.[required]
errorsMapWhy a registered custom server could not be reached, keyed by server name. A server that answered is absent from this map.[required]
systemListNames of the host-configured system servers among the keys of groups; everything else there was registered as a custom server.[required]

Model aiToolsRemoveCustomServer request body​

NameTypeDescriptionNotes
nameString[required]
entityIdString[optional]

Model aiToolsReplaceAllCustomServers request body​

NameTypeDescriptionNotes
mapMapFull replacement set, keyed by server name.[required]
entityIdString[optional]

Model aiToolsSetAllowAlways request body​

NameTypeDescriptionNotes
serverTypeString[required]
toolNameString[required]
valueBooleanWhether the tool is always allowed.[required]
entityIdString[optional]

Model aiToolsSetDisabled request body​

NameTypeDescriptionNotes
serverTypeString[required]
toolNamesListTool names to disable.[required]
entityIdString[optional]

Model aiToolsUpdateCustomServer request body​

NameTypeDescriptionNotes
nameString[required]
configObjectOne MCP server configuration. The shape is intentionally open — MCP allows per-transport fields (command/args for stdio, url for HTTP, plus env, headers, etc.) and the storage layer stays agnostic to which transport is in use.[required]
entityIdString[optional]

Model aiVectorizationStartTask 200 response​

NameTypeDescriptionNotes
countIntegerEnvelope field from the internal service; 0 for this operation.[required] [example: 0]
statusIntegerEnvelope status flag from the internal service.[required] [example: 0]
statusCodeIntegerHTTP status the internal service answered with.[required] [example: 200]

Model aiVectorizationStartTask request body​

NameTypeDescriptionNotes
filesListIdentifiers of the files to vectorize.[required] [example: [1234,1235]]

Model aiWebSearchConfigure request body​

NameTypeDescriptionNotes
configAiWebSearchConfig[required]
entityIdString[optional]

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: