This page documents the canonical HTTP contract for this endpoint.
Requires user-admin permission in addition to the API key's leads:write scope. Selection belongs to the authenticated organization. Values must be non-empty; provenance uses the schema documented on Update lead custom fields. This mutation queues a background job and returns job/task/operation identifiers; poll GET /api/operation-runs/{operation_run_id} with jobs:read to check completion.
Body parameters
valuesrequiredobject
Non-empty map of defined custom field keys to JSON values; empty strings clear fields.
lead_ids· optionalarray<string>
Explicit Lead IDs; use this or selection.
selection· optionalobject
BulkSelectionModel: {mode: "ids", ids: [...]} or {mode: "descriptor", descriptor: {root: <FilterNode>}}. Descriptor root is a rule or group with kind, field/operator/value or logic/children.
scope· optionalstring
Lead scope.
source_table_id· optionalstring
Research table context.
source_table_scope· optionalstring
Research table scope.
provenance· optionalobject
Optional keyed assertions; same basis/rationale/sources schema as Update lead custom fields. Defaults to {}.
| Name | Type | Description |
|---|---|---|
| valuesrequired | object | Non-empty map of defined custom field keys to JSON values; empty strings clear fields. |
| lead_ids | array<string> | Explicit Lead IDs; use this or selection. |
| selection | object | BulkSelectionModel: {mode: "ids", ids: [...]} or {mode: "descriptor", descriptor: {root: <FilterNode>}}. Descriptor root is a rule or group with kind, field/operator/value or logic/children. |
| scope | string | Lead scope. |
| source_table_id | string | Research table context. |
| source_table_scope | string | Research table scope. |
| provenance | object | Optional keyed assertions; same basis/rationale/sources schema as Update lead custom fields. Defaults to {}. |
Errors
| Status | Meaning |
|---|---|
| 400 | Invalid selection, values, or provenance. |
| 401 | Invalid API key or missing auth. |
| 403 | Organization administrator and leads:write access required. |
