Automattic Hosting API

The hosting API from Automattic — 23 operation(s) for hosting.

Operations 35

POST /wpcom/v2/hosting/github/accounts POST /wpcom/v2/hosting/github/accounts #
GET /wpcom/v2/hosting/github/app-authorize GET /wpcom/v2/hosting/github/app-authorize #
GET /wpcom/v2/hosting/github/app-callback GET /wpcom/v2/hosting/github/app-callback #
GET /wpcom/v2/hosting/github/app-install GET /wpcom/v2/hosting/github/app-install #
POST /wpcom/v2/hosting/github/app-webhook POST /wpcom/v2/hosting/github/app-webhook #
GET /wpcom/v2/hosting/github/installations GET /wpcom/v2/hosting/github/installations #
GET /wpcom/v2/hosting/github/repositories GET /wpcom/v2/hosting/github/repositories #
GET /wpcom/v2/hosting/github/repository/branches GET /wpcom/v2/hosting/github/repository/branches #
GET /wpcom/v2/hosting/github/repository/pre-connect-checks GET /wpcom/v2/hosting/github/repository/pre-connect-checks #
GET /wpcom/v2/hosting/github/workflow-templates GET /wpcom/v2/hosting/github/workflow-templates #
GET /wpcom/v2/hosting/github/workflows GET /wpcom/v2/hosting/github/workflows #
POST /wpcom/v2/hosting/github/workflows POST /wpcom/v2/hosting/github/workflows #
GET /wpcom/v2/hosting/github/workflows/checks GET /wpcom/v2/hosting/github/workflows/checks #
GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments #
POST /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments POST /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments #
GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id} GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id} #
POST /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id} POST /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id} #
PUT /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id} PUT /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id} #
PATCH /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id} PATCH /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id} #
DELETE /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id} DELETE /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id} #
GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/runs GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/runs #
POST /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/runs POST /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/runs #
GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/runs/{deployment_run_id}/logs GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/runs/{deployment_run_id}/logs #
GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/runs/{deployment_run_id}/logs/{command_identifier} GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/runs/{deployment_run_id}/logs/{command_identifier} #
POST /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks POST /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks #
GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks #
POST /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks/{webhook_id} POST /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks/{webhook_id} #
PUT /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks/{webhook_id} PUT /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks/{webhook_id} #
PATCH /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks/{webhook_id} PATCH /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks/{webhook_id} #
DELETE /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks/{webhook_id} DELETE /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks/{webhook_id} #
GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks/{webhook_id}/deliveries GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks/{webhook_id}/deliveries #
POST /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks/{webhook_id}/test POST /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks/{webhook_id}/test #
GET /wpcom/v2/sites/{wpcom_site}/hosting/ssh-keys GET /wpcom/v2/sites/{wpcom_site}/hosting/ssh-keys #
POST /wpcom/v2/sites/{wpcom_site}/hosting/ssh-keys POST /wpcom/v2/sites/{wpcom_site}/hosting/ssh-keys #
DELETE /wpcom/v2/sites/{wpcom_site}/hosting/ssh-keys/{user_name}/{name} DELETE /wpcom/v2/sites/{wpcom_site}/hosting/ssh-keys/{user_name}/{name} #

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/automattic-hosting-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

automattic-hosting-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WordPress.com REST API — wpcom/v2 namespace Hosting API
  version: v2
  description: Derived by API Evangelist from the WordPress.com REST API route index published at https://public-api.wordpress.com/wpcom/v2/. Paths, HTTP methods, and parameter names/types/descriptions/defaults are taken verbatim from that index. Response schemas are not published in the route index, so successful responses are described but not schematised; the error envelope was observed live on public-api.wordpress.com.
  contact:
    name: Automattic
    url: https://developer.wordpress.com/docs/api/
  x-derived-from: https://public-api.wordpress.com/wpcom/v2/
  x-derived-by: API Evangelist enrichment pipeline
