Netlify's API documentation (2.34.0)

Download OpenAPI specification:Download

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:

Ticket

createTicket

Authorizations:
netlifyAuth
query Parameters
client_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "client_id": "string",
  • "authorized": true,
  • "created_at": "string"
}

showTicket

Authorizations:
netlifyAuth
path Parameters
ticket_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "client_id": "string",
  • "authorized": true,
  • "created_at": "string"
}

Access token

exchangeTicket

Authorizations:
netlifyAuth
path Parameters
ticket_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "access_token": "string",
  • "user_id": "string",
  • "user_email": "string",
  • "created_at": "string"
}

User

getCurrentUser

Authorizations:
netlifyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Accounts

cancelAccount

Authorizations:
netlifyAuth
path Parameters
account_id
required
string

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

createAccount

Authorizations:
netlifyAuth
Request Body schema: application/json
name
required
string
type_id
required
string
payment_method_id
string
period
string
Enum: "monthly" "yearly"
extra_seats_block
integer

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "type_id": "string",
  • "payment_method_id": "string",
  • "period": "monthly",
  • "extra_seats_block": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "slug": "string",
  • "type": "string",
  • "capabilities": {
    },
  • "billing_name": "string",
  • "billing_email": "string",
  • "billing_details": "string",
  • "billing_period": "string",
  • "payment_method_id": "string",
  • "type_name": "string",
  • "type_id": "string",
  • "owner_ids": [
    ],
  • "roles_allowed": [
    ],
  • "created_at": "string",
  • "updated_at": "string"
}

getAccount

Authorizations:
netlifyAuth
path Parameters
account_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

listAccountsForUser

Authorizations:
netlifyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

updateAccount

Authorizations:
netlifyAuth
path Parameters
account_id
required
string
Request Body schema: application/json
name
string
slug
string
type_id
string
extra_seats_block
integer
billing_name
string
billing_email
string
billing_details
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "slug": "string",
  • "type_id": "string",
  • "extra_seats_block": 0,
  • "billing_name": "string",
  • "billing_email": "string",
  • "billing_details": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "slug": "string",
  • "type": "string",
  • "capabilities": {
    },
  • "billing_name": "string",
  • "billing_email": "string",
  • "billing_details": "string",
  • "billing_period": "string",
  • "payment_method_id": "string",
  • "type_name": "string",
  • "type_id": "string",
  • "owner_ids": [
    ],
  • "roles_allowed": [
    ],
  • "created_at": "string",
  • "updated_at": "string"
}

Member

addMemberToAccount

Authorizations:
netlifyAuth
path Parameters
account_slug
required
string
Request Body schema: application/json
role
string
Enum: "Owner" "Developer" "Billing Admin" "Reviewer"
email
string

Responses

Request samples

Content type
application/json
{
  • "role": "Owner",
  • "email": "string"
}

Response samples

Content type
application/json
[
  • {
    }
]

getAccountMember

Authorizations:
netlifyAuth
path Parameters
account_slug
required
string
member_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "full_name": "string",
  • "email": "string",
  • "avatar": "string",
  • "role": "string"
}

listMembersForAccount

Authorizations:
netlifyAuth
path Parameters
account_slug
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

removeAccountMember

Authorizations:
netlifyAuth
path Parameters
account_slug
required
string
member_id
required
string

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

updateAccountMember

Authorizations:
netlifyAuth
path Parameters
account_slug
required
string
member_id
required
string
Request Body schema: application/json
role
string
Enum: "Owner" "Developer" "Billing Admin" "Reviewer"
site_access
string
Enum: "all" "none" "selected"
site_ids
Array of strings

Responses

Request samples

Content type
application/json
{
  • "role": "Owner",
  • "site_access": "all",
  • "site_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "full_name": "string",
  • "email": "string",
  • "avatar": "string",
  • "role": "string"
}

Access type

listAccountTypesForUser

Authorizations:
netlifyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Payment method

listPaymentMethodsForUser

Authorizations:
netlifyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Audit log

listAccountAuditEvents

Authorizations:
netlifyAuth
path Parameters
account_id
required
string
query Parameters
query
string
log_type
string
page
integer <int32>
per_page
integer <int32>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Site

createSite

Note: Environment variable keys and values have moved from build_settings.env and repo.env to a new endpoint. Please use createEnvVars to create environment variables for a site.

