Supabase LogoDOCS
  • HomeHome
  • Getting StartedGetting Started
  • DatabaseDatabase
  • Serverless APIsServerless APIs
  • AuthAuth
  • Edge FunctionsEdge Functions
  • RealtimeRealtime
  • StorageStorage
  • PlatformPlatform
  • ResourcesResources
  • Self-HostingSelf-Hosting
  • IntegrationsIntegrations
  • Client Library Reference
  • JavaScriptJavaScript
  • FlutterFlutter
  • PythonPythonCommunity
  • C#C#Community
  • Tools
  • Management APIManagement API
  • Supabase CLISupabase CLI
    Back to Home
    getting-startedGetting Started
  • Features
  • Architecture
  • Local Development
  • Framework Quickstarts
  • React
  • NextJS
  • Flutter
  • SvelteKit
  • SolidJS
  • Vue
  • Web app tutorials
  • NextJS
  • React
  • Vue 3
  • Nuxt 3
  • Angular
  • RedwoodJS
  • SolidJS
  • Svelte
  • SvelteKit
  • Mobile tutorials
  • Flutter
  • Expo
  • Ionic React
  • Ionic Vue
  • Ionic Angular
    Back to Home
    databaseDatabase
  • Database Connections
  • Tables and Data
  • Database Functions
  • Database Webhooks
  • Full Text Search
  • Database Testing
  • Extensions
  • Overview
  • HypoPG: Hypothetical indexes
  • plv8: Javascript Language
  • http: RESTful Client
  • PGAudit: Postgres Auditing
  • pgjwt: JSON Web Tokens
  • PGroonga: Multilingual Full Text Search
  • pgRouting: Geospatial Routing
  • pg_cron: Job Scheduling
  • pg_graphql: GraphQL Support
  • pg_hashids: Short UIDs
  • pg_jsonschema: JSON Schema Validation
  • pg_net: Async Networking
  • pg_plan_filter: Restrict Total Cost
  • pg_stat_monitor: Extended Query Performance Monitoring
  • pgvector: Embeddings and vector similarity
  • pg_stat_statements: SQL Planning and Execution Statistics
  • pg_repack: Storage Optimization
  • PostGIS: Geo queries
  • pg-safeupdate: Required Where Clauses
  • pgsodium: Encryption Features
  • pgTAP: Unit Testing
  • plpgsql_check: PL/pgSQL Linter
  • timescaledb: Time-series data
  • uuid-ossp: Unique Identifiers
  • RUM: inverted index for full-text search
  • wrappers: 3rd Party Integrations
  • Postgres resources
  • Managing Indexes
  • Drop All Tables in Schema
  • Select First Row per Group
  • Print PostgreSQL Version
  • Configuration
  • Timeouts
  • Replication
  • Passwords
  • Timezones
    Back to Home
    referenceServerless APIs
  • Overview
  • Quickstart
  • Guides
  • Creating API routes
  • How API Keys work
  • Securing your API
  • Querying joins and nested tables
  • REST & REALTIME
  • Auto-generated Docs
  • Client Libraries
  • Generating Types
  • GRAPHQL
  • GraphiQL Documentation
    Back to Home
    authAuth
  • Overview
  • Quickstarts
  • Auth with React
  • Authentication
  • Email Login
  • Magic Link Login
  • Phone Login
  • Social Login
  • Enterprise SSO
  • Email Templates
  • Authorization
  • Enable Captcha Protection
  • Managing User Data
  • Multi-Factor Authentication
  • Row Level Security
  • Server-side Rendering
  • Auth Helpers
  • Overview
  • Auth UI
  • Next.js (pages)
  • Next.js (app)
  • Remix
  • SvelteKit
  • Deep Dive
  • Part One: JWTs
  • Part Two: Row Level Security
  • Part Three: Policies
  • Part Four: GoTrue
  • Part Five: Google OAuth
    Back to Home
    functionsEdge Functions
  • Overview
  • Quickstart
  • Features
  • TypeScript Support
  • Debugging Edge Functions
  • Managing packages using Import Maps
  • Globally Distributed Deployments
  • Guides
  • Developing Functions locally
  • Deploying with Git
  • Managing Secrets and Environment Variables
  • Integrating With Supabase Auth
  • Integrating with Supabase Storage
  • CORS support for Invoking from the browser
  • Scheduling Functions
  • Connecting directly to Postgres
  • Examples
  • Generating OpenAI GPT3 completions
  • Generating OG images
  • CAPTCHA support with Cloudflare Turnstile
  • Building a Discord Bot
  • Building a Telegram Bot
  • Handling Stripe Webhooks
  • Integrating with Upstash Redis
  • Rate Limiting Edge Functions
  • Taking Screenshots with Puppeteer
    Back to Home
    realtimeRealtime
  • Overview
  • Quickstart
  • Features
  • Channels
  • Extensions
  • Broadcast
  • Presence
  • Postgres Changes
  • Guides
  • Subscribing to Database Changes
  • Bring Your Own Database
  • Using Realtime with Next.js
  • Deep dive
  • Rate Limits
  • Architecture
  • Protocol
    Back to Home
    storageStorage
  • Overview
  • Quickstart
  • Access Control
  • CDN
  • Image Transformations
    Back to Home
    reference-cliSupabase CLI
  • Overview
  • Local Development
  • Managing Environments
  • Reference
  • Commands
  • Configuration
    Back to Home
    platformPlatform
    Add-ons
  • Compute Add-ons
  • Custom Domains
  • Database Backups
  • Platform Management
  • Access Control
  • Database Size
  • HTTP Status Codes
  • Logging
  • Metrics
  • Migrating and Upgrading
  • Network Restrictions
  • Performance Tuning
  • Permissions
  • SSL Enforcement
  • Billing
  • Spend cap
  • Single sign-on
  • Enable SSO for your organization
  • SSO with Azure AD
  • SSO with Google Workspace
  • SSO with Okta
  • Go-live Checklist
  • Production Readiness
  • Troubleshooting
  • HTTP and Project Issues
    Back to Home
    resourcesResources
  • Examples
  • Glossary
  • Migrate to Supabase
  • Firebase Auth
  • Firestore Data
  • Firebase Storage
  • Heroku
  • Render
    Back to Home
    resourcesSelf-Hosting
  • Overview
  • Self-Hosting with Docker
  • Auth Server
  • Reference
  • Configuration
  • Storage Server
  • Reference
  • Configuration
  • Realtime Server
  • Reference
  • Configuration
  • Analytics Server
  • Reference
  • Configuration
    Back to Home
    integrationsIntegrations
  • Overview
  • Auth
  • Auth0
  • Authsignal
  • Clerk
  • keyri
  • Stytch
  • SuperTokens
  • Caching / Offline-first
  • Polyscale
  • Developer Tools
  • Estuary
  • OpenAI
  • pgMustard
  • Prisma
  • Sequin
  • Snaplet
  • Vercel
  • Upstash Redis
  • WeWeb
  • Zuplo
  • Low-code
  • Appsmith
  • DhiWise
  • Directus
  • Draftbit
  • FlutterFlow
  • Plasmic
  • ILLA
  • Messaging
  • OneSignal
    Back to Home
    referenceAPI Reference
    Client libraries
  • supabase-js/docssupabase-js
  • supabase-dart/docssupabase-dart
  • supabase-csharp/docssupabase-csharp
  • supbase-python/docssupbase-python
  • Other tools
  • Supabase CLI/docsSupabase CLI
  • Management API/docsManagement API
