Before using this endpoint, complete the Getting Started guide to obtain your API key and Company ID. You also need to fetch your Client Role ID, which is required when creating a lead.
Prerequisites
- ✅ API key generated from Workspace Config → API Key
- ✅ Company ID retrieved from
GET {{URL}}/accounts/companies - ✅ Client Role ID retrieved (see Step 1 below)
Step 1: Get the Client Role ID
Before creating a lead, you need the Role ID for theclient role in your company.
Endpoint
Headers
| Header | Value |
|---|---|
x-api-key | Your API key |
companyid | Your Company ID |
Example request
cURL
Example response
roles[0].role.name === "client" and extract the outer _id — that is roles[0]._id, not roles[0].role._id.
Step 2: Create a new lead
Endpoint
Headers
| Header | Value |
|---|---|
x-api-key | Your API key |
companyid | Your Company ID |
Content-Type | application/json |
Request body
The request body is a JSON array — you can create one or more leads in a single call.The lead’s first name.
The lead’s last name.
The lead’s email address. Must be unique within your workspace.
The Client Role ID retrieved in Step 1 (i.e.,
roles[0]._id).Must be set to
false when creating a lead. Set to true only when converting a lead into a full client.The lead’s pipeline status. Common values:
New, Contacted, Qualified. Defaults to New if omitted.The lead’s phone number.
How you acquired this lead. Example values:
website, referral, social.The lead’s position (order) within the pipeline board column. Defaults to
1.Example request
cURL
Success response
Confirmation string:
"Lead created successfully".Array of created lead objects.
The unique ID of the newly created lead. Store this if you need to reference the lead in subsequent API calls.
The full name of the lead (firstName + lastName).
The pipeline status of the lead as stored.
The role name assigned to the member — will be
"client".
