Skip to main content
POST
Restaurar una version
Puts the text of that version back as the section’s current text. It does not mutate the history. A restore writes a new version copying the old one and records where it came from in restored_from, so the version you were on is still there and the restore itself can be undone. A history that loses entries when you roll back is not a history.

Endpoint

Required scope

agents:write

Path parameters

Example request

curl

Response

201 Created

The version that was created, not the one you restored from.

403 Forbidden

The token does not have the agents:write scope.

404 Not Found

No agent with that id in the token’s company and project, or no version with that id in that section.

Operational notes

  • The new version number is the next one, not the restored one. Version 5 can hold the text of version 3; restored_from is what tells you so.
  • Restoring a section the agent no longer has puts it back. The section reappears with that text.
  • The agent picks it up on its next turn. Conversations in flight finish on what they had.

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
section
string
required
versionId
string
required

Response

201 - application/json
_id
string
required
agent_id
string
required
section
string
required
Example:

"business_context"

version_number
number
required

Correlativo dentro de la seccion; el mayor es el vigente.

markdown
string
required
label
object | null
required
created_by
object | null
required

Quien la guardo.

restored_from
object | null
required

Version de la que se copio, cuando esta nacio de una restauracion. Restaurar no muta: crea una version nueva.

created_at
string
required