Back to Main Menu
reference-javascriptJavaScript
  • Introduction
  • Initializing
  • Upgrade guide
  • Database
  • Fetch data
  • Insert data
  • Update data
  • Upsert data
  • Delete data
  • Call a Postgres function
  • Using filters
  • Using Modifiers
  • Auth
  • Create a new user
  • Sign in a user
  • Sign out a user
  • Retrieve a session
  • Update a user
  • Update the access token
  • Retrieve a user
  • Retrieve a session
  • Retrieve a user
  • Listen to auth events
  • Send a password reset request
  • Functions
  • Invoke a function
  • Realtime
  • Subscribe to channel
  • Remove a subscription
  • Remove all subscriptions
  • Retrieve subscriptions
  • Storage
  • Create a bucket
  • Retrieve a bucket
  • List all buckets
  • Update a bucket
  • Delete a bucket
  • Empty a bucket
  • Upload a file
  • Download a file
  • List all files in a bucket
  • Replace an existing file
  • Move an existing file
  • Copy an existing file
  • Delete files in a bucket
  • Create a signed URL
  • Create signed URLs
  • Retrieve public URL
  • Misc
  • Release Notes
Back to Main Menu
reference-javascriptJavaScript
  • Introduction
  • Installing
  • Initializing
  • Typescript Support
  • Database
  • Fetch data
  • Insert data
  • Update data
  • Upsert data
  • Delete data
  • Call a Postgres function
  • Using filters
  • Using Modifiers
  • Auth
  • Overview
  • Create a new user
  • Sign in a user
  • Sign in a user through OTP
  • Sign in a user through OAuth
  • Sign out a user
  • Verify and log in through OTP
  • Retrieve a session
  • Retrieve a new session
  • Retrieve a user
  • Update a user
  • Set the session data
  • Listen to auth events
  • Send a password reset request
  • Enroll a factor
  • Create a challenge
  • Verify a challenge
  • Create and verify a challenge
  • Unenroll a factor
  • Get Authenticator Assurance Level
  • Auth Admin
  • Functions
  • Invoke a function
  • Realtime
  • Subscribe to channel
  • Unsubscribe from a channel
  • Unsubscribe from all channels
  • Retrieve all channels
  • Storage
  • Create a bucket
  • Retrieve a bucket
  • List all buckets
  • Update a bucket
  • Delete a bucket
  • Empty a bucket
  • Upload a file
  • Download a file
  • List all files in a bucket
  • Replace an existing file
  • Move an existing file
  • Copy an existing file
  • Delete files in a bucket
  • Create a signed URL
  • Create signed URLs
  • Retrieve public URL
  • Misc
  • Release Notes