Authorizations:
netlifyAuth
query Parameters
configure_dns
boolean
Request Body schema: application/json
id
string
state
string
plan
string
name
string
custom_domain
string
domain_aliases
Array of strings
branch_deploy_custom_domain
string
deploy_preview_custom_domain
string
password
string
notification_email
string
url
string
ssl_url
string
admin_url
string
screenshot_url
string
created_at
string <dateTime>
updated_at
string <dateTime>
user_id
string
session_id
string
ssl
boolean
force_ssl
boolean
managed_dns
boolean
deploy_url
string
object (deploy)
account_id
string
account_name
string
account_slug
string
git_provider
string
deploy_hook
string
object
object
object (repoInfo)
id_domain
string
object
build_image
string
prerender
string
functions_region
string
object (repoInfo)

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "state": "string",
  • "plan": "string",
  • "name": "string",
  • "custom_domain": "string",
  • "domain_aliases": [
    ],
  • "branch_deploy_custom_domain": "string",
  • "deploy_preview_custom_domain": "string",
  • "password": "string",
  • "notification_email": "string",
  • "url": "string",
  • "ssl_url": "string",
  • "admin_url": "string",
  • "screenshot_url": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "user_id": "string",
  • "session_id": "string",
  • "ssl": true,
  • "force_ssl": true,
  • "managed_dns": true,
  • "deploy_url": "string",
  • "published_deploy": {
    },
  • "account_id": "string",
  • "account_name": "string",
  • "account_slug": "string",
  • "git_provider": "string",
  • "deploy_hook": "string",
  • "capabilities": {
    },
  • "processing_settings": {
    },
  • "build_settings": {
    },
  • "id_domain": "string",
  • "default_hooks_data": {
    },
  • "build_image": "string",
  • "prerender": "string",
  • "functions_region": "string",
  • "repo": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "state": "string",
  • "plan": "string",
  • "name": "string",
  • "custom_domain": "string",
  • "domain_aliases": [
    ],
  • "branch_deploy_custom_domain": "string",
  • "deploy_preview_custom_domain": "string",
  • "password": "string",
  • "notification_email": "string",
  • "url": "string",
  • "ssl_url": "string",
  • "admin_url": "string",
  • "screenshot_url": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "user_id": "string",
  • "session_id": "string",
  • "ssl": true,
  • "force_ssl": true,
  • "managed_dns": true,
  • "deploy_url": "string",
  • "published_deploy": {
    },
  • "account_id": "string",
  • "account_name": "string",
  • "account_slug": "string",
  • "git_provider": "string",
  • "deploy_hook": "string",
  • "capabilities": {
    },
  • "processing_settings": {
    },
  • "build_settings": {
    },
  • "id_domain": "string",
  • "default_hooks_data": {
    },
  • "build_image": "string",
  • "prerender": "string",
  • "functions_region": "string"
}

createSiteInTeam

Note: Environment variable keys and values have moved from build_settings.env and repo.env to a new endpoint. Please use createEnvVars to create environment variables for a site.

Authorizations:
netlifyAuth
path Parameters
account_slug
required
string
query Parameters
configure_dns
boolean
Request Body schema: application/json
id
string
state
string
plan
string
name
string
custom_domain
string
domain_aliases
Array of strings
branch_deploy_custom_domain
string
deploy_preview_custom_domain
string
password
string
notification_email
string
url
string
ssl_url
string
admin_url
string
screenshot_url
string
created_at
string <dateTime>
updated_at
string <dateTime>
user_id
string
session_id
string
ssl
boolean
force_ssl
boolean
managed_dns
boolean
deploy_url
string
object (deploy)
account_id
string
account_name
string
account_slug
string
git_provider
string
deploy_hook
string
object
object
object (repoInfo)
id_domain
string
object
build_image
string
prerender
string
functions_region
string
object (repoInfo)

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "state": "string",
  • "plan": "string",
  • "name": "string",
  • "custom_domain": "string",
  • "domain_aliases": [
    ],
  • "branch_deploy_custom_domain": "string",
  • "deploy_preview_custom_domain": "string",
  • "password": "string",
  • "notification_email": "string",
  • "url": "string",
  • "ssl_url": "string",
  • "admin_url": "string",
  • "screenshot_url": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "user_id": "string",
  • "session_id": "string",
  • "ssl": true,
  • "force_ssl": true,
  • "managed_dns": true,
  • "deploy_url": "string",
  • "published_deploy": {
    },
  • "account_id": "string",
  • "account_name": "string",
  • "account_slug": "string",
  • "git_provider": "string",
  • "deploy_hook": "string",
  • "capabilities": {
    },
  • "processing_settings": {
    },
  • "build_settings": {
    },
  • "id_domain": "string",
  • "default_hooks_data": {
    },
  • "build_image": "string",
  • "prerender": "string",
  • "functions_region": "string",
  • "repo": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "state": "string",
  • "plan": "string",
  • "name": "string",
  • "custom_domain": "string",
  • "domain_aliases": [
    ],
  • "branch_deploy_custom_domain": "string",
  • "deploy_preview_custom_domain": "string",
  • "password": "string",
  • "notification_email": "string",
  • "url": "string",
  • "ssl_url": "string",
  • "admin_url": "string",
  • "screenshot_url": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "user_id": "string",
  • "session_id": "string",
  • "ssl": true,
  • "force_ssl": true,
  • "managed_dns": true,
  • "deploy_url": "string",
  • "published_deploy": {
    },
  • "account_id": "string",
  • "account_name": "string",
  • "account_slug": "string",
  • "git_provider": "string",
  • "deploy_hook": "string",
  • "capabilities": {
    },
  • "processing_settings": {
    },
  • "build_settings": {
    },
  • "id_domain": "string",
  • "default_hooks_data": {
    },
  • "build_image": "string",
  • "prerender": "string",
  • "functions_region": "string"
}

