# POST /agent-proposals/:id/approve

**Resource:** [Agent Proposals](./agent-proposals.md)  
**Scopes:** `agent-ops:write`  
**Write operation:** yes

Approve a pending proposal and execute its proposed action immediately. The action is resolved via a tool-to-API mapping and executed server-side. The result is stored on the proposal record (status becomes "executed" on success, "failed" on error).

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `id` | path | string | yes | Proposal UUID |
| `answer` | body | string | no | Optional approval note (stored for audit trail) |
| `selected_option` | body | number | no | If the proposal has options, the 0-based index of the chosen option |

## Request example

```bash
{ "answer": "Approved - proceed with enabling the automation." }
```

## Response example

```json
{
  "data": {
    "proposal_id": "f1a2b3c4-...",
    "status": "executed",
    "execution_result": { "id": "auto-uuid", "enabled": true }
  }
}
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`