Back to Main Menu
reference-dartFlutter
  • Introduction
  • Initializing
  • Upgrade guide
  • Database
  • Fetch data
  • Insert data
  • Update data
  • Upsert data
  • Delete data
  • Call a Postgres function
  • Using filters
  • Using Modifiers
  • Auth
  • Create a new user
  • Sign in a user
  • Sign in a user through OAuth
  • Sign out a user
  • Retrieve a session
  • Retrieve a user
  • Retrieve a session
  • Retrieve a session
  • Retrieve a user
  • Update a user
  • Listen to auth events
  • Send a password reset request
  • Functions
  • Invoke a function
  • Realtime
  • Listen to database changes
  • Subscribe to channel
  • Remove a subscription
  • Retrieve subscriptions
  • Storage
  • Create a bucket
  • Retrieve a bucket
  • List all buckets
  • Update a bucket
  • Delete a bucket
  • Empty a bucket
  • Upload a file
  • Download a file
  • List all files in a bucket
  • Replace an existing file
  • Move an existing file
  • Delete files in a bucket
  • Create a signed URL
  • Retrieve public URL
Back to Main Menu
reference-dartFlutter
  • Introduction
  • Installing
  • Initializing
  • Database
  • Fetch data
  • Insert data
  • Update data
  • Upsert data
  • Delete data
  • Call a Postgres function
  • Using filters
  • Using Modifiers
  • Auth
  • Create a new user
  • Sign in a user
  • Sign in a user through OTP
  • Sign in a user through OAuth
  • Sign out a user
  • Verify and log in through OTP
  • Retrieve a session
  • Retrieve a user
  • Update a user
  • Listen to auth events
  • Functions
  • Invoke a function
  • Realtime
  • Listen to database changes
  • Subscribe to channel
  • Unsubscribe from a channel
  • Unsubscribe from all channels
  • Retrieve all channels
  • Storage
  • Create a bucket
  • Retrieve a bucket
  • List all buckets
  • Update a bucket
  • Delete a bucket
  • Empty a bucket
  • Upload a file
  • Download a file
  • List all files in a bucket
  • Replace an existing file
  • Move an existing file
  • Delete files in a bucket
  • Create a signed URL
  • Retrieve public URL
