Adjuntar un bloque a un asistente
Assistant blocks
POST /v1/assistants/{id}/blocks
Attach one existing block to an assistant without touching the rest of its wiring.
POST
Adjuntar un bloque a un asistente
Adds one block to the assistant’s list, leaving every other block where it is. The cheap counterpart to
PUT /v1/assistants/{id}/blocks, which replaces everything.
The block has to exist already. Create it with one of the per-type endpoints first, or reuse one from the catalogue.
Endpoint
Required scope
assistants:write
Headers
Path parameters
Body
Example request
Response
201 Created
The full assistant, same shape asGET /v1/assistants/{id}, with the block added.
400 Bad Request
A malformedObjectId or an unknown property. error.code is ASSISTANT_DUPLICATE_IDENTITY_BLOCK when the assistant already holds an identity block of that type.
401 Unauthorized
Missing, invalid, revoked, or expired token.403 Forbidden
The token does not have theassistants:write scope.
404 Not Found
The assistant does not exist in the token’s company and project, orerror.code is ASSISTANT_BLOCK_NOT_FOUND because the block does not exist or belongs to another company.
502 Bad Gateway
The assistant service is unreachable.Operational notes
- Attaching is not idempotent. Calling it twice with the same
block_idadds a second reference to the same block, which renders it twice in the prompt. Check the current list first, or usePUT, which is naturally idempotent. - Omitting
orderappends. The block lands after everything currently attached. To insert in the middle you have to renumber, which meansPUT. - The duplicate-identity check looks at the resulting list, not just at what you sent, so it catches the case where the assistant already has a
personificationand you attach another. - One block, many assistants. Attaching does not move or copy anything: the same block can be wired into any number of assistants, each with its own
orderand pin.
Authorizations
Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.
Path Parameters
Body
application/json
Response
201 - application/json