Knowledge bases

Create a knowledge base

Creates an empty knowledge base; add documents with Add a knowledge base document. With validate_only, the checks run and 204 answers, nothing is created.

post/v1/workspaces/{workspace_id}/knowledge-bases

Request

  • Base URL
    https://api.stacksync.com
  • URL
    https://api.stacksync.com/v1/workspaces/{workspace_id}/knowledge-bases
  • Auth
    HTTP bearer

Path parameters

workspace_idinteger required

The workspace. List the ones your key can reach with GET /v1/workspaces.

Query parameters

region'besg' | 'usnv' required

Region of the resource: besg (Europe) or usnv (United States), as GET /v1/regions lists them

Headers

Idempotency-Keystring nullable

Makes the create retry-safe for 24 hours: a retry with the same key answers the resource the first call created, with the Idempotent-Replayed: true header, and creates nothing. 1 to 255 visible ASCII characters. The same key with a different request answers 422; while the first call still runs, 409.

Request body

namestring required

Name, unique among the workspace's knowledge bases of the region

resource_idstring nullable

The id genies reference it by, unique in the region; derived from the name when absent (a renamed knowledge base keeps its own, so its old name needs another one)

folder_idstring uuid nullable

Folder to list it in; the root when absent

is_shared_with_workspaceboolean

true lets every member of the workspace use it

validate_onlyboolean

Run every check of the write and answer 204 without writing: a refused write answers the error the write would

Response

Created

knowledge_base_idstring required
namestring required
resource_idstring required
regionstring required
is_shared_with_workspaceboolean required
folder_idstring nullable required
created_timestring date-time required
last_modified_timestring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.