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.
Authorization
AuthorizationheaderrequiredBearer token: API key (sk_…), OAuth access token (mcp_…) or mobile session (xk_…).
Scope:
crm.writePath parameters
idintegerrequiredThread id.
Body application/json
categorystringrequiredCategory key or
auto.Errors
| HTTP | error | Meaning |
|---|---|---|
400 | invalid | Missing or invalid field (`message` explains). |
403 | forbidden | You may not see / edit this record. |
404 | not_found | Record 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"
}'const res = await fetch("https://ornek.solk.app/api/v1/threads/21/category", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SOLK_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"category": "teklif"
}),
});
const data = await res.json();import os, requests
r = requests.post(
"https://ornek.solk.app/api/v1/threads/21/category",
headers={"Authorization": f"Bearer {os.environ['SOLK_API_KEY']}"},
json={
"category": "teklif"
},
)
print(r.json())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.