Netlify Site API

The Site API from Netlify — 4 operation(s) for site.

Operations 10

GET /sites #
POST /sites #
GET /sites/{site_id} #
PATCH /sites/{site_id} #
DELETE /sites/{site_id} #
PUT /sites/{site_id}/unlink_repo #
PUT /sites/{site_id}/enable #
PUT /sites/{site_id}/disable #
POST /{account_slug}/sites #
GET /{account_slug}/sites #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/netlify-site-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

netlify-site-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Netlify Site API
  termsOfService: https://www.netlify.com/legal/terms-of-use/
  x-logo:
    url: netlify-logo.png
    href: https://www.netlify.com/docs/
    altText: Netlify
  version: '1.0'
  description: 'Operations tagged site across 2 of this provider''s published API definitions: netlify-openapi-2.57.0-swagger.json, netlify-site-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.netlify.com/api/v1
security:
- netlifyAuth: []
tags:
- name: site
  x-displayName: Site
paths:
  /sites:
    servers:
    - url: https://api.netlify.com/api/v1
    get:
      operationId: listSites
      tags:
      - site
      parameters:
      - name: name
        in: query
        schema:
          type: string
      - name: filter
        in: query
        schema:
          type: string
          enum:
          - all
          - owner
          - guest
      - name: page
        required: false
        in: query
        schema:
          type: integer
          format: int32
      - name: per_page
        required: false
        in: query
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    state:
                      type: string
                    plan:
                      type: string
                    name:
                      type: string
                    custom_domain:
                      type: string
                    domain_aliases:
                      type: array
                      items:
                        type: string
                    branch_deploy_custom_domain:
                      type: string
                    deploy_preview_custom_domain:
                      type: string
                    password:
                      type: string
                    notification_email:
                      type: string
                    url:
                      type: string
                    ssl_url:
                      type: string
                    admin_url:
                      type: string
                    screenshot_url:
                      type: string
                    created_at:
                      type: string
                      format: dateTime
                    updated_at:
                      type: string
                      format: dateTime
                    user_id:
                      type: string
                    session_id:
                      type: string
                    ssl:
                      type: boolean
                    force_ssl:
                      type: boolean
                    managed_dns:
                      type: boolean
                    deploy_url:
                      type: string
                    published_deploy:
                      type: object
                      properties:
                        id:
                          type: string
                        site_id:
                          type: string
                        user_id:
                          type: string
                        build_id:
                          type: string
                        state:
                          type: string
                        name:
                          type: string
                        url:
                          type: string
                        ssl_url:
                          type: string
                        admin_url:
                          type: string
                        deploy_url:
                          type: string
                        deploy_ssl_url:
                          type: string
                        screenshot_url:
                          type: string
                        review_id:
                          type: number
                        draft:
                          type: boolean
                        required:
                          type: array
                          items:
                            type: string
                        required_functions:
                          type: array
                          items:
                            type: string
                        required_edge_functions:
                          type: array
                          items:
                            type: string
                          description: 'An array of code_shas for the edge-function bundles that need to be uploaded to

                            complete the deploy.

                            '
                        error_message:
                          type: string
                        branch:
                          type: string
                        commit_ref:
                          type: string
                        commit_url:
                          type: string
                        skipped:
                          type: boolean
                        created_at:
                          type: string
                          format: dateTime
                        updated_at:
                          type: string
                          format: dateTime
                        published_at:
                          type: string
                          format: dateTime
                        title:
                          type: string
                        context:
                          type: string
                        locked:
                          type: boolean
                        review_url:
                          type: string
                        framework:
                          type: string
                        skew_protection_token:
                          type: string
                        function_schedules:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                              cron:
                                type: string
                        functions_region:
                          type: string
                          description: 'The functions region for this deploy as an airport code.

                            '
                        functions_region_overrides:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                              region:
                                type: string
                          description: 'Functions in the deploy that explicitly specify their own region

                            (airport code).

                            '
                    account_id:
                      type: string
                    account_name:
                      type: string
                    account_slug:
                      type: string
                    git_provider:
                      type: string
                    deploy_hook:
                      type: string
                    capabilities:
                      type: object
                      additionalProperties:
                        type: object
                    processing_settings:
                      type: object
                      properties:
                        html:
                          type: object
                          properties:
                            pretty_urls:
                              type: boolean
                    build_settings:
                      type: object
                      properties:
                        id:
                          type: integer
                        provider:
                          type: string
                        deploy_key_id:
                          type: string
                        repo_path:
                          type: string
                        repo_branch:
                          type: string
                        dir:
                          type: string
                        functions_dir:
                          type: string
                          description: The directory where Netlify can find your compiled functions to deploy them. Defaults to netlify/functions if not set. You can also define and override this setting in your project’s netlify.toml file.
                        cmd:
                          type: string
                          description: The build command to run. This is the command that Netlify runs to build your site. If a site has a netlify.toml file with a build command it will override this value.
                        allowed_branches:
                          type: array
                          items:
                            type: string
                        public_repo:
                          type: boolean
                        private_logs:
                          type: boolean
                        repo_url:
                          type: string
                        env:
                          type: object
                          additionalProperties:
                            type: string
                        installation_id:
                          type: integer
                        stop_builds:
                          type: boolean
                          description: When true, Netlify will not build your project automatically. You can build locally via the CLI and then publish new deploys manually via the CLI or the API.
                    id_domain:
                      type: string
                    default_hooks_data:
                      type: object
                      properties:
                        access_token:
                          type: string
                    build_image:
                      type: string
                    prerender:
                      type: string
                    functions_region:
                      type: string
                    prevent_non_git_prod_deploys:
                      type: boolean
                      default: false
        default:
          description: error
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  code:
                    type: integer
                    format: int64
                  message:
                    type: string
      description: '**Note:** Environment variable keys and values have moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [getEnvVars](#tag/environmentVariables/operation/getEnvVars) to retrieve site environment variables.'
    post:
      operationId: createSite
      tags:
      - site
      parameters:
      - name: configure_dns
        in: query
        schema:
          type: boolean
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  state:
                    type: string
                  plan:
                    type: string
                  name:
                    type: string
                  custom_domain:
                    type: string
                  domain_aliases:
                    type: array
                    items:
                      type: string
                  branch_deploy_custom_domain:
                    type: string
                  deploy_preview_custom_domain:
                    type: string
                  password:
                    type: string
                  notification_email:
                    type: string
                  url:
                    type: string
                  ssl_url:
                    type: string
                  admin_url:
                    type: string
                  screenshot_url:
                    type: string
                  created_at:
                    type: string
                    format: dateTime
                  updated_at:
                    type: string
                    format: dateTime
                  user_id:
                    type: string
                  session_id:
                    type: string
                  ssl:
                    type: boolean
                  force_ssl:
                    type: boolean
                  managed_dns:
                    type: boolean
                  deploy_url:
                    type: string
                  published_deploy:
                    type: object
                    properties:
                      id:
                        type: string
                      site_id:
                        type: string
                      user_id:
                        type: string
                      build_id:
                        type: string
                      state:
                        type: string
                      name:
                        type: string
                      url:
                        type: string
                      ssl_url:
                        type: string
                      admin_url:
                        type: string
                      deploy_url:
                        type: string
                      deploy_ssl_url:
                        type: string
                      screenshot_url:
                        type: string
                      review_id:
                        type: number
                      draft:
                        type: boolean
                      required:
                        type: array
                        items:
                          type: string
                      required_functions:
                        type: array
                        items:
                          type: string
                      required_edge_functions:
                        type: array
                        items:
                          type: string
                        description: 'An array of code_shas for the edge-function bundles that need to be uploaded to

                          complete the deploy.

                          '
                      error_message:
                        type: string
                      branch:
                        type: string
                      commit_ref:
                        type: string
                      commit_url:
                        type: string
                      skipped:
                        type: boolean
                      created_at:
                        type: string
                        format: dateTime
                      updated_at:
                        type: string
                        format: dateTime
                      published_at:
                        type: string
                        format: dateTime
                      title:
                        type: string
                      context:
                        type: string
                      locked:
                        type: boolean
                      review_url:
                        type: string
                      framework:
                        type: string
                      skew_protection_token:
                        type: string
                      function_schedules:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                            cron:
                              type: string
                      functions_region:
                        type: string
                        description: 'The functions region for this deploy as an airport code.

                          '
                      functions_region_overrides:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                            region:
                              type: string
                        description: 'Functions in the deploy that explicitly specify their own region

                          (airport code).

                          '
                  account_id:
                    type: string
                  account_name:
                    type: string
                  account_slug:
                    type: string
                  git_provider:
                    type: string
                  deploy_hook:
                    type: string
                  capabilities:
                    type: object
                    additionalProperties:
                      type: object
                  processing_settings:
                    type: object
                    properties:
                      html:
                        type: object
                        properties:
                          pretty_urls:
                            type: boolean
                  build_settings:
                    type: object
                    properties:
                      id:
                        type: integer
                      provider:
                        type: string
                      deploy_key_id:
                        type: string
                      repo_path:
                        type: string
                      repo_branch:
                        type: string
                      dir:
                        type: string
                      functions_dir:
                        type: string
                        description: The directory where Netlify can find your compiled functions to deploy them. Defaults to netlify/functions if not set. You can also define and override this setting in your project’s netlify.toml file.
                      cmd:
                        type: string
                        description: The build command to run. This is the command that Netlify runs to build your site. If a site has a netlify.toml file with a build command it will override this value.
                      allowed_branches:
                        type: array
                        items:
                          type: string
                      public_repo:
                        type: boolean
                      private_logs:
                        type: boolean
                      repo_url:
                        type: string
                      env:
                        type: object
                        additionalProperties:
                          type: string
                      installation_id:
                        type: integer
                      stop_builds:
                        type: boolean
                        description: When true, Netlify will not build your project automatically. You can build locally via the CLI and then publish new deploys manually via the CLI or the API.
                  id_domain:
                    type: string
                  default_hooks_data:
                    type: object
                    properties:
                      access_token:
                        type: string
                  build_image:
                    type: string
                  prerender:
                    type: string
                  functions_region:
                    type: string
                  prevent_non_git_prod_deploys:
                    type: boolean
                    default: false
        default:
          description: error
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  code:
                    type: integer
                    format: int64
                  message:
                    type: string
      description: '**Note:** Environment variable keys and values have moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [createEnvVars](#tag/environmentVariables/operation/createEnvVars) to create environment variables for a site.'
      requestBody:
        content:
          application/json:
            schema:
              allOf:
              - type: object
                properties:
                  id:
                    type: string
                  state:
                    type: string
                  plan:
                    type: string
                  name:
                    type: string
                  custom_domain:
                    type: string
                  domain_aliases:
                    type: array
                    items:
                      type: string
                  branch_deploy_custom_domain:
                    type: string
                  deploy_preview_custom_domain:
                    type: string
                  password:
                    type: string
                  notification_email:
                    type: string
                  url:
                    type: string
                  ssl_url:
                    type: string
                  admin_url:
                    type: string
                  screenshot_url:
                    type: string
                  created_at:
                    type: string
                    format: dateTime
                  updated_at:
                    type: string
                    format: dateTime
                  user_id:
                    type: string
                  session_id:
                    type: string
                  ssl:
                    type: boolean
                  force_ssl:
                    type: boolean
                  managed_dns:
                    type: boolean
                  deploy_url:
                    type: string
                  published_deploy:
                    type: object
                    properties:
                      id:
                        type: string
                      site_id:
                        type: string
                      user_id:
                        type: string
                      build_id:
                        type: string
                      state:
                        type: string
                      name:
                        type: string
                      url:
                        type: string
                      ssl_url:
                        type: string
                      admin_url:
                        type: string
                      deploy_url:
                        type: string
                      deploy_ssl_url:
                        type: string
                      screenshot_url:
                        type: string
                      review_id:
                        type: number
                      draft:
                        type: boolean
                      required:
                        type: array
                        items:
                          type: string
                      required_functions:
                        type: array
                        items:
                          type: string
                      required_edge_functions:
                        type: array
                        items:
                          type: string
                        description: 'An array of code_shas for the edge-function bundles that need to be uploaded to

                          complete the deploy.

                          '
                      error_message:
                        type: string
                      branch:
                        type: string
                      commit_ref:
                        type: string
                      commit_url:
                        type: string
                      skipped:
                        type: boolean
                      created_at:
                        type: string
                        format: dateTime
                      updated_at:
                        type: string
                        format: dateTime
                      published_at:
                        type: string
                        format: dateTime
                      title:
                        type: string
                      context:
                        type: string
                      locked:
                        type: boolean
                      review_url:
                        type: string
                      framework:
                        type: string
                      skew_protection_token:
                        type: string
                      function_schedules:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                            cron:
                              type: string
                      functions_region:
                        type: string
                        description: 'The functions region for this deploy as an airport code.

                          '
                      functions_region_overrides:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                            region:
                              type: string
                        description: 'Functions in the deploy that explicitly specify their own region

                          (airport code).

                          '
                  account_id:
                    type: string
                  account_name:
                    type: string
                  account_slug:
                    type: string
                  git_provider:
                    type: string
                  deploy_hook:
                    type: string
                  capabilities:
                    type: object
                    additionalProperties:
                      type: object
                  processing_settings:
                    type: object
                    properties:
                      html:
                        type: object
                        properties:
                          pretty_urls:
                            type: boolean
                  build_settings:
                    type: object
                    properties:
                      id:
                        type: integer
                      provider:
                        type: string
                      deploy_key_id:
                        type: string
                      repo_path:
                        type: string
                      repo_branch:
                        type: string
                      dir:
                        type: string
                      functions_dir:
                        type: string
                        description: The directory where Netlify can find your compiled functions to deploy them. Defaults to netlify/functions if not set. You can also define and override this setting in your project’s netlify.toml file.
                      cmd:
                        type: string
                        description: The build command to run. This is the command that Netlify runs to build your site. If a site has a netlify.toml file with a build command it will override this value.
                      allowed_branches:
                        type: array
                        items:
                          type: string
                      public_repo:
                        type: boolean
                      private_logs:
                        type: boolean
                      repo_url:
                        type: string
                      env:
                        type: object
                        additionalProperties:
                          type: string
                      installation_id:
                        type: integer
                      stop_builds:
                        type: boolean
                        description: When true, Netlify will not build your project automatically. You can build locally via the CLI and then publish new deploys manually via the CLI or the API.
                  id_domain:
                    type: string
                  default_hooks_data:
                    type: object
                    properties:
                      access_token:
                        type: string
                  build_image:
                    type: string
                  prerender:
                    type: string
                  functions_region:
                    type: string
                  prevent_non_git_prod_deploys:
                    type: boolean
                    default: false
              - properties:
                  repo:
                    type: object
                    properties:
                      id:
                        type: integer
                      provider:
                        type: string
                      deploy_key_id:
                        type: string
                      repo_path:
                        type: string
                      repo_branch:
                        type: string
                      dir:
                        type: string
                      functions_dir:
                        type: string
                        description: The directory where Netlify can find your compiled functions to deploy them. Defaults to netlify/functions if not set. You can also define and override this setting in your project’s netlify.toml file.
                      cmd:
                        type: string
                        description: The build command to run. This is the command that Netlify runs to build your site. If a site has a netlify.toml file with a build command it will override this value.
                      allowed_branches:
                        type: array
                        items:
                          type: string
                      public_repo:
                        type: boolean
                      private_logs:
                        type: boolean
                      repo_url:
                        type: string
                      env:
                        type: object
                        additionalProperties:
                          type: string
                      installation_id:
                        type: integer
                      stop_builds:
                        type: boolean
                        description: When true, Netlify will not build your project automatically. You can build locally via the CLI and then publish new deploys manually via the CLI or the API.
        required: true
  /sites/{site_id}:
    parameters:
    - name: site_id
      in: path
      required: true
      schema:
        type: string
    servers:
    - url: https://api.netlify.com/api/v1
    get:
      operationId: getSite
      tags:
      - site
      parameters:
      - name: feature_flags
        x-internal: true
        in: query
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  state:
                    type: string
                  plan:
                    type: string
                  name:
                    type: string
                  custom_domain:
                    type: string
                  domain_aliases:
                    type: array
                    items:
                      type: string
                  branch_deploy_custom_domain:
                    type: string
                  deploy_preview_custom_domain:
           

# --- truncated at 32 KB (103 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/netlify/refs/heads/main/openapi/netlify-site-api-openapi.yml