Set a thread's category

Sets the thread's category by hand (v50; category_source: user — it stays when new messages arrive) or returns it to automatic with auto (recalculated from keywords and linked records). Categories come from the workspace settings (/me → constants.mail_categories). The thread's owner, the company owner or an admin may change it.

POST/api/v1/threads/{id}/category

Authorization

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

Path parameters

idintegerrequired
Thread id.

Body application/json

categorystringrequired
Category key or auto.

Errors

HTTPerrorMeaning
400invalidMissing or invalid field (`message` explains).
403forbiddenYou may not see / edit this record.
404not_foundRecord not found.
Request
curl -X POST https://ornek.solk.app/api/v1/threads/21/category \
  -H "Authorization: Bearer $SOLK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "category": "teklif"
}'
Response
{
  "ok": true,
  "thread": {
    "category": "teklif",
    "category_color": "#6b5bd6",
    "category_label": "Teklif / fiyat",
    "category_source": "user",
    "customer": "Alize Paketleme San. ve Tic. A.Ş.",
    "customer_id": 1,
    "id": 21,
    "last_at": "2026-10-08T09:42:43",
    "last_dir": "out",
    "n": 2,
    "opp": "Mevcut Müşteri — Yenileme · 2026",
    "opp_how": "manual",
    "opp_id": 31,
    "opp_note": "elle seçildi",
    "peer": "selin.dogan@alizepaketleme.example",
    "subject": "Numune ve fiyat teklifi",
    "suggested": false,
    "waiting": false
  }
}

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