Renombrar o archivar un bloque
Block catalogue
PATCH /v1/blocks/{id}
Rename a block or change its archived flag. Content is edited elsewhere.
PATCH
Renombrar o archivar un bloque
Changes a block’s name or archives it. These are the only two mutable fields on a block document —
type and family are fixed at creation, and the content lives in versions.
To change what the block says, use PUT /v1/blocks/{id}/content.
Endpoint
Required scope
assistants:write
Headers
Path parameters
Body
Both fields are optional; send at least one.Example request
Response
200 OK
The block, same shape asGET /v1/blocks/{id}.
400 Bad Request
An empty or over-longname, or a property the endpoint does not accept — including type, family and content.
401 Unauthorized
Missing, invalid, revoked, or expired token.403 Forbidden
The token does not have theassistants:write scope.
404 Not Found
No block with that id in the token’s company and project.502 Bad Gateway
The assistant service is unreachable.Operational notes
- This works on all twelve types, including the read-only five. Renaming and archiving do not touch content, so
product_infoand friends are editable here even though saving their content is not. is_archived: falseis the undo forDELETE /v1/blocks/{id}. They write the same field.- Archiving does not detach. Assistants referencing the block keep using it, and its content keeps rendering into their prompts. Detach it if that is what you meant.
typecannot be changed. A block created asstepsis astepsblock forever; create a new one of the right type and move the content across.
Authorizations
Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.
Path Parameters
Body
application/json
Response
200 - application/json