Leads API

Submit form data from your sites. Leads appear in the dashboard and trigger notifications.

POST/api/public/leads

Request Body

emailstring

Email address (must contain @). At least one of email or phone is required.

phonestring

Phone number. At least one of email or phone is required.

firstNamestring

First name.

lastNamestring

Last name.

sourcestring

Lead source identifier (e.g. "contact-form", "newsletter").

messagestring

Message or comment.

dataobject

Additional custom data as a JSON object.

honeypotstring

Anti-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"
  }
}
200Success
json
{ "success": true, "id": "clxxx..." }
400Validation Error
json
{ "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.