shebang!

Enable on older databases

base_enable_api turns on the Data API for a database created before it existed, in the same response shape as base_create_database.

Enable on older databases

New databases get the Data API by default. If yours was provisioned before the Data API existed, turn it on with:

base_enable_api({ database })

The response carries the same fields base_create_database does: api_url, publishable_key, and — only the first time a key pair is minted for this database — secret_key, shown once and never retrievable again.

Idempotent

Re-running base_enable_api against a database that's already enabled returns 200 with the existing publishable_key and no secret_key field at all — it never shows a second secret for the same key pair. If you need a new secret key, use base_rotate_secret instead.

After enabling

Point supabase-js at api_url with publishable_key, the same as any other sherbase database — see the Data API and supabase-js examples. If a table already existed before you enabled the Data API, it should already be visible; if it isn't, follow up with base_reload_schema.

Next

Limits.