{"service":"connectors","environment":"beta","contract":"/api/openapi.json","routes":[{"route":"GET /api","agent":true,"what":"Route index: each route, what it does and whether it suits an agent"},{"route":"GET /api/openapi.json","agent":true,"what":"This API's OpenAPI 3.1 contract"},{"route":"GET /api/app/version","agent":true,"what":"Build id, commit and environment"},{"route":"GET /api/health","agent":true,"what":"Binding proof, no data"},{"route":"GET /api/me","agent":true,"what":"Who you are to Connectors, and whether you may set the Google OAuth client"},{"route":"GET /api/connections","agent":true,"what":"Your connections: Google (OAuth or domain-wide delegation) and Microsoft 365 (the Mac's sign-in), with status, and your latest Microsoft 365 device-code request"},{"route":"POST /api/google/connect","agent":false,"what":"Start Connect Google: an authorisation URL (offline access, consent, PKCE) whose state is bound to you for 10 minutes"},{"route":"GET /api/google/callback","agent":false,"what":"Google's redirect back: checks the state against the signed-in person, exchanges the code, keeps the refresh token encrypted, and returns to the page"},{"route":"POST /api/connections/:id/disconnect","agent":true,"what":"Disconnect one of your Google OAuth accounts: the token is revoked at Google and deleted here"},{"route":"PUT /api/google/client","agent":false,"what":"Set this environment's Google OAuth client (auth-admin only): the client id, and the secret kept encrypted and never shown again"},{"route":"POST /api/m365/reconnect","agent":false,"what":"Ask the Mac to sign in to Microsoft 365 again: it starts a device-code sign-in and posts back only the code and the address to enter it"},{"route":"POST /api/provider/status","agent":true,"what":"The Mac's job, every minute: the status of the accounts it serves (Microsoft 365 through the m365 CLI, parkins.info through delegation). Never a token"},{"route":"GET /api/provider/device-logins","agent":true,"what":"The Mac's job: device-code sign-ins people have asked for and that are still open"},{"route":"POST /api/provider/device-logins/:id","agent":true,"what":"The Mac's job: report a device-code sign-in (the user code and verification address only, then completed, expired or failed)"},{"route":"GET /api/provider/google/accounts","agent":true,"what":"The feed job: the Google accounts connected by OAuth for the owners it feeds (no tokens)"},{"route":"POST /api/provider/google/token","agent":true,"what":"The feed job: a fresh, short-lived access token for one OAuth-connected Google account (refreshed here; the refresh token never leaves). A refusal at Google marks the account Expired"}]}