Netlify Deploy API

The Deploy API from Netlify — 8 operation(s) for deploy.

Operations 13

GET /sites/{site_id}/deploys #
POST /sites/{site_id}/deploys #
GET /sites/{site_id}/deploys/{deploy_id} #
PUT /sites/{site_id}/deploys/{deploy_id} #
DELETE /sites/{site_id}/deploys/{deploy_id} #
POST /deploys/{deploy_id}/cancel #
POST /sites/{site_id}/deploys/{deploy_id}/restore #
PUT /sites/{site_id}/rollback #
GET /deploys/{deploy_id} #
DELETE /deploys/{deploy_id} #
POST /deploys/{deploy_id}/lock #
POST /deploys/{deploy_id}/unlock #
PATCH /deploys/{deploy_id}/validations_report #

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-deploy-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-deploy-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Netlify Deploy 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 Deploy across 2 of this provider''s published API definitions: netlify-deploy-api-openapi.yml, netlify-openapi-2.57.0-swagger.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.netlify.com/api/v1
security:
- netlifyAuth: []
tags:
- name: Deploy
  x-displayName: Deploy
paths:
  /sites/{site_id}/deploys:
    parameters:
    - name: site_id
      in: path
      required: true
      schema:
        type: string
    - name: deploy-previews
      in: query
      schema:
        type: boolean
    - name: production
      in: query
      schema:
        type: boolean
    - name: state
      in: query
      schema:
        type: string
        enum:
        - new
        - pending_review
        - accepted
        - rejected
        - enqueued
        - building
        - uploading
        - uploaded
        - preparing
        - prepared
        - processing
        - processed
        - ready
        - error
        - retrying
    - name: branch
      in: query
      schema:
        type: string
    - name: latest-published
      in: query
      schema:
        type: boolean
    servers:
    - url: https://api.netlify.com/api/v1
    get:
      tags:
      - Deploy
      operationId: listSiteDeploys
      parameters:
      - name: site_id
        in: path
        required: true
        schema:
          type: string
      - name: deploy-previews
        in: query
        schema:
          type: boolean
      - name: production
        in: query
        schema:
          type: boolean
      - name: state
        in: query
        schema:
          type: string
          enum:
          - new
          - pending_review
          - accepted
          - rejected
          - enqueued
          - building
          - uploading
          - uploaded
          - preparing
          - prepared
          - processing
          - processed
          - ready
          - error
          - retrying
      - name: branch
        in: query
        schema:
          type: string
      - name: latest-published
        in: query
        schema:
          type: boolean
      - name: page
        in: query
        schema:
          type: integer
          format: int32
      - name: per_page
        in: query
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/deploy'
        default:
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
    post:
      tags:
      - Deploy
      operationId: createSiteDeploy
      parameters:
      - name: site_id
        in: path
        required: true
        schema:
          type: string
      - name: deploy-previews
        in: query
        schema:
          type: boolean
      - name: production
        in: query
        schema:
          type: boolean
      - name: state
        in: query
        schema:
          type: string
          enum:
          - new
          - pending_review
          - accepted
          - rejected
          - enqueued
          - building
          - uploading
          - uploaded
          - preparing
          - prepared
          - processing
          - processed
          - ready
          - error
          - retrying
      - name: branch
        in: query
        schema:
          type: string
      - name: latest-published
        in: query
        schema:
          type: boolean
      - name: title
        in: query
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/deployFiles'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deploy'
        default:
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      x-codegen-request-body-name: deploy
  /sites/{site_id}/deploys/{deploy_id}:
    servers:
    - url: https://api.netlify.com/api/v1
    get:
      tags:
      - Deploy
      operationId: getSiteDeploy
      parameters:
      - name: site_id
        in: path
        required: true
        schema:
          type: string
      - name: deploy_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deploy'
        default:
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
    put:
      tags:
      - Deploy
      operationId: updateSiteDeploy
      parameters:
      - name: site_id
        in: path
        required: true
        schema:
          type: string
      - name: deploy_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/deployFiles'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deploy'
        default:
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      x-codegen-request-body-name: deploy
    delete:
      tags:
      - Deploy
      operationId: deleteSiteDeploy
      parameters:
      - name: deploy_id
        in: path
        required: true
        schema:
          type: string
      - name: site_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No content
          content: {}
        default:
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
  /deploys/{deploy_id}/cancel:
    servers:
    - url: https://api.netlify.com/api/v1
    post:
      tags:
      - Deploy
      operationId: cancelSiteDeploy
      parameters:
      - name: deploy_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '201':
          description: Cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deploy'
        default:
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
  /sites/{site_id}/deploys/{deploy_id}/restore:
    servers:
    - url: https://api.netlify.com/api/v1
    post:
      tags:
      - Deploy
      operationId: restoreSiteDeploy
      parameters:
      - name: site_id
        in: path
        required: true
        schema:
          type: string
      - name: deploy_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deploy'
        default:
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
  /sites/{site_id}/rollback:
    parameters:
    - name: site_id
      in: path
      required: true
      schema:
        type: string
    servers:
    - url: https://api.netlify.com/api/v1
    put:
      tags:
      - Deploy
      operationId: rollbackSiteDeploy
      parameters:
      - name: site_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No content
          content: {}
        default:
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
  /deploys/{deploy_id}:
    servers:
    - url: https://api.netlify.com/api/v1
    get:
      tags:
      - Deploy
      operationId: getDeploy
      parameters:
      - name: deploy_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deploy'
        default:
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
    delete:
      tags:
      - Deploy
      operationId: deleteDeploy
      parameters:
      - name: deploy_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No content
          content: {}
        default:
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
  /deploys/{deploy_id}/lock:
    servers:
    - url: https://api.netlify.com/api/v1
    post:
      tags:
      - Deploy
      operationId: lockDeploy
      parameters:
      - name: deploy_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deploy'
        default:
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
  /deploys/{deploy_id}/unlock:
    servers:
    - url: https://api.netlify.com/api/v1
    post:
      tags:
      - Deploy
      operationId: unlockDeploy
      parameters:
      - name: deploy_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deploy'
        default:
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
  /deploys/{deploy_id}/validations_report:
    servers:
    - url: https://api.netlify.com/api/v1
    patch:
      operationId: updateDeployValidations
      tags:
      - Deploy
      description: Updates the deploy validations report for a deploy.
      x-internal: true
      x-controller: api/v1/deploys
      x-action: validations_report
      parameters:
      - name: deploy_id
        description: The ID of the deploy
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The id of the deploy validations report
                  deploy_id:
                    type: string
                    description: The id of the deploy
                  secret_scan_result:
                    type: object
                    properties:
                      scannedFilesCount:
                        type: integer
                        description: The number of files scanned
                      secretsScanMatches:
                        type: array
                        items:
                          type: string
                        description: The list of secrets scan matches
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                secrets_scan:
                  type: object
        required: true