servers:
- url: https://public-api.wordpress.com
security:
- bearerAuth: []
tags:
- name: hosting
paths:
  /wpcom/v2/hosting/github/accounts:
    post:
      operationId: postWpcomV2HostingGithubAccounts
      summary: POST /wpcom/v2/hosting/github/accounts
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                access_token:
                  type: string
              required:
              - access_token
  /wpcom/v2/hosting/github/app-authorize:
    get:
      operationId: getWpcomV2HostingGithubAppAuthorize
      summary: GET /wpcom/v2/hosting/github/app-authorize
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: redirect_uri
        in: query
        required: false
        schema:
          type: string
      - name: ux_mode
        in: query
        required: false
        schema:
          type: string
          default: popup
      - name: scope
        in: query
        required: false
        schema:
          type: string
          default: read:user,user:email
  /wpcom/v2/hosting/github/app-callback:
    get:
      operationId: getWpcomV2HostingGithubAppCallback
      summary: GET /wpcom/v2/hosting/github/app-callback
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: code
        in: query
        required: false
        schema:
          type: string
      - name: setup_action
        in: query
        required: false
        schema:
          type: string
          enum:
          - authorize
          - request
          - install
          - update
      - name: installation_id
        in: query
        required: false
        schema:
          type: integer
      - name: error
        in: query
        required: false
        schema:
          type: string
      - name: error_description
        in: query
        required: false
        schema:
          type: string
      - name: error_uri
        in: query
        required: false
        schema:
          type: string
      - name: state
        in: query
        required: false
        schema:
          type: string
  /wpcom/v2/hosting/github/app-install:
    get:
      operationId: getWpcomV2HostingGithubAppInstall
      summary: GET /wpcom/v2/hosting/github/app-install
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
  /wpcom/v2/hosting/github/app-webhook:
    post:
      operationId: postWpcomV2HostingGithubAppWebhook
      summary: POST /wpcom/v2/hosting/github/app-webhook
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
  /wpcom/v2/hosting/github/installations:
    get:
      operationId: getWpcomV2HostingGithubInstallations
      summary: GET /wpcom/v2/hosting/github/installations
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
  /wpcom/v2/hosting/github/repositories:
    get:
      operationId: getWpcomV2HostingGithubRepositories
      summary: GET /wpcom/v2/hosting/github/repositories
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: installation_id
        in: query
        required: true
        schema:
          type: number
        description: The installation ID of the GitHub App.
  /wpcom/v2/hosting/github/repository/branches:
    get:
      operationId: getWpcomV2HostingGithubRepositoryBranches
      summary: GET /wpcom/v2/hosting/github/repository/branches
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: installation_id
        in: query
        required: true
        schema:
          type: integer
      - name: repository_owner
        in: query
        required: true
        schema:
          type: string
      - name: repository_name
        in: query
        required: true
        schema:
          type: string
  /wpcom/v2/hosting/github/repository/pre-connect-checks:
    get:
      operationId: getWpcomV2HostingGithubRepositoryPreConnectChecks
      summary: GET /wpcom/v2/hosting/github/repository/pre-connect-checks
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: installation_id
        in: query
        required: true
        schema:
          type: integer
      - name: repository_owner
        in: query
        required: true
        schema:
          type: string
      - name: repository_name
        in: query
        required: true
        schema:
          type: string
      - name: repository_branch
        in: query
        required: true
        schema:
          type: string
  /wpcom/v2/hosting/github/workflow-templates:
    get:
      operationId: getWpcomV2HostingGithubWorkflowTemplates
      summary: GET /wpcom/v2/hosting/github/workflow-templates
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: template
        in: query
        required: true
        schema:
          type: string
          enum:
          - simple
          - with_composer
      - name: branch_name
        in: query
        required: true
        schema:
          type: string
  /wpcom/v2/hosting/github/workflows:
    get:
      operationId: getWpcomV2HostingGithubWorkflows
      summary: GET /wpcom/v2/hosting/github/workflows
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: repository_name
        in: query
        required: true
        schema:
          type: string
      - name: repository_owner
        in: query
        required: true
        schema:
          type: string
      - name: branch_name
        in: query
        required: true
        schema:
          type: string
    post:
      operationId: postWpcomV2HostingGithubWorkflows
      summary: POST /wpcom/v2/hosting/github/workflows
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                repository_owner:
                  type: string
                repository_name:
                  type: string
                branch_name:
                  type: string
                workflow_template:
                  type: string
                  enum:
                  - simple
                  - with_composer
              required:
              - repository_owner
              - repository_name
              - branch_name
              - workflow_template
  /wpcom/v2/hosting/github/workflows/checks:
    get:
      operationId: getWpcomV2HostingGithubWorkflowsChecks
      summary: GET /wpcom/v2/hosting/github/workflows/checks
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: repository_name
        in: query
        required: true
        schema:
          type: string
      - name: repository_owner
        in: query
        required: true
        schema:
          type: string
      - name: branch_name
        in: query
        required: true
        schema:
          type: string
      - name: workflow_filename
        in: query
        required: true
        schema:
          type: string
  /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments:
    get:
      operationId: getWpcomV2SitesbyWpcomSiteHostingCodeDeployments
      summary: GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: query
        in: query
        required: false
        schema:
          type: string
        description: Query term to search for code deployments
    post:
      operationId: postWpcomV2SitesbyWpcomSiteHostingCodeDeployments
      summary: POST /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                external_repository_id:
                  type: integer
                  description: The external repository ID.
                branch_name:
                  type: string
                  description: The branch to deploy.
                target_dir:
                  type: string
                  description: The target directory to deploy to.
                installation_id:
                  type: integer
                  description: The installation ID.
                is_automated:
                  type: boolean
                  description: Whether to deploy on a code push to the given branch or manually.
                workflow_path:
                  type: string
                  description: The path to the workflow file.
              required:
              - external_repository_id
              - branch_name
              - target_dir
              - installation_id
  /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}:
    get:
      operationId: getWpcomV2SitesbyWpcomSiteHostingCodeDeploymentsbyDeploymentId
      summary: GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: deployment_id
        in: path
        required: true
        schema:
          type: string
    post:
      operationId: postWpcomV2SitesbyWpcomSiteHostingCodeDeploymentsbyDeploymentId
      summary: POST /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: deployment_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                external_repository_id:
                  type: integer
                  description: The external repository ID.
                branch_name:
                  type: string
                  description: The branch to deploy.
                target_dir:
                  type: string
                  description: The target directory to deploy to.
                installation_id:
                  type: integer
                  description: The installation ID.
                is_automated:
                  type: boolean
                  description: Whether to deploy on a code push to the given branch or manually.
                workflow_path:
                  type: string
                  description: The path to the workflow file.
              required:
              - external_repository_id
              - branch_name
              - target_dir
              - installation_id
    put:
      operationId: putWpcomV2SitesbyWpcomSiteHostingCodeDeploymentsbyDeploymentId
      summary: PUT /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: deployment_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                external_repository_id:
                  type: integer
                  description: The external repository ID.
                branch_name:
                  type: string
                  description: The branch to deploy.
                target_dir:
                  type: string
                  description: The target directory to deploy to.
                installation_id:
                  type: integer
                  description: The installation ID.
                is_automated:
                  type: boolean
                  description: Whether to deploy on a code push to the given branch or manually.
                workflow_path:
                  type: string
                  description: The path to the workflow file.
              required:
              - external_repository_id
              - branch_name
              - target_dir
              - installation_id
    patch:
      operationId: patchWpcomV2SitesbyWpcomSiteHostingCodeDeploymentsbyDeploymentId
      summary: PATCH /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: deployment_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                external_repository_id:
                  type: integer
                  description: The external repository ID.
                branch_name:
                  type: string
                  description: The branch to deploy.
                target_dir:
                  type: string
                  description: The target directory to deploy to.
                installation_id:
                  type: integer
                  description: The installation ID.
                is_automated:
                  type: boolean
                  description: Whether to deploy on a code push to the given branch or manually.
                workflow_path:
                  type: string
                  description: The path to the workflow file.
              required:
              - external_repository_id
              - branch_name
              - target_dir
              - installation_id
    delete:
      operationId: deleteWpcomV2SitesbyWpcomSiteHostingCodeDeploymentsbyDeploymentId
      summary: DELETE /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: deployment_id
        in: path
        required: true
        schema:
          type: string
      - name: remove_files
        in: query
        required: false
        schema:
          type: string
        description: If true, the deployed files will be removed, if any.
  /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/runs:
    get:
      operationId: getWpcomV2SitesbyWpcomSiteHostingCodeDeploymentsbyDeploymentIdRuns
      summary: GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/runs
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: deployment_id
        in: path
        required: true
        schema:
          type: string
    post:
      operationId: postWpcomV2SitesbyWpcomSiteHostingCodeDeploymentsbyDeploymentIdRuns
      summary: POST /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/runs
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: deployment_id
        in: path
        required: true
        schema:
          type: string
  /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/runs/{deployment_run_id}/logs:
    get:
      operationId: getWpcomV2SitesbyWpcomSiteHostingCodeDeploymentsbyDeploymentIdRunsbyDeploymentRunIdLogs
      summary: GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/runs/{deployment_run_id}/logs
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: deployment_id
        in: path
        required: true
        schema:
          type: string
      - name: deployment_run_id
        in: path
        required: true
        schema:
          type: string
  /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/runs/{deployment_run_id}/logs/{command_identifier}:
    get:
      operationId: getWpcomV2SitesbyWpcomSiteHostingCodeDeploymentsbyDeploymentIdRunsbyDeploymentRunIdLogsbyCommandIdentifier
      summary: GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/runs/{deployment_run_id}/logs/{command_identifier}
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: deployment_id
        in: path
        required: true
        schema:
          type: string
      - name: deployment_run_id
        in: path
        required: true
        schema:
          type: string
      - name: command_identifier
        in: path
        required: true
        schema:
          type: string
  /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks:
    post:
      operationId: postWpcomV2SitesbyWpcomSiteHostingCodeDeploymentsbyDeploymentIdWebhooks
      summary: POST /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: deployment_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  description: Webhook URL to receive notifications.
                events:
                  type: string
                  default: building,queued,started,completed,failed,cancelled
                  description: Comma-separated list of events to subscribe to. Defaults to all events.
              required:
              - url
    get:
      operationId: getWpcomV2SitesbyWpcomSiteHostingCodeDeploymentsbyDeploymentIdWebhooks
      summary: GET /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: deployment_id
        in: path
        required: true
        schema:
          type: string
  /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks/{webhook_id}:
    post:
      operationId: postWpcomV2SitesbyWpcomSiteHostingCodeDeploymentsbyDeploymentIdWebhooksbyWebhookId
      summary: POST /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks/{webhook_id}
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: deployment_id
        in: path
        required: true
        schema:
          type: string
      - name: webhook_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  description: Webhook URL.
                events:
                  type: string
                  description: Comma-separated list of events to subscribe to.
    put:
      operationId: putWpcomV2SitesbyWpcomSiteHostingCodeDeploymentsbyDeploymentIdWebhooksbyWebhookId
      summary: PUT /wpcom/v2/sites/{wpcom_site}/hosting/code-deployments/{deployment_id}/webhooks/{webhook_id}
      tags:
      - hosting
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: deployment_id
        in: path
        required: true
        schema:
          type: string
      - name: webhook_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
          

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