close

Netlify's API documentation (2.53.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
Request Body schema: application/json
message
string

Responses

Request samples

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

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
{
  • "id": "string",
  • "uid": "string",
  • "full_name": "string",
  • "avatar_url": "string",
  • "email": "string",
  • "affiliate_id": "string",
  • "site_count": 0,
  • "created_at": "string",
  • "last_login": "string",
  • "login_providers": [
    ],
  • "onboarding_progress": {
    }
}

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
{
  • "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"
}

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
prevent_non_git_prod_deploys
boolean
Default: false
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",
  • "prevent_non_git_prod_deploys": false,
  • "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",
  • "prevent_non_git_prod_deploys": false
}

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
prevent_non_git_prod_deploys
boolean
Default: false
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",
  • "prevent_non_git_prod_deploys": false,
  • "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",
  • "prevent_non_git_prod_deploys": false
}

deleteSite

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

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

disableSite

Disables a site, preventing it from serving content. The site can be re-enabled later using the enable endpoint.

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

Reason for disabling the site

Responses

Response samples

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

enableSite

Re-enables a site that was previously disabled by the user. Sites that were disabled for usage exceeded or marked as spam cannot be re-enabled via this endpoint.

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",
  • "prevent_non_git_prod_deploys": false
}

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",
  • "prevent_non_git_prod_deploys": false
}

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
prevent_non_git_prod_deploys
boolean
Default: false
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",
  • "prevent_non_git_prod_deploys": false,
  • "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",
  • "prevent_non_git_prod_deploys": false
}

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" "dev-server" "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" "dev-server" "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" "dev-server" "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

Provisions or updates a TLS certificate for the site.

Creating a certificate (site has no certificate):

  • Omit certificate params to initiate Let's Encrypt provisioning
  • Provide certificate, key, and ca_certificates to upload a custom certificate

Updating a certificate (site already has a certificate):

  • REQUIRES certificate, key, and ca_certificates to replace with a new custom certificate
  • Use POST /api/v1/sites/{site_id}/ssl/renew to renew an existing Let's Encrypt certificate
Authorizations:
netlifyAuth
path Parameters
site_id
required
string
query Parameters
certificate
string

PEM-encoded certificate. Required when updating an existing certificate.

key
string

PEM-encoded private key. Required when updating an existing certificate.

ca_certificates
string

PEM-encoded CA certificate chain. Required when updating an existing certificate.

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",
  • "skew_protection_token": "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

A hash mapping file paths to SHA1 digests of the file contents.

zip
string <binary>

A zip file containing the site files to deploy. Alternative to 'files'. To use this field, set Content-Type to 'application/json' and include the zip content here. Alternatively, you can set Content-Type to 'application/zip' and send the zip as the raw request body (not as JSON).

draft
boolean
async
boolean
functions
object
Array of objects (functionSchedule)
object
branch
string
framework
string
framework_version
string
Array of objects (deployEnvironmentVariable)

A list of deploy-specific environment variable data. Data specified this way applies only to this specific deploy and is merged into any existing environment variables set on the account and site.

Deploy-specific environment variable data takes precedence over account and site environment variable data: For example, a deploy-specific variable with the key NODE_ENV will take priority over any existing site- and account-level environment variable data with the key NODE_ENV.

Environment variable data may be provided at one of two times:

  • When creating a new Deploy with deploy files (most common)
  • When finalizing an existing Deploy with deploy files

Once set, environment variables for a specific deploy cannot be modified. Subsequent attempts to modify environment variable data for a deploy will be ignored.

Responses

Request samples

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

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",
  • "skew_protection_token": "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",
  • "skew_protection_token": "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",
  • "skew_protection_token": "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",
  • "skew_protection_token": "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",
  • "skew_protection_token": "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",
  • "skew_protection_token": "string",
  • "function_schedules": [
    ]
}

updateSiteDeploy

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
deploy_id
required
string
query Parameters
commit_ref
string
Request Body schema: application/json
files
object

