Skip to main content
POST
Respond to a playground tool approval card

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
approvalKey
string
required

Opaque key for the approval card being resolved. Single-use — consumed atomically; a second call returns approval_expired.

decision
enum<string>
required

approve runs the tool with the captured args; reject stashes a sentinel so the agent acknowledges and moves on.

Available options:
approve,
reject
promptId
string
required

Prompt id used for the original playground turn; the resumed turn re-runs the same prompt so behavior stays consistent.

conversation
object[]

Visible playground history at the moment the user clicked the approval card. Replayed on resume; a synthetic resume note is appended server-side.

conversationId
string

Optional conversation id used for context lookup on the resumed turn; matches the value originally passed to /api/ai/playground.

promptOverride
string

Optional inline prompt text that replaces the saved prompt for this resumed turn — used by editors testing un-saved edits.

modelOverride
object

Pin the resumed turn to a specific provider/model (e.g. { provider: 'anthropic', model: 'claude-sonnet-4-6' }) overriding the org's default assignment.

Example:

Response

Approval resolved and playground resumed

Returned after a playground approval is resolved (approve or reject). response carries the resumed agent reply; toolError flags that the underlying tool execution failed.

success
enum<boolean>
required
Available options:
true
response
string
required
decision
enum<string>
required
Available options:
approve,
reject
toolError
boolean
approvalCards
object[]