> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Update Booking Custom Attribute Definition

> Updates a bookings custom attribute definition.

`square.updateBookingCustomAttributeDefinition` updates a bookings custom attribute definition.

## Example

```ts automations/square-update-booking-custom-attribute-definition.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { square } from "automate.ax/square"

export default automation(
  "Update Square Booking Custom Attribute Definition",
  () => {
    onDashboardRun({
      title: "Update Square Booking Custom Attribute Definition",
    })

    square.updateBookingCustomAttributeDefinition({
      key: "key",
      customAttributeDefinition: {},
    })
  },
)
```

## Inputs

Every input accepts a compatible signal. It requires `APPOINTMENTS_WRITE`.

| Field                       | Type                               | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| --------------------------- | ---------------------------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `key`                       | `string`                           | Yes      | —       | The key of the custom attribute definition to update.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `customAttributeDefinition` | `Square.CustomAttributeDefinition` | Yes      | —       | The custom attribute definition that contains the fields to update. Only the following fields can be updated: - `name` - `description` - `visibility` - `schema` for a `Selection` data type. Only changes to the named options or the maximum number of allowed selections are supported. For more information, see [Updatable definition fields](https://developer.squareup.com/docs/booking-custom-attributes-api/custom-attribute-definitions#updatable-definition-fields). To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) control, include the optional `version` field and specify the current version of the custom attribute definition. |
| `idempotencyKey`            | `string \| null`                   | No       | —       | A unique identifier for this request, used to ensure idempotency. For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

Use the official [UpdateBookingCustomAttributeDefinition reference](https://developer.squareup.com/reference/square/booking-custom-attributes-api/update-booking-custom-attribute-definition) for provider field semantics and limits.

## Output

Returns the official `Square.UpdateBookingCustomAttributeDefinitionResponse` response as a codec-safe object. Square integer money amounts remain `bigint` values.
