Before You Start
- API key scope: Requires an API key with the
KNOWLEDGE_FOLDER_APIscope. The API key itself needs the Editor role on the Knowledge base. See Share Knowledge bases with the API for setup instructions. - Knowledge bases: The Knowledge Folder API manages resources that appear as Knowledge bases in the Library.
Base URL
Roles
A Viewer-only key, including a key that only has API search through the Knowledge base, cannot call these endpoints.
An Editor workspace key can grant other qualifying workspace keys even if the key owner is not a workspace admin. The in-app Share dialog still lists API keys only for workspace admins.
Grant access
POST /knowledge/{folderId}/access
Path Parameters
Request Body
All IDs must resolve to a human workspace member or a qualifying workspace API key. Group IDs are not accepted. Personal API keys are not eligible. If any ID is missing or ineligible, the request fails and no grants are written.
Grant with cURL
Grant with JavaScript
Success Response (200 OK)
Change a role
PATCH /knowledge/{folderId}/access
You cannot change the Knowledge base owner’s access. Reassign ownership in the Library first. If the target has no grant yet, this request creates one.
Revoke access
DELETE /knowledge/{folderId}/access
You cannot revoke the Knowledge base owner’s access.
Error Handling
Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.