# setCreatorCustomAttributes

Mutation

Set one custom attribute value on up to 1,000 creators. Up to 40 creators are written in the request; more run as a background operation.

Available to agents as MCP tool `setCreatorCustomAttributes` — see [Write tools](/api/v2/docs/mcp/write-tools#set-creator-custom-attributes).

## Arguments

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `creatorIds` | `[ID!]!` | Yes | — | Creator ids, as returned by `searchCreators` or `creator`. At least 1 and at most 1000. If any id does not resolve in this workspace, the whole call is refused with one userErrors entry per unknown id under `creatorIds`; nothing is written. |
| `key` | `String!` | Yes | — | The creator custom attribute key, as listed by `customAttributeSchemas(entity: CREATOR)`. The `labels` key and read-only keys are refused. |
| `value` | [`JSON!`](/api/v2/docs/types/json) | Yes | — | The value, typed by the key schema: a string, number, boolean or ISO 8601 date for a scalar type; an array for a list type. A SINGLE_SELECT takes one option id or exact option name. A MULTIPLE_SELECT takes an array of them and replaces the stored options. An unknown option is refused, never created. Use `clearCreatorCustomAttribute` to remove a value. |

## Returns

| Name | Type | Description |
| --- | --- | --- |
| `acceptedCount` | `Int!` | Number of distinct creators the call covers. 0 when userErrors is non-empty. |
| `operationId` | `ID` | The background operation; poll it with `operation(id:)` and its per-creator outcomes with `operationRecords`. Null when `scheduled` is false. |
| `scheduled` | `Boolean!` | True when the write runs as a background operation. False when it was written in the request or userErrors is non-empty. |
| `updatedCount` | `Int!` | Number of creators written in the request. 0 when the write was scheduled or refused. |
| `userErrors` | [`[UserError!]!`](/api/v2/docs/types/user-error) | Errors that refused the whole request: an empty or oversized list, an unknown creator id, an unknown or read-only key, a value the key does not accept, too many bulk operations in flight, or a workspace with no user to attribute the write to. Empty on success. |

## Examples

### Set a creator custom attribute

Write one custom attribute value on a creator, checked against the key's schema.

```graphql
mutation SetCreatorCustomAttributesDefault($creatorIds: [ID!]!, $key: String!, $value: JSON!) {
  setCreatorCustomAttributes(creatorIds: $creatorIds, key: $key, value: $value) {
    scheduled
    operationId
    acceptedCount
    updatedCount
    userErrors {
      field
      message
    }
  }
}
```

Variables:

```json
{
  "creatorIds": [
    "01f0f8f3-97dd-597c-8cc1-cf75eaabddb0"
  ],
  "key": "location",
  "value": "Northwind HQ 1"
}
```

Response — HTTP 200:

```json
{
  "data": {
    "setCreatorCustomAttributes": {
      "scheduled": false,
      "operationId": null,
      "acceptedCount": 1,
      "updatedCount": 1,
      "userErrors": []
    }
  }
}
```