A hash mapping file paths to SHA1 digests of the file contents.

zip
string <binary>

A zip file containing the site files to deploy. Alternative to 'files'. To use this field, set Content-Type to 'application/json' and include the zip content here. Alternatively, you can set Content-Type to 'application/zip' and send the zip as the raw request body (not as JSON).

draft
boolean
async
boolean
functions
object
Array of objects (functionSchedule)
object
branch
string
framework
string
framework_version
string
Array of objects (deployEnvironmentVariable)

A list of deploy-specific environment variable data. Data specified this way applies only to this specific deploy and is merged into any existing environment variables set on the account and site.

Deploy-specific environment variable data takes precedence over account and site environment variable data: For example, a deploy-specific variable with the key NODE_ENV will take priority over any existing site- and account-level environment variable data with the key NODE_ENV.

Environment variable data may be provided at one of two times:

  • When creating a new Deploy with deploy files (most common)
  • When finalizing an existing Deploy with deploy files

Once set, environment variables for a specific deploy cannot be modified. Subsequent attempts to modify environment variable data for a deploy will be ignored.

Responses

Request samples

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

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",
  • "skew_protection_token": "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

Runs a build for a site. The build will be scheduled to run at the first opportunity, but it might not start immediately if insufficient account build capacity is available.

Files for build can be uploaded as a zipped site using one of these methods:

  1. Set Content-Type to 'application/zip' and send the zip file as the raw request body
  2. Set Content-Type to 'multipart/form-data' and include the zip file in the 'zip' field
Authorizations:
netlifyAuth
path Parameters
site_id
required
string
query Parameters
branch
string

If no branch is specified, it is treated as a production deploy If a branch IS specified and matches the main branch, it is also production If a branch is specified and doesn't match the main branch, it is a branch deploy

clear_cache
boolean

Whether to clear the build cache before building

image
string

The build image tag to use for the build

template_id
string

The build template to use for the build

title
string

The title of the build

Request Body schema: multipart/form-data
zip
string <binary>

A zip file containing the site files to build. Only used with Content-Type 'multipart/form-data'. Alternatively, set Content-Type to 'application/zip' and send the zip as the raw request body (no 'zip' parameter needed).

Responses

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
[
  • {
    }
]

getSiteBuild

Authorizations:
netlifyAuth
path Parameters
build_id
required
string

Responses

Response samples

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

listSiteBuilds

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

Responses

Response samples

Content type
application/json
[
  • {
    }
]

notifyBuildStart

Authorizations:
netlifyAuth
path Parameters
build_id
required
string
query Parameters
buildbot_version
string
build_version
string
task_id
string

Responses

Response samples

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

Build log message

updateSiteBuildLog

Authorizations:
netlifyAuth
path Parameters
build_id
required
string

Responses

Response samples

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

Dev server

createSiteDevServer

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

Responses

Response samples

Content type
application/json
[
  • {
    }
]

deleteSiteDevServers

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

Responses

Response samples

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

getSiteDevServer

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
dev_server_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "branch": "string",
  • "url": "string",
  • "state": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "starting_at": "string",
  • "error_at": "string",
  • "live_at": "string",
  • "done_at": "string",
  • "title": "string"
}

listSiteDevServers

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

Responses

Response samples

Content type
application/json
[
  • {
    }
]

updateDevServerState

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
dev_server_id
required
string
Request Body schema: application/json
state
required
string
Enum: "starting" "live" "error" "done"
task_id
string
error
string

Responses

Request samples

Content type
application/json
{
  • "state": "starting",
  • "task_id": "string",
  • "error": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "branch": "string",
  • "url": "string",
  • "state": "string",
  • "created_at": "string",
  • "updated_at": "string",
  • "starting_at": "string",
  • "error_at": "string",
  • "live_at": "string",
  • "done_at": "string",
  • "title": "string"
}

Hook

createHookBySiteId

