Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

connectionId
string
required

Calendar connection ID

Body

application/json

A bookable target to create on a connection whose provider has no scheduling of its own.

name
string
required

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

Required string length: 1 - 120
Example:

"Front desk"

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

Minimum string length: 1
Example:

"clinic@example.com"

durationMinutes
integer
required
Required range: x <= 1440
Example:

30

bufferBeforeMinutes
integer | null

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

Required range: 0 <= x <= 1440
bufferAfterMinutes
integer | null
Required range: 0 <= x <= 1440
minNoticeMinutes
integer | null

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

Required range: 0 <= x <= 525600
horizonDays
integer | null

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

Required range: x <= 365
slotIntervalMinutes
integer | null

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

Required range: x <= 1440
allDayEventsBlock
boolean | null

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
BookableHours · object[] | null

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.

Required array length: 1 - 42 elements

Response

The target, in the same shape GET /targets lists.

data
BookableTarget · object
required

Something on a connected account an agent can be pointed at: a Cal.com event type, or a bookable target on a calendar whose booking policy Roark owns.