Create a lead
Scope: crm:deals.write https://api.alladdin.com/api/v2/leads
Creates a new lead.
The response returns the new lead id.
Request body
object funnel_id string required
Funnel ID
contact_id string required
Contact ID
name string required
Lead name
stage_id string | null optional
Stage ID
value number | null optional
Deal value
potential number | null optional
Deal potential
due_date string<date> | null optional
Due date (YYYY-MM-DD)
assigned_to string | null optional
Assigned user ID
custom_fields[] object[] | null optional
Custom fields
Request
import requests
url = "https://api.alladdin.com/api/v2/leads"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"funnel_id": "string",
"contact_id": "string",
"name": "string",
"stage_id": "string",
"value": 0,
"potential": 0,
"due_date": "2024-01-15",
"assigned_to": "string",
"custom_fields": [
{}
]
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())Responses
Response
{
"id": "507f1f77bcf86cd799439011"
}Success responses
201 Lead created application/json object id string
Error responses
400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 422 Validation error application/json 429 Rate limit exceeded application/json
