REST API
An instant REST API from your schema
Every table and view in the public schema is available over HTTPS as soon as you create it — filtering, ordering, pagination, relations and RPC included. Row Level Security runs on every request.
const { data, error } = await stitchdb
.from('todos')
.select('id, task, is_complete')
.eq('is_complete', false)
.order('created_at', { ascending: false })
.range(0, 9)curl 'https://<project-ref>.p.stitchdb.com/rest/v1/todos?select=id,task&is_complete=eq.false' \
-H "apikey: <anon-key>" \
-H "Authorization: Bearer <user-access-token>"What you get
Endpoints without backend code
No backend code
Create a table, get endpoints. Insert, update and delete with JSON bodies.
Filters and pagination
eq, gt, order, limit, offset and range(); up to 1,000 rows per request on Free and 5,000 on Pro.
Call functions
Postgres functions in public are callable with rpc() or POST /rest/v1/rpc/<name>.
In the dashboard
REST API in your project dashboard
A real screen from the StitchDB dashboard.

How it works
Get started with REST API
Send your key
Put the anon key in the
apikeyheader; add a user's access token as a bearer token to act as that user.Query
GET /rest/v1/todos?select=id,task&is_complete=eq.false.Get rows back
Add
Prefer: return=representationto receive changed rows.
GET /rest/v1/todos?select=* List rows
GET /rest/v1/todos?is_complete=eq.true&id=gt.10 Filter
GET /rest/v1/todos?order=created_at.desc&limit=20 Order and paginate
POST /rest/v1/todos Insert (JSON body)
PATCH /rest/v1/todos?id=eq.1 Update
DELETE /rest/v1/todos?id=eq.1 Delete
POST /rest/v1/rpc/function_name Call a functionExample
See it in code
await stitchdb.from('todos').insert({ task: 'Write docs' })
await stitchdb.from('todos').update({ is_complete: true }).eq('id', 1)
await stitchdb.from('todos').delete().eq('id', 1)curl -X PATCH 'https://<project-ref>.p.stitchdb.com/rest/v1/todos?id=eq.1' \
-H "apikey: <anon-key>" \
-H "Authorization: Bearer <user-access-token>" \
-H "Content-Type: application/json" \
-d '{"is_complete":true}'Explore the platform
Start building on StitchDB today
Create your first project in under a minute.