| GET | /api/v1/gtmscoop/auth/google-client | Get Google Client ID Returns the public Google OAuth client ID to load Google Sign-In with. The ID token you later send to /google must be issued for this client ID. clientId is an empty string when Google sign-in is not configured. |
| POST | /api/v1/gtmscoop/auth/google | Sign in with Google Verifies a Google ID token and signs in, creating the account on first use. Sets the session cookies and returns the user plus csrfToken. 401 if the token is invalid, expired, for another client ID or for an unverified Google email; 403 if the account is deactivated or the email is already linked to a different Google account. 1 parameteridToken (string, required) Google ID token (JWT) from Google Sign-In, issued for the client ID returned by /google-client.
|
| POST | /api/v1/gtmscoop/auth/otp/request | Request One-Time Code Emails a six-digit sign-in code (valid 5 minutes by default) and returns the resend cooldown and expiry. Answers the same way whether or not the address has an account; inside the cooldown the previous code stays live and retryAfterMs is the time left. 400 for a malformed address or a disposable (throwaway) email domain; 502 if the email could not be sent; 5 requests per address and network per hour (429). 1 parameteremail (string, required) The address to send the code to. Must be a valid email, at most 254 characters.
|
| POST | /api/v1/gtmscoop/auth/otp/verify | Verify One-Time Code Consumes the emailed code and signs in, creating the account on first use. Sets the session cookies and returns the user plus csrfToken. 400 for a disposable (throwaway) email domain; 401 for a wrong or expired code (five wrong tries void it); 403 if the account is deactivated. 2 parametersemail (string, required) The address the code was sent to.code (string, required) The six-digit code from the email (sent as a string).
|
| GET | /api/v1/gtmscoop/auth/me | Get Current User The signed-in account: profile, whether its email is verified, and the current CSRF token for cookie-based calls. Called with an API key, it returns the key owner's account. Try Get Current User in the Playground |
| POST | /api/v1/gtmscoop/auth/accept-subscription-agreement | Accept Subscription Agreement Records that the account accepted the GoLeads Subscription Service Agreement, which the web app asks for before a first purchased-list download. Stored on the account, so it applies on every device; takes no body and is safe to repeat (each call re-stamps subscriptionAgreementAcceptedAt). |
| POST | /api/v1/gtmscoop/auth/refresh-token | Refresh Session Rotates the session using the dnp_refresh_token cookie (scoped to /api/v1/gtmscoop/auth; any body or Authorization header is ignored): sets new access, refresh and CSRF cookies and returns the user plus a new csrfToken. Each refresh token works once, and replaying one that was already rotated signs out every session on the account. 401 if the cookie is missing, expired or revoked, or the account is inactive; Bearer callers can instead pick up the renewed token from the X-New-Access-Token header any authenticated call returns when under 10 minutes remain. |
| POST | /api/v1/gtmscoop/auth/logout | Sign Out Ends the session named by the dnp_refresh_token and dnp_access_token cookies and clears all three session cookies. It reads cookies only (an Authorization header is ignored, so a Bearer-only client should use /logout-all) and always succeeds. |
| POST | /api/v1/gtmscoop/auth/logout-all | Sign Out Everywhere Signs out every session on the account, including the one making the call, clears this client's session cookies, and revokes every API key and connected MCP app (Claude, ChatGPT, Cursor, ...) on the account, so nothing a stolen session created keeps working. revokedKeys is how many were revoked; reconnect apps and create a new key afterwards. If the keys can't be revoked the answer is 500 with code API_KEYS_NOT_REVOKED and data.sessionsRevoked true: every session is still over, and the keys should be revoked under Account: API Keys. |