---
title: "Instant REST API from your Postgres schema | Backenly"
description: "Every table is served by PostgREST, the engine Supabase runs: filters, ordering, pagination and embedded resources, with access enforced by grants and RLS."
url: https://backenly.com/features/api-generation
markdown_url: https://backenly.com/features/api-generation.md
---

# REST APIs from your schema

Every table is served by PostgREST, straight from the PostgreSQL catalog. Nothing to regenerate: a table created a second ago is queryable now.

## A table becomes an endpoint

Every table is served by PostgREST the moment it exists, with filters, related rows and counts.

### Two API versions, one engine

/api/v1 is Backenly's stable REST contract, with typed responses. /api/v2 is PostgREST's native grammar, passed through untouched. Both read the same catalog and share one authorization path.

### Embedded resources in one round trip

`?select=*,author(*)` returns a post and its author together. The relationship is resolved from the foreign key in the catalog, so there is nothing to configure and no N+1 to hand-optimize.

### Authorization in the database

Grants and row-level security decide what a request can reach. A read for another tenant's rows, for the auth table, or through an embedded resource is refused by Postgres itself.

### Typed clients and a drift gate

Generate an OpenAPI spec and a typed client from the CLI. `backenly diff` exits non-zero when committed types drift from the live schema, so contract drift fails CI instead of production.

## Questions

### Is this a custom API layer or a real standard?

It is PostgREST, the same open-source engine Supabase runs, reading directly from your PostgreSQL catalog. On query capability Backenly is at parity with Supabase: same engine, same grammar, embedded resources included. If you know one, you know the other.

### Do I have to regenerate the API when my schema changes?

No. The API is the schema. PostgREST reads the catalog, so a table or column created a second ago is queryable immediately, with no registry to regenerate, redeploy or keep in sync.

### Can I add custom API logic or custom endpoints?

Yes. Serverless TypeScript functions and event triggers add business logic that runs on data events, on a schedule, or at a public HTTPS endpoint.

### Is there API documentation?

Every project's live endpoints are browsable in the dashboard with an inline request tester, and the CLI exports an OpenAPI spec and a typed client for your codebase.

## Related features

- [Agent-built backends](https://backenly.com/features/ai-backend-generation.md)
- [Postgres database](https://backenly.com/features/database-setup.md)
- [Authentication](https://backenly.com/features/authentication.md)
- [Operations and autonomy](https://backenly.com/features/deployment-ready-backends.md)

---

Source: [Instant REST API from your Postgres schema | Backenly](https://backenly.com/features/api-generation). Every page in Markdown: https://backenly.com/index.md. Agent docs: https://backenly.com/llms.txt.
