Langdock Knowledge API
The Knowledge API from Langdock — 4 operation(s) for knowledge.
The Knowledge API from Langdock — 4 operation(s) for knowledge.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/langdock:langdock-knowledge-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Langdock Knowledge API
version: 3.0.0
servers:
- url: https://api.langdock.com
description: Production
security:
- bearerAuth: []
tags:
- name: Knowledge
paths:
/knowledge:
get:
summary: List Knowledge bases accessible to the API key
parameters:
- name: limit
in: query
required: false
description: Number of Knowledge bases to return. Default 50. Maximum 100.
schema:
type: integer
minimum: 1
maximum: 100
default: 50
- name: cursor
in: query
required: false
description: UUID of the last Knowledge base from the previous page
schema:
type: string
format: uuid
responses:
'200':
description: Knowledge bases retrieved successfully
security:
- bearerAuth: []
tags:
- Knowledge
operationId: getKnowledge
x-operation-id-source: derived
/knowledge/{folderId}/access:
post:
summary: Grant Knowledge base access to people or workspace API keys
parameters:
- name: folderId
in: path
required: true
description: The ID of the knowledge folder
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- targetIds
- role
properties:
targetIds:
type: array
items:
type: string
format: uuid
minItems: 1
maxItems: 100
role:
type: string
enum:
- USER
- EDITOR
responses:
'200':
description: Access granted successfully
security:
- bearerAuth: []
tags:
- Knowledge
operationId: postKnowledgeByFolderIdAccess
x-operation-id-source: derived
patch:
summary: Change Knowledge base access for a person or workspace API key
parameters:
- name: folderId
in: path
required: true
description: The ID of the knowledge folder
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- type
- targetId
- role
properties:
type:
type: string
enum:
- USER
- API_KEY
targetId:
type: string
format: uuid
role:
type: string
enum:
- USER
- EDITOR
responses:
'200':
description: Access updated successfully
security:
- bearerAuth: []
tags:
- Knowledge
operationId: patchKnowledgeByFolderIdAccess
x-operation-id-source: derived
delete:
summary: Revoke Knowledge base access for a person or workspace API key
parameters:
- name: folderId
in: path
required: true
description: The ID of the knowledge folder
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- type
- targetId
properties:
type:
type: string
enum:
- USER
- API_KEY
targetId:
type: string
format: uuid
responses:
'200':
description: Access revoked successfully
security:
- bearerAuth: []
tags:
- Knowledge
operationId: deleteKnowledgeByFolderIdAccess
x-operation-id-source: derived
/knowledge/{folderId}/folder:
patch:
summary: Update a Knowledge base name or description
parameters:
- name: folderId
in: path
required: true
description: The ID of the knowledge folder
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description:
type: string
responses:
'200':
description: Knowledge base updated successfully
security:
- bearerAuth: []
tags:
- Knowledge
operationId: patchKnowledgeByFolderIdFolder
x-operation-id-source: derived
/knowledge/search:
post:
summary: Search through all files in data folders shared with the API Key
parameters: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- query
properties:
query:
type: string
description: The search query
example: API Documentation
responses:
'200':
description: Successfully found search result
security:
- bearerAuth: []
tags:
- Knowledge
operationId: postKnowledgeSearch
x-operation-id-source: derived
/knowledge/{folderId}:
post:
summary: Upload a file to a knowledge folder
parameters:
- name: folderId
in: path
required: true
description: The ID of the knowledge folder
schema:
type: string
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
description: The file to upload
url:
type: string
description: The associated URL
responses:
'200':
description: File uploaded successfully
'400':
description: Invalid request or file validation failed
content:
application/json:
schema:
oneOf:
- type: object
additionalProperties: false
required:
- message
- code
properties:
message:
type: string
example: The file "quarterly-report.pdf" is declared as a PDF but its content does not start with the expected PDF header.
code:
type: string
enum:
- BAD_REQUEST
- type: object
additionalProperties: false
required:
- message
- errors
properties:
message:
type: string
example: Invalid request
errors:
type: array
items:
type: object
'401':
description: Invalid or missing API key
content:
application/json:
schema:
type: object
required:
- message
properties:
message:
type: string
example: The provided API key is invalid.
'403':
description: API key does not have access to the knowledge folder
content:
application/json:
schema:
oneOf:
- type: object
additionalProperties: false
required:
- message
- code
properties:
message:
type: string
example: Knowledge folder not shared with this API key. Please share the folder with the API key in the Langdock App to upload or update files.
code:
type: string
enum:
- FORBIDDEN
- type: object
additionalProperties: false
required:
- message
- error
- details
properties:
message:
type: string
example: Insufficient API key permissions.
error:
type: string
enum:
- INSUFFICIENT_SCOPES
details:
type: object
required:
- required
- missing
properties:
required:
type: array
items:
type: string
example: KNOWLEDGE_FOLDER_API
missing:
type: array
items:
type: string
example: KNOWLEDGE_FOLDER_API
- type: object
additionalProperties: false
required:
- message
properties:
message:
type: string
example: Forbidden
'404':
description: Knowledge folder not found
content:
application/json:
schema:
type: object
required:
- message
- code
properties:
message:
type: string
example: Knowledge folder not found
code:
type: string
enum:
- NOT_FOUND
'408':
description: Upload timed out
content:
application/json:
schema:
type: object
required:
- message
- code
properties:
message:
type: string
example: Upload request timed out. Please try again with a smaller file or check your connection.
code:
type: string
enum:
- REQUEST_TIMEOUT
'413':
description: File exceeds the size limit
content:
application/json:
schema:
type: object
required:
- message
- code
properties:
message:
type: string
example: File size exceeds the maximum allowed size of 256MB. Please upload a smaller file.
code:
type: string
enum:
- PAYLOAD_TOO_LARGE
'429':
description: Rate limit exceeded
content:
application/json:
schema:
type: object
required:
- message
properties:
message:
type: string
example: You have exceeded the maximum number of requests per minute (50)
code:
type: string
enum:
- TOO_MANY_REQUESTS
'500':
description: Unexpected server error
content:
application/json:
schema:
type: object
required:
- message
properties:
message:
type: string
example: Internal server error
'503':
description: Storage capacity exceeded
content:
application/json:
schema:
type: object
required:
- message
- code
properties:
message:
type: string
example: Storage capacity exceeded. Please contact your administrator.
code:
type: string
enum:
- SERVICE_UNAVAILABLE
security:
- bearerAuth: []
tags:
- Knowledge
operationId: postKnowledgeByFolderId
x-operation-id-source: derived
patch:
summary: Update a file in a knowledge folder
parameters:
- name: folderId
in: path
required: true
description: The ID of the knowledge folder
schema:
type: string
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
description: The new file to upload
url:
type: string
description: URL that is shown to the user if the file is used in an answer
attachmentId:
type: string
description: The ID of the attachment to update
responses:
'200':
description: Attachment updated successfully
'400':
description: Invalid request or file validation failed
content:
application/json:
schema:
oneOf:
- type: object
additionalProperties: false
required:
- message
- code
properties:
message:
type: string
example: The file "updated-report.pdf" is declared as a PDF but its content does not start with the expected PDF header.
code:
type: string
enum:
- BAD_REQUEST
- type: object
additionalProperties: false
required:
- message
- errors
properties:
message:
type: string
example: Invalid request
errors:
type: array
items:
type: object
'401':
description: Invalid or missing API key
content:
application/json:
schema:
type: object
required:
- message
properties:
message:
type: string
example: The provided API key is invalid.
'403':
description: API key does not have access to the knowledge folder
content:
application/json:
schema:
oneOf:
- type: object
additionalProperties: false
required:
- message
- code
properties:
message:
type: string
example: Knowledge folder not shared with this API key. Please share the folder with the API key in the Langdock App to upload or update files.
code:
type: string
enum:
- FORBIDDEN
- type: object
additionalProperties: false
required:
- message
- error
- details
properties:
message:
type: string
example: Insufficient API key permissions.
error:
type: string
enum:
- INSUFFICIENT_SCOPES
details:
type: object
required:
- required
- missing
properties:
required:
type: array
items:
type: string
example: KNOWLEDGE_FOLDER_API
missing:
type: array
items:
type: string
example: KNOWLEDGE_FOLDER_API
- type: object
additionalProperties: false
required:
- message
properties:
message:
type: string
example: Forbidden
'404':
description: Knowledge folder or attachment not found
content:
application/json:
schema:
type: object
required:
- message
- code
properties:
message:
type: string
example: Attachment with ID '550e8400-e29b-41d4-a716-446655440000' not found in this knowledge folder.
code:
type: string
enum:
- NOT_FOUND
'408':
description: Upload timed out
content:
application/json:
schema:
type: object
required:
- message
- code
properties:
message:
type: string
example: Upload request timed out. Please try again with a smaller file or check your connection.
code:
type: string
enum:
- REQUEST_TIMEOUT
'413':
description: File exceeds the size limit
content:
application/json:
schema:
type: object
required:
- message
- code
properties:
message:
type: string
example: File size exceeds the maximum allowed size of 256MB. Please upload a smaller file.
code:
type: string
enum:
- PAYLOAD_TOO_LARGE
'429':
description: Rate limit exceeded
content:
application/json:
schema:
type: object
required:
- message
properties:
message:
type: string
example: You have exceeded the maximum number of requests per minute (50)
code:
type: string
enum:
- TOO_MANY_REQUESTS
'500':
description: Unexpected server error
content:
application/json:
schema:
type: object
required:
- message
properties:
message:
type: string
example: Internal server error
'503':
description: Storage capacity exceeded
content:
application/json:
schema:
type: object
required:
- message
- code
properties:
message:
type: string
example: Storage capacity exceeded. Please contact your administrator.
code:
type: string
enum:
- SERVICE_UNAVAILABLE
security:
- bearerAuth: []
tags:
- Knowledge
operationId: patchKnowledgeByFolderId
x-operation-id-source: derived
/knowledge/{folderId}/list:
get:
summary: Retrieve files from a knowledge folder
parameters:
- name: folderId
in: path
required: true
description: The ID of the knowledge folder
schema:
type: string
responses:
'200':
description: List of files retrieved successfully
security:
- bearerAuth: []
tags:
- Knowledge
operationId: getKnowledgeByFolderIdList
x-operation-id-source: derived
/knowledge/{folderId}/{attachmentId}:
delete:
summary: Delete a file from a knowledge folder
parameters:
- name: folderId
in: path
required: true
description: The ID of the knowledge folder
schema:
type: string
- name: attachmentId
in: path
required: true
description: The ID of the attachment to delete
schema:
type: string
responses:
'200':
description: Attachment deleted successfully
security:
- bearerAuth: []
tags:
- Knowledge
operationId: deleteKnowledgeByFolderIdByAttachmentId
x-operation-id-source: derived
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: API Key
description: API key as Bearer token. Format "Bearer YOUR_API_KEY"
x-provenance:
method: harvested
publisher: Langdock
source: https://docs.langdock.com/openapi.yaml
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)