# setContactsCustomField

Set ONE DROPDOWN custom field to the same value across a selection of contacts: the bulk form of updateContact’s updateCustomFieldValues. customFieldId from listContactCustomFields; read the result per contact with getContact (`customFields[].values.dropdownSelectedValues`). Async bulk job: returns a bulkTaskId to poll with getBulkTask, so an immediate read-back will not show the change. DROPDOWN FIELDS ONLY: dropdownSelectedValues is its only value channel, so a TEXT / NUMBER / DOLLAR / DATE / LINK field cannot be written here (use updateContact per contact). Values are option LABELS (matched case-insensitively, stored as the canonical label), NOT ids: an id or any string not among the options is refused. It REPLACES each contact’s selection rather than adding, so send every option the contact should end up with; an EMPTY array CLEARS the field on every selected contact. More than one value needs `allowMultiple`. WHERE REFUSALS LAND: only the id checks run before the response (a field id not among your organization’s custom fields is a 403). Everything else (not a DROPDOWN, an unknown label, several values on a single-select field) is checked by the worker, so the call returns 200 with a bulkTaskId and the failure shows as `status: FAILED` on getBulkTask with NOTHING written. A 200 means "queued", never "applied": poll the task before reporting the change. POTENTIALLY OUTBOUND: each contact goes through the normal contact-update path, so contact-mutation events fire and a CONTACT workflow triggered on this field can start a run and send.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "setContactsCustomField", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `contactIds`: `[String!]!` (required)
- `customFieldId`: `String!` (required)
- `dropdownSelectedValues`: `[String!]!` (required)

## Response (data, an example)

```json
{
  "contactMutation": {
    "setContactsCustomField": {
      "mode": "SYNC",
      "bulkTaskId": "…"
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "setContactsCustomField",
    "variables": {
      "contactIds": [
        "<String>"
      ],
      "customFieldId": "<String>",
      "dropdownSelectedValues": [
        "<String>"
      ]
    }
  }'
```
