Disconnect a calendar's account
/assistants /{id} /calendars /{calendarId} /connectionThe calendar keeps its handle, which the agent then treats as not available, and waits for an account. Its invite link is revoked.
Path parameters
idstringrequiredID of the assistant, as returned by
GET /assistants.calendarIdstringrequiredID of the calendar, from the assistant's
calendarslist orGET /.assistants/ {id}/ calendars
Request body
No body: send the request without one.
Response
200calendarAssistantCalendaridstringUnique ID of the calendar: the {calendarId} of the calendar endpoints.
assistant_idstringID of the assistant that books on this calendar.
handlestringnullableHow the prompt names this calendar, as @handle: the provider, then the connected account (e.g. google_calendar_jane_at_example.com). Null until an account is connected, unique within the assistant, kept when it is disconnected.
Example
"google_calendar_jane_at_example.com"at most 255 charactersprovider"google-calendar" | "calendly" | "cal-com-oauth"Calendar provider.
"google-calendar"Google Calendar: books on a calendar of the account, with the opening hours and meeting length of its settings.
"calendly"Calendly: books an event type of the account.
"cal-com-oauth"Cal.com: books an event type of the account.
status"not_connected" | "needs_setup" | "ready"Whether the calendar takes bookings.
"not_connected"No account is connected yet: send the invite link to the account owner, or connect an account of your organization.
"needs_setup"An account is connected, but the calendar (Google) or event type (Calendly, Cal.com) to book on is not picked: list them with GET .../options and pick one with PUT .../selection.
"ready"Takes bookings: the agent can book on it during calls.
connectionobjectnullableThe connected account, on the calendar's provider. Null until one is connected.
account_labelstringnullableThe connected account, usually its email. Null when not connected, or when the provider did not say.
connected_via_invitebooleanTrue when the account was connected by a colleague from the invite link.
inviteobjectnullableThe invite link a colleague can use to connect their own account to this calendar (
POST /). Null when no link was created, once it was revoked, and once an account was connected from the dashboard or the API instead.assistants/ {id}/ calendars/ {calendarId}/ invite created_atstring (date-time)When the calendar was added to the assistant (ISO 8601).
Errors
- 400Invalid request: a field or parameter failed validation
{ "message"?: string, "error"?: string, "bodyErrors"?: {…} } - 404Not found in your organization
{ "message"?: string, "error"?: string, "bodyErrors"?: {…} }
Error bodies carry an error (or message) string; a 400 adds bodyErrors.issues. See Errors.