Start signing in with your organization (SSO) by work email
const url = 'https://api.vexarn.dev/api/sso/sign-in';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"alice@acme.example","callbackURL":"http://localhost:5173/","errorCallbackURL":"http://localhost:5173/settings/sessions","oauthQuery":"example","reauth":true,"addAccount":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.vexarn.dev/api/sso/sign-in \ --header 'Content-Type: application/json' \ --data '{ "email": "alice@acme.example", "callbackURL": "http://localhost:5173/", "errorCallbackURL": "http://localhost:5173/settings/sessions", "oauthQuery": "example", "reauth": true, "addAccount": true }'Finds the organization that verified the email’s domain and its SSO connection, and answers the identity provider’s URL to navigate to; the response sets the cookie the sign-in’s return checks. Refusals at the return land on the web app’s /login?error=<code>: account_deactivated, organization_membership_required, email_domain_not_verified, already_member, account_mismatch (signed in as someone else), reauth_not_performed (reauth was asked and the identity provider did not ask for credentials again) or the identity provider’s own error.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Example
alice@acme.exampleWhere the browser lands after signing in: a URL of the web app.
Example
http://localhost:5173/Where a refused sign-in returns, with ?error=<code>: a URL of the web app. Default: the web app’s /login.
Example
http://localhost:5173/settings/sessionsThe signed query of an MCP client’s authorization that sent you to sign in (the login page’s query). After the identity provider, that authorization continues to the consent page instead of callbackURL.
A fresh sign-in before a sensitive organization change: the identity provider must ask for your credentials again (OpenID Connect prompt=login and max_age=0, SAML ForceAuthn). A response that does not prove it returns to errorCallbackURL with ?error=reauth_not_performed.
Add this account next to the ones already signed in on this browser instead of replacing them (the account switcher, at most 5 accounts).
Responses
Section titled “Responses”Where to send the browser
object
The identity provider’s sign-in page; navigate the browser there. Refusals come back to the web app’s /login?error=<code>.
Example generated
{ "url": "example"}Not an email address, or callbackURL / errorCallbackURL is not on the web app (validation_error); oauthQuery is not a valid signed authorization query (oauth_request_invalid)
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}Not from the web app (forbidden_origin)
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}No organization has verified this domain with an SSO connection (sso_not_configured)
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}addAccount while this browser is already signed in to the most accounts allowed, 5 (too_many_accounts)
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}The body is larger than the API accepts
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}The body is not application/json
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}Too many requests from this user or client address
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}Headers
Section titled “Headers”Seconds until the rate limit window resets