Create or update lead
Creates a lead or updates the matching active lead. external_id plus external_source wins when provided; otherwise normalized phone dedupe is used as fallback.
Bearer API key · Scope: leads.write
Endpoint
Request bodyrequired
application/json
LeadWriteHeaders1 parameter
Idempotency-Keyrequiredstring—
Responses
200Existing lead updated.
Headers
X-RateLimit-LimitMaximum requests allowed in the current window.X-RateLimit-RemainingRequests remaining in the current window.X-RateLimit-ResetISO timestamp when the current rate-limit window resets.Idempotency-ReplayedPresent and true when a stored successful write response was replayed.
application/json
LeadUpsertResponse201New lead created.
application/json
LeadUpsertResponse400Request payload, query, or required header is invalid.
application/json
ErrorResponse401Missing, malformed, revoked, deleted, or unknown API key.
Headers
WWW-AuthenticateDocumented response header
application/json
ErrorResponse403API key lacks the required scope or the workspace is not active.
application/json
ErrorResponse409Request conflicts with idempotency or external event identity.
application/json
ErrorResponse429Rate limit exceeded for this key and endpoint or invalid-auth bucket.
Headers
X-RateLimit-LimitMaximum requests allowed in the current window.X-RateLimit-RemainingRequests remaining in the current window.X-RateLimit-ResetISO timestamp when the current rate-limit window resets.Retry-AfterSeconds until the caller should retry.
application/json
ErrorResponse500Internal authentication or server error.
application/json
ErrorResponse