> ## 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.

# Create Customer

> Creates a new customer for a business.

`square.createCustomer` creates a new customer for a business.

## Example

```ts automations/square-create-customer.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { square } from "automate.ax/square"

export default automation("Create Square Customer", () => {
  onDashboardRun({ title: "Create Square Customer" })

  square.createCustomer({
    givenName: "Amelia",
    familyName: "Earhart",
    emailAddress: "Amelia.Earhart@example.com",
    address: {
      addressLine1: "500 Electric Ave",
      addressLine2: "Suite 600",
      locality: "New York",
      administrativeDistrictLevel1: "NY",
      postalCode: "10003",
      country: "US",
    },
    phoneNumber: "+1-212-555-4240",
    referenceId: "YOUR_REFERENCE_ID",
    note: "a customer",
  })
})
```

## Inputs

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

| Field            | Type                    | Required | Default | Description                                                                                                                                                                                                                                                                                                      |
| ---------------- | ----------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `idempotencyKey` | `string`                | No       | —       | The idempotency key for the request. For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).                                                                                                                                                  |
| `givenName`      | `string`                | No       | —       | The given name (that is, the first name) associated with the customer profile. The maximum length for this value is 300 characters.                                                                                                                                                                              |
| `familyName`     | `string`                | No       | —       | The family name (that is, the last name) associated with the customer profile. The maximum length for this value is 300 characters.                                                                                                                                                                              |
| `companyName`    | `string`                | No       | —       | A business name associated with the customer profile. The maximum length for this value is 500 characters.                                                                                                                                                                                                       |
| `nickname`       | `string`                | No       | —       | A nickname for the customer profile. The maximum length for this value is 100 characters.                                                                                                                                                                                                                        |
| `emailAddress`   | `string`                | No       | —       | The email address associated with the customer profile. The maximum length for this value is 254 characters.                                                                                                                                                                                                     |
| `address`        | `Square.Address`        | No       | —       | The physical address associated with the customer profile. For maximum length constraints, see [Customer addresses](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#address). The `first_name` and `last_name` fields are ignored if they are present in the request.                 |
| `phoneNumber`    | `string`                | No       | —       | The phone number associated with the customer profile. The phone number must be valid and can contain 9–16 digits, with an optional `+` prefix and country code. For more information, see [Customer phone numbers](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#phone-number).    |
| `referenceId`    | `string`                | No       | —       | An optional second ID used to associate the customer profile with an entity in another system. The maximum length for this value is 100 characters.                                                                                                                                                              |
| `note`           | `string`                | No       | —       | A custom note associated with the customer profile.                                                                                                                                                                                                                                                              |
| `birthday`       | `string`                | No       | —       | The birthday associated with the customer profile, in `YYYY-MM-DD` or `MM-DD` format. For example, specify `1998-09-21` for September 21, 1998, or `09-21` for September 21. Birthdays are returned in `YYYY-MM-DD` format, where `YYYY` is the specified birth year or `0000` if a birth year is not specified. |
| `taxIds`         | `Square.CustomerTaxIds` | No       | —       | The tax ID associated with the customer profile. This field is available only for customers of sellers in EU countries or the United Kingdom. For more information, see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids).                                     |

Use the official [CreateCustomer reference](https://developer.squareup.com/reference/square/customers-api/create-customer) for provider field semantics and limits.

## Output

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