# Netlify API

> Netlify is a hosting service for the programmable web.

Netlify is a development API from netlify.com. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 120 endpoints.

## At a glance

- Category: [Development](https://www.openparable.com/apis/category/development)
- Provider: netlify.com
- Authentication: OAuth
- HTTPS: Yes
- CORS: Not stated
- Base URL: https://api.netlify.com/api/v1
- Documentation: https://docs.netlify.com/api/get-started/
- OpenAPI description: https://api.apis.guru/v2/specs/netlify.com/2.15.0/swagger.json
- Version: 2.15.0
- Specification updated: 2023-03-06

## Example request

```bash
curl -X GET "https://api.netlify.com/api/v1/accounts" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Endpoints

- `GET /accounts`
- `POST /accounts`
- `GET /accounts/types`
- `GET /accounts/{account_id}`
- `PUT /accounts/{account_id}`
- `DELETE /accounts/{account_id}`
- `GET /accounts/{account_id}/audit`
- `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
- `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 <a href="h
- `GET /accounts/{account_id}/env/{key}` — Returns an individual environment variable. To use this endpoint, your site must no longer be using the <a href="https://docs.netlify.com/environment-variables/
- `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 lon
- `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 <a href="https://docs.netlify.c
- `DELETE /accounts/{account_id}/env/{key}` — Deletes an environment variable. To use this endpoint, your site must no longer be using the <a href="https://docs.netlify.com/environment-variables/classic-exp
- `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 <a href="https://docs.netlify.com/environment-variabl
- `GET /billing/payment_methods`
- `GET /builds/{build_id}`
- `POST /builds/{build_id}/log`
- `POST /builds/{build_id}/start`
- `GET /deploy_keys`
- `POST /deploy_keys`
- `GET /deploy_keys/{key_id}`
- `DELETE /deploy_keys/{key_id}`
- `GET /deploys/{deploy_id}`
- `DELETE /deploys/{deploy_id}`
- `POST /deploys/{deploy_id}/cancel`
- `PUT /deploys/{deploy_id}/files/{path}`
- `PUT /deploys/{deploy_id}/functions/{name}`
- `POST /deploys/{deploy_id}/lock`
- `POST /deploys/{deploy_id}/plugin_runs` — This is an internal-only endpoint.
- `POST /deploys/{deploy_id}/unlock`
- `GET /dns_zones`
- `POST /dns_zones`
- `GET /dns_zones/{zone_id}`
- `DELETE /dns_zones/{zone_id}`
- `GET /dns_zones/{zone_id}/dns_records`
- `POST /dns_zones/{zone_id}/dns_records`
- `GET /dns_zones/{zone_id}/dns_records/{dns_record_id}`
- `DELETE /dns_zones/{zone_id}/dns_records/{dns_record_id}`
- `PUT /dns_zones/{zone_id}/transfer`
- `GET /forms/{form_id}/submissions`
- `GET /hooks`
- `POST /hooks`
- `GET /hooks/types`
- `GET /hooks/{hook_id}`
- `PUT /hooks/{hook_id}`
- `DELETE /hooks/{hook_id}`
- `POST /hooks/{hook_id}/enable`
- `POST /oauth/tickets`
- `GET /oauth/tickets/{ticket_id}`
- `POST /oauth/tickets/{ticket_id}/exchange`
- `GET /services/`
- `GET /services/{addonName}`
- `GET /services/{addonName}/manifest`
- `GET /sites` — **Note:** Environment variable keys and values will soon be moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [getEnvVars](#tag/envir
- `POST /sites` — **Note:** Environment variable keys and values will soon be moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [createEnvVars](#tag/en
- `GET /sites/{site_id}` — **Note:** Environment variable keys and values will soon be moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [getEnvVars](#tag/envir
- `PATCH /sites/{site_id}` — **Note:** Environment variable keys and values will soon be moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [updateEnvVar](#tag/env
- `DELETE /sites/{site_id}`
- `GET /sites/{site_id}/assets`
- `POST /sites/{site_id}/assets`
- `GET /sites/{site_id}/assets/{asset_id}`
- `PUT /sites/{site_id}/assets/{asset_id}`
- `DELETE /sites/{site_id}/assets/{asset_id}`
- `GET /sites/{site_id}/assets/{asset_id}/public_signature`
- `GET /sites/{site_id}/build_hooks`
- `POST /sites/{site_id}/build_hooks`
- `GET /sites/{site_id}/build_hooks/{id}`
- `PUT /sites/{site_id}/build_hooks/{id}`
- `DELETE /sites/{site_id}/build_hooks/{id}`
- `GET /sites/{site_id}/builds`
- `POST /sites/{site_id}/builds`
- `GET /sites/{site_id}/deployed-branches`
- `GET /sites/{site_id}/deploys`
- `POST /sites/{site_id}/deploys`
- `GET /sites/{site_id}/deploys/{deploy_id}`
- `PUT /sites/{site_id}/deploys/{deploy_id}`
- `DELETE /sites/{site_id}/deploys/{deploy_id}`
- `POST /sites/{site_id}/deploys/{deploy_id}/restore`
- `GET /sites/{site_id}/dns`
- `PUT /sites/{site_id}/dns`
- `GET /sites/{site_id}/files`
- `GET /sites/{site_id}/files/{file_path}`
- `GET /sites/{site_id}/forms`
- `DELETE /sites/{site_id}/forms/{form_id}`
- `GET /sites/{site_id}/metadata`
- `PUT /sites/{site_id}/metadata`
- `GET /sites/{site_id}/plugin_runs/latest` — This is an internal-only endpoint.
- `PUT /sites/{site_id}/plugins/{package}` — This is an internal-only endpoint.
- `PUT /sites/{site_id}/rollback`
- `GET /sites/{site_id}/service-instances`
- `POST /sites/{site_id}/services/{addon}/instances`
- `GET /sites/{site_id}/services/{addon}/instances/{instance_id}`
- `PUT /sites/{site_id}/services/{addon}/instances/{instance_id}`
- `DELETE /sites/{site_id}/services/{addon}/instances/{instance_id}`
- `GET /sites/{site_id}/snippets`
- `POST /sites/{site_id}/snippets`
- `GET /sites/{site_id}/snippets/{snippet_id}`
- `PUT /sites/{site_id}/snippets/{snippet_id}`
- `DELETE /sites/{site_id}/snippets/{snippet_id}`
- `GET /sites/{site_id}/ssl`

## Questions

### Does the Netlify API need an API key?

Yes. The Netlify API uses OAuth authentication; the documentation explains how to get credentials.

### Does the Netlify API support HTTPS?

Yes, the Netlify API is served over HTTPS.

### How many endpoints does the Netlify API have?

Its OpenAPI description lists 120 endpoints in version 2.15.0. The first 100 are shown on this page.

### What are alternatives to the Netlify API?

Other Development APIs include Cloudflare, Azure DevOps, IPify, App Store Connect API, StackExchange.

## Similar development APIs

- [Cloudflare](https://www.openparable.com/apis/cloudflare): Manage DNS, CDN, Workers and other services; documented with an official OpenAPI 3.0 spec
- [Azure DevOps](https://www.openparable.com/apis/azure-devops): The Azure DevOps basic components of a REST API request/response pair
- [IPify](https://www.openparable.com/apis/ipify): A simple IP Address API
- [App Store Connect API](https://www.openparable.com/apis/app-store-connect): The data structure that represents an app store connect api resource.
- [StackExchange](https://www.openparable.com/apis/stackexchange): Q&A forum for developers
- [IPinfo](https://www.openparable.com/apis/ipinfo): Another simple IP Address API
- [IBM Text to Speech](https://www.openparable.com/apis/ibm-text-to-speech): Convert text to speech
- [SiteIntel](https://www.openparable.com/apis/siteintel): Extract metadata, tech stack, emails, and screenshots from any URL
- [DigitalOcean Status](https://www.openparable.com/apis/digitalocean-status): Status of all DigitalOcean services
- [Docker Hub](https://www.openparable.com/apis/docker-hub): Interact with Docker Hub
- [MineSkin API](https://www.openparable.com/apis/mineskin): Client implementations: Java: https://github.com/InventivetalentDev/MineskinClient NodeJS: https://github.com/InventivetalentDev/mineskin-client Examples: https://github.com/MineSkin/examples
- [Google Docs](https://www.openparable.com/apis/google-docs): API to read, write, and format Google Docs documents

Listed from: public-apis (MIT), public-apis database (MIT), APIs.guru (CC0). Check the provider's terms before use.

---

Source: https://www.openparable.com/apis/netlify (OpenParable). Cite the canonical URL above.
