Skip to content

API reference

Update a lead

PATCH /leads/{id}

name, email, address (null or “” clears one), fields (merged: a key sent as “” is removed; other keys are kept), consent (replaced), external_id (only while the lead has none), call_now: false (drops the speed-to-lead priority). The phone can’t be changed (phone_cannot_change): add a new lead instead. Answers the updated lead. Idempotency-Key is honoured.

Name In Type Required Notes
id path string (uuid) yes
Idempotency-Key header string Any string you choose (1 to 255 visible characters), new for each new action. Send the same key again within 24 hours and you get the first answer back instead of a second lead or call. At most 255 characters.
Field Type Required Notes
name string or null At most 200 characters.
email string or null At most 254 characters.
address string or null At most 500 characters.
fields object Merged: a key sent as “” is removed, other keys are kept.
consent Consent
external_id string Only while the lead has none. At most 200 characters.
call_now boolean false drops the speed-to-lead priority. One of false.
phone string Can’t be changed (phone_cannot_change). Add a new lead instead.
Terminal window
curl -X PATCH 'https://v2-api.callview.ai/api/v1/external/leads/2b8e4c1d-9f3a-4b7e-8c21-6a5d4e3f2b10' \
-u "$CALLVIEW_KEY_ID:$CALLVIEW_SECRET" \
-H 'Idempotency-Key: patchLeadsId-0001' \
-H 'Content-Type: application/json' \
-d '{
"name": "Dana Smith-Lee",
"fields": {
"roof_age": "13",
"old_field": ""
}
}'

200 The updated lead

{
"data": {
"id": "2b8e4c1d-9f3a-4b7e-8c21-6a5d4e3f2b10",
"external_id": "crm-10442",
"campaign_id": "7c1f2b9e-4a3d-4e8f-9b21-5d6a7e8f9a01",
"name": "LEAD_NAME",
"phone": "+15555550142",
"email": "[email protected]",
"address": "1 Example Street, Springfield",
"fields": {
"roof_age": "12"
},
"consent": {
"source": "web_form",
"agreed_at": "2026-10-06T16:58:02Z",
"url": "https://example.com/quote"
},
"lead_source": "Example CRM",
"owner": null,
"created": "2026-10-06T16:58:04.000Z",
"updated": "2026-10-06T16:58:04.000Z",
"status": "queued",
"call_now": true,
"place_in_line": 3,
"estimated_wait_seconds": 90,
"scheduled_for": null,
"scheduled_reason": null,
"held_reason": null,
"callback_at": null,
"late": false,
"attempts": 0,
"last_outcome": null,
"last_outcome_label": null,
"next_dial_at": null,
"calls": [],
"livemode": true
}
}
Status Codes
400 invalid_request
401 authentication_failed
403 permission_denied
404 not_found
409 duplicate_lead, idempotency_mismatch, idempotency_in_progress
422 phone_cannot_change
429 rate_limited, too_many_concurrent_requests
500 internal_error
503 service_unavailable

Part of Leads. Every example sends your key ID and secret as CALLVIEW_KEY_ID and CALLVIEW_SECRET (see Keys and authentication).