List Definitions
GET /backend/custom-fields
Response
{
"success": true,
"data": [
{
"id": "field-uuid",
"name": "Lead Source",
"field_key": "lead_source",
"type": "select",
"options": ["Website", "Referral", "Ads", "Other"],
"default_value": "Website",
"required": false
}
]
}
Create Definition
POST /backend/custom-fields
Body Parameters
Unique key (used in variables)
Type: text, number, date, boolean, select
Whether field is required
Request Example
curl -X POST "https://api.leavo.ai/backend/custom-fields" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Lead Source",
"field_key": "lead_source",
"type": "select",
"options": ["Website", "Referral", "Ads", "Other"],
"default_value": "Website"
}'
Update Definition
PUT /backend/custom-fields/{id}
curl -X PUT "https://api.leavo.ai/backend/custom-fields/field-uuid" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Lead Origin",
"options": ["Website", "Referral", "Ads", "Events", "Other"]
}'
Delete Definition
DELETE /backend/custom-fields/{id}
curl -X DELETE "https://api.leavo.ai/backend/custom-fields/field-uuid" \
-H "Authorization: Bearer your_api_key_here"
Deleting a definition removes all values stored for that field in all leads.