---
title: "Disconnect a calendar: deletes its tokens, stops push, revokes the Google grant"
method: DELETE
path: "/api/connections/{id}"
tags: ["Account"]
---

# Disconnect a calendar: deletes its tokens, stops push, revokes the Google grant

`DELETE /api/connections/{id}`

## Request

- Base URL: `https://whenmeet.me`
- URL: `https://whenmeet.me/api/connections/{id}`
- Auth: API key in cookie `__Host-session`

Deletes the connection row (tokens included) first; then, best-effort, stops the provider push channel, revokes the Google grant (Microsoft has no revoke endpoint) and drops cached availability. Same-origin browser calls only.

## Path parameters

- `id` string, required

## Response `200`

{ ok: true, warnings[] } — the warnings that applied at the time.

- object
  - `ok` true
  - `warnings` union[]
    - union
      - object: No other Google / Microsoft calendar stays connected: live availability stops.
        - `code` 'last_connection', required
      - object: Active booking links (your own or team links you belong to) rely on your calendars.
        - `code` 'booking_links', required
        - `count` integer, required

## Other responses

- `401`: unauthenticated (no session or token), or invalid_token (a Bearer token that is malformed, unknown or revoked — never a silent anonymous fallback).
- `403`: forbidden (cross-origin request).
- `404`: not_found.

---

[API](https://skmtc.dev/whenmeet/apis/whenmeet-me-api.md) · [All operations](https://skmtc.dev/whenmeet/apis/whenmeet-me-api/llms.txt) · [OpenAPI document](https://skmtc.dev/whenmeet/apis/whenmeet-me-api/revisions/202b80022215?raw)
