openapi: 3.2.0 info: title: Supabase Management Functions API description: The Supabase Management API provides programmatic access to manage Supabase projects and organizations. It supports operations for creating, updating, and deleting projects, managing database configurations, retrieving project API keys, controlling organization membership, deploying Edge Functions, managing secrets, configuring custom domains, and monitoring project health. Authentication is handled via personal access tokens or OAuth2 tokens. version: 1.0.0 contact: name: Supabase Support url: https://supabase.com/support termsOfService: https://supabase.com/terms servers: - url: https://api.supabase.com/v1 description: Production Server security: - bearerAuth: [] tags: - name: Functions description: Deploy and manage Edge Functions for serverless compute at the edge. paths: /projects/{ref}/functions: get: operationId: listFunctions summary: List Edge Functions description: Returns a list of all Edge Functions deployed to a project including their status, slug, and creation date. tags: - Functions parameters: - $ref: '#/components/parameters/ProjectRef' responses: '200': description: Successfully retrieved functions content: application/json: schema: type: array items: $ref: '#/components/schemas/EdgeFunction' '401': description: Unauthorized '404': description: Project not found post: operationId: createFunction summary: Create an Edge Function description: Deploys a new Edge Function to the project. The function will be globally distributed and accessible via HTTP requests. tags: - Functions parameters: - $ref: '#/components/parameters/ProjectRef' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateFunctionRequest' responses: '201': description: Function created successfully content: application/json: schema: $ref: '#/components/schemas/EdgeFunction' '400': description: Bad request '401': description: Unauthorized /projects/{ref}/functions/{function_slug}: get: operationId: getFunction summary: Get an Edge Function description: Retrieves details about a specific Edge Function including its slug, status, version, and creation date. tags: - Functions parameters: - $ref: '#/components/parameters/ProjectRef' - $ref: '#/components/parameters/FunctionSlug' responses: '200': description: Successfully retrieved function content: application/json: schema: $ref: '#/components/schemas/EdgeFunction' '401': description: Unauthorized '404': description: Function not found patch: operationId: updateFunction summary: Update an Edge Function description: Updates an existing Edge Function with new code or configuration changes. tags: - Functions parameters: - $ref: '#/components/parameters/ProjectRef' - $ref: '#/components/parameters/FunctionSlug' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateFunctionRequest' responses: '200': description: Function updated successfully content: application/json: schema: $ref: '#/components/schemas/EdgeFunction' '401': description: Unauthorized '404': description: Function not found delete: operationId: deleteFunction summary: Delete an Edge Function description: Permanently removes an Edge Function from the project. tags: - Functions parameters: - $ref: '#/components/parameters/ProjectRef' - $ref: '#/components/parameters/FunctionSlug' responses: '200': description: Function deleted successfully '401': description: Unauthorized '404': description: Function not found components: schemas: EdgeFunction: type: object properties: id: type: string format: uuid description: Unique identifier for the function slug: type: string description: URL-friendly slug for the function name: type: string description: Display name of the function status: type: string description: Deployment status enum: - ACTIVE - REMOVED - THROTTLED version: type: integer description: Current deployment version created_at: type: string format: date-time description: Timestamp when the function was created updated_at: type: string format: date-time description: Timestamp when the function was last updated verify_jwt: type: boolean description: Whether JWT verification is required for invocations CreateFunctionRequest: type: object required: - slug - name - body properties: slug: type: string description: URL-friendly slug for the function name: type: string description: Display name body: type: string description: Function source code verify_jwt: type: boolean description: Whether to require JWT verification default: true UpdateFunctionRequest: type: object properties: body: type: string description: Updated function source code verify_jwt: type: boolean description: Whether to require JWT verification parameters: ProjectRef: name: ref in: path required: true description: The unique reference ID for the project, found in the project settings or URL. schema: type: string FunctionSlug: name: function_slug in: path required: true description: The URL-friendly slug identifier for the Edge Function. schema: type: string securitySchemes: bearerAuth: type: http scheme: bearer description: Personal access token or OAuth2 token for authentication. Generate tokens from the Supabase Dashboard under Account > Access Tokens. externalDocs: description: Supabase Management API Documentation url: https://supabase.com/docs/reference/api/introduction