Skip to main content
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

Body

Example request

Response

200 OK

400 / 401 / 403 / 404 / 429

  • 400 BAD_REQUEST: assistant_id or node_ids with invalid format, or node_ids empty.
  • 403 FORBIDDEN with code: INSUFFICIENT_SCOPE: the PAT doesn’t have knowledge:assign.
  • 404 NOT_FOUND: the assistant_id doesn’t exist, or one or more node_ids don’t belong to your company.

Authorizations

Authorization
string
header
required

Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.

Body

application/json
assistant_id
string
required

ObjectId del asistente destino.

node_ids
string[]
required

ObjectIds de los nodos a asignar a todos los workers del asistente.

Response

200 - application/json
workers_updated
number
required