Agents

Approve a recommendation and execute it

POST
/api/v1/agents/opportunities/{opportunity_id}/approve

The human approval gate. On approval the Action Agent builds the segment and campaign, the Experiment Agent creates the control/test split, and the campaign is launched with simulated delivery. Requires both campaign:execute and experiment:approve.

Authorization

HTTPBearer
AuthorizationBearer <token>

JWT access token

In: header

Path Parameters

opportunity_id*string
Formatuuid

Query Parameters

merchant_id?|

Optional merchant to act on. Must be one you are a member of.

Formatuuid

Header Parameters

X-Merchant-ID?string|null

Request Body

application/json

The human approval gate for a financially consequential agent action.

approve?boolean
Defaulttrue
execute_now?boolean
Defaulttrue
note?string
Lengthlength <= 500
Default""

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/agents/opportunities/497f6eca-6276-4993-bfeb-53cbbbba6f08/approve" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "agent_run_id": "c3317f32-e28b-4af1-a584-86ac8c788dd8",    "approved": true,    "campaign_id": "78614b6c-fe7c-41e2-8e25-c9b3a3c91904",    "experiment_id": "916afd89-cac5-4339-9c59-dd068abdfa69",    "message": "string",    "opportunity_id": "5c7fee95-8917-4b3c-8649-bbbc4ef0c4f7",    "status": "string",    "steps": [      "string"    ]  },  "meta": {},  "success": true}