Custom objects
Create a record
Creates a record. Required fields and options are validated on the server (invalid, listed one by one in errors). With customer_id the object's company relation is set; links sets other relations (relation key → target id or array of ids). Fires the record_created workflow and webhook event.
Authorization
AuthorizationheaderrequiredBearer token: API key (sk_…), OAuth access token (mcp_…) or mobile session (xk_…).
Module: CustomersScope:
crm.writePath parameters
keystringrequiredObject key.
Body application/json
namestringrequiredRecord name (the object's name field, e.g. Line name).
customer_idintegeroptionalLinked company.
fieldsobjectoptionalField key → value.
linksobjectoptionalRelation key → target id(s).
Errors
| HTTP | error | Meaning |
|---|---|---|
400 | invalid | Missing or invalid field (`message` explains). |
404 | not_found | Record not found. |
Request
curl -X POST https://ornek.solk.app/api/v1/objects/uretim_hatti/records \
-H "Authorization: Bearer $SOLK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Hat 3 — şişirme",
"customer_id": 1,
"fields": {
"makine_tipi": "Ekstrüzyon",
"hiz": 180,
"devreye_alma": "2025-04-01"
}
}'const res = await fetch("https://ornek.solk.app/api/v1/objects/uretim_hatti/records", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SOLK_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Hat 3 — şişirme",
"customer_id": 1,
"fields": {
"makine_tipi": "Ekstrüzyon",
"hiz": 180,
"devreye_alma": "2025-04-01"
}
}),
});
const data = await res.json();import os, requests
r = requests.post(
"https://ornek.solk.app/api/v1/objects/uretim_hatti/records",
headers={"Authorization": f"Bearer {os.environ['SOLK_API_KEY']}"},
json={
"name": "Hat 3 — şişirme",
"customer_id": 1,
"fields": {
"makine_tipi": "Ekstrüzyon",
"hiz": 180,
"devreye_alma": "2025-04-01"
}
},
)
print(r.json())Response
{
"ok": true,
"record": {
"active": true,
"customer": {
"id": 1,
"name": "Alize Paketleme San. ve Tic. A.Ş."
},
"editable": true,
"field_list": [
{
"display": "Ekstrüzyon",
"key": "makine_tipi",
"label": "Makine tipi",
"options": [
"Laminasyon"
],
"required": true,
"type": "select",
"value": "Ekstrüzyon"
}
],
"fields": {
"devreye_alma": "2025-04-01",
"hiz": 180.0,
"makine_tipi": "Ekstrüzyon"
},
"id": 1,
"name": "Hat 3 — şişirme",
"owner": "Deniz Aksoy",
"owner_id": 1,
"relations": [
{
"items": [
{
"id": 1,
"name": "Alize Paketleme San. ve Tic. A.Ş."
}
],
"key": "co1_customer",
"kind": "customer",
"label": "Firma",
"many": false,
"side": "a",
"target_label": "Firma"
}
],
"sub": "Ekstrüzyon · 180",
"updated_at": "2026-10-06T10:26:24",
"url": "https://ornek.solk.app/o/uretim_hatti/1"
}
}Example responses were captured from a v43b installation running sample data; lists are shortened to two items.