Netlify environmentVariables 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 environmentVariables. 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 4 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 operations4 paths4 schemas2 DELETE3 GET1 PATCH1 POST1 PUT
Metadata
The identity and technical contract details declared by the specification.
Netlify environmentVariables 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 — 2 DELETE, 3 GET, 1 PATCH, 1 POST, 1 PUT. Each is listed below with its method, path, parameters, and response codes.
environmentVariables 8
GET
/accounts/{account_id}/env
Returns all environment variables for an account or site. An account corresponds to a team in the Netlify UI. To use this endpoint, your site must no longer be using the classic environment variables…
getEnvVars4 params→ 200default
POST
/accounts/{account_id}/env
Creates new environment variables. Granular scopes are available on Pro plans and above. To use this endpoint, your site must no longer be using the classic environment variables experience . Migrate…
createEnvVars2 paramsbody→ 201default
GET
/api/v1/sites/{site_id}/env
Returns all environment variables for a site. This convenience method behaves the same as getEnvVars but doesn't require an accountid as input.
getSiteEnvVars3 params→ 200default
GET
/accounts/{account_id}/env/{key}
Returns an individual environment variable. To use this endpoint, your site must no longer be using the classic environment variables experience . Migrate now with the Netlify UI.
getEnvVar3 params→ 200default
PUT
/accounts/{account_id}/env/{key}
Updates an existing environment variable and all of its values. Existing values will be replaced by values provided. To use this endpoint, your site must no longer be using the classic environment va…
updateEnvVar3 paramsbody→ 200default
DELETE
/accounts/{account_id}/env/{key}
Deletes an environment variable. To use this endpoint, your site must no longer be using the classic environment variables experience . Migrate now with the Netlify UI.
deleteEnvVar3 params→ 204default
PATCH
/accounts/{account_id}/env/{key}
Updates or creates a new value for an existing environment variable. To use this endpoint, your site must no longer be using the classic environment variables experience . Migrate now with the Netlif…
setEnvVarValue3 paramsbody→ 201default
DELETE
/accounts/{account_id}/env/{key}/value/{id}
Deletes a specific environment variable value. To use this endpoint, your site must no longer be using the classic environment variables experience . Migrate now with the Netlify UI.
deleteEnvVarValue4 params→ 204default
Schemas 4
The contract defines 4 schemas that model the data the API accepts and returns. The most detailed are envVar (6 properties), envVarValue (4 properties), envVarUser (4 properties), error (2 properties). Each schema is shown below with its type and property counts.
envVarUser
object
4 properties
envVarValue
object
Environment variable value model definition
4 properties
envVar
object
Environment variable model definition
6 properties
error
object
2 properties1 required
Specification
The full machine-readable OpenAPI contract behind this narrative.