Docs
Stashbase gives every project a dedicated Postgres schema accessible via a JSON REST API. This stub walks through the four things you most often need. The full reference lives at api.stashbase.io/docs.
1. Quickstart
- Create an account at app.stashbase.io.
- Click New project. You'll get an
anonkey and aservice_rolekey — copy both; they're shown once. - Your project's REST endpoint is
https://api.stashbase.io/rest/v1with anAccept-Profileheader set to your tenant id.
2. Authentication
Users sign up against GoTrue and receive a JWT signed with your project's secret. Pass the JWT as a Bearer token.
curl https://api.stashbase.io/auth/v1/signup \
-H 'content-type: application/json' \
-d '{"email":"ada@example.com","password":"hunter2"}'
After email verification, exchange for an access token:
curl 'https://api.stashbase.io/auth/v1/token?grant_type=password' \
-H 'content-type: application/json' \
-d '{"email":"ada@example.com","password":"hunter2"}'
3. REST CRUD
Every table in your schema is an endpoint. Use Accept-Profile: <your tenant id> to pin the request.
curl https://api.stashbase.io/rest/v1/profiles \ -H "apikey: YOUR_ANON_KEY" \ -H "Authorization: Bearer YOUR_USER_JWT" \ -H "Accept-Profile: tenant_xxx"
Insert with a service-role key, or with a user JWT when row-level security allows:
curl -X POST https://api.stashbase.io/rest/v1/profiles \
-H "apikey: YOUR_ANON_KEY" \
-H "Authorization: Bearer YOUR_USER_JWT" \
-H "Content-Profile: tenant_xxx" \
-H "Content-Type: application/json" \
-d '{"user_id":"<uuid>","display_name":"Ada"}'
4. Migrate from Supabase
Paste a postgres:// connection string on the project's Import tab (or POST it to the control plane):
curl -X POST https://api.stashbase.io/v1/projects/<id>/migrate/supabase \
-H "Authorization: Bearer YOUR_DASHBOARD_JWT" \
-H "Content-Type: application/json" \
-d '{"source":"postgres://user:pw@db.supabase.co:5432/postgres"}'
You can also upload a .sql file (up to 100 MB) — it's replayed into your tenant schema.
Full API reference
The complete endpoint listing, response shapes, and error codes live at api.stashbase.io/docs.