This page documents the canonical HTTP contract for this endpoint.
Developer API keys need the listed scope. A valid authenticated user session may also call this route.
For standard fields, the queued result is admission, not completion. Poll GET /api/operation-runs/{operation_run_id}. Custom-field updates use the existing user-admin custom-field writer and are also queued; poll the returned operation_run_id until terminal state. Choose an editable field and field_ref from the CRM field catalog.
Body parameters
selection· optionalobject
Lead selection; mutually exclusive with lead_ids.
lead_ids· optionalarray<string>
Legacy explicit lead IDs; mutually exclusive with selection.
field_refrequiredstring
CRM catalog ID for a writable Lead field.
operationrequiredstring
set or clear.
value· optionalany
Required and non-null for set; omit or send null for clear.
provenance· optionalobject
Optional qualification provenance for eligible custom-field conclusions; not accepted for clear or standard fields.
| Name | Type | Description |
|---|---|---|
| selection | object | Lead selection; mutually exclusive with lead_ids. |
| lead_ids | array<string> | Legacy explicit lead IDs; mutually exclusive with selection. |
| field_refrequired | string | CRM catalog ID for a writable Lead field. |
| operationrequired | string | set or clear. |
| value | any | Required and non-null for set; omit or send null for clear. |
| provenance | object | Optional qualification provenance for eligible custom-field conclusions; not accepted for clear or standard fields. |
Errors
| Status | Meaning |
|---|---|
| 401 | Authentication is missing or invalid. |
| 403 | The credential is invalid or lacks the required scope. |
| 400 | Selection or field lookup failed. |
| 422 | Operation must be set or clear; set requires a non-null, non-empty value; clear may omit value or send null; non-null values are rejected; selection and lead_ids are mutually exclusive. |
| 404 | No leads match the selection. |
| 409 | The catalog field has no supported bulk writer. |
