# Stack Auth Documentation ## Docs - [Sign up anonymously](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/anonymous/sign-up-anonymously.md): Create a new anonymous account with no email - [Create team API key](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/api-keys/create-team-api-key.md): Create a new API key for a user or team - [Create user API key](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/api-keys/create-user-api-key.md): Create a new API key for a user or team - [Get team API key details](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/api-keys/get-team-api-key-details.md): Get details of a specific team API key - [Get user API key details](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/api-keys/get-user-api-key-details.md): Get details of a specific user API key - [List team API keys](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/api-keys/list-team-api-keys.md): List all team API keys for the project with their metadata and status - [List user API keys](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/api-keys/list-user-api-keys.md): List all user API keys for the project with their metadata and status - [Update team API key](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/api-keys/update-team-api-key.md): Update an team API key - [Update user API key](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/api-keys/update-user-api-key.md): Update an user API key - [/api/v1](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/apiv1.md): Returns a human-readable message with some useful information about the API. - [Complete CLI authentication](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/cli-authentication/complete-cli-authentication.md): Inspect, claim, or complete a CLI authentication session - [Initiate CLI authentication](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/cli-authentication/initiate-cli-authentication.md): Create a new CLI authentication session and return polling and login codes - [Poll CLI authentication status](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/cli-authentication/poll-cli-authentication-status.md): Check the status of a CLI authentication session using the polling code - [List connected accounts](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/connected-accounts/list-connected-accounts.md): Retrieves a list of all connected accounts for a user. - [Check email verification code](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/contact-channels/check-email-verification-code.md): Check if an email verification code is valid without using it - [Create a contact channel](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/contact-channels/create-a-contact-channel.md): Add a new contact channel for a user. - [Delete a contact channel](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/contact-channels/delete-a-contact-channel.md): Removes a contact channel for a given user. - [Get a contact channel](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/contact-channels/get-a-contact-channel.md): Retrieves a specific contact channel by the user ID and the contact channel ID. - [List contact channels](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/contact-channels/list-contact-channels.md): Retrieves a list of all contact channels for a user. - [Send contact channel verification code](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/contact-channels/send-contact-channel-verification-code.md): Send a code to the user's contact channel for verifying the contact channel. - [Update a contact channel](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/contact-channels/update-a-contact-channel.md): Updates an existing contact channel. Only the values provided will be updated. - [Verify an email](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/contact-channels/verify-an-email.md): Verify an email address of a user - [List notification preferences](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/emails/list-notification-preferences.md): Get all notification preferences for a user, showing which notification categories are enabled or disabled. - [Update notification preference](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/emails/update-notification-preference.md): Enable or disable a specific notification category for a user. - [Create a preview project](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/internal/create-a-preview-project.md): Creates a new project pre-filled with dummy data for the preview environment. Only available when NEXT_PUBLIC_STACK_IS_PREVIEW=true. - [Create feature request](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/internal/create-feature-request.md): Create a new feature request - [Get feature requests](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/internal/get-feature-requests.md): Fetch all feature requests with upvote status for the current user - [Submit support feedback](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/internal/submit-support-feedback.md): Send a support feedback message to the internal Stack Auth inbox. Auth is optional — works from both the dashboard (authenticated) and the dev tool (unauthenticated). - [Toggle upvote on feature request](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/internal/toggle-upvote-on-feature-request.md): Toggle upvote on a feature request for the current user - [Create cross-domain auth handoff redirect](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/oauth/create-cross-domain-auth-handoff-redirect.md): Creates a one-time OAuth authorization code redirect for cross-domain sign-in handoff using PKCE. - [Delete an OAuth provider](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/oauth/delete-an-oauth-provider.md): Removes an OAuth provider for a given user. - [Get an OAuth provider](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/oauth/get-an-oauth-provider.md): Retrieves a specific OAuth provider by the user ID and the OAuth provider ID. - [List OAuth providers](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/oauth/list-oauth-providers.md): Retrieves a list of all OAuth providers for a user. - [OAuth authorize endpoint](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/oauth/oauth-authorize-endpoint.md): This endpoint is used to initiate the OAuth authorization flow. there are two purposes for this endpoint: 1. Authenticate a user with an OAuth provider. 2. Link an existing user with an OAuth provider. - [OAuth token endpoints](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/oauth/oauth-token-endpoints.md): This endpoint is used to exchange an authorization code or refresh token for an access token. - [Update an OAuth provider](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/oauth/update-an-oauth-provider.md): Updates an existing OAuth provider for a user. - [Create AI conversation](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/others/create-ai-conversation.md): Create a new AI conversation with optional initial messages - [Delete AI conversation](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/others/delete-ai-conversation.md): Delete an AI conversation and all its messages - [Get AI conversation](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/others/get-ai-conversation.md): Fetch a single AI conversation with all its messages - [List AI conversations](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/others/list-ai-conversations.md): List AI conversations for the current user filtered by project - [Replace conversation messages](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/others/replace-conversation-messages.md): Replace all messages in a conversation - [Update AI conversation](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/others/update-ai-conversation.md): Update the title of an AI conversation - [Check sign in code](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/otp/check-sign-in-code.md): Check if a sign in code is valid without using it - [MFA sign in](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/otp/mfa-sign-in.md): Complete multi-factor authorization to sign in, with a TOTP and an MFA attempt code - [Send sign-in code](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/otp/send-sign-in-code.md): Send a code to the user's email address for sign-in. - [Sign in with a code](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/otp/sign-in-with-a-code.md) - [Check reset password code](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/password/check-reset-password-code.md): Check if a reset password code is valid without using it - [Reset password with a code](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/password/reset-password-with-a-code.md): Reset password with a code - [Send reset password code](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/password/send-reset-password-code.md): Send a code to the user's email address for resetting the password. - [Set password](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/password/set-password.md): Set a new password for the current user - [Sign in with email and password](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/password/sign-in-with-email-and-password.md): Sign in to an account with email and password - [Sign up with email and password](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/password/sign-up-with-email-and-password.md): Create a new account with email and password - [Update password](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/password/update-password.md): Update the password of the current user, requires the old password - [Create Purchase Session](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/payments/create-purchase-session.md): Creates a purchase session for completing a purchase. - [Create Purchase URL](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/payments/create-purchase-url.md): Creates a secure checkout URL for purchasing a product. - [Get Item](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/payments/get-item.md): Retrieves information about a specific item (credits, quotas, etc.) for a customer. - [Validate Purchase Code](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/payments/validate-purchase-code.md): Validates a purchase verification code and returns purchase details including available prices. - [List project permissions](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/permissions/list-project-permissions.md): List global permissions of the current user. `user_id=me` must be set for client requests. `(user_id, permission_id)` together uniquely identify a permission. - [List team permissions](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/permissions/list-team-permissions.md): List team permissions of the current user. `user_id=me` must be set for client requests. Note that this might contain the permissions with the same permission ID across different teams. `(team_id, user_id, permission_id)` together uniquely identify a permission. - [Get the current project](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/projects/get-the-current-project.md): Get the current project information including display name, OAuth providers and authentication methods. Useful for displaying the available login options to the user. - [Delete session](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/sessions/delete-session.md): Delete a session by ID. - [List sessions](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/sessions/list-sessions.md): List all sessions for the current user. - [Refresh access token](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/sessions/refresh-access-token.md): Get a new access token using a refresh token - [Sign out of the current session](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/sessions/sign-out-of-the-current-session.md): Sign out of the current session and invalidate the refresh token - [Accept a team invitation by ID](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/teams/accept-a-team-invitation-by-id.md): Accepts a team invitation for the specified user. The user must have a verified email matching the invitation's recipient email. This marks the invitation as used and adds the user to the team. - [Accept the team invitation](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/teams/accept-the-team-invitation.md): Accept invitation and add user to the team - [Check if a team invitation code is valid](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/teams/check-if-a-team-invitation-code-is-valid.md): Check if a team invitation code is valid without using it - [Create a team](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/teams/create-a-team.md): Create a new team and optionally add the current user as a member. - [Delete a team](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/teams/delete-a-team.md): Delete a team. Only allowed if the current user is a member of the team and has the `$delete_team` permission. - [Delete a team invitation](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/teams/delete-a-team-invitation.md) - [Get a team](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/teams/get-a-team.md): Get a team that the current user is a member of. - [Get a team member profile](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/teams/get-a-team-member-profile.md): Get a team member profile. you can always get your own profile by setting `me` as the `user_id` in the path parameters on the client. If you want to get someone else's profile in a team, you need to have the `$read_members` permission in that team. - [Get team invitation details](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/teams/get-team-invitation-details.md): Get additional information about a team invitation code - [List team invitations](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/teams/list-team-invitations.md) - [List team members profiles](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/teams/list-team-members-profiles.md): List team members profiles. You always need to specify a `team_id` that your are a member of on the client. You can always filter for your own profile by setting `me` as the `user_id` in the path parameters. If you want list all the profiles in a team, you need to have the `$read_members` permission… - [List teams](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/teams/list-teams.md): List all the teams that the current user is a member of. `user_id=me` must be passed in the query parameters. - [Remove a user from a team](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/teams/remove-a-user-from-a-team.md): All the users are allowed to remove themselves from a team (`user_id=me`). Only the users who have the `$remove_members` permission are allowed to remove other users from a team. `team_id` is must an ID of a team that the user is a member of. - [Send an email to invite a user to a team](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/teams/send-an-email-to-invite-a-user-to-a-team.md): The user receiving this email can join the team by clicking on the link in the email. If the user does not have an account yet, they will be prompted to create one. - [Update a team](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/teams/update-a-team.md): Update the team information. Only allowed if the current user is a member of the team and has the `$update_team` permission. - [Update your team member profile](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/teams/update-your-team-member-profile.md): Update your own team member profile. `user_id` must be `me` in the path parameters on the client. - [Delete current user](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/users/delete-current-user.md): Deletes the currently authenticated user. Use this with caution. - [Get current user](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/users/get-current-user.md): Gets the currently authenticated user. - [Update current user](https://stackauth-e0affa27-apps-support.mintlify.app/api/client/users/update-current-user.md): Updates the currently authenticated user. Only the values provided will be updated. - [Overview](https://stackauth-e0affa27-apps-support.mintlify.app/api/overview.md): Complete REST API documentation for Stack Auth - [Sign up anonymously](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/anonymous/sign-up-anonymously.md): Create a new anonymous account with no email - [Check team API key validity](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/api-keys/check-team-api-key-validity.md): Validate a team API key - [Check user API key validity](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/api-keys/check-user-api-key-validity.md): Validate a user API key - [Create team API key](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/api-keys/create-team-api-key.md): Create a new API key for a user or team - [Create user API key](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/api-keys/create-user-api-key.md): Create a new API key for a user or team - [Get team API key details](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/api-keys/get-team-api-key-details.md): Get details of a specific team API key - [Get user API key details](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/api-keys/get-user-api-key-details.md): Get details of a specific user API key - [List team API keys](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/api-keys/list-team-api-keys.md): List all team API keys for the project with their metadata and status - [List user API keys](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/api-keys/list-user-api-keys.md): List all user API keys for the project with their metadata and status - [Update team API key](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/api-keys/update-team-api-key.md): Update an team API key - [Update user API key](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/api-keys/update-user-api-key.md): Update an user API key - [/api/v1](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/apiv1.md): Returns a human-readable message with some useful information about the API. - [Complete CLI authentication](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/cli-authentication/complete-cli-authentication.md): Inspect, claim, or complete a CLI authentication session - [Initiate CLI authentication](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/cli-authentication/initiate-cli-authentication.md): Create a new CLI authentication session and return polling and login codes - [Poll CLI authentication status](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/cli-authentication/poll-cli-authentication-status.md): Check the status of a CLI authentication session using the polling code - [List connected accounts](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/connected-accounts/list-connected-accounts.md): Retrieves a list of all connected accounts for a user. - [Check email verification code](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/contact-channels/check-email-verification-code.md): Check if an email verification code is valid without using it - [Create a contact channel](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/contact-channels/create-a-contact-channel.md): Add a new contact channel for a user. - [Delete a contact channel](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/contact-channels/delete-a-contact-channel.md): Removes a contact channel for a given user. - [Get a contact channel](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/contact-channels/get-a-contact-channel.md): Retrieves a specific contact channel by the user ID and the contact channel ID. - [List contact channels](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/contact-channels/list-contact-channels.md): Retrieves a list of all contact channels for a user. - [Send contact channel verification code](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/contact-channels/send-contact-channel-verification-code.md): Send a code to the user's contact channel for verifying the contact channel. - [Update a contact channel](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/contact-channels/update-a-contact-channel.md): Updates an existing contact channel. Only the values provided will be updated. - [Verify an email](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/contact-channels/verify-an-email.md): Verify an email address of a user - [Retrieve encrypted value from data vault](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/datavault/retrieve-encrypted-value-from-data-vault.md): Retrieves and decrypts a value from the data vault using a hashed key - [Store encrypted value in data vault](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/datavault/store-encrypted-value-in-data-vault.md): Stores a hashed key and encrypted value in the data vault for a specific store - [Activate email capacity boost](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/emails/activate-email-capacity-boost.md): Temporarily increases email capacity by 4x for 4 hours. - [Get email delivery info](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/emails/get-email-delivery-info.md): Returns delivery statistics and capacity information for the current tenancy. - [Get email outbox entry](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/emails/get-email-outbox-entry.md): Gets a single email from the outbox by ID. - [List email outbox](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/emails/list-email-outbox.md): Lists all emails in the outbox with optional filtering by status or simple_status. - [List notification preferences](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/emails/list-notification-preferences.md): Get all notification preferences for a user, showing which notification categories are enabled or disabled. - [Send email](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/emails/send-email.md): Send an email to a list of users. The content field should contain either {html} for HTML emails, {template_id, variables} for template-based emails, or {draft_id} for a draft email. - [Update email outbox entry](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/emails/update-email-outbox-entry.md): Updates an email in the outbox. Can be used to edit email content, pause/resume, or cancel emails. Only emails in editable states (`paused`, `preparing`, `rendering`, `render-error`, `scheduled`, `queued`, `server-error`) can be modified. - [Update notification preference](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/emails/update-notification-preference.md): Enable or disable a specific notification category for a user. - [Create a preview project](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/internal/create-a-preview-project.md): Creates a new project pre-filled with dummy data for the preview environment. Only available when NEXT_PUBLIC_STACK_IS_PREVIEW=true. - [Create feature request](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/internal/create-feature-request.md): Create a new feature request - [Get feature requests](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/internal/get-feature-requests.md): Fetch all feature requests with upvote status for the current user - [Submit support feedback](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/internal/submit-support-feedback.md): Send a support feedback message to the internal Stack Auth inbox. Auth is optional — works from both the dashboard (authenticated) and the dev tool (unauthenticated). - [Toggle upvote on feature request](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/internal/toggle-upvote-on-feature-request.md): Toggle upvote on a feature request for the current user - [Create an OAuth provider](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/oauth/create-an-oauth-provider.md): Add a new OAuth provider for a user. - [Create cross-domain auth handoff redirect](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/oauth/create-cross-domain-auth-handoff-redirect.md): Creates a one-time OAuth authorization code redirect for cross-domain sign-in handoff using PKCE. - [Delete an OAuth provider](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/oauth/delete-an-oauth-provider.md): Removes an OAuth provider for a given user. - [Get an OAuth provider](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/oauth/get-an-oauth-provider.md): Retrieves a specific OAuth provider by the user ID and the OAuth provider ID. - [List OAuth providers](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/oauth/list-oauth-providers.md): Retrieves a list of all OAuth providers for a user. - [OAuth authorize endpoint](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/oauth/oauth-authorize-endpoint.md): This endpoint is used to initiate the OAuth authorization flow. there are two purposes for this endpoint: 1. Authenticate a user with an OAuth provider. 2. Link an existing user with an OAuth provider. - [OAuth token endpoints](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/oauth/oauth-token-endpoints.md): This endpoint is used to exchange an authorization code or refresh token for an access token. - [Update an OAuth provider](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/oauth/update-an-oauth-provider.md): Updates an existing OAuth provider. Only the values provided will be updated. - [Create AI conversation](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/others/create-ai-conversation.md): Create a new AI conversation with optional initial messages - [Delete AI conversation](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/others/delete-ai-conversation.md): Delete an AI conversation and all its messages - [Get AI conversation](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/others/get-ai-conversation.md): Fetch a single AI conversation with all its messages - [List AI conversations](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/others/list-ai-conversations.md): List AI conversations for the current user filtered by project - [Replace conversation messages](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/others/replace-conversation-messages.md): Replace all messages in a conversation - [Update AI conversation](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/others/update-ai-conversation.md): Update the title of an AI conversation - [Check sign in code](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/otp/check-sign-in-code.md): Check if a sign in code is valid without using it - [MFA sign in](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/otp/mfa-sign-in.md): Complete multi-factor authorization to sign in, with a TOTP and an MFA attempt code - [Send sign-in code](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/otp/send-sign-in-code.md): Send a code to the user's email address for sign-in. - [Sign in with a code](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/otp/sign-in-with-a-code.md) - [Check reset password code](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/password/check-reset-password-code.md): Check if a reset password code is valid without using it - [Reset password with a code](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/password/reset-password-with-a-code.md): Reset password with a code - [Send reset password code](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/password/send-reset-password-code.md): Send a code to the user's email address for resetting the password. - [Set password](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/password/set-password.md): Set a new password for the current user - [Sign in with email and password](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/password/sign-in-with-email-and-password.md): Sign in to an account with email and password - [Sign up with email and password](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/password/sign-up-with-email-and-password.md): Create a new account with email and password - [Update password](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/password/update-password.md): Update the password of the current user, requires the old password - [Create Purchase Session](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/payments/create-purchase-session.md): Creates a purchase session for completing a purchase. - [Create Purchase URL](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/payments/create-purchase-url.md): Creates a secure checkout URL for purchasing a product. - [Get Item](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/payments/get-item.md): Retrieves information about a specific item (credits, quotas, etc.) for a customer. - [Update Item Quantity](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/payments/update-item-quantity.md): Updates the quantity of an item for a customer. Can increase or decrease quantities, with optional expiration and negative balance control. - [Validate Purchase Code](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/payments/validate-purchase-code.md): Validates a purchase verification code and returns purchase details including available prices. - [Grant a global permission to a user](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/permissions/grant-a-global-permission-to-a-user.md): Grant a global permission to a user (the permission must be created first on the Stack dashboard) - [Grant a team permission to a user](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/permissions/grant-a-team-permission-to-a-user.md): Grant a team permission to a user (the team permission must be created first on the Stack dashboard) - [List project permissions](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/permissions/list-project-permissions.md): Query and filter the permission with `user_id` and `permission_id`. `(user_id, permission_id)` together uniquely identify a permission. - [List team permissions of a user](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/permissions/list-team-permissions-of-a-user.md): Query and filter the permission with `team_id`, `user_id`, and `permission_id`. Note that this might contain the permissions with the same permission ID across different teams and users. `(team_id, user_id, permission_id)` together uniquely identify a permission. - [Revoke a global permission from a user](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/permissions/revoke-a-global-permission-from-a-user.md): Revoke a global permission from a user - [Revoke a team permission from a user](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/permissions/revoke-a-team-permission-from-a-user.md): Revoke a team permission from a user - [Get the current project](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/projects/get-the-current-project.md): Get the current project information including display name, OAuth providers and authentication methods. Useful for displaying the available login options to the user. - [Create session](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/sessions/create-session.md): Create a new session for a given user. This will return a refresh token that can be used to impersonate the user. - [Delete session](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/sessions/delete-session.md): Delete a session by ID. - [List sessions](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/sessions/list-sessions.md): List all sessions for the current user. - [Refresh access token](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/sessions/refresh-access-token.md): Get a new access token using a refresh token - [Sign out of the current session](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/sessions/sign-out-of-the-current-session.md): Sign out of the current session and invalidate the refresh token - [Accept a team invitation by ID](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/teams/accept-a-team-invitation-by-id.md): Accepts a team invitation for the specified user. The user must have a verified email matching the invitation's recipient email. This marks the invitation as used and adds the user to the team. - [Accept the team invitation](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/teams/accept-the-team-invitation.md): Accept invitation and add user to the team - [Add a user to a team](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/teams/add-a-user-to-a-team.md) - [Check if a team invitation code is valid](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/teams/check-if-a-team-invitation-code-is-valid.md): Check if a team invitation code is valid without using it - [Create a team](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/teams/create-a-team.md): Create a new team and optionally add the current user as a member. - [Delete a team](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/teams/delete-a-team.md): Delete a team by ID. - [Delete a team invitation](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/teams/delete-a-team-invitation.md) - [Get a team](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/teams/get-a-team.md): Get a team by ID. - [Get a team member profile](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/teams/get-a-team-member-profile.md): Get a team member profile by user ID - [Get team invitation details](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/teams/get-team-invitation-details.md): Get additional information about a team invitation code - [List team invitations](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/teams/list-team-invitations.md) - [List team members profiles](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/teams/list-team-members-profiles.md): List team members profiles and filter by team ID and user ID - [List teams](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/teams/list-teams.md): List all the teams in the project. - [Remove a user from a team](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/teams/remove-a-user-from-a-team.md) - [Send an email to invite a user to a team](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/teams/send-an-email-to-invite-a-user-to-a-team.md): The user receiving this email can join the team by clicking on the link in the email. If the user does not have an account yet, they will be prompted to create one. - [Update a team](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/teams/update-a-team.md): Update the team information by ID. - [Update a team member profile](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/teams/update-a-team-member-profile.md): Update a team member profile by user ID - [Create user](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/users/create-user.md): Creates a new user. E-mail authentication is always enabled, and no password is set, meaning the only way to authenticate the newly created user is through magic link. - [Delete current user](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/users/delete-current-user.md): Deletes the currently authenticated user. Use this with caution. - [Delete user](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/users/delete-user.md): Deletes a user. Use this with caution. - [Get current user](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/users/get-current-user.md): Gets the currently authenticated user. - [Get user](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/users/get-user.md): Gets a user by user ID. - [List users](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/users/list-users.md): Lists all the users in the project. By default, only fully onboarded users are returned. Restricted users (those who haven't completed onboarding requirements like email verification) are included if `include_restricted` is set to `true`. Anonymous users are included if `include_anonymous` is set to… - [Update current user](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/users/update-current-user.md): Updates the currently authenticated user. Only the values provided will be updated. - [Update user](https://stackauth-e0affa27-apps-support.mintlify.app/api/server/users/update-user.md): Updates a user. Only the values provided will be updated. - [Team membershipcreated](https://stackauth-e0affa27-apps-support.mintlify.app/api/webhooks/teams/team_membershipcreated.md): This event is triggered when a user is added to a team. - [Team membershipdeleted](https://stackauth-e0affa27-apps-support.mintlify.app/api/webhooks/teams/team_membershipdeleted.md): This event is triggered when a user is removed from a team. - [Team permissioncreated](https://stackauth-e0affa27-apps-support.mintlify.app/api/webhooks/teams/team_permissioncreated.md): This event is triggered when a team permission is created. - [Team permissiondeleted](https://stackauth-e0affa27-apps-support.mintlify.app/api/webhooks/teams/team_permissiondeleted.md): This event is triggered when a team permission is deleted. - [Teamcreated](https://stackauth-e0affa27-apps-support.mintlify.app/api/webhooks/teams/teamcreated.md): This event is triggered when a team is created. - [Teamdeleted](https://stackauth-e0affa27-apps-support.mintlify.app/api/webhooks/teams/teamdeleted.md): This event is triggered when a team is deleted. - [Teamupdated](https://stackauth-e0affa27-apps-support.mintlify.app/api/webhooks/teams/teamupdated.md): This event is triggered when a team is updated. - [Usercreated](https://stackauth-e0affa27-apps-support.mintlify.app/api/webhooks/users/usercreated.md): This event is triggered when a user is created. - [Userdeleted](https://stackauth-e0affa27-apps-support.mintlify.app/api/webhooks/users/userdeleted.md): This event is triggered when a user is deleted. - [Userupdated](https://stackauth-e0affa27-apps-support.mintlify.app/api/webhooks/users/userupdated.md): This event is triggered when a user is updated. - [Analytics](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/analytics/overview.md): Explore events, session replays, and SQL queries in your project's analytics dataset - [API Keys](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/api-keys/overview.md): Create and manage API keys for users and teams - [All Auth Providers](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/auth-providers.md): Configure authentication providers for your application - [Apple](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/auth-providers/apple.md): Set up Apple as an authentication provider with Stack Auth - [Bitbucket](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/auth-providers/bitbucket.md): Set up Bitbucket as an authentication provider with Stack Auth - [Discord](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/auth-providers/discord.md): Set up Discord as an authentication provider with Stack Auth - [Facebook](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/auth-providers/facebook.md): Set up Facebook as an authentication provider with Stack Auth - [GitHub](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/auth-providers/github.md): Set up GitHub as an authentication provider with Stack Auth - [GitLab](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/auth-providers/gitlab.md): Set up GitLab as an authentication provider with Stack Auth - [Google](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/auth-providers/google.md): Set up Google as an authentication provider with Stack Auth - [LinkedIn](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/auth-providers/linkedin.md): Set up LinkedIn as an authentication provider with Stack Auth - [Microsoft](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/auth-providers/microsoft.md): Set up Microsoft as an authentication provider with Stack Auth - [Passkey](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/auth-providers/passkey.md): Set up passkey authentication with Stack Auth using WebAuthn - [Spotify](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/auth-providers/spotify.md): Set up Spotify as an authentication provider with Stack Auth - [Twitch](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/auth-providers/twitch.md): Set up Twitch as an authentication provider with Stack Auth - [Two-Factor Authentication (2FA)](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/auth-providers/two-factor-auth.md): Learn how Two-Factor Authentication works with Stack Auth - [X (Twitter)](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/auth-providers/x-twitter.md): Set up X (Twitter) as an authentication provider with Stack Auth - [CLI Authentication](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/cli-authentication.md): How to authenticate a command line application using Stack Auth - [Connected Accounts](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/connected-accounts.md): Managing third-party OAuth access tokens - [JWT Tokens](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/jwts.md): Understand how Stack Auth uses JSON Web Tokens for authentication - [Authentication](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/overview.md): Integrate Stack Auth with AI-powered tools and services - [Sign-up Rules](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/sign-up-rules.md): Control who can sign up for your application with customizable rules. - [User Onboarding](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/authentication/user-onboarding.md): Implementing a user onboarding page and collecting information on sign-up - [Data Vault](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/data-vault/overview.md): An encrypted key-value store for sensitive data, with zero-knowledge security - [Emails](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/emails/overview.md): Send custom emails, manage templates, and track delivery - all from Stack Auth. - [Fraud Protection](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/fraud-protection/overview.md): Protect your project from fraud and abuse - [Launch Checklist](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/launch-checklist/overview.md): Steps to prepare Stack for production use - [Payments](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/payments/overview.md): Accept payments and manage billing with Stack Auth's Stripe integration - [RBAC Permissions](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/rbac/overview.md): Control what each user can do and access within your application - [Teams](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/teams/overview.md): Manage teams and team members - [Team Selection](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/teams/team-selection.md) - [Webhooks](https://stackauth-e0affa27-apps-support.mintlify.app/guides/apps/webhooks/overview.md): Receive real-time updates when events occur in your Stack project - [FAQ](https://stackauth-e0affa27-apps-support.mintlify.app/guides/faq.md): Frequently asked questions about Stack - [Using Stack Auth with AI](https://stackauth-e0affa27-apps-support.mintlify.app/guides/getting-started/ai-integration.md): Integrate Stack Auth with AI-powered tools and services - [Setup](https://stackauth-e0affa27-apps-support.mintlify.app/guides/getting-started/setup.md): Install and configure Stack Auth for your project - [User Fundamentals](https://stackauth-e0affa27-apps-support.mintlify.app/guides/getting-started/user-fundamentals.md): Access and manage user information within custom components - [Integrating with Backends](https://stackauth-e0affa27-apps-support.mintlify.app/guides/going-further/backend-integration.md): Integrate Stack Auth with your own server with the REST APIs - [Local Development](https://stackauth-e0affa27-apps-support.mintlify.app/guides/going-further/local-development.md): Set up and run Stack Auth locally for development and testing - [Stack App](https://stackauth-e0affa27-apps-support.mintlify.app/guides/going-further/stack-app.md): The most important object of your Stack project - [User Metadata](https://stackauth-e0affa27-apps-support.mintlify.app/guides/going-further/user-metadata.md): How to store custom user metadata in Stack Auth - [Convex](https://stackauth-e0affa27-apps-support.mintlify.app/guides/integrations/convex/overview.md): Integrate Stack Auth with Convex - [Supabase](https://stackauth-e0affa27-apps-support.mintlify.app/guides/integrations/supabase/overview.md): Integrate Stack Auth with Supabase RLS - [Vercel](https://stackauth-e0affa27-apps-support.mintlify.app/guides/integrations/vercel/overview.md): Deploy your Stack Auth project on Vercel with the dashboard integration flow. - [MCP Setup](https://stackauth-e0affa27-apps-support.mintlify.app/guides/other/mcp-setup.md): Set up Stack Auth's Model Context Protocol (MCP) server for intelligent code assistance in your development environment. - [Self-host](https://stackauth-e0affa27-apps-support.mintlify.app/guides/other/self-host.md): Deploy Stack Auth on your own infrastructure with full control over your authentication system. - [Showcase](https://stackauth-e0affa27-apps-support.mintlify.app/guides/other/showcase.md): See what others have built with Stack Auth - [Build a SaaS with Stack Auth](https://stackauth-e0affa27-apps-support.mintlify.app/guides/other/tutorials/build-a-saas-with-stack-auth.md): Bootstrap auth, resolve the signed-in user, protect your app, and ship-with optional pointers to teams, RBAC, and billing. - [Build a Team-Based App](https://stackauth-e0affa27-apps-support.mintlify.app/guides/other/tutorials/build-a-team-based-app.md): Model B2B tenants as teams, wire team selection and deep links, enforce RBAC on the server, and grow membership with invitations. - [Ship Production-Ready Auth](https://stackauth-e0affa27-apps-support.mintlify.app/guides/other/tutorials/ship-production-ready-auth.md): Lock down page and API access, handle secrets and environments, then align domains, OAuth, email, webhooks, and dashboard production mode with Stack Auth. - [Welcome](https://stackauth-e0affa27-apps-support.mintlify.app/index.md): Stack Auth documentation for setup, components, SDK usage, and REST APIs. - [useStackApp](https://stackauth-e0affa27-apps-support.mintlify.app/sdk/hooks/use-stack-app.md): React hook to retrieve the StackClientApp instance from the StackProvider. - [useUser](https://stackauth-e0affa27-apps-support.mintlify.app/sdk/hooks/use-user.md): React hook to access the current authenticated user. - [StackApp](https://stackauth-e0affa27-apps-support.mintlify.app/sdk/objects/stack-app.md): Reference documentation for StackClientApp and StackServerApp objects. - [SDK Overview](https://stackauth-e0affa27-apps-support.mintlify.app/sdk/overview.md): The SDK reference for Stack Auth's Next.js SDK. - [ApiKey](https://stackauth-e0affa27-apps-support.mintlify.app/sdk/types/api-key.md): Reference for the ApiKey type for programmatic backend access. - [ConnectedAccount](https://stackauth-e0affa27-apps-support.mintlify.app/sdk/types/connected-account.md): Reference for ConnectedAccount types for OAuth connections. - [ContactChannel](https://stackauth-e0affa27-apps-support.mintlify.app/sdk/types/contact-channel.md): Reference for ContactChannel and ServerContactChannel types for user contact information. - [Customer](https://stackauth-e0affa27-apps-support.mintlify.app/sdk/types/customer.md): Reference for the Customer interface providing payment and item management capabilities. - [SendEmailOptions](https://stackauth-e0affa27-apps-support.mintlify.app/sdk/types/email.md): Reference for the SendEmailOptions type used with the sendEmail method. - [Item](https://stackauth-e0affa27-apps-support.mintlify.app/sdk/types/item.md): Reference for Item and ServerItem types for managing quantifiable resources. - [Project](https://stackauth-e0affa27-apps-support.mintlify.app/sdk/types/project.md): Reference for the Project type representing project configuration. - [Team](https://stackauth-e0affa27-apps-support.mintlify.app/sdk/types/team.md): Reference for Team and ServerTeam types for team management. - [TeamPermission](https://stackauth-e0affa27-apps-support.mintlify.app/sdk/types/team-permission.md): Reference for the TeamPermission type representing permissions within a team. - [TeamMemberProfile](https://stackauth-e0affa27-apps-support.mintlify.app/sdk/types/team-profile.md): Reference for TeamMemberProfile and ServerTeamMemberProfile types for team-specific user profiles. - [TeamUser](https://stackauth-e0affa27-apps-support.mintlify.app/sdk/types/team-user.md): Reference for TeamUser and ServerTeamUser types representing team members. - [User](https://stackauth-e0affa27-apps-support.mintlify.app/sdk/types/user.md): Reference for CurrentUser, ServerUser, and CurrentServerUser types. ## OpenAPI Specs - [webhooks](https://stackauth-e0affa27-apps-support.mintlify.app/openapi/webhooks.json) - [server](https://stackauth-e0affa27-apps-support.mintlify.app/openapi/server.json) - [client](https://stackauth-e0affa27-apps-support.mintlify.app/openapi/client.json) - [admin](https://stackauth-e0affa27-apps-support.mintlify.app/openapi/admin.json)