deleteSite

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

getSite

Note: Environment variable keys and values have moved from build_settings.env and repo.env to a new endpoint. Please use getEnvVars to retrieve site environment variables.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "state": "string",
  • "plan": "string",
  • "name": "string",
  • "custom_domain": "string",
  • "domain_aliases": [
    ],
  • "branch_deploy_custom_domain": "string",
  • "deploy_preview_custom_domain": "string",
  • "password": "string",
  • "notification_email": "string",
  • "url": "string",
  • "ssl_url": "string",
  • "admin_url": "string",
  • "screenshot_url": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "user_id": "string",
  • "session_id": "string",
  • "ssl": true,
  • "force_ssl": true,
  • "managed_dns": true,
  • "deploy_url": "string",
  • "published_deploy": {
    },
  • "account_id": "string",
  • "account_name": "string",
  • "account_slug": "string",
  • "git_provider": "string",
  • "deploy_hook": "string",
  • "capabilities": {
    },
  • "processing_settings": {
    },
  • "build_settings": {
    },
  • "id_domain": "string",
  • "default_hooks_data": {
    },
  • "build_image": "string",
  • "prerender": "string",
  • "functions_region": "string"
}

listSites

Note: Environment variable keys and values have moved from build_settings.env and repo.env to a new endpoint. Please use getEnvVars to retrieve site environment variables.

Authorizations:
netlifyAuth
query Parameters
name
string
filter
string
Enum: "all" "owner" "guest"
page
integer <int32>
per_page
integer <int32>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

listSitesForAccount

Note: Environment variable keys and values have moved from build_settings.env and repo.env to a new endpoint. Please use getEnvVars to retrieve site environment variables.

Authorizations:
netlifyAuth
path Parameters
account_slug
required
string
query Parameters
name
string
page
integer <int32>
per_page
integer <int32>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

unlinkSiteRepo

[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
Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "state": "string",
  • "plan": "string",
  • "name": "string",
  • "custom_domain": "string",
  • "domain_aliases": [
    ],
  • "branch_deploy_custom_domain": "string",
  • "deploy_preview_custom_domain": "string",
  • "password": "string",
  • "notification_email": "string",
  • "url": "string",
  • "ssl_url": "string",
  • "admin_url": "string",
  • "screenshot_url": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "user_id": "string",
  • "session_id": "string",
  • "ssl": true,
  • "force_ssl": true,
  • "managed_dns": true,
  • "deploy_url": "string",
  • "published_deploy": {
    },
  • "account_id": "string",
  • "account_name": "string",
  • "account_slug": "string",
  • "git_provider": "string",
  • "deploy_hook": "string",
  • "capabilities": {
    },
  • "processing_settings": {
    },
  • "build_settings": {
    },
  • "id_domain": "string",
  • "default_hooks_data": {
    },
  • "build_image": "string",
  • "prerender": "string",
  • "functions_region": "string"
}

updateSite