Back to Main Menu
reference-csharpC#
  • Introduction
  • Installing
  • Initializing
  • Database
  • Fetch data
  • Insert data
  • Update data
  • Upsert data
  • Delete data
  • Call a Postgres function
  • Using filters
  • Using Modifiers
  • Auth
  • Create a new user
  • Sign in a user
  • Sign in a user through OTP
  • Sign in a user through OAuth
  • Sign out a user
  • Verify and log in through OTP
  • Retrieve a session
  • Retrieve a user
  • Update a user
  • Listen to auth events
  • Functions
  • Invoke a function
  • Realtime
  • Subscribe to channel
  • Unsubscribe from a channel
  • Retrieve all channels
  • Storage
  • Create a bucket
  • Retrieve a bucket
  • List all buckets
  • Update a bucket
  • Delete a bucket
  • Empty a bucket
  • Upload a file
  • Download a file
  • List all files in a bucket
  • Replace an existing file
  • Move an existing file
  • Delete files in a bucket
  • Create a signed URL
  • Retrieve public URL
  • Misc
  • Release Notes
Back to Main Menu
reference-pythonPython
  • Introduction
  • Initializing
  • Database
  • Fetch data
  • Insert data
  • Auth
  • Create a new user
  • Sign in a user
  • Sign in a user through OTP
  • Sign in a user through OAuth
  • Sign out a user
  • Verify and log in through OTP
  • Retrieve a session
  • Retrieve a new session
  • Retrieve a user
  • Set the session data
  • Functions
  • Invoke a function
  • Realtime
  • Subscribe to channel
  • Storage
  • Create a bucket
  • Retrieve a bucket
  • List all buckets
  • Delete a bucket
  • Empty a bucket
  • Upload a file
  • Download a file
  • List all files in a bucket
  • Move an existing file
  • Delete files in a bucket
  • Create a signed URL
  • Retrieve public URL
  • Misc
  • Release Notes
Back to Main Menu
reference-cliSupabase CLI
  • Introduction
  • Global flags
  • General
  • Initialize a local project
  • Log in to a Supabase account
  • Link to a Supabase project
  • Start a container
  • Stop all containers
  • Retrieve container status
  • Testing
  • Run tests
  • Run tests (pgTAP)
  • Generate Types
  • Run code generation tools
  • Generate types (Postgres schema)
  • Generate types (TypeScript)
  • Database
  • Manage local databases
  • Dump schema from remote database
  • Push migration to remote database
  • Reset local database
  • Diff local database
  • Lint local database
  • Manage remote databases
  • Commit remote database changes
  • Migrations
  • Manage database migrations
  • Create a migration
  • List all migrations
  • Repair migration history table
  • Projects
  • Manage projects
  • Create a project
  • List all projects
  • Organizations
  • Manage organizations
  • List all organizations
  • Edge Functions
  • Manage edge functions
  • Create a function
  • Download a function
  • Serve functions locally
  • Deploy a function
  • Delete a function
  • Secrets
  • Manage secrets
  • Set a secret
  • List all secrets
  • Unset a secret
  • Custom Domains
  • Manage custom domains
  • Activate custom hostname
  • Create a custom hostname
  • Retrieve custom hostname config
  • Re-verify custom hostname config
  • Delete custom hostname config
  • Vanity Subdomains
  • Manage vanity subdomains
  • Activate a vanity subdomain
  • Retrieve vanity subdomain
  • Check subdomain availability
  • Delete vanity subdomain
  • Network Bans
  • Manage network bans
  • Retrieve network bans
  • Remove a network ban
  • Network Restrictions
  • Manage network restrictions
  • Retrieve network restrictions
  • Update network restrictions
  • SSL Enforcement
  • Manage SSL enforcement configuration
  • Get the current SSL enforcement configuration
  • Update SSL enforcement configuration
  • Autocompletion Scripts
  • Generate autocompletion scripts
  • Generate zsh script
  • Generate powershell script
  • Generate fish script
  • Generate bash script
