Documentation menu
These are pre-release docs from the main branch.

API reference

2 operations in calendar-sync. Raw spec: openapi.json.

POST/api/v1/calendar-sync/{connection_id}/authorize

POST /api/calendar-sync/{connection_id}/authorize — begin consent.

Returns the vendor URL to send the operator to. The `state` is a server-generated nonce, NOT a client-supplied value: a client that chose its own state would defeat the CSRF protection entirely.

Parameters

NameInTypeRequiredDescription
connection_idpathstringYes

Responses

StatusDescription
200

Security: bearer

GET/api/v1/calendar-sync/{provider}/callback

GET /api/calendar-sync/{provider}/callback — the vendor's redirect target.

The `state` is matched against the stored nonce, which is what makes the flow CSRF-safe: a callback whose state does not match the connection this browser started is discarded, so an attacker cannot feed a victim's browser a code obtained under someone else's consent.

Parameters

NameInTypeRequiredDescription
providerpathstringYes
statequerystringYes
codequery—No
errorquery—NoThe operator may decline; the vendor then redirects with an error and no code. That is a user choice, not a failure, so it gets its own message instead of "invalid code".

Responses

StatusDescription
200