Netlify Environment Variables API

The Environment Variables API from Netlify — 4 operation(s) for environment variables.

Business capability
Configuration & Secrets Management BC-4210.60

Operations 8

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

GET /accounts/{account_id}/env List environment variables for a team or site · Get env vars #
Ask an LLM
“How do I see all environment variables for my team?”
“Can I list only the variables used in the production deploy context?”
Tell an agent
List environment variables for account {account}.
List env vars in account {account} for site {site}.
POST /accounts/{account_id}/env Create environment variables · Create env vars #
Ask an LLM
“How do I add new environment variables to my team?”
“Can I create environment variables scoped to one site?”
Tell an agent
Create environment variables in account {account}.
Add new env vars to site {site} in account {account}.
GET /api/v1/sites/{site_id}/env List a site's environment variables · Get site env vars #
Ask an LLM
“Can I get a site's environment variables without knowing the account ID?”
“What environment variables does my site have for deploy previews?”
Tell an agent
List environment variables for site {site}.
Show site {site}'s env vars in the {context} context.
GET /accounts/{account_id}/env/{key} Get one environment variable · Get env var #
Ask an LLM
“Can I read the values of a single environment variable?”
“What contexts is a particular env var set for?”
Tell an agent
Get environment variable {key} in account {account}.
Show env var {key} in account {account} for site {site}.
PUT /accounts/{account_id}/env/{key} Replace an environment variable and its values · Update env var #
Ask an LLM
“How do I overwrite all values of an existing environment variable?”
“Can I mark an env var as secret when updating it?”
Tell an agent
Replace all values of env var {key} in account {account}.
Update env var {key} in account {account} to use scopes {scopes}.
PATCH /accounts/{account_id}/env/{key} Set an env var's value for one context · Set env var value #
Ask an LLM
“Can I change an env var's value for only the production context?”
“Is it possible to set a different value for a branch deploy?”
Tell an agent
Set env var {key} in account {account} to {value} for context {context}.
Set {key} in account {account} to {value} for branch {branch}.
DELETE /accounts/{account_id}/env/{key} Delete an environment variable · Delete env var #
Ask an LLM
“How do I remove an environment variable entirely?”
“Can I delete an env var from just one site?”
Tell an agent destructive · confirm first
Delete environment variable {key} from account {account}.
Remove env var {key} for site {site} in account {account}.
DELETE /accounts/{account_id}/env/{key}/value/{id} Delete one value of an environment variable · Delete env var value #
Ask an LLM
“Can I remove a single context value but keep the variable?”
“What removes just one of an env var's values?”
Tell an agent destructive · confirm first
Delete value {value_id} of env var {key} in account {account}.
Remove the value {value_id} from variable {key} in account {account}, keeping the rest.

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-environment-variables-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-environment-variables-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 2.57.0
  title: Netlify's API documentation Environment Variables 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 (39 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/netlify/refs/heads/main/openapi/netlify-environment-variables-api-openapi.yml