Leads API
Submit form data from your sites. Leads appear in the dashboard and trigger notifications.
POST/api/public/leads
Request Body
emailstringEmail address (must contain @). At least one of email or phone is required.
phonestringPhone number. At least one of email or phone is required.
firstNamestringFirst name.
lastNamestringLast name.
sourcestringLead source identifier (e.g. "contact-form", "newsletter").
messagestringMessage or comment.
dataobjectAdditional custom data as a JSON object.
honeypotstringAnti-spam honeypot field. If filled, the request succeeds silently but no lead is created.
Request
{
"email": "visitor@example.com",
"firstName": "Jane",
"lastName": "Doe",
"source": "contact-form",
"message": "I'd like to learn more about your services.",
"data": {
"company": "Acme Inc",
"budget": "10k-50k"
}
}{
"email": "visitor@example.com",
"firstName": "Jane",
"lastName": "Doe",
"source": "contact-form",
"message": "I'd like to learn more about your services.",
"data": {
"company": "Acme Inc",
"budget": "10k-50k"
}
}200Success
json
{ "success": true, "id": "clxxx..." }{ "success": true, "id": "clxxx..." }400Validation Error
json
{ "error": "Email or phone is required" }{ "error": "Email or phone is required" }Side effects: Creating a lead triggers Discord notifications, webhook calls to your webhookUrl, and email notifications to workspace owners and admins. The client's IP, user-agent, and referrer are stored automatically.