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

# roark integrations calendar target create

> Create a bookable target

Only for a connection whose `capabilities.roarkOwnsBookingPolicy` is true. A calendar with no scheduling of its own has nothing an agent can be pointed at, so the thing a calendar tool books into is created here: the calendar, how long an appointment runs, and the hours it is offered in. The policy and the hours are written together, because a target with no hours offers nothing. Refused if the calendar is one the account can only read.

```bash Synopsis theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark integrations calendar target create <connection-id> [options]
```

> [!NOTE]
>
> Calls `POST /v1/integrations/calendar/{connectionId}/targets`

## Arguments

**connection-id** `string` *required*

Calendar connection ID.

## Options

**--name** `string` *required*

Unique within the connection, and how a config file refers to this target. Letters, digits, spaces, \_ or -.

**--calendar-id** `string` *required*

The calendar to write appointments to, from `GET /v1/integrations/calendar/{connectionId}/calendars`. `primary` is accepted and stored as the account’s own id.

**--duration-minutes** `integer` *required*

**--buffer-before-minutes** `integer`

Dead time before an appointment, counted as busy when a slot is offered. Defaults to 0.

**--buffer-after-minutes** `integer`

**--min-notice-minutes** `integer`

How soon from now an appointment may be made. Defaults to 120.

**--horizon-days** `integer`

How far ahead appointments may be made. Defaults to 30.

**--slot-interval-minutes** `integer`

The grid slots are offered on. Defaults to the duration, which gives back-to-back appointments.

**--all-day-events-block** `switch`

Whether an all-day event closes the day. Defaults to true, because a calendar marks all-day events free unless their creator says otherwise and a public holiday entered as one would otherwise be bookable.

**--hours** `array`

The windows of the week appointments are offered in. Omit to adopt Monday to Friday, 09:00 to 17:00. A target with no windows offers nothing at all, which reads to a caller as a permanently full diary.

## Example

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark integrations calendar target create <connection-id> --name <value> --calendar-id <value> --duration-minutes <value>
```

Every command also takes the [global options](https://docs.roark.ai/cli-reference/overview.md#global-options) and sets one
of the [exit codes](https://docs.roark.ai/cli-reference/overview.md#exit-codes).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.