Note: Environment variable keys and values have moved from build_settings.env and repo.env to a new endpoint. Please use updateEnvVar to update a site's environment variables.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
Request Body schema: application/json
id
string
state
string
plan
string
name
string
custom_domain
string
domain_aliases
Array of strings
branch_deploy_custom_domain
string
deploy_preview_custom_domain
string
password
string
notification_email
string
url
string
ssl_url
string
admin_url
string
screenshot_url
string
created_at
string <dateTime>
updated_at
string <dateTime>
user_id
string
session_id
string
ssl
boolean
force_ssl
boolean
managed_dns
boolean
deploy_url
string
object (deploy)
account_id
string
account_name
string
account_slug
string
git_provider
string
deploy_hook
string
object
object
object (repoInfo)
id_domain
string
object
build_image
string
prerender
string
functions_region
string
object (repoInfo)

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "state": "string",
  • "plan": "string",
  • "name": "string",
  • "custom_domain": "string",
  • "domain_aliases": [
    ],
  • "branch_deploy_custom_domain": "string",
  • "deploy_preview_custom_domain": "string",
  • "password": "string",
  • "notification_email": "string",
  • "url": "string",
  • "ssl_url": "string",
  • "admin_url": "string",
  • "screenshot_url": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "user_id": "string",
  • "session_id": "string",
  • "ssl": true,
  • "force_ssl": true,
  • "managed_dns": true,
  • "deploy_url": "string",
  • "published_deploy": {
    },
  • "account_id": "string",
  • "account_name": "string",
  • "account_slug": "string",
  • "git_provider": "string",
  • "deploy_hook": "string",
  • "capabilities": {
    },
  • "processing_settings": {
    },
  • "build_settings": {
    },
  • "id_domain": "string",
  • "default_hooks_data": {
    },
  • "build_image": "string",
  • "prerender": "string",
  • "functions_region": "string",
  • "repo": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "state": "string",
  • "plan": "string",
  • "name": "string",
  • "custom_domain": "string",
  • "domain_aliases": [
    ],
  • "branch_deploy_custom_domain": "string",
  • "deploy_preview_custom_domain": "string",
  • "password": "string",
  • "notification_email": "string",
  • "url": "string",
  • "ssl_url": "string",
  • "admin_url": "string",
  • "screenshot_url": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "user_id": "string",
  • "session_id": "string",
  • "ssl": true,
  • "force_ssl": true,
  • "managed_dns": true,
  • "deploy_url": "string",
  • "published_deploy": {
    },
  • "account_id": "string",
  • "account_name": "string",
  • "account_slug": "string",
  • "git_provider": "string",
  • "deploy_hook": "string",
  • "capabilities": {
    },
  • "processing_settings": {
    },
  • "build_settings": {
    },
  • "id_domain": "string",
  • "default_hooks_data": {
    },
  • "build_image": "string",
  • "prerender": "string",
  • "functions_region": "string"
}

Environment variables

createEnvVars

Creates new environment variables. Granular scopes are available on Pro plans and above.

Authorizations:
netlifyAuth
path Parameters
account_id
required
string

Scope response to account_id

query Parameters
site_id
string

If provided, create an environment variable on the site level, not the account level

Request Body schema: application/json
Array
key
string

The existing or new name of the key, if you wish to rename it (case-sensitive)

scopes
Array of strings
Items Enum: "builds" "functions" "runtime" "post-processing"

The scopes that this environment variable is set to (Pro plans and above)

Array of objects (envVarValue)
is_secret
boolean

Secret values are only readable by code running on Netlify's systems. With secrets, only the local development context values are readable from the UI, API, and CLI. By default, environment variable values are not secret.

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

deleteEnvVar

Deletes an environment variable

Authorizations:
netlifyAuth
path Parameters
account_id
required
string

Scope response to account_id

key
required
string

The environment variable key (case-sensitive)

query Parameters
site_id
string

If provided, delete the environment variable from this site

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

deleteEnvVarValue

Deletes a specific environment variable value.

Authorizations:
netlifyAuth
path Parameters
account_id
required
string

Scope response to account_id

id
required
string

The environment variable value's ID

key
required
string

The environment variable key name (case-sensitive)

query Parameters
site_id
string

If provided, delete the value from an environment variable on this site

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

getEnvVar

Returns an individual environment variable.

Authorizations:
netlifyAuth
path Parameters
account_id
required
string

Scope response to account_id

key
required
string

The environment variable key (case-sensitive)

query Parameters
site_id
string

If provided, return the environment variable for a specific site (no merging is performed)

Responses

Response samples

Content type
application/json
{
  • "key": "string",
  • "scopes": [
    ],
  • "values": [
    ],
  • "is_secret": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": {
    }
}

getEnvVars

Returns all environment variables for an account or site. An account corresponds to a team in the Netlify UI.

Authorizations:
netlifyAuth
path Parameters
account_id
required
string

Scope response to account_id

query Parameters
context_name
string
Enum: "all" "dev" "branch-deploy" "deploy-preview" "production"

Filter by deploy context

scope
string
Enum: "builds" "functions" "runtime" "post-processing"

