{"openapi":"3.1.0","info":{"title":"GET /api/v1/gmail/status","version":"1.0.0","description":"Gmail connection status"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/gmail/status":{"get":{"tags":["gmail"],"summary":"Gmail connection status","description":"Returns the signed-in user's Gmail connection state and health.","operationId":"get_connection_status_api_v1_gmail_status_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope_GmailConnectionStatusResponse_"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"GmailConnectionStatusResponse":{"properties":{"connected":{"type":"boolean","title":"Connected"},"healthy":{"type":"boolean","title":"Healthy","default":false},"google_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Email"},"scopes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scopes"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"last_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error Message"}},"additionalProperties":true,"type":"object","required":["connected"],"title":"GmailConnectionStatusResponse","description":"Response for ``get_connection_status``."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"SuccessEnvelope_GmailConnectionStatusResponse_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"data":{"anyOf":[{"$ref":"#/components/schemas/GmailConnectionStatusResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[GmailConnectionStatusResponse]"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}