openapi: 3.1.0 info: title: Supabase Auth Admin Organizations API description: The Supabase Auth API (based on GoTrue) is a JWT-based API for managing users and issuing access tokens. It provides endpoints for user signup, signin with email/password, magic links, one-time passwords, OAuth social login, token refresh, user management, multi-factor authentication, and SAML-based single sign-on. When deployed on Supabase, the server requires an apikey header containing a valid Supabase-issued API key. version: 2.0.0 contact: name: Supabase Support url: https://supabase.com/support termsOfService: https://supabase.com/terms servers: - url: https://{project_ref}.supabase.co/auth/v1 description: Supabase Project Auth Server variables: project_ref: description: Your Supabase project reference ID default: your-project-ref security: - apiKeyAuth: [] tags: - name: Organizations description: Manage organizations including membership, billing, and settings. paths: /organizations: get: operationId: listOrganizations summary: List all organizations description: Returns a list of all organizations the authenticated user belongs to. tags: - Organizations responses: '200': description: Successfully retrieved organizations content: application/json: schema: type: array items: $ref: '#/components/schemas/Organization' '401': description: Unauthorized post: operationId: createOrganization summary: Create an organization description: Creates a new organization that can contain Supabase projects and team members. tags: - Organizations requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateOrganizationRequest' responses: '201': description: Organization created successfully content: application/json: schema: $ref: '#/components/schemas/Organization' '400': description: Bad request '401': description: Unauthorized /organizations/{slug}/members: get: operationId: listOrganizationMembers summary: List organization members description: Returns a list of all members in an organization along with their roles and permissions. tags: - Organizations parameters: - $ref: '#/components/parameters/OrganizationSlug' responses: '200': description: Successfully retrieved members content: application/json: schema: type: array items: $ref: '#/components/schemas/OrganizationMember' '401': description: Unauthorized '404': description: Organization not found components: schemas: CreateOrganizationRequest: type: object required: - name properties: name: type: string description: Display name for the organization OrganizationMember: type: object properties: user_id: type: string format: uuid description: User identifier role_name: type: string description: Role assigned to the member enum: - Owner - Administrator - Developer - Read only primary_email: type: string format: email description: Email address of the member username: type: string description: Display name of the member Organization: type: object properties: id: type: string format: uuid description: Unique identifier for the organization name: type: string description: Display name of the organization slug: type: string description: URL-friendly slug billing_email: type: string format: email description: Billing contact email created_at: type: string format: date-time description: Timestamp when the organization was created parameters: OrganizationSlug: name: slug in: path required: true description: The URL-friendly slug identifier for the organization. schema: type: string securitySchemes: apiKeyAuth: type: apiKey in: header name: apikey description: Supabase project API key (anon key for public operations, service_role key for admin operations). bearerAuth: type: http scheme: bearer bearerFormat: JWT description: JWT access token obtained from a successful authentication. externalDocs: description: Supabase Auth Documentation url: https://supabase.com/docs/guides/auth