Trade fairs & leads

Convert a lead

Converts the lead (same core as the web conversion card): to a registered company or as a new prospect; people are linked to the matched contact (blank fields filled), created as new contacts or skipped; optionally a new opportunity or linking to an open one; a fair visit (with attendees). The lead becomes Aktarıldı. With an empty body: registered / name-matched company, new opportunity, visit.

POST/api/v1/leads/{id}/convert

Authorization

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

Path parameters

idintegerrequired
Lead id.

Body application/json

modestringoptional
Company: registered or new prospect.
Valuesexistingnew
customer_idintegeroptional
Company for mode: existing.
peopleobjectoptional
Person index (i) → new · skip · <contact id>.
opp_modestringoptionaldefault: new
Opportunity.
Valuesnewexistingnone
opp_idintegeroptional
Open opportunity for opp_mode: existing.
make_visitbooleanoptionaldefault: True
Log a fair visit.

Errors

HTTPerrorMeaning
400invalidMissing or invalid field (`message` explains).
404not_foundRecord not found.
403moduleThe module is off in the licence or for the user.
Request
curl -X POST https://ornek.solk.app/api/v1/leads/27/convert \
  -H "Authorization: Bearer $SOLK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "mode": "existing",
  "customer_id": 1,
  "people": {
    "0": "new",
    "1": "new"
  },
  "opp_mode": "none",
  "make_visit": true
}'
Response
{
  "created": 2,
  "customer": "Alize Paketleme San. ve Tic. A.Ş.",
  "customer_id": 1,
  "lead": {
    "can_edit": true,
    "city": "",
    "company": "Alize Paketleme San. ve Tic. A.Ş.",
    "contact_label": "Selin Kaya +1",
    "contact_name": "Selin Kaya",
    "created_at": "2026-10-09T23:14:43",
    "customer_id": 1,
    "email": "",
    "fair": "Ambalaj Fuarı 2026 (örnek)",
    "fair_id": 1,
    "id": 27,
    "initials": "AP",
    "interest": "Sıcak",
    "line": "",
    "link_contact_id": 60,
    "link_customer": "Alize Paketleme San. ve Tic. A.Ş.",
    "link_customer_id": 1,
    "next_action": "",
    "next_date": null,
    "note": "",
    "opp_id": null,
    "opp_type": "",
    "owner": {
      "full_name": "Deniz Aksoy",
      "id": 1,
      "role": "admin",
      "role_label": "Yönetici",
      "username": "admin"
    },
    "people": [
      {
        "cid": null,
        "email": null,
        "name": "Emre Tan",
        "phone": "+90 532 444 55 66",
        "title": "Ar-Ge"
      }
    ],
    "phone": "",
    "potential_kg": null,
    "products": "",
    "products_text": "",
    "project_note": "",
    "rid": "00Q8D5NoUERPzEA",
    "sector": "",
    "status": "Aktarıldı",
    "status_eff": "Aktarıldı",
    "supplier": "",
    "task_id": null,
    "timing": "",
    "title": "",
    "unit": "kg",
    "visitor_type": "Potansiyel müşteri",
    "wa": "",
    "website": ""
  },
  "linked": 0,
  "message": "Lead CRM'e aktarıldı (kayıtlı firma): Alize Paketleme San. ve Tic. A.Ş. · 2 yeni kişi. Proje kazanılınca lead 'Kazanıldı' olur.",
  "ok": true,
  "opp_id": null
}

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