---
title: Enable on older databases
description: 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`](/sherbase/reload-schema-and-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](/sherbase/the-data-api) and
[supabase-js examples](/sherbase/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`](/sherbase/reload-schema-and-rotate-secret).

## Next

[Limits](/sherbase/limits).
