/accounts/oauth-sessions Authentication
Send your organization API key as a Bearer credential.
Authorization: Bearer YOUR_API_KEY Body
application/json provider string required Allowed values: google
google reconnect_account_id number Existing Google account ID to reconnect. The mailbox address must match.
Range: x ≥ 1, x ≤ 2147483647
123 Response
application/json Session created with a Google consent link and admin setup details.
session_id string required provider string required Allowed values: google
status string required Allowed values: pending, connected, failed, expired
expires_at string required When the one-time Google consent link expires, in UTC. Create a new session if this deadline passes before the Google callback.
account_id number Returned when status is connected. Reconnecting preserves the existing Coldy account ID.
123 email string Present for connected sessions.
error_code string Present for failed sessions.
Allowed values: consent_denied, workspace_required, mail_access_not_granted, refresh_token_missing, mailbox_mismatch, account_not_found, account_in_use, access_revoked, connection_failed
authorization_url string required Open in a browser to grant mailbox access to Coldy.
workspace_setup object required Google Admin setup details for the Coldy app in the Google Workspace organization.
Show child attributes
workspace_setup.client_id string required Copy this public OAuth Client ID into the Configure New App search field in Google Admin. The value matches client_id in authorization_url.
example.apps.googleusercontent.com workspace_setup.app_access_control_url string required Open App Access Control in Google Admin. Configure the Coldy app for the organizational unit of the mailboxes you want to connect, if the app is not already allowed.
https://admin.google.com/ac/owl/list?tab=configuredApps workspace_setup.guide_url string required Coldy guide for authorizing the app in Google Workspace.
https://coldy.ai/guides/how-to-connect-gmail-accounts-to-coldy Invalid provider or account ID.
A valid Coldy API key is required.
The caller cannot manage email accounts in this organization.
The requested reconnect account was not found in this organization.
OAuth session rate limit exceeded.
Google Workspace OAuth is temporarily unavailable.