Skip to main content
POST
Publish Disposition

Overview

Dispositions are enabled per organization. If your organization does not have access, these endpoints return 404.
Freezes the current draft into a new immutable version, points publishedVersionId at it, and sets state to enabled so the disposition runs on every new completed call. Publishing validates strictly: every value must pin a published judge or extractor version, and the definition must have at least one value. Call Estimate Disposition Cost first and pass its id; publish recomputes the estimate and refuses if anything moved. Undo with Disable Disposition. Requires an admin, owner, operator, or prompter role.

Headers

string
required
Your API key for authentication.

Path Parameters

string
required
The agent’s unique identifier. Must be a UUID; otherwise returns 400 with the message agentId must be a valid UUID. Returns 404 Agent not found if the agent is not in your organization.
string
required
The disposition’s unique identifier. Must be a UUID; otherwise returns 400 with the message dispositionId must be a valid UUID. Returns 404 Disposition not found if it does not belong to this agent.

Body Parameters

Unknown fields are rejected.
integer
required
The draft revision you estimated, at least 1. Returns 409 CONFLICT if the live revision differs. On success the draft revision becomes expectedDraftRevision + 1 and the draft is kept in sync with the published snapshot, so hasUnpublishedChanges reads false.
string
required
The id returned by Estimate Disposition Cost for this exact draft revision. Publish recomputes the estimate against fresh dependency reads and returns 409 CONFLICT if the id no longer matches.
boolean
Must be exactly true when the estimate’s totalUsdPerCall.expected is greater than 0.0000; omitting it in that case returns 400 BAD_REQUEST with the message Acknowledge the estimated recurring cost before publishing. Any value other than true is rejected as an invalid body. Optional when the expected cost is zero.

Response

object
The newly created version.
null | array
null on success, or a list of error objects if the request failed.

Docs for agents: llms.txt