APIYard
Back to APIs
DevOpsBearer TokenFree tier

Netlify

The Netlify API lets you manage sites, trigger builds, set environment variables, manage forms, and configure deploy contexts.

Base URL

https://api.netlify.com/api/v1
deploymentssitesbuildsformsedge functions

Endpoints

GET/sites

List all sites in your Netlify account.

const response = await fetch("https://api.netlify.com/api/v1/sites", {
  method: "GET",
  headers: {
  "Content-Type": "application/json",
  "Authorization": "Bearer YOUR_ACCESS_TOKEN"
  }
});

const data = await response.json();
console.log(data);

Response Preview

[
  {
    "id": "abc123def456",
    "name": "my-site",
    "url": "https://my-site.netlify.app",
    "state": "current",
    "published_deploy": {
      "id": "deploy_abc",
      "state": "ready",
      "created_at": "2024-05-01T10:00:00Z"
    }
  }
]