components:
  schemas:
    functionConfig:
      type: object
      properties:
        display_name:
          type: string
        generator:
          type: string
        build_data:
          type: object
          properties: {}
        routes:
          type: array
          items:
            $ref: '#/components/schemas/functionRoute'
        excluded_routes:
          type: array
          items:
            $ref: '#/components/schemas/excludedFunctionRoute'
        priority:
          type: integer
        traffic_rules:
          $ref: '#/components/schemas/trafficRulesConfig'
    trafficRulesRateLimitConfig:
      type: object
      properties:
        algorithm:
          type: string
          enum:
          - sliding_window
        window_size:
          type: integer
        window_limit:
          type: integer
    trafficRulesAggregateConfig:
      type: object
      properties:
        keys:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                - ip
                - domain
    functionRoute:
      type: object
      properties:
        pattern:
          type: string
        literal:
          type: string
        expression:
          type: string
        methods:
          type: array
          items:
            type: string
            enum:
            - GET
            - POST
            - PUT
            - PATCH
            - DELETE
            - OPTIONS
        prefer_static:
          type: boolean
    deployFiles:
      type: object
      properties:
        files:
          type: object
          properties: {}
        draft:
          type: boolean
        async:
          type: boolean
        functions:
          type: object
          properties: {}
        function_schedules:
          type: array
          items:
            $ref: '#/components/schemas/functionSchedule'
        functions_config:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/functionConfig'
        branch:
          type: string
        framework:
          type: string
        framework_version:
          type: string
    trafficRulesConfig:
      type: object
      properties:
        action:
          type: object
          properties:
            type:
              type: string
            config:
              type: object
              properties:
                to:
                  type: string
                rate_limit_config:
                  $ref: '#/components/schemas/trafficRulesRateLimitConfig'
                aggregate:
                  $ref: '#/components/schemas/trafficRulesAggregateConfig'
    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
        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
        function_schedules:
          type: array
          items:
            $ref: '#/components/schemas/functionSchedule'
    error:
      required:
      - message
      type: object
      properties:
        code:
          type: integer
          format: int64
        message:
          type: string
    functionSchedule:
      type: object
      properties:
        name:
          type: string
        cron:
          type: string
    excludedFunctionRoute:
      type: object
      properties:
        pattern:
          type: string
        literal:
          type: string
        expression:
          type: string
  securitySchemes:
    netlifyAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://app.netlify.com/authorize
          scopes: {}
externalDocs:
  description: Online documentation
  url: https://www.netlify.com/docs/api/
x-refined-from:
- netlify-deploy-api-openapi.yml
- netlify-openapi-2.57.0-swagger.json
x-tagGroups:
- name: OAuth
  tags:
  - ticket
  - accessToken
- name: User accounts
  tags:
  - user
  - accountMembership
  - member
  - accountType
  - paymentMethod
  - auditLog
- name: Site
  tags:
  - site
  - environmentVariables
  - file
  - metadata
  - purge
  - snippet
- name: Domain names
  tags:
  - dnsZone
  - sniCertificate
- name: Deploys
  tags:
  - deploy
  - deployedBranch
  - deployKey
- name: Builds
  tags:
  - build
  - buildLogMsg
- name: Dev servers
  tags:
  - devServer
- name: Webhooks and notifications
  tags:
  - hook
  - hookType
  - buildHook
  - devServerHook
- name: Services
  tags:
  - service
  - serviceInstance
- name: Functions
  tags:
  - function
- name: Forms
  tags:
  - form
  - submission
- name: Split tests
  tags:
  - splitTest
- name: Large media
  tags:
  - asset
  - assetPublicSignature
x-original-swagger-version: '2.0'