Supabase logo

REST API integration

Supabase REST API integration for Draftbit

Connect to Supabase PostgREST tables

Build a working app with Supabase

What is Supabase?

Build a task app with Supabase Auth, Postgres, Storage, and Realtime. Use the project's publishable key and the signed-in user's session in the app, then enforce ownership with Row Level Security. MCP tools help the agent inspect a project while it builds; they don't establish the mobile user's identity or replace database policies.

Use Supabase with Draftbit

  • Create and read tasks owned by the signed-in user.
  • Protect database rows and stored files with ownership policies.
  • Refresh a task list when authorized data changes.

More ways to connect Supabase

Prefer GraphQL? Connect to the Supabase GraphQL integration instead.

Want AI agents to query and act on Supabase while you build? Use the Supabase MCP server .

Example

supabase-example.ts
// Example: fetch from Supabase
const response = await fetch("https://{project_ref}.supabase.co/rest/v1/{table_name}", {
  headers: {
    "apikey": "YOUR_SUPABASE_TOKEN",
    "Authorization": "Bearer YOUR_SUPABASE_VALUE_2",
  },
});
const data = await response.json();

Use cases

  • Power a mobile app with a hosted database and APIs
  • Add search, filtering, and pagination to a list-driven feature
  • Read and write app data without managing your own server

Authentication

Authentication uses 2 headers (`apikey`, `Authorization`). Paste each value once in Draftbit and every request to Supabase carries them automatically for agent tools. Configure runtime authorization separately in the generated app.

Use Supabase in a Draftbit app today

Use Draftbit to build your app, configure Supabase, and test the feature before publishing.

Start building free

Frequently asked questions

How does this service fit into the app?

Build a task app with Supabase Auth, Postgres, Storage, and Realtime. Use the project's publishable key and the signed-in user's session in the app, then enforce ownership with Row Level Security. MCP tools help the agent inspect a project while it builds; they don't establish the mobile user's identity or replace database policies.

Does adding an integration finish the runtime setup?

No. Follow the linked walkthrough to install the SDK or build the backend and the app requests. The tools the agent uses while building don't replace sign-in and authorization in the app itself.

Where should I start?

Open the guide above, create a separate test project, and use its prompts and code to build one working feature. A template gives you a starting interface; you'll still connect the service yourself.

What should I verify before publishing?

The successful flow, a failed request, sign-out, and what a second user can see. Check that secret keys stay on the backend. For payments, run the provider's real sandbox flow in a native build too.

Related Integrations

Get started free Browse all Integrations