Restaurar una version
POST /v1/agents/{id}/prompts/{section}/versions/{versionId}/restore
Make an older version the current text of a section.
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 theagents: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_fromis 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
Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.
Response
201 - application/json
Example:
"business_context"
Correlativo dentro de la seccion; el mayor es el vigente.
Quien la guardo.
Version de la que se copio, cuando esta nacio de una restauracion. Restaurar no muta: crea una version nueva.