Rotate a session's configuration

Replaces a live session's configuration without restarting it.

PATCH /api/v1/flows/{flowId}/sessions/{sessionId}/config

Replaces a live session’s configuration without restarting it.

Exists because a warm session outlives a short-lived credential. A session can hold a container for an hour; a tenant-scoped bearer token is often good for rather less, and without rotation the choice is to let the session break or to issue a long-lived token — which is the thing per-session scoping is meant to avoid.

Replaces rather than merges. A partial update of a security boundary is a way to leave half a policy in force, so send the whole configuration each time.

Takes effect on the next turn. A turn already running finishes under the configuration it started with.

delivered: false is not an error — a sleeping session has no container to push to and picks the new configuration up when the next message wakes it.

Authentication

Requires a project API key — see Authentication.

Parameters

NameInTypeRequiredDescription
flowIdpathstringrequiredUUID of the flow to trigger.
sessionIdpathstringrequired

Request body

FieldTypeRequiredDescription
mcpServersobjectoptionalMCP servers scoped to this run or session. Remote transports only (http, sse); TLS required off localhost.
mcpModestring (mergereplace)optional
appendSystemPromptstringoptional
disallowedToolsarrayoptional
envobjectoptional
partialMessagesbooleanoptional

Responses

StatusDescription
200Configuration stored.
400Request body or query parameters failed validation.
404Flow or session not found.

Tag: Chat