Create or attach lead
Creates a single lead and assigns it to the given list. Idempotent on
(account_id, phone_number): if a lead with this phone number already
exists in the account, the existing lead is attached to the requested
list (no error) and the response carries existed: true with HTTP 200.
A genuinely new lead returns HTTP 201 with existed: false.
Requires scope: leads:write.
Authorizations
Use Authorization: Bearer tc_live_xxxxx
Body
1Phone number in E.164 format (also validated as dialable by libphonenumber-js — country codes that don't exist are rejected)
^\+[1-9]\d{8,14}$New, Contacted, Converted, Unsubscribed Response
Existing lead attached to the requested list (idempotent)
Result of POST /v1/leads. existed=false (returned with HTTP 201) means
the phone number was new and a fresh lead row was created. existed=true
(returned with HTTP 200) means a lead with this phone number already
existed in the account; it has been (idempotently) attached to the
requested list, and list_ids reflects every list the lead is currently
in. The lead's other fields (name, email, notes, tags, metadata) are NOT
overwritten on the attach path - use PATCH /v1/leads/{id} for that.
^\+[1-9]\d{8,14}$New, Contacted, Converted, Unsubscribed false if a new lead was created; true if an existing lead was attached.