/api/v1/* endpoints.
How the session cookie works
When you complete the GitHub OAuth flow, Masker sets a cookie on your browser:
The cookie value is an opaque token. On the server it maps to a session record containing your user ID, GitHub login, and last-seen timestamp. You cannot decode or forge it.
Authenticating API requests
Send the cookie value in aCookie request header:
masker_session), then export it as an environment variable:
The OAuth flow
The OAuth handshake is browser-driven. Masker does not expose an API endpoint that lets you complete it headlessly.1
Start the OAuth flow
Navigate to
GET /api/v1/auth/github. Masker redirects your browser to GitHub’s authorization page.2
Approve the GitHub request
GitHub asks you to authorize Masker. Once you approve, GitHub redirects back to Masker.
3
Masker completes the exchange
Masker receives the authorization code at
GET /api/v1/auth/github/callback, exchanges it for a GitHub access token, creates a session, sets the masker_session cookie, and redirects you to /portal.Logging out
204 No Content, clears the cookie, and permanently invalidates the server-side session row. The cookie value cannot be reused after logout.
Identifying the current user
What 401 and 403 mean
- 401
unauthenticated— The request arrived with nomasker_sessioncookie, or with a cookie that has expired or been invalidated. Sign in again to get a fresh session. - 403
forbidden— Your session is valid, but you are not permitted to perform this action. For example, deleting an agent requires admin access; a non-admin user’s request will be rejected with 403.
Webhook endpoints
Two endpoints are called by external systems and therefore cannot use themasker_session cookie:
POST /proxy/{agent_id}/v1/chat/completionsPOST /vapi/webhook/{agent_id}
X-Vapi-Signature header against the MASKER_VAPI_WEBHOOK_SECRET environment variable. Configure the same secret value on both sides — a mismatch returns 401.
Coming soon
Scoped API tokens are targeting the May 30 release. Tokens will be issuable from the portal with explicit scopes (
agents:read, sessions:read, reports:read) and will be the recommended credential for CI and machine-to-machine access. OIDC and mTLS support are on the longer-term roadmap.