REST API integration
Supabase REST API integration for Draftbit
Connect to Supabase PostgREST tables
What is Supabase?
Supabase auto-generates a REST API from your Postgres schema using PostgREST. Add your project ref and API key to read and write app data with Row Level Security.
Use Supabase with Draftbit
- Built-in endpoints: List/filter rows, Create row, Update rows by ID, Delete rows by ID.
- Bind any Supabase endpoint to a screen, list, form, or AI agent action.
- Authentication is configured once per app — secrets stay on the server.
- Add custom request and response transforms without forking Supabase's client library.
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 — secrets stay on the server side.
Use Supabase in a Draftbit app today
Start free, connect Supabase in minutes, and ship with AI agents that know how to use it.
Frequently asked questions
What is the Supabase REST integration?
Supabase auto-generates a REST API from your Postgres schema using PostgREST. Add your project ref and API key to read and write app data with Row Level Security.
How do I connect Supabase to a Draftbit app?
Go to Integrations → REST APIs in your Draftbit app and pick Supabase from the catalog. Paste your API key or token, set any base-URL variables (project IDs, hosts), and the endpoints become available across your screens.
Does Supabase require authentication?
Most Supabase endpoints expect a key or token sent as a header. Built-in endpoints include: List/filter rows, Create row, Update rows by ID, Delete rows by ID.
What can I build with Supabase and Draftbit?
Use Supabase as a backend platform for your mobile or web app: Power a mobile app with a hosted database and APIs; Add search, filtering, and pagination to a list-driven feature.