Authorizations:
netlifyAuth
query Parameters
site_id
required
string
Request Body schema: application/json
id
string
site_id
string
type
string
event
string
data
object
created_at
string <dateTime>
updated_at
string <dateTime>
disabled
boolean

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "type": "string",
  • "event": "string",
  • "data": { },
  • "created_at": "string",
  • "updated_at": "string",
  • "disabled": true
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "type": "string",
  • "event": "string",
  • "data": { },
  • "created_at": "string",
  • "updated_at": "string",
  • "disabled": true
}

deleteHook

Authorizations:
netlifyAuth
path Parameters
hook_id
required
string

Responses

enableHook

Authorizations:
netlifyAuth
path Parameters
hook_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "type": "string",
  • "event": "string",
  • "data": { },
  • "created_at": "string",
  • "updated_at": "string",
  • "disabled": true
}

getHook

Authorizations:
netlifyAuth
path Parameters
hook_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "type": "string",
  • "event": "string",
  • "data": { },
  • "created_at": "string",
  • "updated_at": "string",
  • "disabled": true
}

listHooksBySiteId

Authorizations:
netlifyAuth
query Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

updateHook

Authorizations:
netlifyAuth
path Parameters
hook_id
required
string
Request Body schema: application/json
id
string
site_id
string
type
string
event
string
data
object
created_at
string <dateTime>
updated_at
string <dateTime>
disabled
boolean

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "type": "string",
  • "event": "string",
  • "data": { },
  • "created_at": "string",
  • "updated_at": "string",
  • "disabled": true
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "type": "string",
  • "event": "string",
  • "data": { },
  • "created_at": "string",
  • "updated_at": "string",
  • "disabled": true
}

Hook type

listHookTypes

Authorizations:
netlifyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Build hook

createSiteBuildHook

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
Request Body schema: application/json
title
string
branch
string

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "branch": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "title": "string",
  • "branch": "string",
  • "url": "string",
  • "site_id": "string",
  • "created_at": "string"
}

deleteSiteBuildHook

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
id
required
string

Responses

Response samples

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

getSiteBuildHook

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "title": "string",
  • "branch": "string",
  • "url": "string",
  • "site_id": "string",
  • "created_at": "string"
}

listSiteBuildHooks

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

updateSiteBuildHook

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
id
required
string
Request Body schema: application/json
title
string
branch
string

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "branch": "string"
}

Response samples

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

Dev server hook

createSiteDevServerHook

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
Request Body schema: application/json
title
string
branch
string
type
string
Enum: "new_dev_server" "content_refresh"

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "branch": "string",
  • "type": "new_dev_server"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "title": "string",
  • "branch": "string",
  • "url": "string",
  • "site_id": "string",
  • "created_at": "string",
  • "type": "new_dev_server"
}

deleteSiteDevServerHook

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
id
required
string

Responses

Response samples

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

getSiteDevServerHook

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "title": "string",
  • "branch": "string",
  • "url": "string",
  • "site_id": "string",
  • "created_at": "string",
  • "type": "new_dev_server"
}

listSiteDevServerHooks

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

updateSiteDevServerHook

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
id
required
string
Request Body schema: application/json
title
string
branch
string
type
string
Enum: "new_dev_server" "content_refresh"

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "branch": "string",
  • "type": "new_dev_server"
}

Response samples

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

Service

getServices

Authorizations:
netlifyAuth
query Parameters
search
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

showService

Authorizations:
netlifyAuth
path Parameters
addonName
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "slug": "string",
  • "service_path": "string",
  • "long_description": "string",
  • "description": "string",
  • "events": [
    ],
  • "tags": [
    ],
  • "icon": "string",
  • "manifest_url": "string",
  • "environments": [
    ],
  • "created_at": "string",
  • "updated_at": "string"
}

showServiceManifest

Authorizations:
netlifyAuth
path Parameters
addonName
required
string

Responses

Response samples

Content type
application/json
{ }

Service instance

