Netlify Database API

The database API from Netlify — 14 operation(s) for database.

Business capability
IT Infrastructure Management BC-600.50

Operations 19

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /sites/{site_id}/database Create a database for a site · Create site database #
Ask an LLM
“How do I add a database to my Netlify site?”
“Which region does a new site database use if I don't pick one?”
Tell an agent
Create a database for site {site}.
Provision a new database for site {site} in region {region}.
GET /sites/{site_id}/database Get a site's database connection string · Get site database #
Ask an LLM
“Where do I find the connection string for my site's database?”
“Can I get the database connection string for a specific role?”
Tell an agent
Get the database connection string for site {site}.
Fetch the connection string for site {site} using the {role} role.
DELETE /sites/{site_id}/database Delete a site's database · Delete site database #
Ask an LLM
“Can I delete my site's database along with all its branches and snapshots?”
“What gets removed when I tear down a site's whole database?”
Tell an agent destructive · confirm first
Delete the entire database for site {site}, including branches and snapshots.
Tear down the database attached to site {site}.
POST /sites/{site_id}/database/branch Create a database branch · Create site database branch #
Ask an LLM
“Can I fork a new database branch off an existing parent branch?”
“How do I create a separate database branch for a feature?”
Tell an agent
Create database branch {branch} for site {site}.
Create database branch {branch} on site {site} forked from parent branch {parent}.
GET /sites/{site_id}/database/branches List a site's database branches · List site database branches #
Ask an LLM
“Which database branches exist for my site and are they running?”
“Can I see the compute status of every database branch?”
Tell an agent
List all database branches for site {site}.
Show every database branch on site {site} with its compute status.
GET /sites/{site_id}/database/branch/{branch_id} Get a database branch connection string · Get site database branch #
Ask an LLM
“Where do I get the connection string for one particular database branch?”
“Can I fetch a branch's connection string for a specific role?”
Tell an agent
Get the connection string for database branch {branch} on site {site}.
Fetch the {role} connection string for database branch {branch} of site {site}.
DELETE /sites/{site_id}/database/branch/{branch_id} Delete a database branch · Delete site database branch #
Ask an LLM
“How do I remove a database branch I no longer need?”
“Can I delete a single branch without deleting the whole database?”
Tell an agent destructive · confirm first
Delete database branch {branch} from site {site}.
Remove the {branch} database branch on site {site}.
POST /sites/{site_id}/database/branch/{branch_id}/reset Reset a database branch from its source · Reset site database branch #
Ask an LLM
“Can I re-fork a preview database branch from production to start fresh?”
“Why didn't my branch reset happen when it was already in sync?”
Tell an agent destructive · confirm first
Reset database branch {branch} on site {site} from production.
Reset database branch {branch} on site {site} from source branch {source}, forcing it even if in sync.
PUT /sites/{site_id}/database/branch/{branch_id}/compute/settings Set compute settings for one database branch · Set site database branch compute settings #
Ask an LLM
“Can I give one database branch different compute limits than the rest?”
“How do I change the sleep timeout for a single database branch?”
Tell an agent
Set database branch {branch} on site {site} to scale between {min_cu} and {max_cu} compute units.
Override the sleep timeout for database branch {branch} on site {site} to {seconds} seconds.
PUT /sites/{site_id}/database/compute/settings Set project-level database compute settings · Set site database compute settings #
Ask an LLM
“Can I set default compute limits that apply to all new database branches?”
“Which plan do I need to customize database compute settings?”
Tell an agent
Set the default database compute range for site {site} to {min_cu}–{max_cu} compute units.
Make new database branches on site {site} sleep after {seconds} seconds idle.
GET /sites/{site_id}/database/compute/settings Get project-level database compute settings · Get site database compute settings #
Ask an LLM
“What compute settings does my site's database use by default?”
“Are my database compute settings custom or the plan tier defaults?”
Tell an agent
Show the project-level database compute settings for site {site}.
Check the effective default compute limits for site {site}'s database.
DELETE /sites/{site_id}/database/compute/settings Reset database compute settings to defaults · Clear site database compute settings #
Ask an LLM
“How do I go back to the tier default compute settings for my database?”
“Can I clear my custom project-level database compute limits?”
Tell an agent destructive · confirm first
Clear the custom database compute settings on site {site}.
Revert site {site}'s database compute settings to plan defaults.
GET /sites/{site_id}/database/migrations List database migrations and their status · List site database migrations #
Ask an LLM
“Which database migrations have been applied to my branch?”
“Can I see pending migrations for a specific database branch?”
Tell an agent
List database migrations for site {site}.
Show which migrations are applied on branch {branch} of site {site}.
GET /sites/{site_id}/database/migrations/{name} Get the contents of a database migration · Get site database migration #
Ask an LLM
“Can I read the SQL of a named database migration?”
“What does a specific migration contain on a given branch?”
Tell an agent
Show the contents of migration {name} for site {site}.
Get migration {name} on branch {branch} of site {site}.
POST /sites/{site_id}/database/migrations/{deploy_id} Run database migrations for a deploy · Run site database migrations #
Ask an LLM
“How do I apply database migrations as part of a deploy?”
“Can I do a dry run of migrations before applying them?”
Tell an agent
Run database migrations for deploy {deploy} on site {site}.
Dry-run the migrations for deploy {deploy} of site {site} without applying them.
POST /sites/{site_id}/database/snapshot Take a database snapshot · Create site database snapshot #
Ask an LLM
“Can I take a point-in-time backup of my database before a risky change?”
“Which branch gets snapshotted if I don't name one?”
Tell an agent
Take a snapshot of the production database for site {site}.
Snapshot database branch {branch} on site {site} and name it {name}.
GET /sites/{site_id}/database/snapshots List database snapshots · List site database snapshots #
Ask an LLM
“What database snapshots do I have for my site?”
“Can I see all point-in-time backups of my site's database?”
Tell an agent
List all database snapshots for site {site}.
Show the saved database snapshots on site {site}.
DELETE /sites/{site_id}/database/snapshot/{snapshot_id} Delete a database snapshot · Delete site database snapshot #
Ask an LLM
“How do I delete an old database snapshot?”
“Can I remove one snapshot without touching the database?”
Tell an agent destructive · confirm first
Delete database snapshot {snapshot} from site {site}.
Remove snapshot {snapshot} on site {site}.
POST /sites/{site_id}/database/snapshot/{snapshot_id}/restore Restore a database snapshot to a branch · Restore site database snapshot #
Ask an LLM
“Can I roll my database back to an earlier snapshot?”
“Is it possible to restore a snapshot into a non-production branch?”
Tell an agent destructive · confirm first
Restore snapshot {snapshot} to the production database of site {site}.
Restore snapshot {snapshot} on site {site} into branch {branch}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/netlify:netlify-database-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

netlify-database-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 2.57.0
  title: Netlify's API documentation Database API
  description: Netlify is a hosting service for the programmable web.
  termsOfService: https://www.netlify.com/legal/terms-of-use/
  x-logo:
    url: netlify-logo.png
    href: https://www.netlify.com/docs/
    altText: Netlify
servers:
- url: https://api.netlify.com/api/v1
security:
- netlifyAuth: []
tags:


# --- truncated at 32 KB (40 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/netlify/refs/heads/main/openapi/netlify-database-api-openapi.yml