- Start connecting a calendar POST
- List a host's calendar connections GET
- Connect a calendar with a password POST
- Disconnect a calendar DELETE
- Choose how a calendar counts PATCH
- List calendar delegations GET
- Add a calendar delegation POST
- Get a calendar delegation GET
- Update a calendar delegation PATCH
- Delete a calendar delegation DELETE
- Verify a calendar delegation POST
- Set a simulated calendar's busy times PUT
Add a calendar delegation
An admin authorizes once, and every host on the domain gets their calendar with no consent screen. It stays pending: authorize what it returns, then verify it. Credentials are never returned.
bearerAuthAuthorizationBearer <token>A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.
Coss-Version?"2026-10-10"The API version (a date) to use for this request. Defaults to your organization's version, pinned to the latest one when it first used the API and upgraded from the dashboard. The SDK always sends the version it was built for.
"2026-10-10"application/json- body
- body
- …
provider*"google""google"domain*stringThe Workspace or Microsoft 365 domain. Only addresses on exactly this domain connect, not its subdomains.
^[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$length <= 253match_host_email?booleanWhether a host's email picks their mailbox when calendar_account isn't set. Turn it off if end users can type their own email into your app: otherwise one could name a colleague's address and reach that calendar.
service_account_key*stringThe whole JSON key of a service account in your Google Cloud project. Never returned.
length <= 10000The delegation.
application/json- response
- response
- …
object*"scheduling.calendar_delegation""scheduling.calendar_delegation"id*stringprovider*string"google""microsoft"domain*stringstatus*stringpending: not verified yet. failing: the provider refused access, and its hosts aren't offered until it's back. deleting: its connections are being removed.
"pending""active""failing""deleting"match_host_email*booleanclient_id*stringGoogle: the numeric client ID your Workspace admin authorizes.
tenant_id*string|nullscopes*array<string>What to authorize: OAuth scopes in Google's Admin console, the application permission in Entra.
verified_account*string|nulllast_error_code*string|nullfailing_since*string|nullsecret_expires_at*string|nullhosts_connected*integerhosts_failed*integerHosts whose mailbox can't be reached, or who are out while this is failing.
created_at*stringupdated_at*stringimport { Coss } from "coss";const coss = new Coss({ apiKey: process.env.COSS_API_KEY, baseUrl: "https://api.coss.com",});const { data, error } = await coss.scheduling.calendarDelegations.create({ provider: "microsoft", domain: "example.com", tenant_id: "7d3f1c52-8e0b-4d6e-9a27-5c4b1e7d2f60", client_id: "3f1c7a52-8e0b-4d6e-9a27-5c4b1e7d2f60", client_secret: "abc~defghijklmnopqrstuvwxyz",});{ "object": "scheduling.calendar_delegation", "id": "caldlg_01kd2m9a0b1c2d3e4f5g6h7j8m", "provider": "google", "domain": "example.com", "status": "active", "match_host_email": true, "client_id": "117063284751902345678", "tenant_id": null, "scopes": [ "https://www.googleapis.com/auth/calendar.events.freebusy" ], "verified_account": "ana@example.com", "last_error_code": null, "failing_since": null, "secret_expires_at": null, "hosts_connected": 240, "hosts_failed": 1, "created_at": "2027-01-01T10:00:00.000Z", "updated_at": "2027-01-01T10:00:00.000Z"}