Netlify's API documentation (0.11.4)

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:

Authentication

netlifyAuth

Security scheme type: OAuth2
implicit OAuth Flow
Authorization URL: https://app.netlify.com/authorize
Scopes:

    Ticket

    createTicket

    Authorizations:
    query Parameters
    client_id
    required
    string

    Responses

    201

    ok

    default

    error

    post /oauth/tickets
    https://api.netlify.com/api/v1/oauth/tickets

    Response samples

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

    showTicket

    Authorizations:
    path Parameters
    ticket_id
    required
    string

    Responses

    200

    ok

    default

    error

    get /oauth/tickets/{ticket_id}
    https://api.netlify.com/api/v1/oauth/tickets/{ticket_id}

    Response samples

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

    Access token

    exchangeTicket

    Authorizations:
    path Parameters
    ticket_id
    required
    string

    Responses

    201

    ok

    default

    error

    post /oauth/tickets/{ticket_id}/exchange
    https://api.netlify.com/api/v1/oauth/tickets/{ticket_id}/exchange

    Response samples

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

    User

    getCurrentUser

    Authorizations:

    Responses

    200

    OK

    default

    error

    get /user
    https://api.netlify.com/api/v1/user

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    [
    • {
      }
    ]

    Accounts

    listAccountsForUser

    Authorizations:

    Responses

    200

    OK

    default

    error

    get /accounts
    https://api.netlify.com/api/v1/accounts

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    [
    • {
      }
    ]

    createAccount

    Authorizations:
    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

    201

    Created

    default

    error

    post /accounts
    https://api.netlify.com/api/v1/accounts

    Request samples

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

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "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:
    path Parameters
    account_id
    required
    string

    Responses

    200

    OK

    default

    error

    get /accounts/{account_id}
    https://api.netlify.com/api/v1/accounts/{account_id}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    [
    • {
      }
    ]

    updateAccount

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

    Responses

    200

    OK

    default

    error

    put /accounts/{account_id}
    https://api.netlify.com/api/v1/accounts/{account_id}

    Request samples

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

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "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"
    }

    cancelAccount

    Authorizations:
    path Parameters
    account_id
    required
    string

    Responses

    204

    Not Content

    default

    error

    delete /accounts/{account_id}
    https://api.netlify.com/api/v1/accounts/{account_id}

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    {
    • "code": 0,
    • "message": "string"
    }

    Member

    listMembersForAccount

    Authorizations:
    path Parameters
    account_slug
    required
    string

    Responses

    200

    OK

    default

    error

    get /{account_slug}/members
    https://api.netlify.com/api/v1/{account_slug}/members

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    [
    • {
      }
    ]

    addMemberToAccount

    Authorizations:
    path Parameters
    account_slug
    required
    string
    query Parameters
    email
    required
    string
    role
    string
    Enum: "Owner" "Collaborator" "Controller"

    Responses

    200

    OK

    default

    error

    post /{account_slug}/members
    https://api.netlify.com/api/v1/{account_slug}/members

    Response samples

    Content type
    application/json
    Copy
    Expand all Collapse all
    [
    • {
      }
    ]