Back to Main Menu
reference-apiManagement API
  • Introduction
  • Projects
  • List all projects
  • Create a project
  • List all organizations
  • Create an organization
  • Secrets
  • List all secrets
  • Bulk create secrets
  • Bulk delete secrets
  • Typescript
  • Generate TypeScript types
  • Functions
  • Create a function
  • List all functions
  • Retrieve a function
  • Update a function
  • Delete a function
  • Retrieve a function body
  • Custom Hostname
  • Retrieve hostname configuration
  • Delete hostname configuration
  • Update hostname configuration
  • Verify DNS configuration
  • Activate custom hostname
  • pgsodium
  • Retrieve pgsodium config
  • Update pgsodium config
  • Network
  • Retrieve network bans
  • Delete network bans
  • Retrieve network restrictions
  • Update network restrictions
Back to Main Menu
reference-authSelf-Hosting Auth
  • Introduction
  • Usage
  • Generates an email action link
  • Get a user
  • Update a user
  • Deletes a user
  • List all users
  • Returns the created user
  • Redirects the user to the 3rd party oauth provider to start the oauth1 0 or oauth2 0 authentication process
  • Receives the redirect from an external provider during the oauth authentication process starts the process of creating an access and refresh token
  • The healthcheck endpoint for gotrue returns the current gotrue version
  • Sends an invite link to the user
  • Logs out the user
  • Passwordless sign in method for email or phone
  • Sends a password recovery email link to the users email
  • Returns the configuration settings for the gotrue server
  • Password based signup with either email or phone
  • Signs in a user with a password
  • Refreshes a users refresh token
  • Get information for the logged in user
  • Returns the updated user
  • Verifies a sign up
Back to Main Menu
reference-storageSelf-Hosting Storage
  • Introduction
  • Usage
  • Create a bucket
  • Gets all buckets
  • Empty a bucket
  • Get details of a bucket
  • Update properties of a bucket
  • Delete a bucket
  • Delete an object
  • Get object
  • Update the object at an existing key
  • Upload a new object
  • Delete multiple objects
  • Retrieve an object
  • Generate a presigned url to retrieve an object
  • Retrieve an object via a presigned URL
  • Generate presigned urls to retrieve objects
  • Moves an object
  • Search for objects under a prefix
  • Retrieve object info
  • Copies an object
  • Retrieve an object from a public bucket
  • Get object info
Back to Main Menu
reference-realtimeSelf-Hosting Realtime
  • Introduction
Back to Main Menu
reference-analyticsSelf-Hosting Analytics
  • Introduction
  • Management API
  • List endpoints
  • Create endpoint
  • Delete endpoint
  • Fetch endpoint
  • Update endpoint
  • List sources
  • Create source
  • Delete source
  • Fetch source
  • Update source
  • List teams
  • Create team
  • Delete team
  • Fetch team
  • Update team
Supabase LogoDOCS
Supabase.comDashboard
Home

Resources

Examples
Official GitHub examples, curated content from the community, and more.
Glossary
Definitions for terminology and acronyms used in the Supabase documentation.

Migrate to Supabase#

Firebase Auth
Move your auth users from a Firebase project to a Supabase project.Learn more
Firestore Data
Migrate the contents of a Firestore collection to a single PostgreSQL table.Learn more
Firebase Storage
Convert your Firebase Storage files to Supabase Storage.Learn more
Heroku
Migrate your Heroku Postgres database to Supabase.Learn more
Render
Migrate your Render Postgres database to Supabase.Learn more

Postgres Resources#

Managing Indexes
Improve query performance using various index types in Postgres.
Drop all tables in schema
Delete all tables in a given schema.
Select first row per group
Retrieve the first row in each distinct group.
Print PostgreSQL version
Find out which version of Postgres you are running.

Supabase 2022—ContributingChangelogAuthor StyleguideOpen SourceSupaSquad