Overview
The Netlify API offers a RESTful interface for interacting with the Netlify platform's core services. Developers can use the API to manage sites, deployments, custom domains, DNS records, serverless functions (Netlify Edge Functions), and other platform features programmatically. This capability supports automation of common development and operations tasks, from continuous integration/continuous deployment (CI/CD) pipelines to custom dashboards and tooling.
The API is designed for developers and technical buyers who require granular control over their web projects hosted on Netlify. It facilitates various use cases, including deploying new site versions automatically upon code commits, updating environment variables, managing build hooks, and accessing deployment logs. Authentication for the API typically involves using personal access tokens or OAuth, allowing for secure integration into existing workflows and applications. The Netlify Open API specification provides an interactive reference for available endpoints and data models.
Netlify’s platform is often chosen for its focus on modern web development workflows, particularly for static site generators and single-page applications. The API extends these capabilities, allowing for the integration of Netlify services into custom toolchains. For instance, teams can write scripts to monitor deployment status, trigger redeployments based on external events, or manage team members and their permissions through automated processes.
Beyond basic deployment, the Netlify API also covers advanced features such as Netlify Forms, which collects submissions from HTML forms without requiring server-side code, and Netlify Analytics, offering insights into site traffic. Developers can programmatically configure these features or retrieve data, which is particularly useful for building custom analytics dashboards or integrating form submissions into CRM systems. The consistent REST structure and comprehensive documentation aim to provide a clear developer experience, including examples in multiple languages such as JavaScript, Go, and cURL for various endpoints.
Key features
- Site Management: Programmatically create, update, delete, and list sites, including managing custom domains and DNS records.
- Deployment Automation: Trigger new deployments, manage existing deployments, and access deployment logs, supporting CI/CD pipelines.
- Serverless Functions Control: Configure and deploy Netlify Edge Functions, which run at the edge of the network, responding to requests with low latency.
- Form Handling: Configure Netlify Forms and retrieve submitted data for integration with other services.
- Team and User Management: Manage team members, roles, and access permissions for collaborative projects.
- Build Hooks: Create and manage custom build hooks to trigger deployments from external services.
- Environment Variable Management: Programmatically set and retrieve environment variables for different deployment contexts.
- Analytics Data Access: Retrieve site analytics data for custom reporting and monitoring.
Pricing
Netlify offers a range of pricing plans, starting with a free tier suitable for individual developers and small projects, extending to paid plans for professional teams and enterprises. The pricing structure is typically based on factors such as build minutes, bandwidth, included team members, and advanced features.
| Plan Name | Description | Price (as of 2026-05-27) | Key Inclusions |
|---|---|---|---|
| Starter | For individuals and small projects | Free | 1 builder, 300 build minutes/month, 100 GB bandwidth/month |
| Pro | For professional teams | $19/user/month | 3 builders, 1,000 build minutes/month, 400 GB bandwidth/month, Netlify Analytics |
| Business | For growing businesses | Custom pricing | Advanced collaboration, increased limits, dedicated support |
| Enterprise | For large organizations | Custom pricing | Highest limits, advanced security, SLA, dedicated account management |
For detailed and up-to-date pricing information, including specifics on overages and feature availability across plans, refer to the official Netlify pricing page.
Common integrations
- GitHub/GitLab/Bitbucket: Automatically deploy sites on code pushes for continuous deployment workflows (documented in Netlify build configuration documentation).
- Content Management Systems (CMS): Integrate with headless CMS platforms like Contentful, Sanity, or Strapi to trigger builds and deploy content updates.
- Serverless Functions (AWS Lambda, Google Cloud Functions): While Netlify provides its own Edge Functions, some setups integrate with external serverless providers using webhooks.
- Monitoring and Logging Tools: Send deployment events and logs to services like Datadog or New Relic for centralized monitoring.
- E-commerce Platforms: Connect with platforms such as Stripe or Shopify to manage product data and order forms through custom serverless functions. See Stripe's API documentation for example payment integrations.
- CRM Systems: Integrate Netlify Forms submissions with CRMs like Salesforce or HubSpot for lead management.
Alternatives
- Vercel: A platform for frontend developers, offering similar deployment and serverless function capabilities for modern web projects.
- Cloudflare Pages: A platform for JAMstack deployment, leveraging Cloudflare's global network and serverless functions for performance and scalability.
- AWS Amplify: A set of tools and services for building scalable full-stack applications on AWS, including hosting, authentication, and serverless backends.
- Firebase Hosting: Google's hosting service for web apps and static content, integrated with other Firebase services like Cloud Functions and Firestore.
- GitHub Pages: A free static site hosting service directly from GitHub repositories, suitable for simpler projects and documentation.
Getting started
To begin using the Netlify API, you typically need to generate a Personal Access Token (PAT) from your Netlify account settings. This token authenticates your requests. The following cURL example demonstrates how to list all sites associated with your account using the API.
curl -X GET "https://api.netlify.com/api/v1/sites" \
-H "Authorization: Bearer YOUR_NETLIFY_ACCESS_TOKEN" \
-H "Content-Type: application/json"
Replace YOUR_NETLIFY_ACCESS_TOKEN with your actual personal access token. This request will return a JSON array containing information about each site, such as its ID, name, URL, and deployment status. More detailed examples and endpoint specifications can be found in the Netlify API Getting Started guide.
For JavaScript environments, the Netlify API can be accessed using standard HTTP client libraries like node-fetch or axios. Here's an example using Node.js to achieve the same site listing:
const fetch = require('node-fetch');
async function listNetlifySites() {
const accessToken = 'YOUR_NETLIFY_ACCESS_TOKEN';
const response = await fetch('https://api.netlify.com/api/v1/sites', {
method: 'GET',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json'
}
});
if (!response.ok) {
throw new Error(`Error fetching sites: ${response.statusText}`);
}
const sites = await response.json();
console.log('Your Netlify Sites:', sites.map(site => `${site.name} (${site.url})`));
}
listNetlifySites().catch(console.error);
This JavaScript snippet performs an authenticated GET request to the /sites endpoint and logs the names and URLs of the retrieved sites. For more complex operations, such as deploying a new version of a site or managing environment variables, the API supports various HTTP methods (POST, PUT, DELETE) and requires specific request bodies as defined in the Netlify OpenAPI documentation.