🚀 Create a New Lead Using API
Step 1: Generate an API Key
Go to:
{{workspaceUrl}}/workspace-config?tab=api-keyGenerate
Copy the API key.
Step 2: Get Company ID
📍 Endpoint:
{{URL}}/accounts/companies
🛠️ Set Headers:
📥 Response Example:
📝 What to Do:
Extract the Company ID from the response:
companies[0]._id
.Store the ID for later use:
Step 3: Get Client Role ID
📍 Endpoint:
{{URL}}/roles?type=company
🛠️ Set Headers:
📥 Response Example:
📝 What to Do:
Find the role where
roles[0].role.name === "client"
.Extract and store the Client Role ID:
Important: Ensure you do not copy
_id
fromroles[0].role
, but fromroles[0]
itself.
Step 4: Create a New Lead
📍 Endpoint:
{{URL}}/company/{{companyId}}/members/bulk-client
🛠️ Set Headers:
📦 Request Body:
✅ Success Response:
❗ Important Tips:
Ensure
"isConvertedClient": false
is set in the request.Use the correct Role ID from Step 3.
Last updated
Was this helpful?