# createCustomAttributeSchema

Mutation

Create a creator custom attribute field of a value or select type. The key is derived from the name.

Available to agents as MCP tool `createCustomAttributeSchema` — see [Write tools](/api/v2/docs/mcp/write-tools#create-custom-attribute-schema).

## Arguments

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | `String!` | Yes | — | Display name, at most 100 characters. It must differ from every creator field name, ignoring case and surrounding whitespace. Built-in names such as Labels are refused. |
| `options` | `[String!]` | No | — | Initial option names for SINGLE_SELECT_V3 and MULTIPLE_SELECT_V2, at most 100, each at most 255 characters. Repeated names collapse. Omit it for other types. |
| `type` | [`CustomAttributeType!`](/api/v2/docs/types/custom-attribute-type) | Yes | — | Value type. Only TEXT, URL, EMAIL, PHONE, NUMBER, BOOLEAN, DATE, DATETIME, TEXT_LIST, NUMBER_LIST, BOOLEAN_LIST, DATE_LIST, DATETIME_LIST, SINGLE_SELECT_V3, MULTIPLE_SELECT_V2 can be created; any other type is a userError on `type`. |

## Returns

| Name | Type | Description |
| --- | --- | --- |
| `schema` | [`CustomAttributeSchema`](/api/v2/docs/types/custom-attribute-schema) | The created field, as `customAttributeSchemas(entity: CREATOR)` lists it. Null when userErrors is non-empty. |
| `userErrors` | [`[UserError!]!`](/api/v2/docs/types/user-error) | Errors that refused the request, on the input at fault: a blank, long, taken or built-in name, a type that cannot be created, unusable options, or the 250-field workspace cap on `base` (built-in fields do not count). Empty on success. |

## Examples

### Create a creator custom attribute field

Create a creator select field with its first options.

```graphql
mutation CreateCustomAttributeSchemaDefault($name: String!, $type: CustomAttributeType!, $options: [String!]) {
  createCustomAttributeSchema(name: $name, type: $type, options: $options) {
    schema {
      key
      name
      type
      options {
        id
        name
      }
    }
    userErrors {
      field
      message
    }
  }
}
```

Variables:

```json
{
  "name": "Creator Tier",
  "type": "SINGLE_SELECT_V3",
  "options": [
    "Gold",
    "Silver"
  ]
}
```

Response — HTTP 200:

```json
{
  "data": {
    "createCustomAttributeSchema": {
      "schema": {
        "key": "creator_tier",
        "name": "Creator Tier",
        "type": "SINGLE_SELECT_V3",
        "options": [
          {
            "id": "e0ba7c8b-59c6-56ff-8aed-f148d120e16b",
            "name": "Gold"
          },
          {
            "id": "741f26c9-bcee-5080-8331-0ce51d5713b0",
            "name": "Silver"
          }
        ]
      },
      "userErrors": []
    }
  }
}
```