Filter by scope

site_id
string

If specified, only return environment variables set on this site

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getSiteEnvVars

Returns all environment variables for a site. This convenience method behaves the same as getEnvVars but doesn't require an account_id as input.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Scope response to site_id

query Parameters
context_name
string
Enum: "all" "dev" "branch-deploy" "deploy-preview" "production"

Filter by deploy context

scope
string
Enum: "builds" "functions" "runtime" "post_processing"

Filter by scope

Responses

Response samples

Content type
application/json
[
  • {
    }
]

setEnvVarValue

Updates or creates a new value for an existing environment variable.

Authorizations:
netlifyAuth
path Parameters
account_id
required
string

Scope response to account_id

key
required
string

The existing environment variable key name (case-sensitive)

query Parameters
site_id
string

If provided, update an environment variable set on this site

Request Body schema: application/json
context
string
Enum: "all" "dev" "branch-deploy" "deploy-preview" "production" "branch"

The deploy context in which this value will be used. dev refers to local development when running netlify dev. branch must be provided with a value in context_parameter.

context_parameter
string

An additional parameter for custom branches. Currently, this is used for providing a branch name when context=branch.

value
string

The environment variable's unencrypted value

Responses

Request samples

Content type
application/json
{
  • "context": "all",
  • "context_parameter": "string",
  • "value": "string"
}

Response samples

Content type
application/json
{
  • "key": "string",
  • "scopes": [
    ],
  • "values": [
    ],
  • "is_secret": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": {
    }
}

updateEnvVar

Updates an existing environment variable and all of its values. Existing values will be replaced by values provided.

Authorizations:
netlifyAuth
path Parameters
account_id
required
string

Scope response to account_id

key
required
string

The existing environment variable key name (case-sensitive)

query Parameters
site_id
string

If provided, update an environment variable set on this site

Request Body schema: application/json
key
string

The existing or new name of the key, if you wish to rename it (case-sensitive)

scopes
Array of strings
Items Enum: "builds" "functions" "runtime" "post-processing"

The scopes that this environment variable is set to (Pro plans and above)

Array of objects (envVarValue)
is_secret
boolean

Secret values are only readable by code running on Netlify's systems. With secrets, only the local development context values are readable from the UI, API, and CLI. By default, environment variable values are not secret.

Responses

Request samples

Content type
application/json
{
  • "key": "string",
  • "scopes": [
    ],
  • "values": [
    ],
  • "is_secret": true
}

Response samples

Content type
application/json
{
  • "key": "string",
  • "scopes": [
    ],
  • "values": [
    ],
  • "is_secret": true,
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_by": {
    }
}

File

getSiteFileByPathName

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
file_path
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "path": "string",
  • "sha": "string",
  • "mime_type": "string",
  • "size": 0
}

listSiteFiles

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

uploadDeployFile

Authorizations:
netlifyAuth
path Parameters
deploy_id
required
string
path
required
string
query Parameters
size
integer
Request Body schema: application/octet-stream
string <binary>

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "path": "string",
  • "sha": "string",
  • "mime_type": "string",
  • "size": 0
}

Metadata

getSiteMetadata

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
{ }

updateSiteMetadata

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
Request Body schema: application/json
object (metadata)

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

Cache purge

purgeCache

Purges cached content from Netlify's CDN. Supports purging by Cache-Tag.

Authorizations:
netlifyAuth
Request Body schema: application/json
site_id
string
site_slug
string
cache_tags
Array of strings

Responses

Request samples

Content type
application/json
{
  • "site_id": "string",
  • "site_slug": "string",
  • "cache_tags": [
    ]
}

Snippet

createSiteSnippet

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
Request Body schema: application/json
id
integer <int32>
site_id
string
title
string
general
string
general_position
string
goal
string
goal_position
string

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "site_id": "string",
  • "title": "string",
  • "general": "string",
  • "general_position": "string",
  • "goal": "string",
  • "goal_position": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "site_id": "string",
  • "title": "string",
  • "general": "string",
  • "general_position": "string",
  • "goal": "string",
  • "goal_position": "string"
}

deleteSiteSnippet

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
snippet_id
required
string

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

getSiteSnippet

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
snippet_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "site_id": "string",
  • "title": "string",
  • "general": "string",
  • "general_position": "string",
  • "goal": "string",
  • "goal_position": "string"
}

listSiteSnippets

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

updateSiteSnippet

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
snippet_id
required
string
Request Body schema: application/json
id
integer <int32>
site_id
string
title
string
general
string
general_position
string
goal
string
goal_position
string

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "site_id": "string",
  • "title": "string",
  • "general": "string",
  • "general_position": "string",
  • "goal": "string",
  • "goal_position": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

