AI

Respond to a playground tool approval card

POST
/api/ai/playground/approval/respond

Resolves a playground approval card by approving or rejecting it. Approving executes the requested tool with the originally captured arguments and resumes the playground turn; rejecting stashes a rejection sentinel so the agent acknowledges and moves on. Returns the resumed AI response and any new approval cards.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/ai/playground/approval/respond" \  -H "Content-Type: application/json" \  -d '{    "approvalKey": "playground:5f7b1c2e8a1d4e0012c3b4a5:tool-call-7c2a",    "decision": "approve",    "conversation": [      {        "role": "user",        "content": "Please book me for Tuesday at 2pm."      },      {        "role": "assistant",        "content": "I will go ahead and request that slot."      }    ],    "promptId": "5f7b1c2e8a1d4e0012c3b4a5",    "conversationId": "64d2f9c5e8a1d4e001a0b1c2",    "modelOverride": {      "provider": "anthropic",      "model": "claude-sonnet-4-6"    }  }'
{  "success": true,  "decision": "approve",  "response": "Sent! I just texted Alex the confirmation."}