Endpoints
Core Legation HTTP endpoints.
Core endpoints, relative to the base path of your Legation endpoint. The Legation client calls these for you; use them directly only when you cannot use the client.
Base path
The client builds request URLs from the baseURL you pass it:
- If
baseURLhas no path, for examplehttps://dev-<environment-id>.<region>.<your-id0n-domain>, the client adds the default base path/api/auth. - If
baseURLalready includes a path, the client uses it unchanged.
Paths in the table below are relative to that resolved base. Use your environment endpoint exactly as id0n gives it to you; the base path for hosted environments is confirmed with your endpoint. See Environments.
Core endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /sign-up/email | Sign up with email and password |
| POST | /sign-in/email | Sign in with email and password |
| POST | /sign-in/social | Start social sign-in, or sign in with an ID token |
| POST | /sign-out | Sign out |
| GET, POST | /get-session | Read the current session |
| GET | /list-sessions | List the user's sessions |
| POST | /revoke-session | Revoke one session |
| POST | /revoke-sessions | Revoke all sessions |
| POST | /revoke-other-sessions | Revoke all other sessions |
| POST | /update-session | Update the session |
| POST | /send-verification-email | Send a verification email |
| GET | /verify-email | Verify an email from a link |
| POST | /request-password-reset | Request a password reset email |
| GET | /reset-password/{token} | Open a reset link |
| POST | /reset-password | Set a new password |
| POST | /change-password | Change password |
| POST | /change-email | Change email |
| POST | /update-user | Update the user |
| POST | /verify-password | Check the current password |
| POST | /delete-user | Delete the user |
| GET | /delete-user/callback | Confirm deletion |
| POST | /link-social | Link a social account |
| POST | /unlink-account | Unlink an account |
| GET | /list-accounts | List linked accounts |
| GET | /account-info | Read linked account details |
| POST | /get-access-token | Get a provider access token |
| POST | /refresh-token | Refresh a provider token |
| GET, POST | /callback/{id} | Provider callback |
| GET | /error | Error page |
| GET | /ok | Health check |
Endpoints for optional features, such as organizations or two-factor, are available only when the feature is enabled for your environment.