Skip to navigation

Create Lead

View as Markdown

Create a Lead with optional contacts[] and addresses[] payload.

Identity rule (PRD §10.1):

  • customer_type=commercial → business_name required.
  • customer_type=residential → at least one contacts[] item with first_name + last_name.

Primary-flag invariants: at most one is_primary=true per contacts[] / addresses[].

Headers

{{tenant_key_name}}stringOptional

Request

This endpoint expects a multipart form.
customer_typestringRequired

Required: residential|commercial

lead_source_idstringRequired

Required: Lead source UUID

inquiry_summarystringRequired

Optional: Free-text inquiry description

addresses[0][city]stringRequired

Required when addresses[] present. String max 120.

contacts[0][email]stringRequired

Optional: contact email. Valid email max 255.

contacts[0][phone]stringRequired

Optional: contact phone. String max 64.

addresses[0][state]stringRequired

Required when addresses[] present. String max 120.

contacts[0][last_name]stringRequired

Conditional: pairs with contacts[0][first_name]. String max 120.

contacts[0][first_name]stringRequired

Conditional: required for residential leads when no other contact provides one. String max 120.

contacts[0][is_primary]stringRequired

Optional: bool - at most one primary per contacts[]. Defaults to first row when none flagged.

addresses[0][is_primary]stringRequired

Optional: bool - at most one primary per addresses[]. Defaults to first row when none flagged.

preferred_contact_methodstringRequired

Optional: phone|email|sms

addresses[0][postal_code]stringRequired

Required when addresses[] present. String max 32.

addresses[0][address_line_1]stringRequired

Required when addresses[] present. String max 255.

Response

Successful response