v1

latestSwagger 2.02026-07-13180103150.2 KB
environmentVariables

Creates new environment variables. Granular scopes are available on Pro plans and above.

post/accounts/{account_id}/env

Path parameters

account_idstring required

Scope response to account_id

Query parameters

site_idstring

If provided, create an environment variable on the site level, not the account level

Request body

keystring

The existing or new name of the key, if you wish to rename it (case-sensitive)

scopesstring[]

The scopes that this environment variable is set to (Pro plans and above)

is_secretboolean

Secret values are only readable by code running on Netlify's systems. With secrets, only the local development context values are readable from the UI, API, and CLI. By default, environment variable values are not secret.

Response

OK

keystring

The environment variable key, like ALGOLIA_ID (case-sensitive)

scopesstring[]

The scopes that this environment variable is set to

is_secretboolean

Secret values are only readable by code running on Netlify's systems. With secrets, only the local development context values are readable from the UI, API, and CLI. By default, environment variable values are not secret.

updated_atstring date-time

The timestamp of when the value was last updated