Skip to main content
leads

Create /leads

Create a lead. Required: company or name (at least one). Optional: company/contact details, address, types, categories, assignees, responsible_role_id (round-robin assign to the next active staff of that role), status, source, and organization. Returns record with the detail projection. If the email, phone or company code already exists, no new lead is created: a repeated-request task is added to the existing lead and the response is 200 with duplicate: true, message and the existing lead as record (or duplicate_of with its type and uuid when the match is not a lead you can read).

POST
/leads
Authorizationstringheaderrequired

API key (Bearer token) created in Setup → API & MCP.

Body

application/json
citystring

City.

companystring

Company name. Required unless name (the contact person) is provided.

company_codestring

Company registration code.

countrystring

Country UUID.

custom_fieldsobject[]

Custom field values by slug.

descriptionstring

Description/notes.

emailstring

Email address.

is_newsletter_subscribestring

Newsletter subscription consent. Accepts 1/0 or true/false. To disable on update send 0 (a JSON false is treated as "not provided").

last_contactstring

Last contact date (Y-m-d or Y-m-d H:i:s). Send today's date to mark the lead as contacted today.

lead_categoriesstring[]

Lead category UUIDs or code_name values.

lead_typesstring[]

Lead type UUIDs or code_name values.

namestring

Contact person name. Required unless company is provided.

organizationstring

Organization UUID.

phonestring

Phone number.

responsiblestring[]

Responsible staff UUIDs.

responsible_role_idstring

Staff role UUID or numeric ID (tblroles.roleid), as listed by GET /roles. On create, assigns the next active staff member of this role in round-robin order. Merged with responsible when both are sent.

sourcestring

Lead source UUID, code_name, or numeric ID.

statestring

State/region.

statusstring

Lead status UUID, code_name, or numeric ID.

streetstring

Street address.

titlestring

Contact title / position.

vat_codestring

VAT code.

websitestring

Website URL.

zipstring

ZIP/postal code.

any

Response

application/json

Duplicate: a matching record already exists, nothing was created.

duplicateenum<boolean>required
Available options: true
duplicate_ofobject

Sent instead of record when the match is not a record of this module you can read.

messagestringrequired

Which value matched (email, phone, company code).

recordobject

Fields enabled for this documentation instance (projection enabled: feature, option, subdomain, closures) plus account-level form field visibility. Role- and user-level field overrides are not applied here, so an API key whose staff user has such overrides may receive fewer fields. A disabled field is omitted from the response object entirely; a present key with a null value means the record simply has no value.