Asignar nodos de la base de conocimientos a todos los workers de un asistente.
Knowledge base
POST /v1/knowledge/assignments
Assign knowledge base nodes to all of an assistant’s workers.
POST
Asignar nodos de la base de conocimientos a todos los workers de un asistente.
Associates one or more knowledge base nodes with an assistant. The assignment propagates to all of the assistant’s workers (except
supervisor workers), adding the given node_id values to their list of accessible knowledge. The operation is idempotent: if a node was already assigned, it isn’t duplicated.
To list available assistants use GET /v1/assistants. To get validated node_id values for your folders and documents use GET /v1/knowledge/tree.
After the assignment, a reindex is enqueued to refresh the workers’ cached embeddings.
Endpoint
Required scope
knowledge:assign
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer kbai_pk_<token> |
Content-Type | Yes | application/json |
Body
| Field | Type | Required | Description |
|---|---|---|---|
assistant_id | string | Yes | ObjectId of the target assistant. |
node_ids | string[] | Yes | ObjectId values of the nodes to assign. Minimum 1, maximum 200. |
Example request
Response
200 OK
| Field | Type | Description |
|---|---|---|
workers_updated | number | Number of assistant workers that received the assignment. 0 means the assistant has no non-supervisor workers. |
400 / 401 / 403 / 404 / 429
400 BAD_REQUEST:assistant_idornode_idswith invalid format, ornode_idsempty.403 FORBIDDENwithcode: INSUFFICIENT_SCOPE: the PAT doesn’t haveknowledge:assign.404 NOT_FOUND: theassistant_iddoesn’t exist, or one or morenode_idsdon’t belong to your company.
Authorizations
Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.
Body
application/json
Response
200 - application/json