{ "openapi": "3.1.0", "info": { "title": "Authula API", "description": "Authula API - An open-source authentication solution that scales with you.", "version": "0.1.0" }, "servers": [{ "url": "http://localhost:8080" }], "paths": { "/api/auth/.well-known/jwks.json": { "get": { "tags": ["JWT Plugin"], "summary": "Get JWKS", "description": "Returns the JSON Web Key Set (JWKS) containing the public keys used to verify JWT signatures.", "operationId": "getJWKS", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WellKnownJWKSResponse" } } } } } } }, "/api/auth/email-password/change-password": { "post": { "tags": ["Email Password Plugin"], "summary": "Change password", "description": "Changes the user's password using a reset token", "operationId": "changePassword", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangePasswordRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangePasswordResponse" } } } } } } }, "/api/auth/email-password/request-email-change": { "post": { "tags": ["Email Password Plugin"], "summary": "Request email change", "description": "Requests to change the authenticated user's email address", "operationId": "requestEmailChange", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestEmailChangeRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangeEmailResponse" } } } } } } }, "/api/auth/email-password/request-password-reset": { "post": { "tags": ["Email Password Plugin"], "summary": "Request password reset", "description": "Requests a password reset link to be sent to the user's email", "operationId": "requestPasswordReset", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestPasswordResetRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangePasswordResponse" } } } } } } }, "/api/auth/email-password/send-email-verification": { "post": { "tags": ["Email Password Plugin"], "summary": "Send email verification", "description": "Sends a verification email to the authenticated user", "operationId": "sendEmailVerification", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendEmailVerificationRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangePasswordResponse" } } } } } } }, "/api/auth/email-password/sign-in": { "post": { "tags": ["Email Password Plugin"], "summary": "Sign in", "description": "Authenticates a user with email and password", "operationId": "signIn", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignInRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignInResponse" } } } } } } }, "/api/auth/email-password/sign-up": { "post": { "tags": ["Email Password Plugin"], "summary": "Register new user", "description": "Registers a new user with email and password", "operationId": "signUp", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignUpRequest" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignUpResponse" } } } } } } }, "/api/auth/email-password/verify-email": { "get": { "tags": ["Email Password Plugin"], "summary": "Verify email", "description": "Verifies an email address or processes a password reset token using a verification token", "operationId": "verifyEmail", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangePasswordResponse" } } } } } } }, "/api/auth/magic-link/exchange": { "post": { "tags": ["Magic Link Plugin"], "summary": "Exchange magic link token for session", "description": "Exchanges a verified magic link token for an authenticated user session.", "operationId": "exchange", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MagicLinkExchangeRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MagicLinkExchangeResponse" } } } } } } }, "/api/auth/magic-link/sign-in": { "post": { "tags": ["Magic Link Plugin"], "summary": "Sign in with magic link", "description": "Sends a magic link to the given email address if an account exists. Optionally creates a new account if sign-up is enabled.", "operationId": "signIn", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MagicLinkSignInRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MagicLinkSignInResponse" } } } } } } }, "/api/auth/magic-link/verify": { "get": { "tags": ["Magic Link Plugin"], "summary": "Verify magic link token", "description": "Verifies a magic link token. If a callback_url is provided and trusted, redirects the user with an exchange token appended. Otherwise returns the exchange token in the JSON response.", "operationId": "verify", "parameters": [ { "name": "token", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "callback_url", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MagicLinkVerifyResponse" } } } } } } }, "/api/auth/oauth2/authorize/{provider}": { "get": { "tags": ["OAuth2 Plugin"], "summary": "Authorize with OAuth2 provider", "description": "Initiates the OAuth2 authorization flow with the specified provider. Returns the provider's authorization URL to redirect the user to.", "operationId": "authorize", "parameters": [ { "name": "redirect_to", "in": "query", "schema": { "type": "string" } }, { "name": "provider", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthorizeResponse" } } } } } } }, "/api/auth/oauth2/callback/{provider}": { "get": { "tags": ["OAuth2 Plugin"], "summary": "OAuth2 callback", "description": "Handles the OAuth2 callback from the provider. Exchanges the authorization code for tokens, creates or links a user account, and returns the authenticated user and session.", "operationId": "callback", "parameters": [ { "name": "code", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "state", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "error", "in": "query", "schema": { "type": "string" } }, { "name": "provider", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallbackResponse" } } } } } } }, "/api/auth/organizations": { "get": { "tags": ["Organizations"], "summary": "List organizations", "description": "Lists all organizations owned by the authenticated user.", "operationId": "listOrganizations", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/Organization" }, "type": ["null", "array"] } } } } } }, "post": { "tags": ["Organizations"], "summary": "Create organization", "description": "Creates a new organization with the authenticated user as the owner.", "operationId": "createOrganization", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateOrganizationRequest" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Organization" } } } } } } }, "/api/auth/organizations/{organization_id}": { "get": { "tags": ["Organizations"], "summary": "Get organization", "description": "Retrieves an organization by its ID.", "operationId": "getOrganization", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Organization" } } } } } }, "delete": { "tags": ["Organizations"], "summary": "Delete organization", "description": "Deletes an organization.", "operationId": "deleteOrganization", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteOrganizationResponse" } } } } } }, "patch": { "tags": ["Organizations"], "summary": "Update organization", "description": "Updates an existing organization.", "operationId": "updateOrganization", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateOrganizationRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Organization" } } } } } } }, "/api/auth/organizations/{organization_id}/invitations": { "get": { "tags": ["Invitations"], "summary": "List invitations", "description": "Lists all invitations for an organization.", "operationId": "listOrganizationInvitations", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/OrganizationInvitation" }, "type": ["null", "array"] } } } } } }, "post": { "tags": ["Invitations"], "summary": "Create invitation", "description": "Creates an invitation for a user to join an organization.", "operationId": "createOrganizationInvitation", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateOrganizationInvitationRequest" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationInvitation" } } } } } } }, "/api/auth/organizations/{organization_id}/invitations/{invitation_id}": { "get": { "tags": ["Invitations"], "summary": "Get invitation", "description": "Retrieves a single invitation by its ID.", "operationId": "getOrganizationInvitation", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "invitation_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationInvitation" } } } } } }, "patch": { "tags": ["Invitations"], "summary": "Revoke invitation", "description": "Revokes a pending invitation.", "operationId": "revokeOrganizationInvitation", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "invitation_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvitationID" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationInvitation" } } } } } } }, "/api/auth/organizations/{organization_id}/invitations/{invitation_id}/accept": { "post": { "tags": ["Invitations"], "summary": "Accept invitation", "description": "Accepts an invitation to join an organization. Optionally redirects if a redirect_url is provided.", "operationId": "acceptOrganizationInvitation", "parameters": [ { "name": "redirect_url", "in": "query", "schema": { "type": "string" } }, { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "invitation_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcceptOrganizationInvitationQuery" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationInvitation" } } } } } } }, "/api/auth/organizations/{organization_id}/invitations/{invitation_id}/reject": { "post": { "tags": ["Invitations"], "summary": "Reject invitation", "description": "Rejects an invitation to join an organization.", "operationId": "rejectOrganizationInvitation", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "invitation_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvitationID" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationInvitation" } } } } } } }, "/api/auth/organizations/{organization_id}/members": { "get": { "tags": ["Members"], "summary": "List members", "description": "Lists all members of an organization with pagination.", "operationId": "listOrganizationMembers", "parameters": [ { "name": "page", "in": "query", "schema": { "type": "integer" } }, { "name": "limit", "in": "query", "schema": { "type": "integer" } }, { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/OrganizationMember" }, "type": ["null", "array"] } } } } } }, "post": { "tags": ["Members"], "summary": "Add member", "description": "Adds a user as a member of an organization with the specified role.", "operationId": "addOrganizationMember", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddOrganizationMemberRequest" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationMember" } } } } } } }, "/api/auth/organizations/{organization_id}/members/{member_id}": { "get": { "tags": ["Members"], "summary": "Get member", "description": "Retrieves a single organization member by ID.", "operationId": "getOrganizationMember", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "member_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationMember" } } } } } }, "delete": { "tags": ["Members"], "summary": "Delete member", "description": "Removes a member from an organization.", "operationId": "deleteOrganizationMember", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "member_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteOrganizationMemberResponse" } } } } } }, "patch": { "tags": ["Members"], "summary": "Update member", "description": "Updates the role of an organization member.", "operationId": "updateOrganizationMember", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "member_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateOrganizationMemberRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationMember" } } } } } } }, "/api/auth/organizations/{organization_id}/teams": { "get": { "tags": ["Teams"], "summary": "List teams", "description": "Lists all teams within an organization.", "operationId": "listOrganizationTeams", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/OrganizationTeam" }, "type": ["null", "array"] } } } } } }, "post": { "tags": ["Teams"], "summary": "Create team", "description": "Creates a new team within an organization.", "operationId": "createOrganizationTeam", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateOrganizationTeamRequest" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationTeam" } } } } } } }, "/api/auth/organizations/{organization_id}/teams/{team_id}": { "get": { "tags": ["Teams"], "summary": "Get team", "description": "Retrieves a single team by its ID.", "operationId": "getOrganizationTeam", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationTeam" } } } } } }, "delete": { "tags": ["Teams"], "summary": "Delete team", "description": "Deletes a team.", "operationId": "deleteOrganizationTeam", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteOrganizationTeamResponse" } } } } } }, "patch": { "tags": ["Teams"], "summary": "Update team", "description": "Updates an existing team.", "operationId": "updateOrganizationTeam", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateOrganizationTeamRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationTeam" } } } } } } }, "/api/auth/organizations/{organization_id}/teams/{team_id}/members": { "get": { "tags": ["Team Members"], "summary": "List team members", "description": "Lists all members of a team with pagination.", "operationId": "listOrganizationTeamMembers", "parameters": [ { "name": "page", "in": "query", "schema": { "type": "integer" } }, { "name": "limit", "in": "query", "schema": { "type": "integer" } }, { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/OrganizationTeamMember" }, "type": ["null", "array"] } } } } } }, "post": { "tags": ["Team Members"], "summary": "Add team member", "description": "Adds a member to a team.", "operationId": "addOrganizationTeamMember", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddOrganizationTeamMemberRequest" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationTeamMember" } } } } } } }, "/api/auth/organizations/{organization_id}/teams/{team_id}/members/{member_id}": { "get": { "tags": ["Team Members"], "summary": "Get team member", "description": "Retrieves a single team member by ID.", "operationId": "getOrganizationTeamMember", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "member_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationTeamMember" } } } } } }, "delete": { "tags": ["Team Members"], "summary": "Delete team member", "description": "Removes a member from a team.", "operationId": "deleteOrganizationTeamMember", "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "member_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteOrganizationTeamMemberResponse" } } } } } } }, "/api/auth/token/refresh": { "post": { "tags": ["JWT Plugin"], "summary": "Refresh JWT token", "description": "Exchanges a valid refresh token for a new access token and refresh token pair.", "operationId": "refreshToken", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefreshTokenRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefreshTokenResponse" } } } } } } }, "/api/auth/totp/disable": { "post": { "tags": ["TOTP Plugin"], "summary": "Disable TOTP", "description": "Disables TOTP two-factor authentication for the authenticated user.", "operationId": "disableTotp", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DisableResponse" } } } } } } }, "/api/auth/totp/enable": { "post": { "tags": ["TOTP Plugin"], "summary": "Enable TOTP", "description": "Enables TOTP two-factor authentication for the authenticated user. Returns the TOTP URI and backup codes.", "operationId": "enableTotp", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnableResponse" } } } } } } }, "/api/auth/totp/generate-backup-codes": { "post": { "tags": ["TOTP Plugin"], "summary": "Generate backup codes", "description": "Generates a new set of backup codes for the authenticated user. Previous backup codes are invalidated.", "operationId": "generateTotpBackupCodes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateBackupCodesResponse" } } } } } } }, "/api/auth/totp/get-uri": { "get": { "tags": ["TOTP Plugin"], "summary": "Get TOTP URI", "description": "Returns the current TOTP URI for the authenticated user's authenticator app configuration.", "operationId": "getTotpURI", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetTOTPURIResponse" } } } } } } }, "/api/auth/totp/verify": { "post": { "tags": ["TOTP Plugin"], "summary": "Verify TOTP code", "description": "Verifies a TOTP code from the authenticator app and completes authentication. Requires a pending TOTP cookie set during sign-in.", "operationId": "verifyTotp", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyTOTPRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyTOTPResponse" } } } } } } }, "/api/auth/totp/verify-backup-code": { "post": { "tags": ["TOTP Plugin"], "summary": "Verify backup code", "description": "Verifies a backup code as an alternative to TOTP verification. Completes authentication if the code is valid.", "operationId": "verifyTotpBackupCode", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyBackupCodeRequest" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyBackupCodeResponse" } } } } } } } }, "components": { "schemas": { "AcceptOrganizationInvitationQuery": { "properties": { "invitation_id": { "type": "string" }, "organization_id": { "type": "string" }, "redirect_url": { "type": ["string", "null"] } }, "required": ["organization_id", "invitation_id"], "type": "object" }, "AddOrganizationMemberRequest": { "properties": { "role": { "type": "string" }, "user_id": { "type": "string" } }, "required": ["user_id", "role"], "type": "object" }, "AddOrganizationTeamMemberRequest": { "properties": { "member_id": { "type": "string" } }, "required": ["member_id"], "type": "object" }, "AuthorizeResponse": { "properties": { "auth_url": { "type": "string" } }, "required": ["auth_url"], "type": "object" }, "CallbackResponse": { "properties": { "session": { "$ref": "#/components/schemas/Session" }, "user": { "$ref": "#/components/schemas/User" } }, "required": ["user", "session"], "type": "object" }, "ChangeEmailResponse": { "properties": { "message": { "type": "string" } }, "required": ["message"], "type": "object" }, "ChangePasswordRequest": { "properties": { "password": { "type": "string" }, "token": { "type": "string" } }, "required": ["token", "password"], "type": "object" }, "ChangePasswordResponse": { "properties": { "message": { "type": "string" } }, "required": ["message"], "type": "object" }, "CreateOrganizationInvitationRequest": { "properties": { "email": { "type": "string" }, "redirect_url": { "type": ["string", "null"] }, "role": { "type": "string" } }, "required": ["email", "role"], "type": "object" }, "CreateOrganizationRequest": { "properties": { "logo": { "type": ["null", "string"] }, "metadata": { "additionalProperties": {}, "type": ["object", "null"] }, "name": { "type": "string" }, "role": { "type": "string" }, "slug": { "type": ["null", "string"] } }, "required": ["name", "role"], "type": "object" }, "CreateOrganizationTeamRequest": { "properties": { "description": { "type": ["null", "string"] }, "metadata": { "additionalProperties": {}, "type": ["object", "null"] }, "name": { "type": "string" }, "slug": { "type": ["null", "string"] } }, "required": ["name"], "type": "object" }, "DeleteOrganizationMemberResponse": { "properties": { "message": { "type": "string" } }, "required": ["message"], "type": "object" }, "DeleteOrganizationResponse": { "properties": { "message": { "type": "string" } }, "required": ["message"], "type": "object" }, "DeleteOrganizationTeamMemberResponse": { "properties": { "message": { "type": "string" } }, "required": ["message"], "type": "object" }, "DeleteOrganizationTeamResponse": { "properties": { "message": { "type": "string" } }, "required": ["message"], "type": "object" }, "DisableResponse": { "properties": { "message": { "type": "string" } }, "required": ["message"], "type": "object" }, "EnableResponse": { "properties": { "backup_codes": { "items": { "type": "string" }, "type": "array" }, "totp_uri": { "type": "string" } }, "required": ["totp_uri", "backup_codes"], "type": "object" }, "GenerateBackupCodesResponse": { "properties": { "backup_codes": { "items": { "type": "string" }, "type": "array" } }, "required": ["backup_codes"], "type": "object" }, "GetTOTPURIResponse": { "properties": { "totp_uri": { "type": "string" } }, "required": ["totp_uri"], "type": "object" }, "InvitationID": { "properties": { "invitation_id": { "type": "string" }, "organization_id": { "type": "string" } }, "required": ["organization_id", "invitation_id"], "type": "object" }, "JWK": { "properties": { "alg": { "type": "string" }, "crv": { "type": "string" }, "e": { "type": "string" }, "kid": { "type": "string" }, "kty": { "type": "string" }, "n": { "type": "string" }, "use": { "type": "string" }, "x": { "type": "string" } }, "required": ["kty"], "type": "object" }, "MagicLinkExchangeRequest": { "properties": { "token": { "type": "string" } }, "required": ["token"], "type": "object" }, "MagicLinkExchangeResponse": { "properties": { "session": { "$ref": "#/components/schemas/Session" }, "user": { "$ref": "#/components/schemas/User" } }, "required": ["user", "session"], "type": "object" }, "MagicLinkSignInRequest": { "properties": { "callback_url": { "type": ["null", "string"] }, "email": { "type": "string" }, "name": { "type": ["null", "string"] } }, "required": ["email"], "type": "object" }, "MagicLinkSignInResponse": { "properties": { "message": { "type": "string" } }, "required": ["message"], "type": "object" }, "MagicLinkVerifyResponse": { "properties": { "message": { "type": "string" }, "token": { "type": "string" } }, "required": ["message"], "type": "object" }, "MemberID": { "properties": { "member_id": { "type": "string" }, "organization_id": { "type": "string" } }, "required": ["organization_id", "member_id"], "type": "object" }, "Organization": { "properties": { "created_at": { "format": "date-time", "type": "string" }, "id": { "type": "string" }, "logo": { "type": ["null", "string"] }, "metadata": { "additionalProperties": {}, "type": ["object", "null"] }, "name": { "type": "string" }, "owner_id": { "type": "string" }, "slug": { "type": "string" }, "updated_at": { "format": "date-time", "type": "string" } }, "required": [ "id", "owner_id", "name", "slug", "created_at", "updated_at" ], "type": "object" }, "OrganizationID": { "properties": { "organization_id": { "type": "string" } }, "required": ["organization_id"], "type": "object" }, "OrganizationInvitation": { "properties": { "created_at": { "format": "date-time", "type": "string" }, "email": { "type": "string" }, "expires_at": { "format": "date-time", "type": "string" }, "id": { "type": "string" }, "inviter_id": { "type": "string" }, "organization_id": { "type": "string" }, "role": { "type": "string" }, "status": { "$ref": "#/components/schemas/OrganizationInvitationStatus" } }, "required": [ "id", "email", "inviter_id", "organization_id", "role", "status", "expires_at", "created_at" ], "type": "object" }, "OrganizationInvitationStatus": { "description": "The type of the invitation status", "enum": ["pending", "accepted", "rejected", "revoked", "expired"], "type": "string" }, "OrganizationMember": { "properties": { "created_at": { "format": "date-time", "type": "string" }, "id": { "type": "string" }, "organization_id": { "type": "string" }, "role": { "type": "string" }, "updated_at": { "format": "date-time", "type": "string" }, "user_id": { "type": "string" } }, "required": [ "id", "organization_id", "user_id", "role", "created_at", "updated_at" ], "type": "object" }, "OrganizationTeam": { "properties": { "created_at": { "format": "date-time", "type": "string" }, "description": { "type": ["null", "string"] }, "id": { "type": "string" }, "metadata": { "additionalProperties": {}, "type": ["object", "null"] }, "name": { "type": "string" }, "organization_id": { "type": "string" }, "slug": { "type": "string" }, "updated_at": { "format": "date-time", "type": "string" } }, "required": [ "id", "organization_id", "name", "slug", "created_at", "updated_at" ], "type": "object" }, "OrganizationTeamMember": { "properties": { "created_at": { "format": "date-time", "type": "string" }, "id": { "type": "string" }, "member_id": { "type": "string" }, "team_id": { "type": "string" } }, "required": ["id", "team_id", "member_id", "created_at"], "type": "object" }, "RefreshTokenRequest": { "properties": { "refresh_token": { "type": "string" } }, "required": ["refresh_token"], "type": "object" }, "RefreshTokenResponse": { "properties": { "access_token": { "type": "string" }, "refresh_token": { "type": "string" } }, "required": ["access_token", "refresh_token"], "type": "object" }, "RequestEmailChangeRequest": { "properties": { "callback_url": { "type": ["null", "string"] }, "new_email": { "type": "string" } }, "required": ["new_email"], "type": "object" }, "RequestPasswordResetRequest": { "properties": { "callback_url": { "type": ["null", "string"] }, "email": { "type": "string" } }, "required": ["email"], "type": "object" }, "SendEmailVerificationRequest": { "properties": { "callback_url": { "type": ["null", "string"] } }, "type": "object" }, "Session": { "properties": { "created_at": { "format": "date-time", "type": "string" }, "expires_at": { "format": "date-time", "type": "string" }, "id": { "type": "string" }, "ip_address": { "type": ["null", "string"] }, "token": { "type": "string" }, "updated_at": { "format": "date-time", "type": "string" }, "user_agent": { "type": ["null", "string"] }, "user_id": { "type": "string" } }, "type": "object" }, "SignInRequest": { "properties": { "callback_url": { "type": ["null", "string"] }, "email": { "type": "string" }, "password": { "type": "string" } }, "required": ["email", "password"], "type": "object" }, "SignInResponse": { "properties": { "session": { "$ref": "#/components/schemas/Session" }, "user": { "$ref": "#/components/schemas/User" } }, "required": ["user", "session"], "type": "object" }, "SignUpRequest": { "properties": { "callback_url": { "type": ["null", "string"] }, "email": { "type": "string" }, "image": { "type": ["null", "string"] }, "metadata": { "additionalProperties": {}, "type": ["object", "null"] }, "name": { "type": "string" }, "password": { "type": "string" } }, "required": ["name", "email", "password"], "type": "object" }, "SignUpResponse": { "properties": { "session": { "$ref": "#/components/schemas/Session" }, "user": { "$ref": "#/components/schemas/User" } }, "required": ["user", "session"], "type": "object" }, "TeamID": { "properties": { "organization_id": { "type": "string" }, "team_id": { "type": "string" } }, "required": ["organization_id", "team_id"], "type": "object" }, "UpdateOrganizationMemberRequest": { "properties": { "role": { "type": "string" } }, "required": ["role"], "type": "object" }, "UpdateOrganizationRequest": { "properties": { "logo": { "type": ["null", "string"] }, "metadata": { "additionalProperties": {}, "type": ["object", "null"] }, "name": { "type": ["null", "string"] }, "slug": { "type": ["null", "string"] } }, "type": "object" }, "UpdateOrganizationTeamRequest": { "properties": { "description": { "type": ["null", "string"] }, "metadata": { "additionalProperties": {}, "type": ["object", "null"] }, "name": { "type": "string" }, "slug": { "type": ["null", "string"] } }, "required": ["name"], "type": "object" }, "User": { "properties": { "created_at": { "format": "date-time", "type": "string" }, "email": { "type": "string" }, "email_verified": { "type": "boolean" }, "id": { "type": "string" }, "image": { "type": ["null", "string"] }, "metadata": { "additionalProperties": {}, "type": ["object", "null"] }, "name": { "type": "string" }, "updated_at": { "format": "date-time", "type": "string" } }, "type": "object" }, "VerifyBackupCodeRequest": { "properties": { "code": { "type": "string" }, "trust_device": { "type": "boolean" } }, "required": ["code"], "type": "object" }, "VerifyBackupCodeResponse": { "properties": { "session": { "$ref": "#/components/schemas/Session" }, "user": { "$ref": "#/components/schemas/User" } }, "required": ["user", "session"], "type": "object" }, "VerifyTOTPRequest": { "properties": { "code": { "type": "string" }, "trust_device": { "type": "boolean" } }, "required": ["code"], "type": "object" }, "VerifyTOTPResponse": { "properties": { "session": { "$ref": "#/components/schemas/Session" }, "user": { "$ref": "#/components/schemas/User" } }, "required": ["user", "session"], "type": "object" }, "WellKnownJWKSResponse": { "properties": { "keys": { "items": { "$ref": "#/components/schemas/JWK" }, "type": "array" } }, "required": ["keys"], "type": "object" } } } }