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

> Creates a [location](https://developer.squareup.com/docs/locations-api).

`square.createLocation` creates a [location](https://developer.squareup.com/docs/locations-api).

## Example

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

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

  square.createLocation({
    location: {
      name: "Midtown",
      address: {
        addressLine1: "1234 Peachtree St. NE",
        locality: "Atlanta",
        administrativeDistrictLevel1: "GA",
        postalCode: "30309",
      },
      description: "Midtown Atlanta store",
    },
  })
})
```

## Inputs

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

| Field      | Type              | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                           |
| ---------- | ----------------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `location` | `Square.Location` | No       | —       | The initial values of the location being created. The `name` field is required and must be unique within a seller account. All other fields are optional, but any information you care about for the location should be included. The remaining fields are automatically added based on the data from the [main location](https://developer.squareup.com/docs/locations-api#about-the-main-location). |

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

## Output

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