Netlify's API documentation
netlify · Cloud
Netlify is a hosting service for the programmable web. It understands your documents and provides an API to handle atomic deploys of websites, manage form submissions, inject JavaScript snippets, and much more. This is a REST-style API that uses JSON for serialization and OAuth 2 for authentication. This document is an OpenAPI reference for the Netlify API that you can explore. For more detailed instructions for common uses, please visit the [online documentation](https://www.netlify.com/docs/a
Authentication
Sample Requests
**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/environmentVariables/operation/getEnvVars) to retrieve site environment variables.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/netlify.com/2.15.0/sites?name=test&page=1&filter=all&per_page=10"
import requests
params = {
"name": "test",
"page": "1",
"filter": "all",
"per_page": "10"
}
response = requests.get(
"https://api.apis.guru/v2/specs/netlify.com/2.15.0/sites",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/netlify.com/2.15.0/sites');
url.searchParams.set('name', 'test');
url.searchParams.set('page', '1');
url.searchParams.set('filter', 'all');
url.searchParams.set('per_page', '10');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/netlify.com/2.15.0/sites")
q := baseURL.Query()
q.Set("name", "test")
q.Set("page", "1")
q.Set("filter", "all")
q.Set("per_page", "10")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/netlify.com/2.15.0/sites")
uri.query = URI.encode_www_form({
"name" => "test",
"page" => "1",
"filter" => "all",
"per_page" => "10"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/netlify.com/2.15.0/sites?" . http_build_query([
"name" => "test",
"page" => "1",
"filter" => "all",
"per_page" => "10"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/netlify.com/2.15.0/dns_zones?account_slug=example"
import requests
params = {
"account_slug": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/netlify.com/2.15.0/dns_zones",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/netlify.com/2.15.0/dns_zones');
url.searchParams.set('account_slug', 'example');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/netlify.com/2.15.0/dns_zones")
q := baseURL.Query()
q.Set("account_slug", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/netlify.com/2.15.0/dns_zones")
uri.query = URI.encode_www_form({
"account_slug" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/netlify.com/2.15.0/dns_zones?" . http_build_query([
"account_slug" => "example"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/netlify.com/2.15.0/hooks?site_id=example"
import requests
params = {
"site_id": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/netlify.com/2.15.0/hooks",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/netlify.com/2.15.0/hooks');
url.searchParams.set('site_id', 'example');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/netlify.com/2.15.0/hooks")
q := baseURL.Query()
q.Set("site_id", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/netlify.com/2.15.0/hooks")
uri.query = URI.encode_www_form({
"site_id" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/netlify.com/2.15.0/hooks?" . http_build_query([
"site_id" => "example"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with Netlify's API documentation?
Netlify's API documentation is a Cloud API. Developers commonly use cloud APIs for:
- provisioning and managing cloud infrastructure
- automating deployments and container orchestration
- monitoring uptime and performance metrics
- managing storage buckets and databases
- setting up auto-scaling and load balancing
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Netlify's API documentation is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide · Learn about API keys · What is REST?