DNS zone

configureDNSForSite

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

createDnsRecord

Authorizations:
netlifyAuth
path Parameters
zone_id
required
string
Request Body schema: application/json
type
string
hostname
string
value
string
ttl
integer <int64>
priority
integer <int64>
weight
integer <int64>
port
integer <int64>
flag
integer <int64>
tag
string

Responses

Request samples

Content type
application/json
{
  • "type": "string",
  • "hostname": "string",
  • "value": "string",
  • "ttl": 0,
  • "priority": 0,
  • "weight": 0,
  • "port": 0,
  • "flag": 0,
  • "tag": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "hostname": "string",
  • "type": "string",
  • "value": "string",
  • "ttl": 0,
  • "priority": 0,
  • "dns_zone_id": "string",
  • "site_id": "string",
  • "flag": 0,
  • "tag": "string",
  • "managed": true
}

createDnsZone

Authorizations:
netlifyAuth
Request Body schema: application/json
account_slug
string
site_id
string
name
string

Responses

Request samples

Content type
application/json
{
  • "account_slug": "string",
  • "site_id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "errors": [
    ],
  • "supported_record_types": [
    ],
  • "user_id": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "records": [
    ],
  • "dns_servers": [
    ],
  • "account_id": "string",
  • "site_id": "string",
  • "account_slug": "string",
  • "account_name": "string",
  • "domain": "string",
  • "ipv6_enabled": true,
  • "dedicated": true
}

deleteDnsRecord

Authorizations:
netlifyAuth
path Parameters
zone_id
required
string
dns_record_id
required
string

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

deleteDnsZone

Authorizations:
netlifyAuth
path Parameters
zone_id
required
string

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

getDNSForSite

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getDnsRecords

Authorizations:
netlifyAuth
path Parameters
zone_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getDnsZone

Authorizations:
netlifyAuth
path Parameters
zone_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "errors": [
    ],
  • "supported_record_types": [
    ],
  • "user_id": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "records": [
    ],
  • "dns_servers": [
    ],
  • "account_id": "string",
  • "site_id": "string",
  • "account_slug": "string",
  • "account_name": "string",
  • "domain": "string",
  • "ipv6_enabled": true,
  • "dedicated": true
}

getDnsZones

Authorizations:
netlifyAuth
query Parameters
account_slug
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getIndividualDnsRecord

Authorizations:
netlifyAuth
path Parameters
zone_id
required
string
dns_record_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "hostname": "string",
  • "type": "string",
  • "value": "string",
  • "ttl": 0,
  • "priority": 0,
  • "dns_zone_id": "string",
  • "site_id": "string",
  • "flag": 0,
  • "tag": "string",
  • "managed": true
}

transferDnsZone

Authorizations:
netlifyAuth
path Parameters
zone_id
required
string
query Parameters
account_id
required
string

the account of the dns zone

transfer_account_id
required
string

the account you want to transfer the dns zone to

transfer_user_id
required
string

the user you want to transfer the dns zone to

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "errors": [
    ],
  • "supported_record_types": [
    ],
  • "user_id": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "records": [
    ],
  • "dns_servers": [
    ],
  • "account_id": "string",
  • "site_id": "string",
  • "account_slug": "string",
  • "account_name": "string",
  • "domain": "string",
  • "ipv6_enabled": true,
  • "dedicated": true
}

SNI certificate

getAllCertificates

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
query Parameters
domain
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

provisionSiteTLSCertificate

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
query Parameters
certificate
string
key
string
ca_certificates
string

Responses

Response samples

Content type
application/json
{
  • "state": "string",
  • "domains": [
    ],
  • "created_at": "string",
  • "updated_at": "string",
  • "expires_at": "string"
}

showSiteTLSCertificate

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
{
  • "state": "string",
  • "domains": [
    ],
  • "created_at": "string",
  • "updated_at": "string",
  • "expires_at": "string"
}

Deploy

cancelSiteDeploy

Authorizations:
netlifyAuth
path Parameters
deploy_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "user_id": "string",
  • "build_id": "string",
  • "state": "string",
  • "name": "string",
  • "url": "string",
  • "ssl_url": "string",
  • "admin_url": "string",
  • "deploy_url": "string",
  • "deploy_ssl_url": "string",
  • "screenshot_url": "string",
  • "review_id": 0,
  • "draft": true,
  • "required": [
    ],
  • "required_functions": [
    ],
  • "error_message": "string",
  • "branch": "string",
  • "commit_ref": "string",
  • "commit_url": "string",
  • "skipped": true,
  • "created_at": "string",
  • "updated_at": "string",
  • "published_at": "string",
  • "title": "string",
  • "context": "string",
  • "locked": true,
  • "review_url": "string",
  • "framework": "string",
  • "function_schedules": [
    ]
}

