Campaign Leads
Update Campaign Lead
Correct a campaign lead’s phone number, metadata, or notes before the call is placed. Locked once dialling begins.
PATCH
Update a campaign lead
Updates editable fields on a campaign lead, the
phone_number, the metadata object that holds dynamic variables, and any free-form notes. Updates are only permitted while the lead is in pending status; once a call has been initiated, the lead’s data is locked so the call log can be reconciled cleanly against the configuration in effect at dial time.
When to use this
- Data quality fixes: you discovered a typo in a phone number after uploading a batch and want to correct it before the campaign reaches that row.
- Late variable updates: you want to add a personalization variable (for example
customer_first_name) that was missing from the original upload, before the lead is dialled. - Re-categorization: you want to tag the lead with a different
productorsegmentso the agent’s prompt branches correctly.
Path parameters
| Parameter | Description |
|---|---|
id | The campaign-lead ID, for example cmp_5tw8vz2rnx1q. |
Body parameters
| Field | Description |
|---|---|
phone_number | Corrected E.164 phone number. |
metadata | New metadata object. Replaces the existing object, include every key you want to keep. |
notes | Free-form notes attached to this lead. |
Errors
404 Not Foundis returned when the lead does not exist or has been removed.409 Conflictis returned when the lead has already been dialled and its data is locked.400 Bad Requestis returned whenphone_numberis not in E.164 format.
Request
Response
Related endpoints
- Get Campaign Lead: confirm the new values.
- Upload Campaign Leads: bulk-add or re-add corrected leads.
- Remove Campaign Lead: remove the lead instead of editing.
- Dynamic Variables: how
metadatais referenced in agent prompts.
Authorizations
Pass your API key as a Bearer token in the Authorization header.
Path Parameters
Response
Success.
Example:
"lead_abc123"
Example:
"Priya Sharma"
Example:
"+919876543210"
Example:
"cmp_xyz789"
Example:
"completed"
Example:
{
"loan_amount": "250000",
"product": "home_loan"
}
Example:
"log_abc123"
Example:
"2024-03-01T10:00:00.000Z"
Update a campaign lead