Skip to main content
PUT
Escribir una seccion del prompt
Replaces the text of that one section and creates it if it was not there. The rest of the agent is untouched, which is the difference between this and sending prompts to the update endpoint — that one replaces them all. Every save that changes the text leaves a version behind, so an integration that writes sections gets an audit trail and an undo for free.

Endpoint

Required scope

agents:write

Path parameters

Body

Example request

Response

200 OK

Returns the whole agent, so you can see the section in place without a second read.

401 Unauthorized

Missing, invalid, revoked, or expired token.

403 Forbidden

The token does not have the agents:write scope.

404 Not Found

ASSISTANT_NOT_FOUND when no agent has that id in the token’s company and project, or PROMPT_SECTION_NOT_FOUND when the section is not in the catalogue. The error lists the valid sections.

502 Bad Gateway

The agent service is unreachable.

Operational notes

  • Send the whole section, not the new paragraph. The text is replaced. Appending is your job before the call.
  • An unknown section is rejected, on purpose. Storing it would return 200 and change nothing: the agent only reads sections the catalogue declares.
  • Two writes to different sections of the same agent can lose one. The section is written by reading the agent, replacing that entry and saving it back, so simultaneous writes race. Serialise your writes per agent.
  • Saving identical text does not create a version. The history records changes, not calls.
  • This does not restart anything. The agent picks the new text up on its next turn; conversations already 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

Body

application/json
markdown
string
required

El texto completo de la seccion, en markdown.

label
string
Maximum string length: 150

Response

200 - application/json
agent
object
required