createSiteDeploy

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
query Parameters
deploy-previews
boolean
production
boolean
state
string
Enum: "new" "pending_review" "accepted" "rejected" "enqueued" "building" "uploading" "uploaded" "preparing" "prepared" "processing" "processed" "ready" "error" "retrying"
branch
string
latest-published
boolean
title
string
Request Body schema: application/json
files
object
draft
boolean
async
boolean
functions
object
Array of objects (functionSchedule)
object
branch
string
framework
string
framework_version
string

Responses

Request samples

Content type
application/json
{
  • "files": { },
  • "draft": true,
  • "async": true,
  • "functions": { },
  • "function_schedules": [
    ],
  • "functions_config": {
    },
  • "branch": "string",
  • "framework": "string",
  • "framework_version": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "user_id": "string",
  • "build_id": "string",
  • "state": "string",
  • "name": "string",
  • "url": "string",
  • "ssl_url": "string",
  • "admin_url": "string",
  • "deploy_url": "string",
  • "deploy_ssl_url": "string",
  • "screenshot_url": "string",
  • "review_id": 0,
  • "draft": true,
  • "required": [
    ],
  • "required_functions": [
    ],
  • "error_message": "string",
  • "branch": "string",
  • "commit_ref": "string",
  • "commit_url": "string",
  • "skipped": true,
  • "created_at": "string",
  • "updated_at": "string",
  • "published_at": "string",
  • "title": "string",
  • "context": "string",
  • "locked": true,
  • "review_url": "string",
  • "framework": "string",
  • "function_schedules": [
    ]
}

deleteDeploy

Authorizations:
netlifyAuth
path Parameters
deploy_id
required
string

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

deleteSiteDeploy

Authorizations:
netlifyAuth
path Parameters
deploy_id
required
string
site_id
required
string

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

getDeploy

Authorizations:
netlifyAuth
path Parameters
deploy_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "user_id": "string",
  • "build_id": "string",
  • "state": "string",
  • "name": "string",
  • "url": "string",
  • "ssl_url": "string",
  • "admin_url": "string",
  • "deploy_url": "string",
  • "deploy_ssl_url": "string",
  • "screenshot_url": "string",
  • "review_id": 0,
  • "draft": true,
  • "required": [
    ],
  • "required_functions": [
    ],
  • "error_message": "string",
  • "branch": "string",
  • "commit_ref": "string",
  • "commit_url": "string",
  • "skipped": true,
  • "created_at": "string",
  • "updated_at": "string",
  • "published_at": "string",
  • "title": "string",
  • "context": "string",
  • "locked": true,
  • "review_url": "string",
  • "framework": "string",
  • "function_schedules": [
    ]
}

getSiteDeploy

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
deploy_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "user_id": "string",
  • "build_id": "string",
  • "state": "string",
  • "name": "string",
  • "url": "string",
  • "ssl_url": "string",
  • "admin_url": "string",
  • "deploy_url": "string",
  • "deploy_ssl_url": "string",
  • "screenshot_url": "string",
  • "review_id": 0,
  • "draft": true,
  • "required": [
    ],
  • "required_functions": [
    ],
  • "error_message": "string",
  • "branch": "string",
  • "commit_ref": "string",
  • "commit_url": "string",
  • "skipped": true,
  • "created_at": "string",
  • "updated_at": "string",
  • "published_at": "string",
  • "title": "string",
  • "context": "string",
  • "locked": true,
  • "review_url": "string",
  • "framework": "string",
  • "function_schedules": [
    ]
}

listSiteDeploys

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
query Parameters
deploy-previews
boolean
production
boolean
state
string
Enum: "new" "pending_review" "accepted" "rejected" "enqueued" "building" "uploading" "uploaded" "preparing" "prepared" "processing" "processed" "ready" "error" "retrying"
branch
string
latest-published
boolean
page
integer <int32>
per_page
integer <int32>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

lockDeploy

