Connect receptionist calendar

Connects the account's cal.com calendar with a cal.com API key you supply, for example one key per member or the key of your shared cal.com. Replaces a key…

PUT/v2/api/partner/accounts/{id}/numbers/{number}/receptionist/calendar

Connects the account's cal.com calendar with a cal.com API key, so the receptionist can book appointments. You supply the key: give each member its own key, or the key of your shared cal.com. The response returns the calendar, in the same shape as Get a calendar, with its available_event_types.

{
  "api_key": "cal_live_..."
}
  • The calendar belongs to the account, not to one number: every number of the account books on it.
  • Connecting a calendar again replaces the key connected before. If the new key fails, no calendar stays connected.

Choose what the receptionist books

Connecting a calendar does not make the receptionist book on it. Pick the event types it books with Update receptionist: send scheduling.calendars, keyed by the calendar id, with the event types to use.

{
  "scheduling": {
    "calendars": {
      "<calendar id>": ["<event type>"]
    }
  }
}

Errors

CodeWhat it means
MISSING_FIELDapi_key is missing (400).
RECEPTIONIST_NOT_ACTIVEThe receptionist is not activated on this number (409). Activate it first.
CALENDAR_API_KEY_REJECTEDThe calendar provider refused the key, or could not be reached to check it (422). No calendar is connected. Check the key, then send it again.
CALENDAR_UNAVAILABLEThe calendar provider could not be reached (502). Retry in a few seconds.
PARTNER_ACCOUNT_NOT_FOUNDNo account with this id was created by your API key, or the account is deactivated (404).
PHONE_NUMBER_NOT_FOUNDThe number is not on this account (404).

Authorization

Authorizationstring · headerrequired

Api-Key ak_live_…

Path parameters

idstringrequired

The account id returned on create.

numberstringrequired

A number of the account, in E.164 format.

Body

api_keystringrequired

A cal.com API key. It replaces the key connected before.

Responses

200The calendar, with its available event types
dataobject

A calendar connected to your workspace, whether or not a receptionist books on it.

7 fields
idstring

What scheduling.calendars on PATCH /v2/api/numbers/{number}/agent is keyed by.

namestring | null
providerenum<string>

GOOGLE_CALENDARCAL_COMCALENDLYOUTLOOK

statusenum<string>

ACTIVEDISCONNECTED

is_team_defaultboolean
ownerobject

The teammate who connected the calendar.

4 fields
user_idstring
user_namestring | null
emailstring | null
is_current_userboolean
available_event_typesobject[]

Reported by GET /v2/api/calendars/{id} only, read live from the provider. Absent for a provider with no event-type concept, which is not the same answer as an empty list.

6 fields
idstring
slugstring | null
titlestring
length_in_minutesinteger | null
provider_descriptionstring | null

The blurb written in the calendar provider. Not the routing note the receptionist matches on: that one is the description you send in scheduling.calendars.

required_questionsobject[]
2 fields
idstring
labelstring
400
401
403The API key lacks the PARTNER scope.
errorobject
404No account with this id was created by your API key, or it is deactivated (PARTNER_ACCOUNT_NOT_FOUND), or the number is not on the account (PHONE_NUMBER_NOT_FOUND).
errorobject
6 fields
typestring
codestring
messagestring
retryableboolean
request_idstring
retry_after_secondsinteger | null
409The receptionist is not activated on this number (RECEPTIONIST_NOT_ACTIVE).
errorobject
6 fields
typestring
codestring
messagestring
retryableboolean
request_idstring
retry_after_secondsinteger | null
422cal.com refused the API key (CALENDAR_API_KEY_REJECTED).
errorobject
6 fields
typestring
codestring
messagestring
retryableboolean
request_idstring
retry_after_secondsinteger | null
429
502The calendar provider could not be reached (CALENDAR_UNAVAILABLE). Retry.
errorobject
6 fields
typestring
codestring
messagestring
retryableboolean
request_idstring
retry_after_secondsinteger | null