Netlify's API documentation
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…
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
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. Visit our Community forum to join the conversation about understanding and using Netlify’s API.
Additionally, we have two API clients for your convenience:
Endpoints 120
ticket
- POSTcreateTicket
/oauth/tickets?client_id=string - GETshowTicket
/oauth/tickets/:ticket_id
accessToken
- POSTexchangeTicket
/oauth/tickets/:ticket_id/exchange
user
- GETgetCurrentUser
/user
accountMembership
- GETlistAccountsForUser
/accounts - POSTcreateAccount
/accounts - GETgetAccount
/accounts/:account_id - PUTupdateAccount
/accounts/:account_id - DELETEcancelAccount
/accounts/:account_id
member
- GETlistMembersForAccount
/:account_slug/members - POSTaddMemberToAccount
/:account_slug/members - GETgetAccountMember
/:account_slug/members/:member_id - PUTupdateAccountMember
/:account_slug/members/:member_id - DELETEremoveAccountMember
/:account_slug/members/:member_id
accountType
- GETlistAccountTypesForUser
/accounts/types
paymentMethod
- GETlistPaymentMethodsForUser
/billing/payment_methods
auditLog
- GETlistAccountAuditEvents
/accounts/:account_id/audit?query=string&log_type=string&page=0&per_page=0
site
- GETlistSites
/sites?name=string&filter=all&page=0&per_page=0Note: Environment variable keys and values will soon be moved from build_settings.env and repo.env to a new endpoint. Please use getEnvVars to retrieve site… - POSTcreateSite
/sites?configure_dns=trueNote: Environment variable keys and values will soon be moved from build_settings.env and repo.env to a new endpoint. Please use createEnvVars to create… - GETgetSite
/sites/:site_idNote: Environment variable keys and values will soon be moved from build_settings.env and repo.env to a new endpoint. Please use getEnvVars to retrieve site… - DELETEdeleteSite
/sites/:site_id - PATCHupdateSite
/sites/:site_idNote: Environment variable keys and values will soon be moved from build_settings.env and repo.env to a new endpoint. Please use updateEnvVar to update a… - PUTunlinkSiteRepo
/sites/:site_id/unlink_repo[Beta] Unlinks the repo from the site. This action will also: Delete associated deploy keys Delete outgoing webhooks for the repo Delete the site's build hooks - GETlistSitesForAccount
/:account_slug/sites?name=string&page=0&per_page=0Note: Environment variable keys and values will soon be moved from build_settings.env and repo.env to a new endpoint. Please use getEnvVars to retrieve site… - POSTcreateSiteInTeam
/:account_slug/sites?configure_dns=trueNote: Environment variable keys and values will soon be moved from build_settings.env and repo.env to a new endpoint. Please use createEnvVars to create…
environmentVariables
- GETgetEnvVars
/accounts/:account_id/env?context_name=all&scope=builds&site_id=stringReturns 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… - POSTcreateEnvVars
/accounts/:account_id/env?site_id=stringCreates 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… - GETgetEnvVar
/accounts/:account_id/env/:key?site_id=stringReturns an individual environment variable. To use this endpoint, your site must no longer be using the <a… - PUTupdateEnvVar
/accounts/:account_id/env/:key?site_id=stringUpdates 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… - DELETEdeleteEnvVar
/accounts/:account_id/env/:key?site_id=stringDeletes an environment variable. To use this endpoint, your site must no longer be using the <a… - PATCHsetEnvVarValue
/accounts/:account_id/env/:key?site_id=stringUpdates or creates a new value for an existing environment variable. To use this endpoint, your site must no longer be using the <a… - DELETEdeleteEnvVarValue
/accounts/:account_id/env/:key/value/:id?site_id=stringDeletes a specific environment variable value. To use this endpoint, your site must no longer be using the <a…
file
- PUTuploadDeployFile
/deploys/:deploy_id/files/:path?size=0 - GETlistSiteFiles
/sites/:site_id/files - GETgetSiteFileByPathName
/sites/:site_id/files/:file_path
metadata
- GETgetSiteMetadata
/sites/:site_id/metadata - PUTupdateSiteMetadata
/sites/:site_id/metadata
snippet
- GETlistSiteSnippets
/sites/:site_id/snippets - POSTcreateSiteSnippet
/sites/:site_id/snippets - GETgetSiteSnippet
/sites/:site_id/snippets/:snippet_id - PUTupdateSiteSnippet
/sites/:site_id/snippets/:snippet_id - DELETEdeleteSiteSnippet
/sites/:site_id/snippets/:snippet_id
dnsZone
- GETgetDnsZones
/dns_zones?account_slug=string - POSTcreateDnsZone
/dns_zones - GETgetDnsZone
/dns_zones/:zone_id - DELETEdeleteDnsZone
/dns_zones/:zone_id - GETgetDnsRecords
/dns_zones/:zone_id/dns_records - POSTcreateDnsRecord
/dns_zones/:zone_id/dns_records - GETgetIndividualDnsRecord
/dns_zones/:zone_id/dns_records/:dns_record_id - DELETEdeleteDnsRecord
/dns_zones/:zone_id/dns_records/:dns_record_id - PUTtransferDnsZone
/dns_zones/:zone_id/transfer?account_id=string&transfer_account_id=string&transfer_user_id=string - GETgetDNSForSite
/sites/:site_id/dns - PUTconfigureDNSForSite
/sites/:site_id/dns
sniCertificate
- GETshowSiteTLSCertificate
/sites/:site_id/ssl - POSTprovisionSiteTLSCertificate
/sites/:site_id/ssl?certificate=string&key=string&ca_certificates=string
deploy
- GETgetDeploy
/deploys/:deploy_id - DELETEdeleteDeploy
/deploys/:deploy_id - POSTcancelSiteDeploy
/deploys/:deploy_id/cancel - POSTlockDeploy
/deploys/:deploy_id/lock - POSTunlockDeploy
/deploys/:deploy_id/unlock - GETlistSiteDeploys
/sites/:site_id/deploys?deploy-previews=true&production=true&state=new&branch=string&latest-published=true&page=0&per_page=0 - POSTcreateSiteDeploy
/sites/:site_id/deploys?deploy-previews=true&production=true&state=new&branch=string&latest-published=true&title=string - GETgetSiteDeploy
/sites/:site_id/deploys/:deploy_id - PUTupdateSiteDeploy
/sites/:site_id/deploys/:deploy_id - DELETEdeleteSiteDeploy
/sites/:site_id/deploys/:deploy_id - POSTrestoreSiteDeploy
/sites/:site_id/deploys/:deploy_id/restore - PUTrollbackSiteDeploy
/sites/:site_id/rollback
deployedBranch
- GETlistSiteDeployedBranches
/sites/:site_id/deployed-branches
deployKey
- GETlistDeployKeys
/deploy_keys - POSTcreateDeployKey
/deploy_keys - GETgetDeployKey
/deploy_keys/:key_id - DELETEdeleteDeployKey
/deploy_keys/:key_id
build
- GETgetSiteBuild
/builds/:build_id - POSTnotifyBuildStart
/builds/:build_id/start - GETlistSiteBuilds
/sites/:site_id/builds?page=0&per_page=0 - POSTcreateSiteBuild
/sites/:site_id/builds - GETgetAccountBuildStatus
/:account_id/builds/status
buildLogMsg
- POSTupdateSiteBuildLog
/builds/:build_id/log
hook
- GETlistHooksBySiteId
/hooks?site_id=string - POSTcreateHookBySiteId
/hooks?site_id=string - GETgetHook
/hooks/:hook_id - PUTupdateHook
/hooks/:hook_id - DELETEdeleteHook
/hooks/:hook_id - POSTenableHook
/hooks/:hook_id/enable
hookType
- GETlistHookTypes
/hooks/types
buildHook
- GETlistSiteBuildHooks
/sites/:site_id/build_hooks - POSTcreateSiteBuildHook
/sites/:site_id/build_hooks - GETgetSiteBuildHook
/sites/:site_id/build_hooks/:id - PUTupdateSiteBuildHook
/sites/:site_id/build_hooks/:id - DELETEdeleteSiteBuildHook
/sites/:site_id/build_hooks/:id
service
- GETgetServices
/services/?search=string - GETshowService
/services/:addonName - GETshowServiceManifest
/services/:addonName/manifest
serviceInstance
- GETlistServiceInstancesForSite
/sites/:site_id/service-instances - POSTcreateServiceInstance
/sites/:site_id/services/:addon/instances - GETshowServiceInstance
/sites/:site_id/services/:addon/instances/:instance_id - PUTupdateServiceInstance
/sites/:site_id/services/:addon/instances/:instance_id - DELETEdeleteServiceInstance
/sites/:site_id/services/:addon/instances/:instance_id
function
- PUTuploadDeployFunction
/deploys/:deploy_id/functions/:name?runtime=string&size=0
form
- GETlistSiteForms
/sites/:site_id/forms - DELETEdeleteSiteForm
/sites/:site_id/forms/:form_id
submission
- GETlistFormSubmissions
/forms/:form_id/submissions?page=0&per_page=0 - GETlistSiteSubmissions
/sites/:site_id/submissions?page=0&per_page=0 - GETlistFormSubmission
/submissions/:submission_id?query=string&page=0&per_page=0 - DELETEdeleteSubmission
/submissions/:submission_id
splitTest
- GETgetSplitTests
/sites/:site_id/traffic_splits - POSTcreateSplitTest
/sites/:site_id/traffic_splits - GETgetSplitTest
/sites/:site_id/traffic_splits/:split_test_id - PUTupdateSplitTest
/sites/:site_id/traffic_splits/:split_test_id - POSTenableSplitTest
/sites/:site_id/traffic_splits/:split_test_id/publish - POSTdisableSplitTest
/sites/:site_id/traffic_splits/:split_test_id/unpublish
asset
- GETlistSiteAssets
/sites/:site_id/assets - POSTcreateSiteAsset
/sites/:site_id/assets?name=string&size=0&content_type=string&visibility=string - GETgetSiteAssetInfo
/sites/:site_id/assets/:asset_id - PUTupdateSiteAsset
/sites/:site_id/assets/:asset_id?state=string - DELETEdeleteSiteAsset
/sites/:site_id/assets/:asset_id
assetPublicSignature
- GETgetSiteAssetPublicSignature
/sites/:site_id/assets/:asset_id/public_signature
x-internal
- POSTcreatePluginRun
/deploys/:deploy_id/plugin_runsThis is an internal-only endpoint. - GETgetLatestPluginRuns
/sites/:site_id/plugin_runs/latest?packages=string&state=stringThis is an internal-only endpoint. - PUTupdatePlugin
/sites/:site_id/plugins/:packageThis is an internal-only endpoint.
API details
- Base URL
https://api.netlify.com/api/v1- Authentication
- OAuth 2.0 (implicit flow)
- Operations
- 120 operations on 75 pathsGET 54POST 29PUT 18DELETE 17PATCH 2
- Main resources
- deploy 12dnsZone 11site 8environmentVariables 7hook 6splitTest 6accountMembership 5asset 5build 5buildHook 5
- Response formats
application/json- Description format
- Swagger 2.0, API version
2.15.0 - Listed from
- APIs.guru OpenAPI Directory (CC0-1.0)
Source updated
How to test the Netlify's API documentation in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Netlify's API documentation collection, without the publisher's secrets.
- Add your credentialsThis API uses OAuth 2.0 (implicit flow). Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “createTicket” (POST /oauth/tickets?client_id=string), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Netlify's API documentation?
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… It is listed under Developer tools and has 120 endpoints.
Who publishes the Netlify's API documentation?
It is listed from Netlify's public API description (an OpenAPI document), not published by Netlify on Swastik Codes. Anyone who controls netlify.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Netlify's API documentation?
Requests go to https://api.netlify.com/api/v1. Endpoint paths are added to this base URL.
How do I authenticate with the Netlify's API documentation?
With OAuth 2.0 (implicit flow).
How many endpoints does the Netlify's API documentation have?
120 operations on 75 paths (54 GET, 29 POST, 18 PUT, 17 DELETE, 2 PATCH). The largest groups are deploy, dnsZone, site, environmentVariables.
Is forking the Netlify's API documentation free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.