Skip to main content
PUT
Replace guidelines
Start from Get guidelines, and send the placeholders back exactly as you received them. A {{...}} placeholder written with a name instead of its ID, such as {{action.Check availability}}, doesn’t resolve. Change the text around the placeholders and leave each one as it was.
  • The whole text is replaced. Send everything the agent should keep, not only what changed. An empty string clears the guidelines.
  • The last write wins. There is no conflict check, so a replace overwrites whatever was saved before it, including an edit made in Studio.
  • It’s recorded. A replace appears in Audit Logs as an update to the agent, with the key’s creator as the Actor.

When the Change Goes Live

A replace saves to the agent’s draft, exactly like typing in the Guidelines editor:
  • An agent that has never been published runs its draft, so its next conversation uses the new guidelines.
  • A published agent keeps using its published guidelines on phone calls, website chats and emails until it is published again, with Publish an agent or Publish in Studio. Until then the agent shows Unpublished edits, and Review Changes lists the new guidelines. Talk and the test Chat use the draft straight away.
needs_publish in the response is true when the agent has any unpublished change, yours or an edit made in Studio, and live_version names the version that is live. See Publishing Your Agent.

Authorizations

X-API-Key
string
header
required

An API key from Manage → API Keys in Studio. See Authentication.

Path Parameters

assistantId
string<uuid>
required

The agent's ID. Open the agent in Studio and select Copy ID in its header.

Body

application/json
guidelines
string
required

The whole new guidelines text, as Markdown. It replaces what's there, so send everything the agent should keep. An empty string clears the guidelines. This is the only field accepted; any other field returns a 400.

Response

The guidelines were saved to the agent's draft.

success
boolean
required
data
object
required