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.

POST/api/v1/objects/{key}/records

Authorization

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

Path parameters

keystringrequired
Object key.

Body application/json

namestringrequired
Record name (the object's name field, e.g. Line name).
customer_idintegeroptional
Linked company.
fieldsobjectoptional
Field key → value.
linksobjectoptional
Relation key → target id(s).

Errors

HTTPerrorMeaning
400invalidMissing or invalid field (`message` explains).
404not_foundRecord 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"
  }
}'
Response
{
  "ok": true,
  "record": {
    "active": true,
    "customer": {
      "id": 1,
      "name": "Alize Paketleme San. ve Tic. A.Ş."
    },
    "editable": true,
    "field_list": [
      {
        "display": "",
        "key": "hat_tipi",
        "label": "Hat tipi",
        "options": [
          "Solventsiz laminasyon"
        ],
        "required": false,
        "type": "select",
        "value": null
      }
    ],
    "fields": {
      "hat_tipi": null,
      "hiz_m_dk": null,
      "kurulum_yili": null,
      "mevcut_yapistirici": null
    },
    "id": 10,
    "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": "",
    "updated_at": "2026-10-15T11:02:09",
    "url": "https://ornek.solk.app/o/uretim_hatti/10"
  }
}

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