Companies

Create a company

Creates a company (status Prospect unless given, owned by the caller). An existing name returns 409 exists; similar names return 409 similar with a similar list — send confirm_new: true to create anyway. Optionally creates the first contact.

POST/api/v1/customers

Authorization

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

Body application/json

namestringrequired
Company name (max 200 characters).
statusstringoptionaldefault: Prospect
Status.
ValuesACProspect
citystringoptional
City.
sectorstringoptional
Sector.
phonestringoptional
Phone.
websitestringoptional
Website.
addressstringoptional
Address.
notestringoptional
Note.
owner_idintegeroptional
Owner user id (admins only).
visit_period_daysintegeroptional
Visit every N days.
potential_kgnumberoptional
Monthly potential quantity (installation's base unit).
contact_namestringoptional
First contact's name (becomes the main contact).
contact_titlestringoptional
First contact's job title.
contact_emailstringoptional
First contact's e-mail.
contact_phonestringoptional
First contact's phone.
confirm_newbooleanoptional
Create even if similar names exist.

Errors

HTTPerrorMeaning
400invalidMissing or invalid field (`message` explains).
409existsA company with this name exists (returned in `customer`).
409similarSimilar names exist (`similar`); send `confirm_new: true` to create anyway.
Request
curl -X POST https://ornek.solk.app/api/v1/customers \
  -H "Authorization: Bearer $SOLK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Kuzey Plastik Sanayi",
  "city": "Bursa",
  "sector": "Plastik",
  "phone": "+90 224 555 01 02",
  "website": "kuzeyplastik.com.tr",
  "contact_name": "Selin Kara",
  "contact_title": "Satın Alma Müdürü",
  "contact_email": "selin.kara@kuzeyplastik.com.tr",
  "confirm_new": true
}'
Response
{
  "customer": {
    "act": {
      "addr": "Bursa",
      "c": 31,
      "mail": "selin.kara@kuzeyplastik.com.tr",
      "n": "Kuzey Plastik Sanayi",
      "tel": "+90 224 555 01 02",
      "url": "/customers/31",
      "wa": "902245550102",
      "who": "Selin Kara"
    },
    "active": true,
    "address": "",
    "at_risk": false,
    "barrier": "",
    "can_edit": true,
    "city": "Bursa",
    "commit_kg": null,
    "competitors": [],
    "contacts": [
      {
        "customer": "Kuzey Plastik Sanayi",
        "customer_id": 31,
        "department": "",
        "email": "selin.kara@kuzeyplastik.com.tr",
        "id": 58,
        "is_former": false,
        "is_main": true,
        "name": "Selin Kara",
        "note": "",
        "phone": "",
        "rid": "003URRQi11tfUY7",
        "title": "Satın Alma Müdürü",
        "wa": ""
      }
    ],
    "created_at": "2026-10-02T20:07:00",
    "currency": "EUR",
    "currency_default": "",
    "demos": [],
    "events": [
      {
        "badge": null,
        "dot": "#94a3b8",
        "icon": "building",
        "kind": "firma",
        "note": "",
        "opp_id": null,
        "planned": false,
        "state": null,
        "sub": "Firma #31 · Deniz Aksoy",
        "title": "Firma kaydı açıldı",
        "url": "",
        "when": "2026-10-02",
        "who": ""
      }
    ],
    "extra_kg": null,
    "id": 31,
    "initials": "KP",
    "last_visit": null,
    "main_contact": {
      "email": "selin.kara@kuzeyplastik.com.tr",
      "name": "Selin Kara",
      "phone": "",
      "wa": ""
    },
    "mgmt_note": "",
    "mgmt_support": false,
    "name": "Kuzey Plastik Sanayi",
    "next_visit_due": null,
    "note": "",
    "offers": [],
    "open_actions": [],
    "open_opps": 0,
    "opps": [],
    "orders": [],
    "our_kg_current": null,
    "our_kg_target": null,
    "owner": {
      "full_name": "Deniz Aksoy",
      "id": 1,
      "role": "admin",
      "role_label": "Yönetici",
      "username": "admin"
    },
    "pending_state": null,
    "period": 180,
    "phone": "+90 224 555 01 02",
    "potential_kg": null,
    "prices": [],
    "priority_score": 0.0,
    "rid": "001QJi5Zr1Hk2VH",
    "sector": "Plastik",
    "share_current": null,
    "share_start": null,
    "share_target": null,
    "status": "Prospect",
    "status_label": "Prospect",
    "supplier_note": "",
    "threads": [],
    "threads_n": 0,
    "unit": "kg",
    "visit_overdue_days": 0,
    "visit_period_days": null,
    "visit_postponed_until": null,
    "visit_state": "none",
    "visits": [],
    "website": "kuzeyplastik.com.tr"
  },
  "ok": true
}

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