:::endpoint POST /v1/me/ai/actions/{id}/confirm

Does what an [action card](/docs/api/apps/ai-overview#action-cards) proposed,
the way the button on the firm's website does it: the same checks, the same
result, and the same line in the activity log, marked as done through the
assistant.

Everything is checked again now, not when the card was made. The person must
still hold the permission the website asks for, the record must still be as it
was (a ticket a colleague assigned in the meantime is not taken back from
them), and the card must still be open and younger than 24 hours.

The answer is the card as it stands afterwards. Read its `status`:

| `status` | Meaning |
| --- | --- |
| `done` | It happened. `outcome` says what, in the person's language |
| `failed` | It did not happen. `outcome` says why, in the person's language, to show as it is |
| `expired` | Nobody answered it within 24 hours. Nothing happened |
| `dismissed` | It was dismissed earlier. Nothing happened |
| `confirmed` | Another press is running it right now. The result follows as `action_updated` on the websocket |

A card that cannot be done is not an error: the request answers `200` with a
`failed` card, so an app only ever has one thing to show. Pressing twice, or
from two devices, does it once and answers the same card both times. Every
device that has the conversation open also hears `action_updated` on its
[channel](/docs/api/apps/ai-overview#listening-for-the-answer).

When the card carries `ask`, or is `destructive`, show that sentence and ask the
person once more before calling this, as the website does.

## Request

```bash
curl -X POST https://api.proppertrading.com/v1/me/ai/actions/aiact_3er9kgyanz6ebeep/confirm \
  -H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
  -H "Idempotency-Key: 4c1d8e27-6b3a-4f95-a2e0-8d7c5b9f1a36"
```

## Response

```json
{
    "data": {
        "id": "aiact_3er9kgyanz6ebeep",
        "object": "ai_action",
        "kind": "AddTraderNote",
        "title": "Add a note to Lucia Gonzalez",
        "lines": [
            "Test note by the action card check, please ignore."
        ],
        "records": [
            {
                "label": "Lucia Gonzalez",
                "url": "/admin/users/usr_p98c25cd46f8yraa"
            }
        ],
        "destructive": false,
        "ask": null,
        "status": "done",
        "outcome": "Note added to Lucia Gonzalez.",
        "expires_at": "2026-10-23T02:50:29+00:00",
        "decided_at": "2026-10-22T02:50:33+00:00"
    },
    "meta": {
        "request_id": "req_01m5gr8xrjvrjqcezap8wttwwk"
    }
}
```

## Errors

| Status | Code | Meaning |
| ------ | ---- | ------- |
| 400 | `missing_idempotency_key` | Every POST needs one |
| 400 | `workspace_required` | Our own staff, without a firm in `Propper-Workspace` |
| 403 | `ai_unavailable` | The firm has the assistant switched off for this chat |
| 403 | `forbidden` | Staff whose role does not include `use_ai_chat` |
| 403 | `insufficient_scope` | This device does not hold `ai:write` |
| 404 | `resource_not_found` | No card with that id was proposed to you, in this chat and this firm |