# Complete an action

`POST /api/v1/actions/{kind}/{rid}/done`

Marks the action done (or open again with `done: false`). `done_on` sets the completion day (default now).

## Path parameters

| Field | Type | Description |
|---|---|---|
| `kind` (required) | string | Action kind: `task`, `visit` (next action of a visit), `demo` (next action of a trial), `step` (opportunity step). Values: `task`, `visit`, `demo`, `step` |
| `rid` (required) | integer | Action id (`id` in the list). |

## Body

| Field | Type | Description |
|---|---|---|
| `done` | boolean | Done; flips the state when omitted. |
| `done_on` | string | Completion day (YYYY-MM-DD). |
| `result` | string | Result note. |

## Response

```json 200
{
  "action": {
    "act": {
      "addr": "Bursa",
      "c": 31,
      "mail": "emre.yildiz@kuzeyplastik.com.tr",
      "n": "Kuzey Plastik Sanayi",
      "tel": "+90 532 555 11 22",
      "url": "/customers/31",
      "wa": "905325551122",
      "who": "Emre Yıldız"
    },
    "chain_after": [],
    "chain_before": [],
    "customer": "Kuzey Plastik Sanayi",
    "customer_id": 31,
    "date": "2026-10-05",
    "detail": "2027 listesi, €/kg\n[Ertelendi 04.10.2026 → 05.10.2026] Liste onayı bekleniyor",
    "done": true,
    "done_at": "2026-10-02T20:07:01",
    "editable": true,
    "icon": "📋",
    "id": 23,
    "key": "task:23",
    "kind": "task",
    "label": "Fiyat listesini gönder",
    "opp": "",
    "opp_id": null,
    "others": [
      {
        "customer": "",
        "customer_id": null,
        "date": "2026-10-05",
        "icon": "⚡",
        "id": 106,
        "key": "visit:106",
        "kind": "visit",
        "label": "Teklif gönder",
        "opp": "Streç film tedariki",
        "opp_id": 53,
        "src": "Ziyaret",
        "state": "soon",
        "url": "/action/visit/106"
      }
    ],
    "result": "Liste e-postayla gönderildi",
    "rid": "00TxuMVTniYx44l",
    "src": "Görev",
    "state": "done",
    "threads": [],
    "threads_n": 0,
    "user": {
      "full_name": "Deniz Aksoy",
      "id": 1,
      "role": "admin",
      "role_label": "Yönetici",
      "username": "admin"
    }
  },
  "ok": true
}
```
