database

Create a site database

Changed on

Creates a new database for the specified site. If a database already exists, returns the existing connection string. The database region defaults to the site's functions region if not specified.

post/sites/{site_id}/database

Request

  • Base URL
    https://api.netlify.com/api/v1
  • URL
    https://api.netlify.com/api/v1/sites/{site_id}/database
  • Auth
    OAuth 2
    Implicit: https://app.netlify.com/authorize

Request body

regionstring

The region where the database should be created. Defaults to the site's functions region if not specified.

Response

Database already exists

connection_stringstring

The connection string for the database

Changes