createServiceInstance

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
addon
required
string
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "id": "string",
  • "url": "string",
  • "config": { },
  • "external_attributes": { },
  • "service_slug": "string",
  • "service_path": "string",
  • "service_name": "string",
  • "env": { },
  • "snippets": [
    ],
  • "auth_url": "string",
  • "created_at": "string",
  • "updated_at": "string"
}

deleteServiceInstance

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
addon
required
string
instance_id
required
string

Responses

Response samples

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

listServiceInstancesForSite

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

showServiceInstance

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
addon
required
string
instance_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "url": "string",
  • "config": { },
  • "external_attributes": { },
  • "service_slug": "string",
  • "service_path": "string",
  • "service_name": "string",
  • "env": { },
  • "snippets": [
    ],
  • "auth_url": "string",
  • "created_at": "string",
  • "updated_at": "string"
}

updateServiceInstance

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
addon
required
string
instance_id
required
string
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

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

Function

searchSiteFunctions

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

Responses

Response samples

Content type
application/json
[
  • {
    }
]

uploadDeployFunction

Authorizations:
netlifyAuth
path Parameters
deploy_id
required
string
name
required
string
query Parameters
runtime
string
invocation_mode
string
timeout
integer
size
integer
header Parameters
X-Nf-Retry-Count
integer
Request Body schema: application/octet-stream
string <binary>

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "sha": "string"
}

Database

clearSiteDatabaseComputeSettings

Resets project-level compute settings to tier defaults. Requires a Pro or higher plan.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

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

createSiteDatabase

Creates a new database for the specified site. If a database already exists, returns the existing connection string. The database region defaults to the site's functions region if not specified.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
Request Body schema: application/json
region
string

The region where the database should be created. Defaults to the site's functions region if not specified.

Responses

Request samples

Content type
application/json
{
  • "region": "string"
}

Response samples

Content type
application/json
{
  • "connection_string": "string"
}

createSiteDatabaseBranch

Creates a new database branch. If a branch already exists for the specified branch ID, returns the existing connection string.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
Request Body schema: application/json
branch_id
required
string

The branch identifier

parent_branch_id
string

The ID of the parent branch to create the new branch from. Defaults to the production branch if not specified.

object

Arbitrary metadata to associate with the branch

Responses

Request samples

Content type
application/json
{
  • "parent_branch_id": "string",
  • "branch_id": "string",
  • "metadata": { }
}

Response samples

Content type
application/json
{
  • "connection_string": "string",
  • "metadata": { }
}

createSiteDatabaseSnapshot

Creates a point-in-time snapshot of a database branch. Defaults to the production branch if no branch name is specified.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
Request Body schema: application/json
branch_id
string

The ID of the branch to snapshot. Defaults to "production" if not specified.

name
string

A name for the snapshot

object (databaseSnapshotMetadata)

Metadata associated with a snapshot

Responses

Request samples

Content type
application/json
{
  • "branch_id": "string",
  • "name": "string",
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "source_branch_id": "string",
  • "manual": true,
  • "created_at": "string",
  • "expires_at": "string",
  • "timestamp": "string",
  • "metadata": {
    }
}

deleteSiteDatabase

Deletes the database and all associated branches and snapshots for the specified site.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

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

deleteSiteDatabaseBranch

Deletes a database branch.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
branch_id
required
string

The branch ID

Responses

Response samples

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

deleteSiteDatabaseSnapshot

Deletes a database snapshot.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
snapshot_id
required
string

The snapshot ID

Responses

Response samples

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

getSiteDatabase

Returns the database connection string for the specified site.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
query Parameters
role
string
Enum: "netlifydb_owner" "netlifydb_readonly"

The database role to use for the connection string. Defaults to netlifydb_owner if not specified.

Responses

Response samples

Content type
application/json
{
  • "connection_string": "string"
}

getSiteDatabaseBranch

Returns the database branch connection string for a specific branch.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
branch_id
required
string

The branch ID

query Parameters
role
string
Enum: "netlifydb_owner" "netlifydb_readonly"

