Actions & tasks

Close and open the next

Closes the action with its result and optionally opens the next task in the chain (same company and project). mode: keep leaves the action open and only adds the next task.

POST/api/v1/actions/{kind}/{rid}/close

Authorization

Authorizationheaderrequired
Bearer token: API key (sk_…), OAuth access token (mcp_…) or mobile session (xk_…).
Module: TasksScope: crm.write

Path parameters

kindstringrequired
Action kind: task, visit (next action of a visit), demo (next action of a trial), step (opportunity step).
Valuestaskvisitdemostep
ridintegerrequired
Action id (id in the list).

Body application/json

resultstringoptional
Result.
next_titlestringoptional
Next task's title.
next_datestringoptional
Next task's due date.
next_assignedintegeroptional
Next task's assignee.
next_prioritystringoptional
Priority.
ValuesDüşükNormalYüksekAcil
modestringoptionaldefault: close
close closes, keep leaves it open.
Valuesclosekeep

Errors

HTTPerrorMeaning
403forbiddenYou may not see / edit this record.
404not_foundRecord not found.
Request
curl -X POST https://ornek.solk.app/api/v1/actions/task/1/close \
  -H "Authorization: Bearer $SOLK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "result": "Müşteri aradı, teklif istendi",
  "next_title": "Teklif hazırla",
  "next_date": "2026-10-04"
}'
Response
{
  "action": {
    "act": {
      "addr": "Ankara Organize Sanayi Bölgesi, 8. Cadde No: 35, Ankara, Ankara",
      "c": 3,
      "mail": "cem.polat@lotusmedikal.example",
      "n": "Lotus Medikal Ambalaj San. Tic. Ltd. Şti.",
      "tel": "0 (312) 000 46 49",
      "url": "/customers/3",
      "wa": "903120004649",
      "who": "Cem Polat"
    },
    "chain_after": [
      [
        {
          "date": "2026-10-04",
          "done": false,
          "id": 24,
          "key": "task:24",
          "kind": "task",
          "label": "Teklif hazırla",
          "src": "Görev",
          "state": "soon"
        }
      ]
    ],
    "chain_before": [],
    "customer": "Lotus Medikal Ambalaj San. Tic. Ltd. Şti.",
    "customer_id": 3,
    "date": "2026-09-26",
    "detail": "",
    "done": true,
    "done_at": "2026-10-02T20:07:01",
    "editable": true,
    "icon": "📋",
    "id": 1,
    "key": "task:1",
    "kind": "task",
    "label": "Numune sonucu için ara",
    "opp": "Yeni Müşteri · 2026",
    "opp_id": 33,
    "others": [
      {
        "customer": "",
        "customer_id": null,
        "date": "2026-10-03",
        "icon": "📋",
        "id": 19,
        "key": "task:19",
        "kind": "task",
        "label": "Kargo takip numarasını ilet",
        "opp": "Yeni Müşteri · 2026",
        "opp_id": 33,
        "src": "Görev",
        "state": "soon",
        "url": "/action/task/19"
      }
    ],
    "result": "Müşteri aradı, teklif istendi",
    "rid": "00Tc4zPI4VpXeWp",
    "src": "Görev",
    "state": "done",
    "threads": [],
    "threads_n": 0,
    "user": {
      "full_name": "Deniz Aksoy",
      "id": 1,
      "role": "admin",
      "role_label": "Yönetici",
      "username": "admin"
    }
  },
  "next_task": {
    "assignee": {
      "full_name": "Deniz Aksoy",
      "id": 1,
      "role": "admin",
      "role_label": "Yönetici",
      "username": "admin"
    },
    "completed_at": null,
    "customer": "Lotus Medikal Ambalaj San. Tic. Ltd. Şti.",
    "customer_id": 3,
    "detail": "↳ Görev #1 (Numune sonucu için ara) sonrası: Müşteri aradı, teklif istendi",
    "due_date": "2026-10-04",
    "due_time": "",
    "id": 24,
    "opp": "Yeni Müşteri · 2026",
    "opp_id": 33,
    "priority": "Normal",
    "result": "",
    "rid": "00TfYtMol2EnOoG",
    "source_key": "task:1",
    "state": "soon",
    "status": "Açık",
    "title": "Teklif hazırla"
  },
  "ok": true
}

Example responses were captured from a v22 installation running sample data; lists are shortened to two items.