Skip to main content
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 as GET /v1/blocks/{id}.

400 Bad Request

An empty or over-long name, 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 the assistants: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_info and friends are editable here even though saving their content is not.
  • is_archived: false is the undo for DELETE /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.
  • type cannot be changed. A block created as steps is a steps block forever; create a new one of the right type and move the content across.

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Body

application/json
name
string
Maximum string length: 150
is_archived
boolean

Archiva o desarchiva el bloque. Archivar no lo borra ni lo saca de los asistentes que lo tienen adjunto.

Response

200 - application/json
block
object
required