Converting Leads to Deals via API

Overview
Build custom integrations or scripts that convert leads into deals programmatically using Laywork’s REST API.

Steps

  1. Obtain an API token under Profile → API Keys.

  2. Fetch the lead you want to convert via GET /api/v1/lead-contacts/{lead_id}.

  3. Send a POST /api/v1/deals request with JSON payload, mapping lead fields into the deal:

    {
      "lead_id": "123",
      "name": "Deal for John Doe",
      "pipeline_id": 1,
      "stage_id": 2,
      "value": 5000,
      "close_date": "2025-06-30"
    }
    
  4. Optional: call PATCH /api/v1/lead-contacts/{lead_id} to update lead status to “Converted.”

  5. Confirm the deal appears in Leads → Deals and the lead’s history shows the conversion.

Tips