The database role to use for the connection string. Defaults to netlifydb_owner if not specified.

Responses

Response samples

Content type
application/json
{
  • "connection_string": "string",
  • "metadata": { }
}

getSiteDatabaseComputeSettings

Returns the project-level compute settings for the database. Returns effective settings (custom or tier defaults). Requires a Pro or higher plan.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
{
  • "min_cu": 0,
  • "max_cu": 0,
  • "sleep_timeout_seconds": 0
}

getSiteDatabaseMigration

Returns the contents of a named migration for the specified branch.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
name
required
string

The migration name

query Parameters
branch
string

The branch ID to look up the migration on. Defaults to the currently published deploy's branch.

Responses

Response samples

Content type
application/json
{
  • "version": 0,
  • "name": "string",
  • "path": "string",
  • "content": "string"
}

listSiteDatabaseBranches

Returns all branches for the site's database with compute status and metadata.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
{
  • "branches": [
    ]
}

listSiteDatabaseMigrations

Returns the list of migrations available for the specified branch, indicating which ones have been applied to the database.

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

The branch ID to list migrations for. Defaults to "production" if not specified.

Responses

Response samples

Content type
application/json
{
  • "migrations": [
    ]
}

listSiteDatabaseSnapshots

Returns all snapshots for the site's database.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
{
  • "snapshots": [
    ]
}

resetSiteDatabaseBranch

Resets a non-production database branch by re-forking it from a source branch (defaults to the production branch). If the target branch is already in sync with the source, returns the existing connection string without performing a reset, unless force=true is passed. The production branch cannot be reset.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
branch_id
required
string

The branch ID to reset

query Parameters
force
boolean

If true, resets the branch even when it is already in sync with the source.

role
string
Enum: "netlifydb_owner" "netlifydb_readonly"

The database role to use for the returned connection string. Defaults to netlifydb_owner if not specified.

Request Body schema: application/json
source_branch_id
string

The ID of the branch to re-fork the target branch from. Defaults to "production" if not specified.

Responses

Request samples

Content type
application/json
{
  • "source_branch_id": "string"
}

Response samples

Content type
application/json
{
  • "reset": true,
  • "connection_string": "string",
  • "metadata": { }
}

restoreSiteDatabaseSnapshot

Restores a snapshot to a database branch. Defaults to the production branch if no branch_name is specified.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
snapshot_id
required
string

The snapshot ID to restore

Request Body schema: application/json
branch_id
string

The ID of the branch to restore the snapshot to. Defaults to "production" if not specified.

Responses

Request samples

Content type
application/json
{
  • "branch_id": "string"
}

Response samples

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

runSiteDatabaseMigrations

Runs database migrations for the specified deploy. Finds the deploy and determines the appropriate branch.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
deploy_id
required
string

The deploy ID to run migrations for

Request Body schema: application/json
dry_run
boolean

If true, validates migrations without applying them.

Responses

Request samples

Content type
application/json
{
  • "dry_run": true
}

Response samples

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

setSiteDatabaseBranchComputeSettings

Sets compute settings for a specific database branch, overriding project-level settings. Requires a Pro or higher plan.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
branch_id
required
string

The branch ID

Request Body schema: application/json
min_cu
number or null <double> [ 0.25 .. 16 ]

Minimum compute units (0.25 to 16.0). Must be less than or equal to max_cu.

max_cu
number or null <double> [ 0.25 .. 16 ]

Maximum compute units (0.25 to 16.0). Must be greater than or equal to min_cu. max_cu - min_cu must not exceed 8.0.

sleep_timeout_seconds
integer or null <int64> >= -1

Seconds of inactivity before the compute endpoint is suspended. Use -1 for always on, or a non-negative value.

Responses

Request samples

Content type
application/json
{
  • "min_cu": 0.25,
  • "max_cu": 0.25,
  • "sleep_timeout_seconds": -1
}

Response samples

