Back to APIs
Supabase
A Postgres-backed backend-as-a-service with auto-generated REST APIs, realtime subscriptions, auth, and storage built in.
Base URL
https://YOUR_PROJECT.supabase.co/rest/v1PostgresrealtimeRESTopen sourceBaaS
Endpoints
GET
/{table}Query any Postgres table with filtering and pagination.
const response = await fetch("https://YOUR_PROJECT.supabase.co/rest/v1/posts?select=*&limit=10", {
method: "GET",
headers: {
"Content-Type": "application/json",
"apikey": "YOUR_API_KEY"
}
});
const data = await response.json();
console.log(data);Response Preview
[
{
"id": 1,
"title": "Hello World",
"content": "My first post",
"user_id": "a1b2c3",
"created_at": "2024-05-01T10:00:00Z"
}
]POST
/{table}Insert a new row into a Postgres table.
const response = await fetch("https://YOUR_PROJECT.supabase.co/rest/v1/posts", {
method: "POST",
headers: {
"Content-Type": "application/json",
"apikey": "YOUR_API_KEY"
},
body: JSON.stringify({
"title": "New Post",
"content": "Hello!",
"user_id": "a1b2c3"
})
});
const data = await response.json();
console.log(data);Response Preview
[
{
"id": 42,
"title": "New Post",
"content": "Hello!",
"user_id": "a1b2c3",
"created_at": "2024-05-01T12:00:00Z"
}
]