Authorizations:
netlifyAuth
path Parameters
deploy_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "user_id": "string",
  • "build_id": "string",
  • "state": "string",
  • "name": "string",
  • "url": "string",
  • "ssl_url": "string",
  • "admin_url": "string",
  • "deploy_url": "string",
  • "deploy_ssl_url": "string",
  • "screenshot_url": "string",
  • "review_id": 0,
  • "draft": true,
  • "required": [
    ],
  • "required_functions": [
    ],
  • "error_message": "string",
  • "branch": "string",
  • "commit_ref": "string",
  • "commit_url": "string",
  • "skipped": true,
  • "created_at": "string",
  • "updated_at": "string",
  • "published_at": "string",
  • "title": "string",
  • "context": "string",
  • "locked": true,
  • "review_url": "string",
  • "framework": "string",
  • "function_schedules": [
    ]
}

restoreSiteDeploy

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
deploy_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "user_id": "string",
  • "build_id": "string",
  • "state": "string",
  • "name": "string",
  • "url": "string",
  • "ssl_url": "string",
  • "admin_url": "string",
  • "deploy_url": "string",
  • "deploy_ssl_url": "string",
  • "screenshot_url": "string",
  • "review_id": 0,
  • "draft": true,
  • "required": [
    ],
  • "required_functions": [
    ],
  • "error_message": "string",
  • "branch": "string",
  • "commit_ref": "string",
  • "commit_url": "string",
  • "skipped": true,
  • "created_at": "string",
  • "updated_at": "string",
  • "published_at": "string",
  • "title": "string",
  • "context": "string",
  • "locked": true,
  • "review_url": "string",
  • "framework": "string",
  • "function_schedules": [
    ]
}

rollbackSiteDeploy

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

unlockDeploy

Authorizations:
netlifyAuth
path Parameters
deploy_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "user_id": "string",
  • "build_id": "string",
  • "state": "string",
  • "name": "string",
  • "url": "string",
  • "ssl_url": "string",
  • "admin_url": "string",
  • "deploy_url": "string",
  • "deploy_ssl_url": "string",
  • "screenshot_url": "string",
  • "review_id": 0,
  • "draft": true,
  • "required": [
    ],
  • "required_functions": [
    ],
  • "error_message": "string",
  • "branch": "string",
  • "commit_ref": "string",
  • "commit_url": "string",
  • "skipped": true,
  • "created_at": "string",
  • "updated_at": "string",
  • "published_at": "string",
  • "title": "string",
  • "context": "string",
  • "locked": true,
  • "review_url": "string",
  • "framework": "string",
  • "function_schedules": [
    ]
}

updateSiteDeploy

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
deploy_id
required
string
Request Body schema: application/json
files
object
draft
boolean
async
boolean
functions
object
Array of objects (functionSchedule)
object
branch
string
framework
string
framework_version
string

Responses

Request samples

Content type
application/json
{
  • "files": { },
  • "draft": true,
  • "async": true,
  • "functions": { },
  • "function_schedules": [
    ],
  • "functions_config": {
    },
  • "branch": "string",
  • "framework": "string",
  • "framework_version": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "user_id": "string",
  • "build_id": "string",
  • "state": "string",
  • "name": "string",
  • "url": "string",
  • "ssl_url": "string",
  • "admin_url": "string",
  • "deploy_url": "string",
  • "deploy_ssl_url": "string",
  • "screenshot_url": "string",
  • "review_id": 0,
  • "draft": true,
  • "required": [
    ],
  • "required_functions": [
    ],
  • "error_message": "string",
  • "branch": "string",
  • "commit_ref": "string",
  • "commit_url": "string",
  • "skipped": true,
  • "created_at": "string",
  • "updated_at": "string",
  • "published_at": "string",
  • "title": "string",
  • "context": "string",
  • "locked": true,
  • "review_url": "string",
  • "framework": "string",
  • "function_schedules": [
    ]
}

Deployed branch

listSiteDeployedBranches

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Deploy key

createDeployKey

Authorizations:
netlifyAuth

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "public_key": "string",
  • "created_at": "string"
}

deleteDeployKey

Authorizations:
netlifyAuth
path Parameters
key_id
required
string

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

getDeployKey

Authorizations:
netlifyAuth
path Parameters
key_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "public_key": "string",
  • "created_at": "string"
}

listDeployKeys

Authorizations:
netlifyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Build

createSiteBuild

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
Request Body schema: application/json
image
string
clear_cache
boolean

Responses

Request samples

Content type
application/json
{
  • "image": "string",
  • "clear_cache": true
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "deploy_id": "string",
  • "sha": "string",
  • "done": true,
  • "error": "string",
  • "created_at": "string"
}

getAccountBuildStatus

Authorizations:
netlifyAuth
path Parameters
account_id
required
string

Responses

Response samples

Content type
application/json
[
  • {