Update Lead
Partially updates a single lead. The :id path param accepts EITHER the AdBuy lead UUID (leads.id) or the partner-supplied external_lead_id — whichever you have on hand. Identity fields (campaign_id, external_lead_id) themselves are not patchable. Every successful PATCH writes an audit row to lead_events with before/after/diff JSON for forensic review.
Endpoint
/api/v1/insertion/leads/:idAuthentication
Same as Create Lead. PATCH requires the leads:write scope; GET on this resource requires leads:read. See the dedicated Authentication guide for HMAC and Bearer signing recipes.
Path Parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Either the AdBuy lead UUID (leads.id) OR the partner-supplied external_lead_id. Scoped to your account; cross-account lookups return 404. |
Request Body
All fields are optional. At least one patchable field is required (empty bodies are rejected with 400 invalid_payload).
| Name | Type | Description |
|---|---|---|
phone | string | 10–50 chars. |
email | string | Up to 320 chars. |
first_name | string | Up to 100 chars. |
last_name | string | Up to 100 chars. |
source | string | Lead source label. |
source_form_url | string | URL the lead originated from. |
ip_address | string | Client IP. |
tcpa_consent | boolean | Consent flag. |
tcpa_consent_text | string | Consent string. |
tcpa_consent_timestamp | string | ISO 8601 timestamp. |
custom_fields | object | Arbitrary JSON. |
Identity fields (campaign_id, external_lead_id) cannot be modified — to re-key a lead, create a new one with the desired identifiers. Unknown fields are rejected by the Zod schema.
Response
The event.id field is the lead_events row recording the before/after/diff for this mutation. It may be absent if the audit insert was best-effort skipped. See Errors & Idempotency for the full error envelope.