Content type
application/json
{
  • "min_cu": 0,
  • "max_cu": 0,
  • "sleep_timeout_seconds": 0
}

setSiteDatabaseComputeSettings

Sets project-level compute settings for the database. Applied to new branches. Can be overridden per-branch. Requires a Pro or higher plan.

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
Request Body schema: application/json
min_cu
number or null <double> [ 0.25 .. 16 ]

Minimum compute units (0.25 to 16.0). Must be less than or equal to max_cu.

max_cu
number or null <double> [ 0.25 .. 16 ]

Maximum compute units (0.25 to 16.0). Must be greater than or equal to min_cu. max_cu - min_cu must not exceed 8.0.

sleep_timeout_seconds
integer or null <int64> >= -1

Seconds of inactivity before the compute endpoint is suspended. Use -1 for always on, or a non-negative value.

Responses

Request samples

Content type
application/json
{
  • "min_cu": 0.25,
  • "max_cu": 0.25,
  • "sleep_timeout_seconds": -1
}

Response samples

Content type
application/json
{
  • "min_cu": 0,
  • "max_cu": 0,
  • "sleep_timeout_seconds": 0
}

Form

deleteSiteForm

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
form_id
required
string

Responses

Response samples

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

listSiteForms

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Form submission

deleteSubmission

Authorizations:
netlifyAuth
path Parameters
submission_id
required
string

Responses

Response samples

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

listFormSubmission

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

Responses

Response samples

Content type
application/json
[
  • {
    }
]

listFormSubmissions

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

Responses

Response samples

Content type
application/json
[
  • {
    }
]

listSiteSubmissions

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

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Split test

createSplitTest

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
Request Body schema: application/json
branch_tests
object

Responses

Request samples

Content type
application/json
{
  • "branch_tests": { }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "name": "string",
  • "path": "string",
  • "branches": [
    ],
  • "active": true,
  • "created_at": "string",
  • "updated_at": "string",
  • "unpublished_at": "string"
}

disableSplitTest

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
split_test_id
required
string

Responses

Response samples

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

enableSplitTest

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
split_test_id
required
string

Responses

Response samples

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

getSplitTest

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
split_test_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "name": "string",
  • "path": "string",
  • "branches": [
    ],
  • "active": true,
  • "created_at": "string",
  • "updated_at": "string",
  • "unpublished_at": "string"
}

getSplitTests

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

updateSplitTest

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
split_test_id
required
string
Request Body schema: application/json
branch_tests
object

Responses

Request samples

Content type
application/json
{
  • "branch_tests": { }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "name": "string",
  • "path": "string",
  • "branches": [
    ],
  • "active": true,
  • "created_at": "string",
  • "updated_at": "string",
  • "unpublished_at": "string"
}

Asset

createSiteAsset

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
query Parameters
name
required
string
size
required
integer <int64>
content_type
required
string
visibility
string

Responses

Response samples

Content type
application/json
{
  • "form": {
    },
  • "asset": {
    }
}

deleteSiteAsset

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
asset_id
required
string

Responses

Response samples

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

getSiteAssetInfo

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
asset_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "creator_id": "string",
  • "name": "string",
  • "state": "string",
  • "content_type": "string",
  • "url": "string",
  • "key": "string",
  • "visibility": "string",
  • "size": 0,
  • "created_at": "string",
  • "updated_at": "string"
}

listSiteAssets

Authorizations:
netlifyAuth
path Parameters
site_id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

updateSiteAsset

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
asset_id
required
string
query Parameters
state
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "site_id": "string",
  • "creator_id": "string",
  • "name": "string",
  • "state": "string",
  • "content_type": "string",
  • "url": "string",
  • "key": "string",
  • "visibility": "string",
  • "size": 0,
  • "created_at": "string",
  • "updated_at": "string"
}

Asset public signature

getSiteAssetPublicSignature

Authorizations:
netlifyAuth
path Parameters
site_id
required
string
asset_id
required
string

Responses

Response samples

Content type
application/json
{
  • "url": "string"
}