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.

Body

application/json

Input for connecting a calendar account.

provider
enum<string>
required

Who holds the calendar. CAL_COM and GO_HIGH_LEVEL are connected with a key, GO_HIGH_LEVEL also needing the sub-account the key belongs to; GOOGLE and CALENDLY are connected by consent, through POST /v1/connections/calendar/google/authorize-url and POST /v1/connections/calendar/calendly/authorize-url.

Available options:
CAL_COM,
GOOGLE,
CALENDLY,
GO_HIGH_LEVEL
label
string
required

Customer-facing name for this account, unique within the project. Required.

Required string length: 1 - 120
apiKey
string
required

The provider account’s API key. For CAL_COM, a Cal.com API key (starts with cal_). For GO_HIGH_LEVEL, a sub-account Private Integration Token, which must carry the calendars.readonly, calendars/events.readonly, calendars/events.write, contacts.readonly, contacts.write and locations.readonly scopes. It is verified against the provider before anything is stored, so an invalid key is a 400 and no connection is created. Stored encrypted and never returned.

Minimum string length: 1
goHighLevelLocation
string | null

Required for GO_HIGH_LEVEL and ignored by every other provider: the sub-account the token belongs to, for example ve9EPM428h8vShlRW1KT. A Private Integration Token does not name its own sub-account and every calendar call needs one, so the two are stored and verified together: a token minted in a different sub-account is a 400.

Required string length: 1 - 64
timezone
string | null

The named IANA timezone to offer slots in, for example America/Los_Angeles. Omit to adopt the provider account’s own timezone. A fixed offset such as -08:00 is rejected: it does not observe DST.

Minimum string length: 1

Response

The connected calendar.

data
CalendarConnection · object
required

A project’s credential for one calendar account, the thing a calendar tool books against. The credential itself is never returned.