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

> Creates a new `Timecard`.

`square.createTimecard` creates a new `Timecard`.

## Example

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

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

  square.createTimecard({
    idempotencyKey: "HIDSNG5KS478L",
    timecard: {
      locationId: "PAA1RJZZKXBFG",
      startAt: "2019-01-25T03:11:00-05:00",
      endAt: "2019-01-25T13:11:00-05:00",
      wage: {
        title: "Barista",
        hourlyRate: {
          amount: BigInt("1100"),
          currency: "USD",
        },
        tipEligible: true,
      },
      breaks: [
        {
          startAt: "2019-01-25T06:11:00-05:00",
          endAt: "2019-01-25T06:16:00-05:00",
          breakTypeId: "REGS1EQR1TPZ5",
          name: "Tea Break",
          expectedDuration: "PT5M",
          isPaid: true,
        },
      ],
      teamMemberId: "ormj0jJJZ5OZIzxrZYJI",
      declaredCashTipMoney: {
        amount: BigInt("500"),
        currency: "USD",
      },
    },
  })
})
```

## Inputs

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

| Field            | Type              | Required | Default | Description                                                       |
| ---------------- | ----------------- | -------- | ------- | ----------------------------------------------------------------- |
| `idempotencyKey` | `string`          | No       | —       | A unique string value to ensure the idempotency of the operation. |
| `timecard`       | `Square.Timecard` | Yes      | —       | The `Timecard` to be created.                                     |

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

## Output

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