Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Netlify Site API

The Site API from Netlify — 4 operation(s) for site.

Netlify Site API is one of 35 APIs that Netlify publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

Tagged areas include Site. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an AsyncAPI specification, and a getting-started guide.

This API exposes 8 operations across 4 paths, and defines 6 schemas. It is described by OpenAPI 3.0.1, at version 2.33.1.

Requests are made against a single base URL, https://api.netlify.com/api/v1.

8 operations 4 paths 6 schemas 1 DELETE3 GET1 PATCH2 POST1 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.1
API Version
2.33.1
Base URL
https://api.netlify.com/api/v1/
Authentication
OAuth 2.0
Terms of Service
Resource Areas
1

Authentication & Security 1

Netlify Site API declares 1 security scheme for authenticating requests. It supports OAuth 2.0 (netlifyAuth) using the implicit flow. By default, every request must be authenticated.

Paths & Operations 8

Across 4 paths, the API surfaces 8 operations — 1 DELETE, 3 GET, 1 PATCH, 2 POST, 1 PUT. Each is listed below with its method, path, parameters, and response codes.

Site 8
GET
/sites
Note: Environment variable keys and values have moved from buildsettings.env and repo.env to a new endpoint. Please use [getEnvVars](tag/environmentVariables/operation/getEnvVars) to retrieve site en…
listSites 4 params → 200default
POST
/sites
Note: Environment variable keys and values have moved from buildsettings.env and repo.env to a new endpoint. Please use [createEnvVars](tag/environmentVariables/operation/createEnvVars) to create env…
createSite 1 param body → 201default
GET
/sites/{site_id}
Note: Environment variable keys and values have moved from buildsettings.env and repo.env to a new endpoint. Please use [getEnvVars](tag/environmentVariables/operation/getEnvVars) to retrieve site en…
getSite 2 params → 200default
DELETE
/sites/{site_id}
deleteSite 1 param → 204default
PATCH
/sites/{site_id}
Note: Environment variable keys and values have moved from buildsettings.env and repo.env to a new endpoint. Please use [updateEnvVar](tag/environmentVariables/operation/updateEnvVar) to update a sit…
updateSite 1 param body → 200default
PUT
/sites/{site_id}/unlink_repo
[Beta] Unlinks the repo from the site. This action will also: - Delete associated deploy keys - Delete outgoing webhooks for the repo - Delete the site's build hooks
unlinkSiteRepo 1 param → 200404
GET
/{account_slug}/sites
Note: Environment variable keys and values have moved from buildsettings.env and repo.env to a new endpoint. Please use [getEnvVars](tag/environmentVariables/operation/getEnvVars) to retrieve site en…
listSitesForAccount 4 params → 200default
POST
/{account_slug}/sites
Note: Environment variable keys and values have moved from buildsettings.env and repo.env to a new endpoint. Please use [createEnvVars](tag/environmentVariables/operation/createEnvVars) to create env…
createSiteInTeam 2 params body → 201default

Schemas 6

The contract defines 6 schemas that model the data the API accepts and returns. The most detailed are site (35 properties), deploy (30 properties), repoInfo (15 properties), error (2 properties). Each schema is shown below with its type and property counts.

deploy
object
30 properties
site
object
35 properties
functionSchedule
object
2 properties
repoInfo
object
15 properties
siteSetup
error
object
2 properties 1 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

netlify-site-api-openapi.yml Raw ↑

Other APIs Netlify publishes across the network.

Netlify accessToken API
Netlify accountMembership API
Netlify accountType API
Netlify Asset API
Netlify assetPublicSignature API
Netlify auditLog API
Netlify Build API
Netlify buildHook API
Netlify buildLogMsg API
Netlify Deploy API
Netlify deployedBranch API
Netlify deployKey API