openapi: 3.1.0
info:
  title: Kinsta API
  version: 1.106.0
  description: pages/introduction.md
  termsOfService: https://kinsta.com/legal/terms-service/
  x-logo:
    url: https://kinsta-api-resources.s3.amazonaws.com/kinsta-api-logo-light.svg
    href: /
  x-meta:
    title: Kinsta API - Kinsta® Docs
    description: Kinsta's REST API provides a streamlined and efficient way to work
      with our platform, allowing you to efficiently retrieve data, perform
      actions, and automate tasks.
servers:
  - url: https://api.kinsta.com/v2
tags:
  - name: Company Users
    description: pages/company-users/description.md
  - name: Domains
    description: pages/domains/description.md
  - name: Available Regions
    description: pages/available-regions/description.md
  - name: API Keys
    description: pages/api-keys/description.md
  - name: Activity Logs
    description: pages/activity-logs/description.md
  - name: WordPress Sites
    description: pages/wordpress-sites/description.md
  - name: WordPress Site Environments
    description: pages/wordpress-site-environments/description.md
  - name: WordPress Site Tools
    description: pages/wordpress-site-tools/description.md
  - name: WordPress Site Themes & Plugins
    description: pages/wordpress-site-themes-plugins/description.md
  - name: WordPress Site Domains
    description: pages/wordpress-site-domains/description.md
  - name: WordPress Edge Caching
    description: pages/wordpress-edge-caching/description.md
  - name: WordPress CDN
    description: pages/wordpress-cdn/description.md
  - name: Backups
    description: pages/backups/description.md
  - name: Logs
    description: pages/logs/description.md
  - name: Additional SFTP Users
    description: pages/additional-sftp-users/description.md
  - name: Analytics
    description: pages/analytics/description.md
  - name: Operations
    description: pages/operations/description.md
  - name: Authentication
    description: pages/authentication/description.md
x-tagGroups:
  - name: Company
    tags:
      - Company Users
      - Available Regions
      - API Keys
      - Activity Logs
      - WordPress Themes & Plugins
  - name: DNS Management
    tags:
      - Domains
  - name: WordPress Hosting
    tags:
      - WordPress Sites
      - WordPress Site Environments
      - WordPress Site Tools
      - WordPress Site Themes & Plugins
      - WordPress Site Domains
      - WordPress Edge Caching
      - WordPress CDN
      - Additional SFTP Users
      - Analytics
      - Backups
      - Logs
  - name: Utilities
    tags:
      - Operations
      - Authentication
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
  schemas:
    CompanyByIdRequestParams:
      type: object
      properties:
        id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - id
    CompanyUsersResponseSchema:
      type: object
      properties:
        company:
          type: object
          properties:
            users:
              type: array
              items:
                type: object
                properties:
                  user:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
                      email:
                        type: string
                        format: email
                        example: example@exmample.com
                      image:
                        type: string
                        format: uri
                        example: https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50
                      full_name:
                        type: string
                        example: John Doe
                    required:
                      - id
                      - email
                      - image
                      - full_name
                required:
                  - user
          required:
            - users
      required:
        - company
    StatusResponseSchema200:
      type: object
      properties:
        message:
          type: string
          example: Successfully finished request
        status:
          type: number
          example: 200
        data: {}
      required:
        - message
        - status
    StatusResponseSchema202:
      type: object
      properties:
        message:
          type: string
          example: Operation in progress
        status:
          type: number
          example: 202
        data: {}
      required:
        - message
        - status
    StatusResponseSchema400:
      type: object
      properties:
        message:
          type: string
          example: Bad request format
        status:
          type: number
          example: 400
        data: {}
      required:
        - message
        - status
    StatusResponseSchema401:
      type: object
      properties:
        message:
          type: string
          example: No or invalid API key provided to the request
        status:
          type: number
          example: 401
        data: {}
      required:
        - message
        - status
    StatusResponseSchema404:
      type: object
      properties:
        message:
          type: string
          example: Could not find data or the user does not have permissions to retrieve
            it
        status:
          type: number
          example: 404
        data: {}
      required:
        - message
        - status
    StatusResponseSchema500:
      type: object
      properties:
        message:
          type: string
          example: Error occurred while processing your request
        status:
          type: number
          example: 500
        data: {}
      required:
        - message
        - status
    CompanyApiKeysResponseSchema:
      type: object
      properties:
        api_keys:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
              name:
                type: string
                example: Public API Key
              status:
                type: string
                enum:
                  - active
                  - revoked
                  - expired
                example: active
              expires_at:
                type:
                  - string
                  - "null"
                example: 2028-08-21T08:15:21.872Z
            required:
              - id
              - name
              - status
              - expires_at
      required:
        - api_keys
    GetDomainsRequest:
      type: object
      properties:
        company:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - company
    Domain:
      type: object
      properties:
        id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        name:
          type: string
          example: mydomain.com
        site_id:
          type:
            - string
            - "null"
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        is_active:
          type: boolean
          example: true
      required:
        - id
        - name
        - site_id
        - is_active
    CompanyDomainsSchema:
      type: object
      properties:
        company:
          type: object
          properties:
            domains:
              type: array
              items:
                $ref: "#/components/schemas/Domain"
          required:
            - domains
      required:
        - company
    DomainDnsRecordsRequestParamsSchema:
      type: object
      properties:
        domain_id:
          type: string
          format: uuid
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - domain_id
    DomainDnsRecord:
      type: object
      properties:
        type:
          type: string
          example: A
        name:
          type: string
          example: abc.mydomain.com
        ttl:
          type: number
          minimum: 300
          description: TTL in seconds
          example: 3600
        resource_records:
          type: array
          items:
            type: object
            properties:
              value:
                type: string
                example: 1.1.1.1
            required:
              - value
      required:
        - type
        - name
        - ttl
        - resource_records
    DomainDnsRecordsResponseSchema:
      type: object
      properties:
        domain:
          type: object
          properties:
            dns_records:
              type: array
              items:
                $ref: "#/components/schemas/DomainDnsRecord"
          required:
            - dns_records
      required:
        - domain
    CreateDomainDnsRecordResponseSchema:
      type: object
      properties:
        operation_id:
          type: string
          example: domains:create-dns-record-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Creating a domain DNS record in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    UpdateDomainDnsRecordPreGqlResultSchema:
      type: object
      properties:
        domain:
          type: object
          properties:
            dns_records:
              type: array
              items:
                $ref: "#/components/schemas/DomainDnsRecord"
          required:
            - dns_records
      required:
        - domain
    UpdateDomainDnsRecordRequestBodySchema:
      type: object
      properties:
        type:
          type: string
          example: A
        name:
          type: string
          example: abc.mydomain.com
        ttl:
          type: number
          minimum: 300
          description: TTL in seconds
          example: 3600
        new_resource_records:
          type: array
          items:
            type: object
            properties:
              value:
                type: string
                example: 1.1.1.1
            required:
              - value
        removed_resource_records:
          type: array
          items:
            type: object
            properties:
              value:
                type: string
                example: 2.2.2.2
            required:
              - value
      required:
        - type
        - name
    UpdateDomainDnsRecordResponseSchema:
      type: object
      properties:
        operation_id:
          type: string
          example: domains:update-dns-record-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Updating a domain DNS record in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    DeleteDomainDnsRecordRequestBodyTransformerSchema:
      type: object
      properties:
        type:
          type: string
          example: A
        name:
          type: string
          example: staging.mydomain.com
      required:
        - type
        - name
    DeleteDomainDnsRecordPreGqlResultSchema:
      type: object
      properties:
        domain:
          type: object
          properties:
            dns_records:
              type: array
              items:
                $ref: "#/components/schemas/DomainDnsRecord"
          required:
            - dns_records
      required:
        - domain
    DeleteDomainDnsRecordResponseSchema:
      type: object
      properties:
        operation_id:
          type: string
          example: domains:delete-dns-record-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Deleting domain DNS record in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    ClearCacheRequestBody:
      type: object
      properties:
        environment_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - environment_id
    MKClearCacheResponse:
      type: object
      properties:
        operation_id:
          type: string
          example: cache:clear-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Clearing site cache in progress
        status:
          type: number
          example: 202
      required:
        - operation_id
        - message
        - status
    RestartPhpEngineRequestBody:
      type: object
      properties:
        environment_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - environment_id
    RestartPhpEngineResponse:
      type: object
      properties:
        operation_id:
          type: string
          example: php:restart-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Restarting PHP in progress
        status:
          type: number
          example: 202
      required:
        - operation_id
        - message
        - status
    ModifyPhpVersionRequestBody:
      type: object
      properties:
        environment_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        php_version:
          type: string
          example: "8.1"
        is_opt_out_from_automatic_php_update:
          type: boolean
          example: false
      required:
        - environment_id
        - php_version
    ModifyPhpVersionResponse:
      type: object
      properties:
        operation_id:
          type: string
          example: php:modify-version-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Modifying PHP version in progress
        status:
          type: number
          example: 202
      required:
        - operation_id
        - message
        - status
    cloneWPSite-Body:
      type: object
      properties:
        company:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        display_name:
          type: string
          example: Copy of First WP Site
        source_env_id:
          type: string
          example: 0010cdaf-0b94-472e-86bd-7edf6fceaa1c
      required:
        - company
        - display_name
        - source_env_id
    cloneWPSite-Response:
      type: object
      properties:
        operation_id:
          type: string
          example: site:clone-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Cloning site in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    addPlainWPSite-Body:
      type: object
      properties:
        company:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        display_name:
          type: string
          example: First plain site
        region:
          type: string
          example: us-central1
          externalDocs:
            url: https://kinsta.com/docs/data-center-locations/
            description: See the list of available regions
      required:
        - company
        - display_name
        - region
    addPlainWPSite-Response:
      type: object
      properties:
        operation_id:
          type: string
          example: sites:add-plain-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Adding plain site in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    addWPSite-Body:
      type: object
      properties:
        company:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        display_name:
          type: string
          example: First site
        region:
          type: string
          example: us-central1
          externalDocs:
            url: https://kinsta.com/docs/data-center-locations/
            description: See the list of available regions
        install_mode:
          type: string
          default: plain
          example: new
          enum:
            - new
            - plain
            - clone
          deprecated: true
          x-default: new
        is_subdomain_multisite:
          type: boolean
          example: false
        admin_email:
          type: string
          example: admin@example.com
        admin_password:
          type: string
          example: vJnFnN-~v)PxF[6k
        admin_user:
          type: string
          example: admin
        is_multisite:
          type: boolean
          example: false
        site_title:
          type: string
          example: My First Site
        woocommerce:
          type: boolean
          example: false
        wordpressseo:
          type: boolean
          example: false
        wp_language:
          type: string
          example: en_US
          externalDocs:
            url: https://translate.wordpress.org/
            description: Find your WordPress locale
      required:
        - company
        - display_name
        - region
        - install_mode
        - admin_email
        - admin_password
        - admin_user
        - site_title
        - wp_language
    addWPSite-Response:
      type: object
      properties:
        operation_id:
          type: string
          example: sites:add-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Adding site in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    IdEnvBodySchema:
      type: object
      properties:
        idEnv:
          type: string
          example: id-environment
      required:
        - idEnv
    SshConnection:
      type: object
      properties:
        ssh_port:
          type: string
          example: "808080"
        ssh_ip:
          type: object
          properties:
            external_ip:
              type: string
              example: 1xx.1xx.1xx.1xx
          required:
            - external_ip
      required:
        - ssh_port
        - ssh_ip
      description: "How to connect to SSH with SSH keys:
        [link](https://kinsta.com/docs/connect-to-ssh/#how-to-connect-to-ssh-wi\
        th-ssh-keys)."
    ContainerInfo:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        php_engine_version:
          type: string
          example: php8.3
      required:
        - id
        - php_engine_version
    EnvSiteDomain:
      type: object
      properties:
        id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        name:
          type: string
          example: mydomain.com
        type:
          type: string
          example: live
        site_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - id
        - name
        - type
        - site_id
    Environment:
      type: object
      properties:
        id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        name:
          type: string
          example: live
        display_name:
          type: string
          example: Live
        is_blocked:
          type: boolean
          example: false
        id_edge_cache:
          type:
            - string
            - "null"
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        cdn_cache_id:
          type:
            - string
            - "null"
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        is_opt_out_from_automatic_php_update:
          type:
            - boolean
            - "null"
          example: false
        web_root:
          type: string
          example: /release_v1
        image_optimization_type:
          type:
            - string
            - "null"
          example: lossy
          enum:
            - off
            - lossy
            - lossless
        is_additional_sftp_accounts_enabled:
          type: boolean
          example: false
        is_premium:
          type: boolean
          example: false
        wordpress_version:
          type:
            - string
            - "null"
          example: 6.3.1
        domains:
          type: array
          items:
            $ref: "#/components/schemas/EnvSiteDomain"
        primaryDomain:
          $ref: "#/components/schemas/EnvSiteDomain"
        ssh_connection:
          $ref: "#/components/schemas/SshConnection"
        container_info:
          $ref: "#/components/schemas/ContainerInfo"
      required:
        - id
        - name
        - display_name
        - is_blocked
        - id_edge_cache
        - cdn_cache_id
        - is_opt_out_from_automatic_php_update
        - web_root
        - image_optimization_type
        - is_additional_sftp_accounts_enabled
        - is_premium
        - wordpress_version
        - domains
        - primaryDomain
        - ssh_connection
        - container_info
    getSites-Query:
      type: object
      properties:
        company:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        include_environments:
          type:
            - boolean
            - "null"
          default: false
          example: true
          x-default: true
      required:
        - company
    getSites-Site:
      type: object
      properties:
        id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        name:
          type: string
          example: firstsite
        display_name:
          type: string
          example: First site
        status:
          type: string
          example: live
        siteLabels:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
              name:
                type: string
                example: Do not remove
            required:
              - id
              - name
        environments:
          type: array
          items:
            $ref: "#/components/schemas/Environment"
      required:
        - id
        - name
        - display_name
        - status
    getSites-Response:
      type: object
      properties:
        company:
          type: object
          properties:
            sites:
              type: array
              items:
                $ref: "#/components/schemas/getSites-Site"
          required:
            - sites
      required:
        - company
    SiteById-Params:
      type: object
      properties:
        site_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - site_id
    SiteById-Environment:
      type: object
      properties:
        id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        name:
          type: string
          example: first-site
        display_name:
          type: string
          example: First site
        is_premium:
          type: boolean
          example: false
        is_blocked:
          type: boolean
          example: false
        domains:
          type: array
          items:
            $ref: "#/components/schemas/EnvSiteDomain"
        primaryDomain:
          $ref: "#/components/schemas/EnvSiteDomain"
      required:
        - id
        - name
        - display_name
        - is_premium
        - is_blocked
        - domains
        - primaryDomain
    SiteById-Site:
      type: object
      properties:
        id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        name:
          type: string
          example: first-site
        display_name:
          type: string
          example: Site Name
        company_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        status:
          type: string
          example: live
        environments:
          type: array
          items:
            $ref: "#/components/schemas/SiteById-Environment"
      required:
        - id
        - name
        - display_name
        - company_id
        - status
        - environments
    SiteById-Response:
      type: object
      properties:
        site:
          $ref: "#/components/schemas/SiteById-Site"
      required:
        - site
    deleteWpSite-Params:
      type: object
      properties:
        site_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - site_id
    deleteWpSite-Response:
      type: object
      properties:
        operation_id:
          type: string
          example: sites:delete-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Deleting site in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    WpSiteEnvironmentPluginsParamsSchema:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    UpdateWpEnvironmentRequestBodySchema:
      type: object
      properties:
        name:
          type: string
          example: akismet
        update_version:
          type: string
          example: "5.3"
      required:
        - name
        - update_version
    GetWpSiteEnvironmentPluginsResponseSchema:
      type: object
      properties:
        environment:
          type: object
          properties:
            id:
              type: string
              format: uuid
              example: 54fb80af-576c-4fdc-ba4f-b596c83f15b2
            container_info:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  example: 54fb80af-576c-4fdc-ba4f-b596c83f15c3
                wp_plugins:
                  type: object
                  properties:
                    data:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            example: akismet
                          title:
                            type: string
                            example: "Akismet Anti-Spam: Spam Protection"
                          status:
                            type: string
                            example: active
                          version:
                            type: string
                            example: 1.0.0
                          update:
                            type: string
                            example: available
                          update_version:
                            type:
                              - string
                              - "null"
                            example: 1.0.1
                          update_status:
                            type:
                              - string
                              - "null"
                            example: updated
                        required:
                          - name
                          - title
                          - status
                          - version
                          - update
                          - update_version
                          - update_status
                  required:
                    - data
              required:
                - id
                - wp_plugins
          required:
            - id
            - container_info
      required:
        - environment
    UpdateWpEnvironmentPluginResponseSchema:
      type: object
      properties:
        operation_id:
          type: string
          example: wp-plugin:update-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Updating WordPress plugin in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    BulkUpdateWpEnvironmentPluginsRequestBodySchema:
      type: object
      properties:
        plugins:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                example: akismet
            required:
              - name
      required:
        - plugins
    BulkUpdateWpEnvironmentPluginsResponseSchema:
      type: object
      properties:
        operation_id:
          type: string
          example: wp-plugins:bulk-update-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Bulk-updating WordPress plugins in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    GetWpSiteEnvironmentThemesResponseSchema:
      type: object
      properties:
        environment:
          type: object
          properties:
            id:
              type: string
              format: uuid
              example: 54fb80af-576c-4fdc-ba4f-b596c83f15b2
            container_info:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  example: 54fb80af-576c-4fdc-ba4f-b596c83f15c3
                wp_themes:
                  type: object
                  properties:
                    data:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            example: twentytwentythree
                          title:
                            type: string
                            example: Twenty Twenty Three
                          status:
                            type: string
                            example: active
                          version:
                            type: string
                            example: 1.0.0
                          update:
                            type: string
                            example: available
                          update_version:
                            type:
                              - string
                              - "null"
                            example: 1.0.1
                          update_status:
                            type:
                              - string
                              - "null"
                            example: updated
                        required:
                          - name
                          - title
                          - status
                          - version
                          - update
                          - update_version
                          - update_status
                  required:
                    - data
              required:
                - id
                - wp_themes
          required:
            - id
            - container_info
      required:
        - environment
    UpdateWpEnvironmentThemeResponseSchema:
      type: object
      properties:
        operation_id:
          type: string
          example: wp-theme:update-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Updating WordPress theme in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    BulkUpdateWpEnvironmentThemesRequestBodySchema:
      type: object
      properties:
        themes:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                example: twenty-twenty-three
            required:
              - name
      required:
        - themes
    BulkUpdateWpEnvironmentThemesResponseSchema:
      type: object
      properties:
        operation_id:
          type: string
          example: wp-themes:bulk-update-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Bulk-updating WordPress themes in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    SiteDomainRequestParamsSchema:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    AddSiteDomainRequestBodySchema:
      type: object
      properties:
        domain_name:
          type: string
        is_wildcardless:
          type: boolean
          default: true
        add_with_www_subdomain:
          type: boolean
          default: false
          description: Cannot be enabled when is_wildcardless is true.
        setup_type:
          type: string
          enum:
            - quick
            - avoid_downtime
          default: quick
        custom_ssl_key:
          type: string
        custom_ssl_cert:
          type: string
      required:
        - domain_name
    AddSiteDomainResponseSchema:
      type: object
      properties:
        operation_id:
          type: string
          example: sites:add-domain-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Adding site domain in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    DeleteSiteDomainRequestBodySchema:
      type: object
      properties:
        domain_ids:
          type: array
          items:
            type: string
          example:
            - 54fb80af-576c-4fdc-ba4f-b596c83f15a1
            - 3b2b80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - domain_ids
    DeleteSiteDomainResponseSchema:
      type: object
      properties:
        operation_id:
          type: string
          example: sites:delete-domain-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Deleting site domain in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    SiteDomain:
      type: object
      properties:
        id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        name:
          type: string
          example: mydomain.com
        uses_cloudflare_dns:
          type: boolean
          example: true
      required:
        - id
        - name
        - uses_cloudflare_dns
    GetSiteDomainsResponseSchema:
      type: object
      properties:
        environment:
          type: object
          properties:
            site_domains:
              type: array
              items:
                $ref: "#/components/schemas/SiteDomain"
          required:
            - site_domains
      required:
        - environment
    GetVerificationRecordsRequestParamsSchema:
      type: object
      properties:
        site_domain_id:
          type: string
          format: uuid
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - site_domain_id
    VerificationDnsRecord:
      type: object
      properties:
        name:
          type: string
          example: _acme-challenge.staging.example-site.io
        value:
          type: string
          example: staging.example-site.io.kinstavalidation.app
        type:
          type: string
          example: CNAME
      required:
        - name
        - value
        - type
    PointingDnsRecord:
      type: object
      properties:
        name:
          type: string
          example: staging.example-site.io
        value:
          type: string
          example: 192.0.2.10
        type:
          type: string
          example: A
      required:
        - name
        - value
        - type
    GetVerificationRecordsResponseSchema:
      type: object
      properties:
        site_domain:
          type: object
          properties:
            verification_records:
              type: array
              items:
                $ref: "#/components/schemas/VerificationDnsRecord"
            pointing_records:
              type: array
              items:
                $ref: "#/components/schemas/PointingDnsRecord"
          required:
            - verification_records
            - pointing_records
      required:
        - site_domain
      example:
        site_domain:
          verification_records:
            - name: _acme-challenge.staging.example-site.io
              value: staging.example-site.io.kinstavalidation.app
              type: CNAME
          pointing_records:
            - name: staging.example-site.io
              value: 192.0.2.10
              type: A
            - name: www
              value: staging.example-site.io
              type: CNAME
    ChangePrimaryDomainRequestBodySchema:
      type: object
      properties:
        domain_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        run_search_and_replace:
          type: boolean
          default: false
          example: true
          x-default: true
      required:
        - domain_id
        - run_search_and_replace
    ChangePrimaryDomainResponseSchema:
      type: object
      properties:
        operation_id:
          type: string
          example: sites:change-primary-domain-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Changing primary site domain in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    GetEnvironments-Params:
      type: object
      properties:
        site_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - site_id
    GetEnvironments-Response:
      type: object
      properties:
        site:
          type: object
          properties:
            environments:
              type: array
              items:
                $ref: "#/components/schemas/Environment"
          required:
            - environments
      required:
        - site
    addWPEnvironment-Body:
      type: object
      properties:
        display_name:
          type: string
          example: development
        site_title:
          type: string
          example: My First Site - development
        is_premium:
          type: boolean
          example: false
        is_subdomain_multisite:
          type: boolean
          example: false
        admin_email:
          type: string
          example: admin@example.com
        admin_password:
          type: string
          example: vJnFnN-~v)PxF[6k
        admin_user:
          type: string
          example: admin
        is_multisite:
          type: boolean
          example: false
        woocommerce:
          type: boolean
          example: false
        wordpress_plugin_edd:
          type: boolean
          example: false
        wordpressseo:
          type: boolean
          example: false
        wp_language:
          type: string
          example: en_US
          externalDocs:
            url: https://translate.wordpress.org/
            description: Find your WordPress locale
      required:
        - display_name
        - site_title
        - is_premium
        - admin_email
        - admin_password
        - admin_user
        - wp_language
    addWPEnvironment-Response:
      type: object
      properties:
        operation_id:
          type: string
          example: environment:add-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Adding environment in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    resetSite-Params:
      type: object
      properties:
        site_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - site_id
    resetSite-Body:
      type: object
      properties:
        admin_password:
          type: string
          example: vJnFnN-~v)PxF[6k
      required:
        - admin_password
    resetSite-Response:
      type: object
      properties:
        operation_id:
          type: string
          example: sites:reset-site-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Reset site in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    cloneWpEnvironment-Body:
      type: object
      properties:
        display_name:
          type: string
          example: development
        is_premium:
          type: boolean
          example: false
      required:
        - display_name
        - is_premium
    cloneWpEnvironment-Response:
      type: object
      properties:
        operation_id:
          type: string
          example: environment:clone-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Creating plain environment in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    deleteWpEnvironment-Params:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    deleteWpEnvironment-Response:
      type: object
      properties:
        operation_id:
          type: string
          example: environments:delete-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Deleting environment in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    PushEnvironmentRequestBody:
      type: object
      properties:
        source_env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        target_env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        push_db:
          type: boolean
          default: true
          example: true
          x-default: true
        push_files:
          type: boolean
          default: true
          example: true
          x-default: true
        run_search_and_replace:
          type: boolean
          default: true
          example: true
          x-default: true
        push_files_option:
          type: string
          enum:
            - ALL_FILES
            - SPECIFIC_FILES
          default: ALL_FILES
          example: SPECIFIC_FILES
          x-default: SPECIFIC_FILES
        file_list:
          type: array
          items:
            type: string
          example:
            - wp-content/plugins
            - wp-content/themes
            - wp-content/uploads
      required:
        - source_env_id
        - target_env_id
    PushEnvironmentResponse:
      type: object
      properties:
        operation_id:
          type: string
          example: environments:push-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Pushing environment in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    changeEnvironmentPhpAllocation-Params:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    changeEnvironmentPhpAllocation-Body:
      type: object
      properties:
        thread_count:
          type: number
          example: 2
        thread_memory:
          type: number
          example: 256
      required:
        - thread_count
        - thread_memory
      additionalProperties: false
    changeEnvironmentPhpAllocation-Response:
      type: object
      properties:
        operation_id:
          type: string
          example: environments:change-environment-php-allocation-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Environment PHP allocation change in progress
        status:
          type: number
          example: 202
      required:
        - operation_id
        - message
        - status
    changeEnvironmentWebRootSubfolder-Params:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    changeEnvironmentWebRootSubfolder-Body:
      type: object
      properties:
        web_root_subfolder:
          type: string
          pattern: ^\/([a-zA-Z0-9_-]+\/?)*$
          example: /release_v1
        clear_all_cache:
          type: boolean
          default: true
          example: true
          x-default: true
        refresh_plugins_and_themes:
          type: boolean
          default: true
          example: true
          x-default: true
      required:
        - web_root_subfolder
    changeEnvironmentWebRootSubfolder-Response:
      type: object
      properties:
        operation_id:
          type: string
          example: sites:change-webroot-subfolder-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Environment webroot subfolder change in progress
        status:
          type: number
          example: 202
      required:
        - operation_id
        - message
        - status
    changeSitePhpAllocation-Params:
      type: object
      properties:
        site_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - site_id
    changeSitePhpAllocation-Body:
      type: object
      properties:
        thread_count:
          type: number
          example: 2
        thread_memory:
          type: number
          example: 256
      required:
        - thread_count
        - thread_memory
      additionalProperties: false
    changeSitePhpAllocation-Response:
      type: object
      properties:
        operation_id:
          type: string
          example: sites:change-site-php-allocation-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Site PHP allocation change in progress
        status:
          type: number
          example: 202
      required:
        - operation_id
        - message
        - status
    GetEnvironmentFileListParamsSchema:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    GetEnvironmentFileListResponseSchema:
      type: object
      properties:
        environment:
          type: object
          properties:
            id:
              type: string
              format: uuid
              example: 54fb80af-576c-4fdc-ba4f-b596c83f15b2
            file_list:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    example: wp-content
                  path:
                    type: string
                    example: wp-content
                  children:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        path:
                          type: string
                        children:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                              path:
                                type: string
                            required:
                              - name
                              - path
                      required:
                        - name
                        - path
                        - children
                    example:
                      - name: plugins
                        path: wp-content/plugins
                        children:
                          - name: akismet
                            path: wp-content/plugins/akismet
                required:
                  - name
                  - path
                  - children
          required:
            - id
            - file_list
      required:
        - environment
    OperationStatusParams:
      type: object
      properties:
        operation_id:
          type: string
          example: sites:add-8dc99dce-c5c7-4d8e-b589-6641696fc830
      required:
        - operation_id
    OperationResponse:
      type: object
      properties:
        status:
          type: number
          example: 202
        message:
          type: string
          example: Operation in progress
        data: {}
      required:
        - status
        - message
    ClearEdgeCacheRequestBody:
      type: object
      properties:
        environment_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        clear_subdirectories:
          type: boolean
          default: false
          example: true
          x-default: true
        url:
          type: string
          example: http://example.com
      required:
        - environment_id
    MKClearEdgeCacheResponse:
      type: object
      properties:
        operation_id:
          type: string
          example: edgeCache:clear-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Clearing site edge cache in progress
        status:
          type: number
          example: 202
      required:
        - operation_id
        - message
        - status
    UpdateEdgeCacheStatusRequestBody:
      type: object
      properties:
        environment_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        enabled:
          type: boolean
          example: true
      required:
        - environment_id
        - enabled
    UpdateEdgeCacheStatusResponse:
      type: object
      properties:
        operation_id:
          type: string
          example: edge-cache:update-status-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Updating Site Edge Cache Status in progress
        status:
          type: number
          example: 202
      required:
        - operation_id
        - message
        - status
    ClearCDNCacheRequestBody:
      type: object
      properties:
        environment_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        cdn_cache_id:
          type: string
          example: 6ba7b810-9dad-11d1-80b4-00c04fd430c8
      required:
        - environment_id
        - cdn_cache_id
    ClearCDNCacheResponse:
      type: object
      properties:
        operation_id:
          type: string
          example: cdn-cache:clear-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Clearing site CDN cache in progress
        status:
          type: number
          example: 202
      required:
        - operation_id
        - message
        - status
    UpdateImageOptimizationRequestBody:
      type: object
      properties:
        environment_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        image_optimization_type:
          type: string
          enum:
            - off
            - lossy
            - lossless
          example: lossy
      required:
        - environment_id
        - image_optimization_type
    UpdateImageOptimizationResponse:
      type: object
      properties:
        operation_id:
          type: string
          example: cdn:update-image-optimization-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Updating Site Image Optimization in progress
        status:
          type: number
          example: 202
      required:
        - operation_id
        - message
        - status
    GetDeniedIPsQuery:
      type: object
      properties:
        environment_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - environment_id
    GetDeniedIPsResponse:
      type: object
      properties:
        environment:
          type: object
          properties:
            id:
              type: string
              example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
            ip_list:
              type: array
              items:
                type: string
              example:
                - 127.0.0.1
                - 128.0.0.1/32
                - 2001:0db8:0a0b:12f0:0000:0000:0000:0001
          required:
            - id
            - ip_list
      required:
        - environment
    UpdateDeniedIPsRequestBody:
      type: object
      properties:
        environment_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        ip_list:
          type: array
          items:
            type: string
          example:
            - 127.0.0.1
            - 128.0.0.1/32
            - 2001:0db8:0a0b:12f0:0000:0000:0000:0001
      required:
        - environment_id
        - ip_list
    UpdateDeniedIPsResponse:
      type: object
      properties:
        result:
          type: "null"
      required:
        - result
    GetBackupsRequestParamsSchema:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    Backup:
      type: object
      properties:
        id:
          type: number
          example: 123456789
        name:
          type: string
          example: mySiteName-1234567890-backupType
        note:
          type:
            - string
            - "null"
          example: Daily Auto Backup
        type:
          type: string
          example: manual
        created_at:
          type: number
          example: 1665382600770
      required:
        - id
        - name
        - note
        - type
        - created_at
    BackupEnvironment:
      type: object
      properties:
        display_name:
          type: string
          example: MyEnvironment
        backups:
          type: array
          items:
            $ref: "#/components/schemas/Backup"
      required:
        - display_name
        - backups
    GetBackupsResponseSchema:
      type: object
      properties:
        environment:
          $ref: "#/components/schemas/BackupEnvironment"
      required:
        - environment
    GetDownloadableBackupsRequestParamsSchema:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    DownloadableBackup:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 1915fa3a-7ef4-4766-806d-71104be7deb0
        created_at:
          type: number
          example: 1665382600770
        download_link:
          type:
            - string
            - "null"
          example: https://example.com
        expires_at:
          type: number
          example: 1665382600770
        is_generation_in_progress:
          type: boolean
          example: true
      required:
        - id
        - created_at
        - download_link
        - expires_at
        - is_generation_in_progress
    DownloadableBackupEnvironment:
      type: object
      properties:
        display_name:
          type: string
          example: MyEnvironment
        downloadable_backups:
          type: array
          items:
            $ref: "#/components/schemas/DownloadableBackup"
      required:
        - display_name
        - downloadable_backups
    GetDownloadableBackupsResponseSchema:
      type: object
      properties:
        environment:
          $ref: "#/components/schemas/DownloadableBackupEnvironment"
      required:
        - environment
    NextDownloadableBackupAvailableRequestParamsSchema:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    NextDownloadableBackupAvailableResponseSchema:
      type: object
      properties:
        is_backup_available:
          type: boolean
          example: false
        reset_at:
          type:
            - string
            - "null"
          example: 10/10/2026, 06:16 AM UTC
      required:
        - is_backup_available
        - reset_at
    AddDownloadableBackupRequestParamsSchema:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    AddDownloadableBackupResponseSchema:
      type: object
      properties:
        operation_id:
          type: string
          example: start-downloadable-backup-generation:update-status-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Starting downloadable backup generation. Use the operation_id to check
            the status.
        status:
          type: number
          example: 202
      required:
        - message
        - status
    RestoreSnapshotToEnvRequestParamsSchema:
      type: object
      properties:
        target_env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - target_env_id
    RestoreSnapshotToEnvRequestBodySchema:
      type: object
      properties:
        backup_id:
          type: number
          example: 123456789
        notified_user_id:
          type: string
          format: uuid
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - backup_id
        - notified_user_id
    RestoreSnapshotToEnvResponseSchema:
      type: object
      properties:
        operation_id:
          type: string
          example: backups:restore-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Restoring a backup to environment in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    AddManualBackupRequestParamsSchema:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    AddManualBackupRequestBodySchema:
      type: object
      properties:
        tag:
          type: string
          default: ""
          example: my-awesome-backup
          x-default: my-awesome-backup
    AddManualBackupResponseSchema:
      type: object
      properties:
        operation_id:
          type: string
          example: backups:add-manual-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Adding a manual backup to environment in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    BackupByIdRequestParamsSchema:
      type: object
      properties:
        backup_id:
          type: number
          example: 165424355
      required:
        - backup_id
    RemoveBackupResponseSchema:
      type: object
      properties:
        operation_id:
          type: string
          example: backups:remove-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Removing a backup in progress. Use the operation_id to check the
            status.
        status:
          type: number
          example: 202
      required:
        - message
        - status
    GetLogsRequestParamsSchema:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    GetLogsRequestQuerySchema:
      type: object
      properties:
        file_name:
          type: string
          enum:
            - error
            - access
            - kinsta-cache-perf
          default: error
          example: error
          x-default: error
        lines:
          type: number
          maximum: 20000
          default: 1000
          example: 1000
          x-default: 1000
        from:
          type:
            - string
            - "null"
          example: 2026-07-23T00:00:00Z
        to:
          type:
            - string
            - "null"
          example: 2026-07-24T00:00:00Z
        search:
          type: string
          example: Example search
      required:
        - file_name
        - lines
    Logs:
      type: object
      properties:
        logs:
          type: string
      required:
        - logs
    ActiveContinerEnvironment:
      type: object
      properties:
        container_info:
          $ref: "#/components/schemas/Logs"
      required:
        - container_info
    GetLogsResponseSchema:
      type: object
      properties:
        environment:
          $ref: "#/components/schemas/ActiveContinerEnvironment"
      required:
        - environment
    AdditionalSftpAccountsRequestParamsSchema:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    ToggleAdditionalSftpAccountsRequestBodySchema:
      type: object
      properties:
        enabled:
          type: boolean
          example: true
      required:
        - enabled
    ToggleAdditionalSftpAccountsResponse:
      type: object
      properties:
        operation_id:
          type: string
          example: sftp-accounts:toggle-status-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Updating Additional SFTP Accounts Status in progress
        status:
          type: number
          example: 202
      required:
        - operation_id
        - message
        - status
    AddAdditionalSftpAccountRequestBodySchema:
      type: object
      properties:
        username:
          type: string
          example: test-user
        password:
          type: string
          minLength: 16
          example: R8zXwT@#bV!kJq9^
        root_directory:
          type: string
          default: /
          example: /dir_1
          x-default: /dir_1
        permission:
          type: string
          enum:
            - read
            - write
          default: read
          example: write
          x-default: write
      required:
        - username
        - password
    AddAdditionalSftpAccountResponse:
      type: object
      properties:
        operation_id:
          type: string
          example: sftp-accounts:add-additional-sftp-account-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Adding Additional SFTP Account in progress
        status:
          type: number
          example: 202
      required:
        - operation_id
        - message
        - status
    GetAdditionalSftpAccountsAdditionalSftpAccount:
      type: object
      properties:
        id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        username:
          type: string
          example: test-user
        root_directory:
          type: string
          example: /
        is_active:
          type: boolean
          example: true
        permission:
          type: string
          enum:
            - read
            - write
          example: write
      required:
        - id
        - username
        - root_directory
        - is_active
        - permission
    GetAdditionalSftpAccountsResponse:
      type: object
      properties:
        environment:
          type: object
          properties:
            additional_sftp_accounts:
              type: array
              items:
                $ref: "#/components/schemas/GetAdditionalSftpAccountsAdditionalSftpAccount"
            container_info:
              type: object
              properties:
                additional_sftp_accounts_port:
                  type:
                    - string
                    - "null"
                  example: "12374"
              required:
                - additional_sftp_accounts_port
          required:
            - additional_sftp_accounts
            - container_info
      required:
        - environment
    RemoveAdditionalSftpAccountRequestParamsSchema:
      type: object
      properties:
        sftp_account_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - sftp_account_id
    RemoveAdditionalSftpAccountResponse:
      type: object
      properties:
        operation_id:
          type: string
          example: sftp-accounts:remove-additional-sftp-account-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Removing Additional SFTP Account in progress
        status:
          type: number
          example: 202
      required:
        - operation_id
        - message
        - status
    GetRedirectRulesRequest:
      type: object
      properties:
        limit:
          type: number
          default: 10
          example: 10
          x-default: 10
        offset:
          type: number
          default: 0
          example: 3
          x-default: 3
        key:
          type: string
          enum: &a1
            - domain
            - from
            - to
            - type
          default: domain
          example: domain
          x-default: domain
        order:
          type: string
          enum: &a2
            - ascend
            - descend
          default: ascend
          example: ascend
          x-default: ascend
        search_query:
          type: string
          default: ""
          example: Search...
          x-default: Search...
        regex_search:
          type: string
          enum: &a3
            - "true"
            - "false"
          default: "false"
          example: "true"
          x-default: "true"
    GetRedirectRulesRequestParamsSchema:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    GetRedirectRulesResponse:
      type: object
      properties:
        environment:
          type: object
          properties:
            id:
              type: string
              format: uuid
              example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
            container_info:
              type: object
              properties:
                redirect_rules:
                  type: object
                  properties:
                    rules:
                      type: array
                      items:
                        type: object
                        properties:
                          from:
                            type: string
                            example: /
                          to:
                            type: string
                            example: https://example.com/login
                          type:
                            type: string
                            example: redirect
                          domain:
                            type:
                              - string
                              - "null"
                            example: https://login.example.com
                          traffic_from_country:
                            type:
                              - string
                              - "null"
                            example: US
                          traffic_from_country_name:
                            type:
                              - string
                              - "null"
                            example: United States
                          traffic_from_city:
                            type:
                              - string
                              - "null"
                            example: Nashville
                          displayed_location:
                            type:
                              - string
                              - "null"
                            example: Nashville, United States
                        required:
                          - from
                          - to
                          - type
                          - domain
                          - traffic_from_country
                          - traffic_from_country_name
                          - traffic_from_city
                          - displayed_location
                    redirect_rules_count:
                      type: number
                      example: 100
                  required:
                    - rules
                    - redirect_rules_count
              required:
                - redirect_rules
          required:
            - id
            - container_info
      required:
        - environment
    AvailableRegions:
      type: object
      properties:
        company:
          type: object
          properties:
            available_regions:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    example: Dallas US (us-south1)
                  region:
                    type: string
                    example: us-south1
                required:
                  - name
                  - region
          required:
            - available_regions
      required:
        - company
    getUserActivityLogs-Query:
      type: object
      properties:
        limit:
          type: number
          default: 10
          example: 10
          x-default: 10
        offset:
          type: number
          default: 0
          example: 3
          x-default: 3
        category:
          type: string
          enum:
            - siteActions
            - kinstaDns
            - migrations
            - billing
            - notifications
            - userManagement
            - personalSettings
            - samlSso
          example: siteActions
        site_id:
          type: string
        id_initiated_by:
          type: string
        id_api_key:
          type: string
        language:
          type: string
          enum:
            - da
            - de
            - en
            - es
            - fr
            - it
            - ja
            - nl
            - pt
            - sv
          default: en
    getUserActivityLogs-UserAgentInfo:
      type: object
      properties:
        browser_name:
          type:
            - string
            - "null"
          example: Chrome
        browser_version:
          type:
            - string
            - "null"
          example: 126.0.0
        os_name:
          type:
            - string
            - "null"
          example: macOS
      required:
        - browser_name
        - browser_version
        - os_name
    getUserActivityLogs-InitiatedBy:
      type: object
      properties:
        id:
          type: string
          example: admin-user
        role:
          type:
            - string
            - "null"
          example: admin
        full_name:
          type:
            - string
            - "null"
          example: Jane
        first_name:
          type:
            - string
            - "null"
          example: Smith
      required:
        - id
        - role
        - full_name
        - first_name
    getUserActivityLogs-ApiKeyInfo:
      type: object
      properties:
        id:
          type: string
          example: cf5b98a0-6fdd-4997-9c1f-e73d566533be
        name:
          type:
            - string
            - "null"
          example: Public API Key
      required:
        - id
        - name
    getUserActivityLogs-UserActivityItem:
      type: object
      properties:
        id:
          type: number
          example: 34181968
        site_id:
          type:
            - string
            - "null"
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        created_at:
          type: number
          example: 1665382600770
        is_done:
          type: boolean
          example: true
        has_failed:
          type: boolean
          example: false
        has_warning:
          type: boolean
          example: false
        type:
          type: string
          example: deleteSite
        public_error:
          type:
            - string
            - "null"
          example: The environment is blocked by another process. Please try again a bit
            later.
        ip_address:
          type:
            - string
            - "null"
          example: 203.0.113.42
        initiated_by:
          allOf:
            - $ref: "#/components/schemas/getUserActivityLogs-InitiatedBy"
            - type:
                - object
                - "null"
        user_agent_info:
          allOf:
            - $ref: "#/components/schemas/getUserActivityLogs-UserAgentInfo"
            - type:
                - object
                - "null"
        api_key_info:
          allOf:
            - $ref: "#/components/schemas/getUserActivityLogs-ApiKeyInfo"
            - type:
                - object
                - "null"
        descriptions:
          type:
            - array
            - "null"
          items:
            type: string
          example:
            - Delete site "Test ABC"
      required:
        - id
        - site_id
        - created_at
        - is_done
        - has_failed
        - has_warning
        - type
        - public_error
        - ip_address
        - descriptions
    getUserActivityLogs-UserActivityLog:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/getUserActivityLogs-UserActivityItem"
        total:
          type: integer
          minimum: 0
          example: 42
      required:
        - items
        - total
    getUserActivityLogs-Response:
      type: object
      properties:
        company:
          type: object
          properties:
            activity_logs:
              $ref: "#/components/schemas/getUserActivityLogs-UserActivityLog"
          required:
            - activity_logs
      required:
        - company
    SetSftpSshAccess-Params:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    SetSftpSshAccess-Body:
      type: object
      properties:
        is_enabled:
          type: boolean
          example: true
      required:
        - is_enabled
    SetSftpSshAccess-Response:
      type: object
      properties:
        result:
          type: "null"
      required:
        - result
    GetSftpSshStatus-Params:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    GetSftpSshStatus-Response:
      type: object
      properties:
        environment:
          type: object
          properties:
            active_container:
              type: object
              properties:
                is_ssh_enabled:
                  type: boolean
                  example: true
              required:
                - is_ssh_enabled
          required:
            - active_container
      required:
        - environment
    SetSftpSshPasswordAccess-Params:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    SetSftpSshPasswordAccess-Body:
      type: object
      properties:
        is_enabled:
          type: boolean
          example: true
      required:
        - is_enabled
    SetSftpSshPasswordAccess-Response:
      type: object
      properties:
        result:
          type: "null"
      required:
        - result
    GenerateSftpPassword-Params:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    GenerateSftpPassword-Response:
      type: object
      properties:
        result:
          type: "null"
      required:
        - result
    GetSftpSshAllowlist-Params:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    GetSftpSshAllowlist-Response:
      type: object
      properties:
        environment:
          type: object
          properties:
            active_container:
              type: object
              properties:
                sftp_ip_allowlist:
                  type: array
                  items:
                    type: string
                  example:
                    - 127.0.0.1
              required:
                - sftp_ip_allowlist
          required:
            - active_container
      required:
        - environment
    SetSftpIpAllowlist-Params:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    SetSftpIpAllowlist-Body:
      type: object
      properties:
        ip_allowlist:
          type: array
          items:
            type: string
          example:
            - 127.0.0.1
      required:
        - ip_allowlist
    SetSftpIpAllowlist-Response:
      type: object
      properties:
        result:
          type: "null"
      required:
        - result
    GetSftpConfig-Params:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        site_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
        - site_id
    GetSftpConfig-Response:
      type: object
      properties:
        site:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            displayName:
              type: string
            usr:
              type: string
            environment:
              type: object
              properties:
                id:
                  type: string
                activeContainer:
                  type: object
                  properties:
                    id:
                      type: string
                    lxdSshPort:
                      type: string
                    loadBalancer:
                      type: object
                      properties:
                        id:
                          type: string
                        extIP:
                          type: string
                      required:
                        - id
                        - extIP
                  required:
                    - id
                    - lxdSshPort
                    - loadBalancer
              required:
                - id
                - activeContainer
          required:
            - id
            - name
            - displayName
            - usr
            - environment
      required:
        - site
    ChangeSftpPasswordExpiration-Params:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    ChangeSftpPasswordExpiration-Body:
      type: object
      properties:
        exp_interval:
          anyOf:
            - type: string
              enum:
                - days_7
            - type: string
              enum:
                - days_30
            - type: string
              enum:
                - days_90
            - type: string
              enum:
                - hours_24
            - type: string
              enum:
                - never
          example: days_7
      required:
        - exp_interval
    ChangeSftpPasswordExpiration-Response:
      type: object
      properties:
        result:
          type: "null"
      required:
        - result
    GetSftpPassword-Params:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    GetSftpPassword-Response:
      type: object
      properties:
        environment:
          type: object
          properties:
            id:
              type: string
            sftp_password:
              type: string
          required:
            - id
            - sftp_password
      required:
        - environment
    GetVisitsResponse:
      type: object
      properties:
        site:
          type: object
          properties:
            id:
              type: string
              example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
            this_month_usage:
              type: object
              properties:
                visits:
                  type: number
                  example: 100
              required:
                - visits
          required:
            - id
            - this_month_usage
      required:
        - site
    GetBandwidthResponse:
      type: object
      properties:
        site:
          type: object
          properties:
            id:
              type: string
              example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
            this_month_usage:
              type: object
              properties:
                bandwidth:
                  type: number
                  example: 100
              required:
                - bandwidth
          required:
            - id
            - this_month_usage
      required:
        - site
    GetCdnBandwidthResponse:
      type: object
      properties:
        site:
          type: object
          properties:
            id:
              type: string
              example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
            this_month_cdn_usage:
              type: object
              properties:
                bandwidth:
                  type: number
                  example: 100
              required:
                - bandwidth
          required:
            - id
            - this_month_cdn_usage
      required:
        - site
    Analytics-Cdn-Bandwidth-Response:
      type: object
      properties:
        analytics:
          type: object
          properties:
            analytics_response:
              type: object
              properties:
                key:
                  type: string
                  example: cdn-bandwidth
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: cdn-bandwidth
                      total:
                        type: number
                        example: 1000
                      dataset:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                              example: 2025-10-28T00:00:00
                            value:
                              type: string
                              example: "1000"
                          required:
                            - key
                            - value
                    required:
                      - name
                      - total
                      - dataset
              required:
                - key
                - data
          required:
            - analytics_response
      required:
        - analytics
    Analytics-Params:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    Analytics-Query:
      type: object
      properties:
        time_span:
          type: string
          enum:
            - 24_hours
            - 7_days
            - 30_days
            - 60_days
          default: 7_days
          example: 30_days
          x-default: 30_days
        company_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        from:
          type:
            - string
            - "null"
          example: 2025-10-20
        to:
          type:
            - string
            - "null"
          example: 2025-10-30
      required:
        - company_id
    Analytics-Visits-Response:
      type: object
      properties:
        analytics:
          type: object
          properties:
            analytics_response:
              type: object
              properties:
                key:
                  type: string
                  example: uniqueip
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: uniqueip
                      total:
                        type: number
                        example: 1000
                      dataset:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                              example: 2025-10-28T00:00:00
                            value:
                              type: string
                              example: "1000"
                          required:
                            - key
                            - value
                    required:
                      - name
                      - total
                      - dataset
              required:
                - key
                - data
          required:
            - analytics_response
      required:
        - analytics
    Analytics-Bandwidth-Response:
      type: object
      properties:
        analytics:
          type: object
          properties:
            analytics_response:
              type: object
              properties:
                key:
                  type: string
                  example: bandwidth
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: bandwidth
                      total:
                        type: number
                        example: 1000
                      dataset:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                              example: 2025-10-28T00:00:00
                            value:
                              type: string
                              example: "1000"
                          required:
                            - key
                            - value
                    required:
                      - name
                      - total
                      - dataset
              required:
                - key
                - data
          required:
            - analytics_response
      required:
        - analytics
    DiskSpace-Query:
      type: object
      properties:
        time_span:
          type: string
          enum:
            - 7_days
            - 30_days
            - 60_days
          default: 7_days
          example: 30_days
          x-default: 30_days
        company_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        time_zone:
          type: string
          pattern: ^-?(0[0-9]|1[0-4]):00$
          example: 02:00
        from:
          type:
            - string
            - "null"
          example: 2025-10-20
        to:
          type:
            - string
            - "null"
          example: 2025-10-30
      required:
        - company_id
        - time_zone
    Analytics-Disk-Space-Response:
      type: object
      properties:
        analytics:
          type: object
          properties:
            analytics_response:
              type: object
              properties:
                key:
                  type: string
                  example: diskSpaceUsage
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: diskSpaceUsage
                      total:
                        type: number
                        example: 1000
                      dataset:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                              example: 2025-10-28T00:00:00
                            value:
                              type: string
                              example: "1000"
                          required:
                            - key
                            - value
                    required:
                      - name
                      - total
                      - dataset
              required:
                - key
                - data
          required:
            - analytics_response
      required:
        - analytics
    runWPCLICommand-ParamsSchema:
      type: object
      properties:
        env_id:
          type: string
          format: uuid
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    runWPCLICommand-Body:
      type: object
      properties:
        wp_command:
          type: string
          maxLength: 5000
          pattern: ^wp\s+[a-zA-Z0-9_\-./:=@'\s]+$
          example: wp core version
      required:
        - wp_command
    runWPCLICommand-Response:
      type: object
      properties:
        operation_id:
          type: string
          example: environment:run-wp-cli-command-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Running a WP CLI command in progress
        status:
          type: number
          example: 202
      required:
        - message
        - status
    generatePhpMyAdminLoginLink-ParamsSchema:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    generatePhpMyAdminLoginLink-PreGqlResponseSchema:
      type: object
      properties:
        environment:
          type: object
          properties:
            mysqlEditorDomain:
              type: object
              properties:
                name:
                  type:
                    - string
                    - "null"
              required:
                - name
          required:
            - mysqlEditorDomain
      required:
        - environment
    generatePhpMyAdminLoginLink-MainGqlResponseSchema:
      type: object
      properties:
        app_key:
          type: object
          properties:
            token:
              type: string
              example: 4e8d3c9e7b9f4d2a87f1e27c0f61b2fa8f4a15de4e25c9f1f81ad0b2d0ef3c1a
            expires_at:
              type: number
              example: 1736914230000
          required:
            - token
            - expires_at
      required:
        - app_key
    generatePhpMyAdminLoginLink-Response:
      type: object
      properties:
        url:
          type: string
          example: https://mysqleditor-mysite.kinsta.cloud?app-key=4e8d3c9e7b9f4d2a87f1e27c0f61b2fa8f4a15de4e25c9f1f81ad0b2d0ef3c1a
        expires_at:
          type: number
          example: 1736914230000
      required:
        - url
        - expires_at
    GetWpSiteEnvironmentWordPressPlugins-Response:
      type: object
      properties:
        environment:
          type: object
          properties:
            plugins:
              type: object
              properties:
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: akismet
                      title:
                        type: string
                        example: "Akismet Anti-Spam: Spam Protection"
                      status:
                        type: string
                        example: active
                      version:
                        type: string
                        example: 1.0.0
                      update:
                        type: string
                        example: available
                      update_version:
                        type:
                          - string
                          - "null"
                        example: 1.0.1
                      update_status:
                        type:
                          - string
                          - "null"
                        example: updated
                      is_version_vulnerable:
                        type: boolean
                        example: false
                      is_update_version_vulnerable:
                        type: boolean
                        example: false
                      auto_update_type:
                        type:
                          - string
                          - "null"
                        enum:
                          - WordPress Auto Update
                          - Kinsta Automatic Update
                        example: Kinsta Automatic Update
                    required:
                      - name
                      - title
                      - status
                      - version
                      - update
                      - update_version
                      - update_status
                      - is_version_vulnerable
                      - is_update_version_vulnerable
                      - auto_update_type
                last_updated_at:
                  type: string
                  example: 2026-01-01T12:00:00Z
              required:
                - items
                - last_updated_at
          required:
            - plugins
      required:
        - environment
    GetWpSiteEnvironmentWordPressPlugins-Body:
      type: object
      properties:
        status:
          type: string
          enum:
            - active
            - inactive
          example: active
        column:
          type: string
          enum:
            - vulnerable
            - updatesAvailable
          example: updatesAvailable
    GetWpSiteEnvironmentWordPressThemes-Response:
      type: object
      properties:
        environment:
          type: object
          properties:
            themes:
              type: object
              properties:
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: twentytwentythree
                      title:
                        type: string
                        example: Twenty Twenty Three
                      status:
                        type: string
                        example: active
                      version:
                        type: string
                        example: 1.0.0
                      update:
                        type: string
                        example: available
                      update_version:
                        type:
                          - string
                          - "null"
                        example: 1.0.1
                      update_status:
                        type:
                          - string
                          - "null"
                        example: updated
                      is_version_vulnerable:
                        type: boolean
                        example: false
                      is_update_version_vulnerable:
                        type: boolean
                        example: false
                      auto_update_type:
                        type:
                          - string
                          - "null"
                        enum:
                          - WordPress Auto Update
                          - Kinsta Automatic Update
                        example: Kinsta Automatic Update
                    required:
                      - name
                      - title
                      - status
                      - version
                      - update
                      - update_version
                      - update_status
                      - is_version_vulnerable
                      - is_update_version_vulnerable
                      - auto_update_type
                last_updated_at:
                  type: string
                  example: 2026-01-01T12:00:00Z
              required:
                - items
                - last_updated_at
          required:
            - themes
      required:
        - environment
    GetWpSiteEnvironmentWordPressThemes-Body:
      type: object
      properties:
        status:
          type: string
          enum:
            - active
            - inactive
          example: active
        column:
          type: string
          enum:
            - vulnerable
            - updatesAvailable
          example: updatesAvailable
    Analytics-Top-Countries-Response:
      type: object
      properties:
        analytics:
          type: object
          properties:
            analytics_response:
              type: object
              properties:
                key:
                  type: string
                  example: countries
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: country
                      views:
                        type: string
                        example: "1000"
                    required:
                      - name
                      - views
              required:
                - key
                - data
          required:
            - analytics_response
      required:
        - analytics
    Analytics-Top-Cities-Response:
      type: object
      properties:
        analytics:
          type: object
          properties:
            analytics_response:
              type: object
              properties:
                key:
                  type: string
                  example: cities
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: city
                      views:
                        type: string
                        example: "1000"
                    required:
                      - name
                      - views
              required:
                - key
                - data
          required:
            - analytics_response
      required:
        - analytics
    Analytics-Top-Client-Ips-Response:
      type: object
      properties:
        analytics:
          type: object
          properties:
            analytics_response:
              type: object
              properties:
                key:
                  type: string
                  example: topClientIPs
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      ip:
                        type: string
                        example: 0.0.0.0
                      value:
                        type: string
                        example: "1000"
                    required:
                      - ip
                      - value
              required:
                - key
                - data
          required:
            - analytics_response
      required:
        - analytics
    Analytics-Top-Asns-Response:
      type: object
      properties:
        analytics:
          type: object
          properties:
            analytics_response:
              type: object
              properties:
                key:
                  type: string
                  example: asns
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: AS12345
                      views:
                        type: string
                        example: "1000"
                    required:
                      - name
                      - views
              required:
                - key
                - data
          required:
            - analytics_response
      required:
        - analytics
    Analytics-Top-Browsers-Response:
      type: object
      properties:
        analytics:
          type: object
          properties:
            analytics_response:
              type: object
              properties:
                key:
                  type: string
                  example: browsers
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: Chrome
                      views:
                        type: string
                        example: "1000"
                    required:
                      - name
                      - views
              required:
                - key
                - data
          required:
            - analytics_response
      required:
        - analytics
    Analytics-Top-Host-Response:
      type: object
      properties:
        analytics:
          type: object
          properties:
            analytics_response:
              type: object
              properties:
                key:
                  type: string
                  example: hosts
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: example.com
                      views:
                        type: string
                        example: "1000"
                    required:
                      - name
                      - views
              required:
                - key
                - data
          required:
            - analytics_response
      required:
        - analytics
    Analytics-Top-Referrers-Response:
      type: object
      properties:
        analytics:
          type: object
          properties:
            analytics_response:
              type: object
              properties:
                key:
                  type: string
                  example: referrers
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: google.com
                      views:
                        type: string
                        example: "1000"
                    required:
                      - name
                      - views
              required:
                - key
                - data
          required:
            - analytics_response
      required:
        - analytics
    Analytics-Top-UAs-Response:
      type: object
      properties:
        analytics:
          type: object
          properties:
            analytics_response:
              type: object
              properties:
                key:
                  type: string
                  example: user_agents
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: Mozilla/5.0
                      views:
                        type: string
                        example: "1000"
                    required:
                      - name
                      - views
              required:
                - key
                - data
          required:
            - analytics_response
      required:
        - analytics
    Analytics-Visits-Dispersion-Response:
      type: object
      properties:
        analytics:
          type: object
          properties:
            analytics_response:
              type: object
              properties:
                key:
                  type: string
                  example: userAgent
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: mobile
                      dataset:
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                              example: 2025-11-08T00:00:00.000Z
                            percent:
                              type: string
                              example: "30.20"
                          required:
                            - date
                            - percent
                    required:
                      - name
                      - dataset
              required:
                - key
                - data
          required:
            - analytics_response
      required:
        - analytics
    Analytics-Response-Code-Breakdown-Response:
      type: object
      properties:
        analytics:
          type: object
          properties:
            analytics_response:
              type: object
              properties:
                key:
                  type: string
                  example: userAgent
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      response_code:
                        type: string
                        example: "200"
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                              example: 2025-11-08T00:00:00.000Z
                            value:
                              type: string
                              example: "50"
                          required:
                            - key
                            - value
                    required:
                      - response_code
                      - data
              required:
                - key
                - data
          required:
            - analytics_response
      required:
        - analytics
    ValidateAPIKeyResponse:
      type: object
      properties:
        name:
          type: string
          example: my-api-key
        expires_at:
          type:
            - string
            - "null"
          example: "1704081600000"
        company:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        status:
          type: string
          example: active
      required:
        - name
        - expires_at
        - company
        - status
    CompanyWordPressPlugins-Response:
      type: object
      properties:
        company:
          type: object
          properties:
            plugins:
              type: object
              properties:
                total:
                  type: number
                  example: 15
                last_updated_at:
                  type: string
                  example: 2026-01-01T12:00:00Z
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: elementor
                      title:
                        type: string
                        example: Elementor
                      description:
                        type: string
                        example: Popular page builder.
                      latest_version:
                        type:
                          - string
                          - "null"
                        example: 3.22.1
                      is_latest_version_vulnerable:
                        type: boolean
                        example: false
                      environment_count:
                        type: number
                        example: 5
                      update_count:
                        type: number
                        example: 2
                      environments:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
                            site_display_name:
                              type: string
                              example: My Awesome Site
                            display_name:
                              type: string
                              example: Live
                            plugin_status:
                              type: string
                              example: active
                            plugin_update:
                              type:
                                - string
                                - "null"
                              example: available
                            plugin_version:
                              type: string
                              example: 1.0.0
                            is_plugin_version_vulnerable:
                              type: boolean
                              example: false
                            plugin_update_version:
                              type:
                                - string
                                - "null"
                              example: 1.0.1
                            is_plugin_update_version_vulnerable:
                              type: boolean
                              example: false
                            plugin_update_status:
                              type:
                                - string
                                - "null"
                              example: updated
                            auto_update_type:
                              type:
                                - string
                                - "null"
                              enum:
                                - WordPress Auto Update
                                - Kinsta Automatic Update
                              example: Kinsta Automatic Update
                          required:
                            - id
                            - site_display_name
                            - display_name
                            - plugin_status
                            - plugin_update
                            - plugin_version
                            - is_plugin_version_vulnerable
                            - plugin_update_version
                            - is_plugin_update_version_vulnerable
                            - plugin_update_status
                            - auto_update_type
                    required:
                      - name
                      - title
                      - description
                      - latest_version
                      - is_latest_version_vulnerable
                      - environment_count
                      - update_count
                      - environments
              required:
                - total
                - last_updated_at
                - items
          required:
            - plugins
      required:
        - company
    CompanyWordPressPlugins-Body:
      type: object
      properties:
        offset:
          type: number
          example: 0
        limit:
          type: number
          example: 30
        search:
          type: string
          example: Elementor
        status:
          type: string
          enum:
            - active
            - inactive
          example: active
        column:
          type: string
          enum:
            - vulnerable
            - updatesAvailable
          example: updatesAvailable
        order_by:
          type: object
          properties:
            field:
              type: string
              enum:
                - name
                - environments
                - updates
              example: name
            order:
              type: string
              enum:
                - ascend
                - descend
              example: ascend
          required:
            - field
            - order
    CompanyWordPressThemes-Response:
      type: object
      properties:
        company:
          type: object
          properties:
            themes:
              type: object
              properties:
                total:
                  type: number
                  example: 15
                last_updated_at:
                  type: string
                  example: 2026-01-01T12:00:00Z
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: twentytwentyone
                      title:
                        type: string
                        example: Twenty Twenty-One
                      description:
                        type: string
                        example: Default WordPress theme for 2021.
                      latest_version:
                        type:
                          - string
                          - "null"
                        example: "1.0"
                      is_latest_version_vulnerable:
                        type: boolean
                        example: false
                      environment_count:
                        type: number
                        example: 5
                      update_count:
                        type: number
                        example: 2
                      environments:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
                            site_display_name:
                              type: string
                              example: My Awesome Site
                            display_name:
                              type: string
                              example: Live
                            theme_status:
                              type: string
                              example: active
                            theme_update:
                              type:
                                - string
                                - "null"
                              example: available
                            theme_version:
                              type: string
                              example: 1.0.0
                            is_theme_version_vulnerable:
                              type: boolean
                              example: false
                            theme_update_version:
                              type:
                                - string
                                - "null"
                              example: 1.0.1
                            is_theme_update_version_vulnerable:
                              type: boolean
                              example: false
                            theme_update_status:
                              type:
                                - string
                                - "null"
                              example: updated
                            auto_update_type:
                              type:
                                - string
                                - "null"
                              enum:
                                - WordPress Auto Update
                                - Kinsta Automatic Update
                              example: Kinsta Automatic Update
                          required:
                            - id
                            - site_display_name
                            - display_name
                            - theme_status
                            - theme_update
                            - theme_version
                            - is_theme_version_vulnerable
                            - theme_update_version
                            - is_theme_update_version_vulnerable
                            - theme_update_status
                            - auto_update_type
                    required:
                      - name
                      - title
                      - description
                      - latest_version
                      - is_latest_version_vulnerable
                      - environment_count
                      - update_count
                      - environments
              required:
                - total
                - last_updated_at
                - items
          required:
            - themes
      required:
        - company
    CompanyWordPressThemes-Body:
      type: object
      properties:
        offset:
          type: number
          example: 0
        limit:
          type: number
          example: 30
        search:
          type: string
          example: Twenty Twenty-One
        status:
          type: string
          enum:
            - active
            - inactive
          example: active
        column:
          type: string
          enum:
            - vulnerable
            - updatesAvailable
          example: updatesAvailable
        order_by:
          type: object
          properties:
            field:
              type: string
              enum:
                - name
                - environments
                - updates
              example: name
            order:
              type: string
              enum:
                - ascend
                - descend
              example: ascend
          required:
            - field
            - order
    getWpAdminLoginLinkByEmail-ParamsSchema:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    getWpAdminLoginLinkByEmail-Body:
      type: object
      properties:
        email:
          type: string
          format: email
          example: development@example.com
      required:
        - email
    getWpAdminLoginLinkByEmail-PreGqlResponseSchema:
      type: object
      properties:
        createAppKey:
          type: object
          properties:
            id:
              type: string
            token:
              type: string
          required:
            - id
            - token
      required:
        - createAppKey
    getWpAdminLoginLinkByEmail-Response:
      type: object
      properties:
        login_link:
          type: string
          example: https://mysite.kinsta.cloud?wp-login.php?kinsta-wp-autologin=<token>
      required:
        - login_link
    createWpAdminUser-ParamsSchema:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    createWpAdminUser-Body:
      type: object
      properties:
        email:
          type: string
          format: email
          example: development@example.com
        first_name:
          type: string
          example: John
        last_name:
          type: string
          example: Doe
      required:
        - email
        - first_name
        - last_name
    createWpAdminUser-Response:
      type: object
      properties:
        create_wp_admin_user:
          type: boolean
          example: true
      required:
        - create_wp_admin_user
    HasWpAdminUserByEmail-Params:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    HasWpAdminUserByEmail-Response:
      type: object
      properties:
        has_wp_admin_user:
          type: boolean
      required:
        - has_wp_admin_user
    HasWpAdminUserByEmail-Query:
      type: object
      properties:
        email:
          type: string
          format: email
          example: user@example.com
      required:
        - email
    GetForceHttpsStatus-Params:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    GetForceHttpsStatus-Response:
      type: object
      properties:
        force_https_status:
          type: string
          enum:
            - ENABLED_FOR_ALL
            - ENABLED_REDIRECT_TO_PRIMARY
            - DISABLED
          example: ENABLED_REDIRECT_TO_PRIMARY
      required:
        - force_https_status
    SetForceHttpsStatus-Params:
      type: object
      properties:
        env_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
      required:
        - env_id
    SetForceHttpsStatus-Body:
      type: object
      properties:
        type:
          type: string
          enum:
            - ENABLED_FOR_ALL
            - ENABLED_REDIRECT_TO_PRIMARY
            - DISABLED
          example: ENABLED_REDIRECT_TO_PRIMARY
      required:
        - type
    SetForceHttpsStatus-Response:
      type: object
      properties:
        operation_id:
          type: string
          example: force-https:update-status-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Updating Force HTTPS status in progress. Use the operation_id to check
            the status.
        status:
          type: number
          example: 202
      required:
        - message
        - status
    searchAndReplace-Body:
      type: object
      properties:
        environment_id:
          type: string
          example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
        search:
          type: string
          example: old-text
        replace:
          type: string
          default: ""
          example: new-text
          x-default: new-text
        perform_replacement:
          type: boolean
          default: false
          example: false
          x-default: false
        is_clear_cache:
          type: boolean
          default: false
          example: false
          x-default: false
      required:
        - environment_id
        - search
        - replace
    searchAndReplace-Response:
      type: object
      properties:
        operation_id:
          type: string
          example: environments:search-and-replace-54fb80af-576c-4fdc-ba4f-b596c83f15a1
        message:
          type: string
          example: Search and replace in progress
        status:
          type: number
          example: 202
      required:
        - operation_id
        - message
        - status
  parameters: {}
paths:
  /company/{id}/users:
    get:
      operationId: getCompanyUsers
      summary: Get list of company users
      security:
        - bearerAuth: []
      tags:
        - Company Users
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: id
          in: path
      responses:
        "200":
          description: List of company users
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyUsersResponseSchema"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving company users
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /company/{id}/api-keys:
    get:
      operationId: getCompanyApiKeys
      summary: Get list of company API Keys
      security:
        - bearerAuth: []
      tags:
        - API Keys
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: id
          in: path
      responses:
        "200":
          description: List of company API Keys
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyApiKeysResponseSchema"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving company API Keys
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /domains:
    get:
      operationId: getDomains
      summary: Get list of domains by company ID
      security:
        - bearerAuth: []
      tags:
        - Domains
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: company
          in: query
      responses:
        "200":
          description: Response object of domains requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyDomainsSchema"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving domains
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /domains/{domain_id}/dns-records:
    get:
      operationId: getDomainDnsRecords
      summary: Get list of domain DNS records by domain ID
      security:
        - bearerAuth: []
      tags:
        - Domains
      parameters:
        - schema:
            type: string
            format: uuid
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: domain_id
          in: path
      responses:
        "200":
          description: Response object of domain DNS records requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DomainDnsRecordsResponseSchema"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while retrieving domain DNS records
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
    post:
      operationId: createDomainDnsRecord
      summary: Create a domain DNS record
      security:
        - bearerAuth: []
      tags:
        - Domains
      parameters:
        - schema:
            type: string
            format: uuid
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: domain_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DomainDnsRecord"
      responses:
        "202":
          description: DNS record create action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateDomainDnsRecordResponseSchema"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while creating a domain DNS record
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
    put:
      operationId: updateDomainDnsRecord
      summary: Update a domain DNS record
      security:
        - bearerAuth: []
      tags:
        - Domains
      parameters:
        - schema:
            type: string
            format: uuid
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: domain_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateDomainDnsRecordRequestBodySchema"
      responses:
        "202":
          description: DNS record update action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateDomainDnsRecordResponseSchema"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while updating a domain DNS record
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
    delete:
      operationId: deleteDomainDnsRecord
      summary: Delete domain DNS record
      security:
        - bearerAuth: []
      tags:
        - Domains
      parameters:
        - schema:
            type: string
            format: uuid
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: domain_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeleteDomainDnsRecordRequestBodyTransformerSchema"
      responses:
        "202":
          description: Domain DNS record deletion action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteDomainDnsRecordResponseSchema"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while deleting a domain DNS record
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/tools/clear-cache:
    post:
      operationId: clearSiteCache
      summary: Clear Site Cache
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Tools
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ClearCacheRequestBody"
      responses:
        "202":
          description: Clearing site cache in progress
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MKClearCacheResponse"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while trying to clear cache
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/tools/restart-php:
    post:
      operationId: restartPhpEngine
      summary: Restart an Environment's PHP Engine
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Tools
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RestartPhpEngineRequestBody"
      responses:
        "202":
          description: Restarting PHP in progress
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RestartPhpEngineResponse"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while trying to restart the PHP engine
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/tools/modify-php-version:
    put:
      operationId: modifyPhpVersion
      summary: Modify an Environment's PHP Version
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Tools
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ModifyPhpVersionRequestBody"
      responses:
        "202":
          description: Modifying PHP version in progress
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ModifyPhpVersionResponse"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while trying to modify PHP version
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/clone:
    post:
      operationId: cloneWordPressSite
      summary: Clone existing site
      security:
        - bearerAuth: []
      tags:
        - WordPress Sites
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/cloneWPSite-Body"
      responses:
        "202":
          description: Cloning Wordpress site action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/cloneWPSite-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while creating a site
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/plain:
    post:
      operationId: addPlainWordPressSite
      summary: Create a plain site
      security:
        - bearerAuth: []
      tags:
        - WordPress Sites
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/addPlainWPSite-Body"
      responses:
        "202":
          description: Plain site creation action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/addPlainWPSite-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while creating a site
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites:
    post:
      operationId: addWordPressSite
      summary: Create a site
      security:
        - bearerAuth: []
      tags:
        - WordPress Sites
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/addWPSite-Body"
      responses:
        "202":
          description: Site creation action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/addWPSite-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while creating a site
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
    get:
      operationId: getSites
      summary: Get list of company sites
      security:
        - bearerAuth: []
      tags:
        - WordPress Sites
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: company
          in: query
        - schema:
            type:
              - boolean
              - "null"
            default: false
            example: true
            x-default: true
          required: false
          name: include_environments
          in: query
      responses:
        "200":
          description: Successfully found sites
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/getSites-Response"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the sites or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving sites
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/{site_id}:
    get:
      operationId: getSiteById
      summary: Get site by ID
      security:
        - bearerAuth: []
      tags:
        - WordPress Sites
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: site_id
          in: path
      responses:
        "200":
          description: Successfully found site by ID
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SiteById-Response"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the site or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving site by ID
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
    delete:
      operationId: deleteWordpressSite
      summary: Delete a site
      security:
        - bearerAuth: []
      tags:
        - WordPress Sites
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: site_id
          in: path
      responses:
        "202":
          description: Site deletion action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/deleteWpSite-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while deleting a site
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/plugins:
    get:
      operationId: getPlugins
      summary: Get list of WordPress Site plugins
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Themes & Plugins
      deprecated: true
      description: This endpoint is deprecated. Please use <a
        href="https://api-docs.kinsta.com/api-reference/wordpress-site-themes-&-plugins/get-list-of-wp-site-plugins"
        target="_blank">Get Wordpress Plugins</a> instead.
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      responses:
        "200":
          description: Successfully found WP plugins
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetWpSiteEnvironmentPluginsResponseSchema"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the WP plugins or the user does not have permissions
            to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving WP plugins
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
    put:
      operationId: updatePlugin
      summary: Update WP Plugin
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Themes & Plugins
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateWpEnvironmentRequestBodySchema"
      responses:
        "202":
          description: Updating of plugin started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateWpEnvironmentPluginResponseSchema"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while updating a plugin
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/plugins/bulk-update:
    put:
      operationId: bulkUpdatePlugins
      summary: Bulk update WP Site plugins
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Themes & Plugins
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BulkUpdateWpEnvironmentPluginsRequestBodySchema"
      responses:
        "200":
          description: Successfully updated WP plugins
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BulkUpdateWpEnvironmentPluginsResponseSchema"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the WP themes or the user does not have permissions
            to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while bulk-updating WP plugins
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/themes:
    get:
      operationId: getThemes
      summary: Get list of WordPress Site themes
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Themes & Plugins
      deprecated: true
      description: This endpoint is deprecated. Please use <a
        href="https://api-docs.kinsta.com/api-reference/wordpress-site-themes-&-plugins/get-list-of-wp-site-themes"
        target="_blank">Get Wordpress Themes</a> instead.
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      responses:
        "200":
          description: Successfully found WP themes
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetWpSiteEnvironmentThemesResponseSchema"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the WP themes or the user does not have permissions
            to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving WP themes
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
    put:
      operationId: updateTheme
      summary: Update WP Theme
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Themes & Plugins
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateWpEnvironmentRequestBodySchema"
      responses:
        "202":
          description: Updating of theme started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateWpEnvironmentThemeResponseSchema"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while updating a theme
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/themes/bulk-update:
    put:
      operationId: bulkUpdateThemes
      summary: Bulk update WP Site themes
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Themes & Plugins
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BulkUpdateWpEnvironmentThemesRequestBodySchema"
      responses:
        "200":
          description: Successfully updated WP themes
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BulkUpdateWpEnvironmentThemesResponseSchema"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the WP themes or the user does not have permissions
            to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while bulk-updating WP themes
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/domains:
    post:
      operationId: addSiteDomain
      summary: Add new site domain
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Domains
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddSiteDomainRequestBodySchema"
      responses:
        "202":
          description: Site domain creation action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AddSiteDomainResponseSchema"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while adding a site domain
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
    delete:
      operationId: deleteSiteDomain
      summary: Delete one or more site domains
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Domains
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeleteSiteDomainRequestBodySchema"
      responses:
        "202":
          description: Site domain deletion action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteSiteDomainResponseSchema"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while deleting site domains
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
    get:
      operationId: getSiteDomains
      summary: Get list of site domains for the environment
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Domains
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      responses:
        "200":
          description: Response object of site domains requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetSiteDomainsResponseSchema"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the site domains or the user does not have
            permissions to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving site domains
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/domains/{site_domain_id}/verification-records:
    get:
      operationId: getVerificationRecords
      summary: Get list of verification and pointing records for the site domain
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Domains
      parameters:
        - schema:
            type: string
            format: uuid
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: site_domain_id
          in: path
      responses:
        "200":
          description: Response object of verification and pointing records requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetVerificationRecordsResponseSchema"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the verification and pointing records or the user
            does not have permissions to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving verification and pointing records
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/change-primary-domain:
    put:
      operationId: changePrimaryDomain
      summary: Change primary domain of an environment
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Domains
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ChangePrimaryDomainRequestBodySchema"
      responses:
        "202":
          description: Changing primary domain action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ChangePrimaryDomainResponseSchema"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while changing primary domain
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/{site_id}/environments:
    get:
      operationId: getSiteEnvironments
      summary: Get site environments
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: site_id
          in: path
      responses:
        "200":
          description: Successfully found site environments
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetEnvironments-Response"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the site environments or the user does not have
            permissions to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving site environments
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
    post:
      operationId: addWordPressEnvironment
      summary: Create a WordPress site environment
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: site_id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/addWPEnvironment-Body"
      responses:
        "202":
          description: Environment creation action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/addWPEnvironment-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while creating an environment
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
    put:
      operationId: pushWordPressEnvironment
      summary: Push a WordPress site environment
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: site_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PushEnvironmentRequestBody"
      responses:
        "202":
          description: Pushing environment action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PushEnvironmentResponse"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while pushing an environment
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/{site_id}/reset-site:
    post:
      operationId: resetSite
      summary: Reset a site
      security:
        - bearerAuth: []
      tags:
        - WordPress Sites
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: site_id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/resetSite-Body"
      responses:
        "202":
          description: Site reset action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/resetSite-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while resetting a site
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/{site_id}/environments/plain:
    post:
      operationId: addPlainEnvironment
      summary: Create a plain environment (no WordPress installed)
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: site_id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/cloneWpEnvironment-Body"
      responses:
        "202":
          description: Creating plain environment action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/cloneWpEnvironment-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while creating an environment
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/{site_id}/environments/clone:
    post:
      operationId: cloneWordPressEnvironment
      summary: Clone an environment
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: site_id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/cloneWpEnvironment-Body"
                - properties:
                    display_name:
                      type: string
                      example: development
                    is_premium:
                      type: boolean
                      example: false
                    source_env_id:
                      type: string
                      example: 0010cdaf-0b94-472e-86bd-7edf6fceaa1c
                  required:
                    - display_name
                    - is_premium
                    - source_env_id
      responses:
        "202":
          description: Cloning environment action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/cloneWpEnvironment-Response"
                  - properties:
                      operation_id:
                        type: string
                        example: environment:clone-54fb80af-576c-4fdc-ba4f-b596c83f15a1
                      message:
                        type: string
                        example: Cloning environment in progress
                      status:
                        type: number
                        example: 202
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while creating an environment
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}:
    delete:
      operationId: deleteWordpressEnvironment
      summary: Delete a WordPress site environment
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      responses:
        "202":
          description: Deleting envrionment action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/deleteWpEnvironment-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while deleting an environment
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/change-environment-php-allocation:
    post:
      operationId: changeEnvironmentPhpAllocation
      summary: Change PHP allocation settings for a premium staging environment
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/changeEnvironmentPhpAllocation-Body"
      responses:
        "202":
          description: Environment PHP allocation change action started. Check MyKinsta
            for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/changeEnvironmentPhpAllocation-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while changing PHP allocation settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/change-webroot-subfolder:
    post:
      operationId: changeEnvironmentWebRootSubfolder
      summary: Change webroot subfolder of environment
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/changeEnvironmentWebRootSubfolder-Body"
      responses:
        "202":
          description: Environment webroot subfolder change action started. Check MyKinsta
            for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/changeEnvironmentWebRootSubfolder-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while changing webroot subfolder
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/{site_id}/change-site-php-allocation:
    post:
      operationId: changeSitePhpAllocation
      summary: Change PHP allocation settings for a site's live and standard staging
        environments
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: site_id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/changeSitePhpAllocation-Body"
      responses:
        "202":
          description: Site PHP allocation change action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/changeSitePhpAllocation-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while changing PHP allocation settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/file-list:
    get:
      operationId: ListFiles
      summary: Get list of files for environment
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      responses:
        "200":
          description: Successfully found environment file list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetEnvironmentFileListResponseSchema"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the environment file list or the user does not have
            permissions to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving environment file list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /operations/{operation_id}:
    get:
      operationId: getOperationStatus
      summary: Get the status information of an operation
      security:
        - bearerAuth: []
      tags:
        - Operations
      parameters:
        - schema:
            type: string
            example: sites:add-8dc99dce-c5c7-4d8e-b589-6641696fc830
          required: true
          name: operation_id
          in: path
      responses:
        "200":
          description: The operation has successfully finished
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema200"
        "202":
          description: The operation is still in progress
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OperationResponse"
        "404":
          description: The operation was not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: The operation has failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/edge-caching/clear:
    post:
      operationId: clearSiteEdgeCache
      summary: Clear Site Edge Cache
      security:
        - bearerAuth: []
      tags:
        - WordPress Edge Caching
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ClearEdgeCacheRequestBody"
      responses:
        "202":
          description: Clearing site edge cache in progress
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MKClearEdgeCacheResponse"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while trying to clear cache
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/edge-caching/status:
    put:
      operationId: updateEdgeCacheStatus
      summary: Update Site Edge Cache Status
      security:
        - bearerAuth: []
      tags:
        - WordPress Edge Caching
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateEdgeCacheStatusRequestBody"
      responses:
        "202":
          description: Updating Site Edge Cache Status in progress
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateEdgeCacheStatusResponse"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while trying to update Site Edge Cache Status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/cdn/clear-cache:
    post:
      operationId: clearSiteCDNCache
      summary: Clear Site CDN Cache
      security:
        - bearerAuth: []
      tags:
        - WordPress CDN
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ClearCDNCacheRequestBody"
      responses:
        "202":
          description: Clearing site CDN cache in progress
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ClearCDNCacheResponse"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while trying to clear cache
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/cdn/image-optimization:
    put:
      operationId: updateImageOptimization
      summary: Update CDN Image Optimization
      security:
        - bearerAuth: []
      tags:
        - WordPress CDN
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateImageOptimizationRequestBody"
      responses:
        "202":
          description: Updating Site Image Optimization in progress
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateImageOptimizationResponse"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while updating CDN Image Optimization
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/tools/denied-ips:
    get:
      operationId: getDeniedIPs
      summary: Get list of denied IPs
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Tools
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: environment_id
          in: query
      responses:
        "200":
          description: Returns list of denied IPs
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetDeniedIPsResponse"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while trying to get list of denied IPs
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
    put:
      operationId: updateDeniedIPs
      summary: Update denied IP list
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Tools
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateDeniedIPsRequestBody"
      responses:
        "200":
          description: List of denied IPs was updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateDeniedIPsResponse"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while trying to update list of denied IPs
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/backups:
    get:
      operationId: getBackups
      summary: Get manual, schedule and system generated backups
      security:
        - bearerAuth: []
      tags:
        - Backups
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      responses:
        "200":
          description: Successfully found backups
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetBackupsResponseSchema"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the environment or the user does not have
            permissions to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving backups
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/downloadable-backups:
    get:
      operationId: getDownloadableBackups
      summary: Get downloadable backups
      security:
        - bearerAuth: []
      tags:
        - Backups
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      responses:
        "200":
          description: Successfully found downloadable backups
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetDownloadableBackupsResponseSchema"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the environment or the user does not have
            permissions to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving downloadable backups
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
    post:
      operationId: addDownloadableBackup
      summary: Add a downloadable backup to an environment
      security:
        - bearerAuth: []
      tags:
        - Backups
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      responses:
        "202":
          description: Downloadable backup creation was successfully started for the
            environment
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AddDownloadableBackupResponseSchema"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while starting downloadable backup generation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/next-downloadable-backup-available:
    get:
      operationId: nextDownloadableBackupAvailable
      summary: Get the date of the next available downloadable backup
      security:
        - bearerAuth: []
      tags:
        - Backups
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      responses:
        "200":
          description: Successfully found the next available downloadable backup
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NextDownloadableBackupAvailableResponseSchema"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the environment or the user does not have
            permissions to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving the next available downloadable
            backup
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{target_env_id}/backups/restore:
    post:
      operationId: restoreBackup
      summary: Restore a scheduled or manual or system generated backup to an
        environment
      security:
        - bearerAuth: []
      tags:
        - Backups
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: target_env_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RestoreSnapshotToEnvRequestBodySchema"
      responses:
        "202":
          description: Restore backup to environment action started. Check MyKinsta for
            status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RestoreSnapshotToEnvResponseSchema"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while restoring backup to environment
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/manual-backups:
    post:
      operationId: addManualBackup
      summary: Add a manual backup to an environment
      security:
        - bearerAuth: []
      tags:
        - Backups
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddManualBackupRequestBodySchema"
      responses:
        "202":
          description: Creating manual backup action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AddManualBackupResponseSchema"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while creating manual backup
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/backups/{backup_id}:
    delete:
      operationId: removeBackup
      summary: Remove a WP site environment backup
      security:
        - bearerAuth: []
      tags:
        - Backups
      parameters:
        - schema:
            type: number
            example: 165424355
          required: true
          name: backup_id
          in: path
      responses:
        "202":
          description: Removing backup action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoveBackupResponseSchema"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while removing backup
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/logs:
    get:
      operationId: getLogs
      summary: Get site logs
      security:
        - bearerAuth: []
      tags:
        - Logs
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
        - schema:
            type: string
            enum:
              - error
              - access
              - kinsta-cache-perf
            default: error
            example: error
            x-default: error
          required: true
          name: file_name
          in: query
        - schema:
            type: number
            maximum: 20000
            default: 1000
            example: 1000
            x-default: 1000
          required: true
          name: lines
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2026-07-23T00:00:00Z
          required: false
          name: from
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2026-07-24T00:00:00Z
          required: false
          name: to
          in: query
        - schema:
            type: string
            example: Example search
          required: false
          name: search
          in: query
      responses:
        "200":
          description: Successfully found site logs
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetLogsResponseSchema"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the site logs or the user does not have permissions
            to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving site logs
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/additional-sftp-accounts/toggle-status:
    put:
      operationId: toggleAdditionalSftpAccounts
      summary: Enable or disable additional SFTP accounts
      security:
        - bearerAuth: []
      tags:
        - Additional SFTP Users
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ToggleAdditionalSftpAccountsRequestBodySchema"
      responses:
        "202":
          description: Toggling status for additional SFTP accounts in progress
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ToggleAdditionalSftpAccountsResponse"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while trying to toggle status for additional SFTP
            accounts
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/additional-sftp-accounts:
    post:
      operationId: addAdditionalSftpAccount
      summary: Add additional SFTP account
      security:
        - bearerAuth: []
      tags:
        - Additional SFTP Users
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddAdditionalSftpAccountRequestBodySchema"
      responses:
        "200":
          description: Adding additional SFTP account successful
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AddAdditionalSftpAccountResponse"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while trying to add additional SFTP account
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
    get:
      operationId: getAdditionalSftpAccounts
      summary: Get list of additional SFTP accounts
      security:
        - bearerAuth: []
      tags:
        - Additional SFTP Users
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      responses:
        "200":
          description: Successfully found additional SFTP accounts
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetAdditionalSftpAccountsResponse"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the additional SFTP accounts or the user does not
            have permissions to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving additional SFTP accounts
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/additional-sftp-accounts/{sftp_account_id}:
    delete:
      operationId: removeAdditionalSftpAccount
      summary: Remove additional SFTP account
      security:
        - bearerAuth: []
      tags:
        - Additional SFTP Users
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: sftp_account_id
          in: path
      responses:
        "202":
          description: Removing additional SFTP account in progress
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoveAdditionalSftpAccountResponse"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while trying to remove additional SFTP account
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/redirect-rules:
    get:
      operationId: getRedirectRules
      summary: Get environment redirect rules
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
        - schema:
            type: number
            default: 10
            example: 10
            x-default: 10
          required: false
          name: limit
          in: query
        - schema:
            type: number
            default: 0
            example: 3
            x-default: 3
          required: false
          name: offset
          in: query
        - schema:
            type: string
            enum: *a1
            default: domain
            example: domain
            x-default: domain
          required: false
          name: key
          in: query
        - schema:
            type: string
            enum: *a2
            default: ascend
            example: ascend
            x-default: ascend
          required: false
          name: order
          in: query
        - schema:
            type: string
            default: ""
            example: Search...
            x-default: Search...
          required: false
          name: search_query
          in: query
        - schema:
            type: string
            enum: *a3
            default: "false"
            example: "true"
            x-default: "true"
          required: false
          name: regex_search
          in: query
      responses:
        "200":
          description: Successfully found redirect rules
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetRedirectRulesResponse"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the redirect rules or the user does not have
            permissions to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving redirect rules
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
    post:
      operationId: updateRedirectRules
      summary: Update redirect rules
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/GetRedirectRulesRequest"
                - properties:
                    rules_to_update:
                      type: array
                      items:
                        type: object
                        properties:
                          domain:
                            type:
                              - string
                              - "null"
                            example: kinsta.com
                          from:
                            type: string
                            example: /redirect/from
                          to:
                            type: string
                            example: /redirect/to
                          traffic_from_city:
                            type:
                              - string
                              - "null"
                            example: Nashville
                          traffic_from_country:
                            type:
                              - string
                              - "null"
                            example: US
                          traffic_from_country_name:
                            type:
                              - string
                              - "null"
                            example: United States
                          displayed_location:
                            type:
                              - string
                              - "null"
                            example: Nashvile, United States
                          type:
                            type: string
                            enum: &a4
                              - permanent
                              - redirect
                        required:
                          - domain
                          - from
                          - to
                          - type
                    new_value:
                      type: object
                      properties:
                        domain:
                          type:
                            - string
                            - "null"
                          example: kinsta.com
                        from:
                          type: string
                          example: /redirect/from
                        to:
                          type: string
                          example: /redirect/to
                        traffic_from_city:
                          type:
                            - string
                            - "null"
                          example: Nashville
                        traffic_from_country:
                          type:
                            - string
                            - "null"
                          example: US
                        traffic_from_country_name:
                          type:
                            - string
                            - "null"
                          example: United States
                        displayed_location:
                          type:
                            - string
                            - "null"
                          example: Nashvile, United States
                        type:
                          type: string
                          enum: *a4
                      required:
                        - domain
                        - from
                        - to
                        - type
                    action_type:
                      type: string
                      enum:
                        - DELETE
                        - DELETE_ALL
                        - NEW
                        - UPDATE
                  required:
                    - action_type
      responses:
        "200":
          description: Successfully updated redirect rules
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the redirect rules or the user does not have
            permissions to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while updating redirect rules
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /company/{id}/available-regions:
    get:
      operationId: getAvailableRegions
      summary: Get list of available regions
      security:
        - bearerAuth: []
      tags:
        - Available Regions
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: id
          in: path
      responses:
        "200":
          description: List of available regions
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AvailableRegions"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving available regions
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /company/{id}/activity-logs:
    get:
      operationId: getUserActivityLogs
      summary: Get list of company activity logs
      security:
        - bearerAuth: []
      tags:
        - Activity Logs
      parameters:
        - schema:
            type: number
            default: 10
            example: 10
            x-default: 10
          required: false
          name: limit
          in: query
        - schema:
            type: number
            default: 0
            example: 3
            x-default: 3
          required: false
          name: offset
          in: query
        - schema:
            type: string
            enum:
              - siteActions
              - kinstaDns
              - migrations
              - billing
              - notifications
              - userManagement
              - personalSettings
              - samlSso
            example: siteActions
          required: false
          name: category
          in: query
        - schema:
            type: string
          required: false
          name: site_id
          in: query
        - schema:
            type: string
          required: false
          name: id_initiated_by
          in: query
        - schema:
            type: string
          required: false
          name: id_api_key
          in: query
        - schema:
            type: string
            enum:
              - da
              - de
              - en
              - es
              - fr
              - it
              - ja
              - nl
              - pt
              - sv
            default: en
          required: false
          name: language
          in: query
      responses:
        "200":
          description: Successfully found activity logs
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/getUserActivityLogs-Response"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the activity logs or the user does not have
            permissions to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving activity logs
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/ssh/set-status:
    post:
      operationId: setSftpSshAccess
      summary: Enable/Disable SFTP/SSH
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SetSftpSshAccess-Body"
      responses:
        "200":
          description: Site creation action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SetSftpSshAccess-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while changing access
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/ssh/get-status:
    get:
      operationId: getSshStatus
      summary: Get SFTP/SSH status
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      responses:
        "200":
          description: Successfully found redirect rules
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetSftpSshStatus-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find environment or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while changing access
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/ssh/set-password-status:
    post:
      operationId: generateSftpPassword
      summary: Enable/Disable SFTP/SSH password access
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SetSftpSshPasswordAccess-Body"
      responses:
        "200":
          description: Enable/Disable SFTP/SSH password access
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SetSftpSshPasswordAccess-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while changing password access
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/ssh/generate-password:
    post:
      operationId: generateSftpPassword
      summary: Generate SFTP password
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      responses:
        "200":
          description: Generate SFTP/SSH password
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GenerateSftpPassword-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while generating password
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/ssh/get-allowed-ips:
    get:
      operationId: getSftpIpAllowList
      summary: Get SFTP/SSH IP allowlist
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      responses:
        "200":
          description: Successfully found IP allowlist
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetSftpSshAllowlist-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find environment or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while changing ip allowlist
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/ssh/set-allowed-ips:
    post:
      operationId: setSftpIpAllowlist
      summary: Update SFTP/SSH IP allowlist
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SetSftpIpAllowlist-Body"
      responses:
        "200":
          description: Update SFTP/SSH IP allowlist
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SetSftpIpAllowlist-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while updating IP allowlist
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/{site_id}/environments/{env_id}/ssh/config:
    get:
      operationId: getSftpConfig
      summary: Get SFTP/SSH connections config
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      responses:
        "200":
          description: Successfully found SFTP config
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/GetSftpConfig-Response"
                  - properties:
                      port:
                        type: string
                      name:
                        type: string
                      host:
                        type: string
                      user:
                        type: string
                      ssh_command:
                        type: string
                    required:
                      - port
                      - name
                      - host
                      - user
                      - ssh_command
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find environment or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
  /sites/environments/{env_id}/ssh/change-expiration-interval:
    post:
      operationId: chaneSftpPasswordExpiration
      summary: Change SFTP/SSH password expiration interval
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ChangeSftpPasswordExpiration-Body"
      responses:
        "200":
          description: Change SFTP/SSH password expiration interval
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ChangeSftpPasswordExpiration-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while changing password expiration interval
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/ssh/password:
    get:
      operationId: getSftpPassword
      summary: Get SFTP/SSH password
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      responses:
        "200":
          description: Successfully found SFTP config
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetSftpPassword-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find environment or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
  /sites/{site_id}/usage/visits/this-month:
    get:
      operationId: getVisitsUsage
      summary: Get Visits usage
      security:
        - bearerAuth: []
      tags:
        - Analytics
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: site_id
          in: path
      responses:
        "200":
          description: Successfully found visits
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetVisitsResponse"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find visits
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving visits
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/{site_id}/usage/bandwidth/this-month:
    get:
      operationId: getBandwidthUsage
      summary: Get Server Bandwidth usage
      security:
        - bearerAuth: []
      tags:
        - Analytics
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: site_id
          in: path
      responses:
        "200":
          description: Successfully found server bandwidth
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetBandwidthResponse"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find server bandwidth
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving server bandwidth
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/{site_id}/usage/cdn-bandwidth/this-month:
    get:
      operationId: getCdnBandwidthUsage
      summary: Get CDN Bandwidth usage
      security:
        - bearerAuth: []
      tags:
        - Analytics
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: site_id
          in: path
      responses:
        "200":
          description: Successfully found CDN bandwidth
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetCdnBandwidthResponse"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find CDN bandwidth
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving CDN bandwidth
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/analytics/cdn-bandwidth:
    get:
      operationId: getCdnBandwidth
      summary: Get CDN Bandwidth
      security:
        - bearerAuth: []
      tags:
        - Analytics
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
        - schema:
            type: string
            enum:
              - 24_hours
              - 7_days
              - 30_days
              - 60_days
            default: 7_days
            example: 30_days
            x-default: 30_days
          required: false
          name: time_span
          in: query
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: company_id
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-20
          required: false
          name: from
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-30
          required: false
          name: to
          in: query
      responses:
        "202":
          description: Getting CDN Bandwidth analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Analytics-Cdn-Bandwidth-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while getting analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/analytics/visits:
    get:
      operationId: getVisits
      summary: Get Visits
      security:
        - bearerAuth: []
      tags:
        - Analytics
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
        - schema:
            type: string
            enum:
              - 24_hours
              - 7_days
              - 30_days
              - 60_days
            default: 7_days
            example: 30_days
            x-default: 30_days
          required: false
          name: time_span
          in: query
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: company_id
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-20
          required: false
          name: from
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-30
          required: false
          name: to
          in: query
      responses:
        "202":
          description: Getting visits analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Analytics-Visits-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while getting analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/analytics/bandwidth:
    get:
      operationId: getBandwidth
      summary: Get Server Bandwidth
      security:
        - bearerAuth: []
      tags:
        - Analytics
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
        - schema:
            type: string
            enum:
              - 24_hours
              - 7_days
              - 30_days
              - 60_days
            default: 7_days
            example: 30_days
            x-default: 30_days
          required: false
          name: time_span
          in: query
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: company_id
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-20
          required: false
          name: from
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-30
          required: false
          name: to
          in: query
      responses:
        "202":
          description: Getting server bandwidth analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Analytics-Bandwidth-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while getting analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/analytics/diskspace:
    get:
      operationId: getDiskSpace
      summary: Get Disk space
      security:
        - bearerAuth: []
      tags:
        - Analytics
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
        - schema:
            type: string
            enum:
              - 7_days
              - 30_days
              - 60_days
            default: 7_days
            example: 30_days
            x-default: 30_days
          required: false
          name: time_span
          in: query
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: company_id
          in: query
        - schema:
            type: string
            pattern: ^-?(0[0-9]|1[0-4]):00$
            example: 02:00
          required: true
          name: time_zone
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-20
          required: false
          name: from
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-30
          required: false
          name: to
          in: query
      responses:
        "202":
          description: Getting Disk space analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Analytics-Disk-Space-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while getting analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/run-wp-cli-command:
    post:
      operationId: runWPCLICommand
      summary: Run a WP CLI command
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      parameters:
        - schema:
            type: string
            format: uuid
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/runWPCLICommand-Body"
      responses:
        "202":
          description: Running a WP CLI command action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/runWPCLICommand-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while running a WP CLI command
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/pma-login-token:
    post:
      operationId: generatePhpMyAdminLoginLink
      summary: Generate phpMyAdmin login link
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      responses:
        "200":
          description: phpMyAdmin login link generated successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/generatePhpMyAdminLoginLink-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while generating the phpMyAdmin login link
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/wp-plugins:
    get:
      operationId: getWordPressPlugins
      summary: Get list of WP Site plugins
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Themes & Plugins
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GetWpSiteEnvironmentWordPressPlugins-Body"
      responses:
        "200":
          description: Successfully found WP plugins
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetWpSiteEnvironmentWordPressPlugins-Response"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the WP plugins or the user does not have permissions
            to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving WP plugins
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/wp-themes:
    get:
      operationId: getWordPressThemes
      summary: Get list of WP Site themes
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Themes & Plugins
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GetWpSiteEnvironmentWordPressThemes-Body"
      responses:
        "200":
          description: Successfully found WP themes
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetWpSiteEnvironmentWordPressThemes-Response"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the WP themes or the user does not have permissions
            to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving WP themes
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/analytics/top-countries:
    get:
      operationId: getTopCountries
      summary: Get top countries
      security:
        - bearerAuth: []
      tags:
        - Analytics
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
        - schema:
            type: string
            enum:
              - 24_hours
              - 7_days
              - 30_days
              - 60_days
            default: 7_days
            example: 30_days
            x-default: 30_days
          required: false
          name: time_span
          in: query
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: company_id
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-20
          required: false
          name: from
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-30
          required: false
          name: to
          in: query
      responses:
        "202":
          description: Getting top countries analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Analytics-Top-Countries-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while getting analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/analytics/top-cities:
    get:
      operationId: getTopCities
      summary: Get top cities
      security:
        - bearerAuth: []
      tags:
        - Analytics
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
        - schema:
            type: string
            enum:
              - 24_hours
              - 7_days
              - 30_days
              - 60_days
            default: 7_days
            example: 30_days
            x-default: 30_days
          required: false
          name: time_span
          in: query
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: company_id
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-20
          required: false
          name: from
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-30
          required: false
          name: to
          in: query
      responses:
        "202":
          description: Getting top cities analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Analytics-Top-Cities-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while getting analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/analytics/top-client-ips:
    get:
      operationId: getTopClientIps
      summary: Get top client ips
      security:
        - bearerAuth: []
      tags:
        - Analytics
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
        - schema:
            type: string
            enum:
              - 24_hours
              - 7_days
              - 30_days
              - 60_days
            default: 7_days
            example: 30_days
            x-default: 30_days
          required: false
          name: time_span
          in: query
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: company_id
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-20
          required: false
          name: from
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-30
          required: false
          name: to
          in: query
      responses:
        "202":
          description: Getting top client ips analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Analytics-Top-Client-Ips-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while getting analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/analytics/top-asns:
    get:
      operationId: getTopAsnsRequests
      summary: Get top ASNs requests
      security:
        - bearerAuth: []
      tags:
        - Analytics
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
        - schema:
            type: string
            enum:
              - 24_hours
              - 7_days
              - 30_days
              - 60_days
            default: 7_days
            example: 30_days
            x-default: 30_days
          required: false
          name: time_span
          in: query
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: company_id
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-20
          required: false
          name: from
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-30
          required: false
          name: to
          in: query
      responses:
        "202":
          description: Getting top ASNs analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Analytics-Top-Asns-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while getting analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/analytics/top-browsers:
    get:
      operationId: getTopBrowsersRequests
      summary: Get top browsers requests
      security:
        - bearerAuth: []
      tags:
        - Analytics
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
        - schema:
            type: string
            enum:
              - 24_hours
              - 7_days
              - 30_days
              - 60_days
            default: 7_days
            example: 30_days
            x-default: 30_days
          required: false
          name: time_span
          in: query
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: company_id
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-20
          required: false
          name: from
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-30
          required: false
          name: to
          in: query
      responses:
        "202":
          description: Getting top browsers analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Analytics-Top-Browsers-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while getting analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/analytics/top-hosts:
    get:
      operationId: getTopHostRequests
      summary: Get top hosts requests
      security:
        - bearerAuth: []
      tags:
        - Analytics
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
        - schema:
            type: string
            enum:
              - 24_hours
              - 7_days
              - 30_days
              - 60_days
            default: 7_days
            example: 30_days
            x-default: 30_days
          required: false
          name: time_span
          in: query
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: company_id
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-20
          required: false
          name: from
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-30
          required: false
          name: to
          in: query
      responses:
        "202":
          description: Getting top hosts analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Analytics-Top-Host-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while getting analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/analytics/top-referrers:
    get:
      operationId: getTopReferrersRequests
      summary: Get top referrers requests
      security:
        - bearerAuth: []
      tags:
        - Analytics
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
        - schema:
            type: string
            enum:
              - 24_hours
              - 7_days
              - 30_days
              - 60_days
            default: 7_days
            example: 30_days
            x-default: 30_days
          required: false
          name: time_span
          in: query
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: company_id
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-20
          required: false
          name: from
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-30
          required: false
          name: to
          in: query
      responses:
        "202":
          description: Getting top referrers analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Analytics-Top-Referrers-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while getting analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/analytics/top-uas:
    get:
      operationId: getTopUAsRequests
      summary: Get top user agents requests
      security:
        - bearerAuth: []
      tags:
        - Analytics
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
        - schema:
            type: string
            enum:
              - 24_hours
              - 7_days
              - 30_days
              - 60_days
            default: 7_days
            example: 30_days
            x-default: 30_days
          required: false
          name: time_span
          in: query
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: company_id
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-20
          required: false
          name: from
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-30
          required: false
          name: to
          in: query
      responses:
        "202":
          description: Getting top user agents analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Analytics-Top-UAs-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while getting analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/analytics/visits-dispersion:
    get:
      operationId: getVisitsDispersion
      summary: Get visits dispersion
      security:
        - bearerAuth: []
      tags:
        - Analytics
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
        - schema:
            type: string
            enum:
              - 24_hours
              - 7_days
              - 30_days
              - 60_days
            default: 7_days
            example: 30_days
            x-default: 30_days
          required: false
          name: time_span
          in: query
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: company_id
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-20
          required: false
          name: from
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-30
          required: false
          name: to
          in: query
      responses:
        "202":
          description: Getting response visits dispersion analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Analytics-Visits-Dispersion-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while getting analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/analytics/response-codes:
    get:
      operationId: getResponseCodeBreakdown
      summary: Get response code breakdown
      security:
        - bearerAuth: []
      tags:
        - Analytics
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
        - schema:
            type: string
            enum:
              - 24_hours
              - 7_days
              - 30_days
              - 60_days
            default: 7_days
            example: 30_days
            x-default: 30_days
          required: false
          name: time_span
          in: query
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: company_id
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-20
          required: false
          name: from
          in: query
        - schema:
            type:
              - string
              - "null"
            example: 2025-10-30
          required: false
          name: to
          in: query
      responses:
        "202":
          description: Getting response code breakdown analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Analytics-Response-Code-Breakdown-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while getting analytics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /validate:
    get:
      operationId: validateApiKey
      summary: Validate API Key
      security:
        - bearerAuth: []
      tags:
        - Authentication
      responses:
        "200":
          description: Response with Api key details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ValidateAPIKeyResponse"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while validating the API key
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /company/{id}/wp-plugins:
    get:
      operationId: getCompanyWordPressPlugins
      summary: Get list of company plugins
      security:
        - bearerAuth: []
      tags:
        - WordPress Themes & Plugins
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CompanyWordPressPlugins-Body"
      responses:
        "200":
          description: List of company plugins
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyWordPressPlugins-Response"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving company plugins
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /company/{id}/wp-themes:
    get:
      operationId: getCompanyWordPressThemes
      summary: Get list of company themes
      security:
        - bearerAuth: []
      tags:
        - WordPress Themes & Plugins
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CompanyWordPressThemes-Body"
      responses:
        "200":
          description: List of company themes
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyWordPressThemes-Response"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the company or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving company themes
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/wpa-login-url:
    post:
      operationId: getWpAdminLoginLinkByEmail
      summary: Get WP admin login link by email
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/getWpAdminLoginLinkByEmail-Body"
      responses:
        "200":
          description: WP admin login link generated successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/getWpAdminLoginLinkByEmail-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while generating the WP admin login link
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/wpa-create-user:
    post:
      operationId: createWpAdminUser
      summary: Create WP admin user
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/createWpAdminUser-Body"
      responses:
        "200":
          description: WP admin user created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/createWpAdminUser-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while creating the WP admin user
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/wpa-user-exists:
    get:
      operationId: hasWpAdminUserByEmail
      summary: Check if WP admin user exists by email
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Environments
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
        - schema:
            type: string
            format: email
            example: user@example.com
          required: true
          name: email
          in: query
      responses:
        "200":
          description: Successfully found WP admin user by email
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HasWpAdminUserByEmail-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find the WP admin user by email or the user does not have
            permissions to retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving WP admin user by email
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/environments/{env_id}/force-https-status:
    get:
      operationId: getForceHttpsStatus
      summary: Get Force HTTPS status
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Tools
      responses:
        "200":
          description: Successfully found HTTPs status for the given environment
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetForceHttpsStatus-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find environment or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while retrieving the Force HTTPS status for the
            given environment
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
    post:
      operationId: setForceHttpsStatus
      summary: Set Force HTTPS status
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Tools
      parameters:
        - schema:
            type: string
            example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
          required: true
          name: env_id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SetForceHttpsStatus-Body"
      responses:
        "202":
          description: Force HTTPS status update for the given environment is in progress
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SetForceHttpsStatus-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "404":
          description: Could not find environment or the user does not have permissions to
            retrieve data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema404"
        "500":
          description: Error occurred while changing the Force HTTPS status for the given
            environment
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
  /sites/tools/search-and-replace:
    post:
      operationId: searchAndReplace
      summary: Search and replace
      security:
        - bearerAuth: []
      tags:
        - WordPress Site Tools
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/searchAndReplace-Body"
      responses:
        "202":
          description: Search and replace action started. Check MyKinsta for status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/searchAndReplace-Response"
        "400":
          description: One or more of the required parameters were not provided to the
            request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema400"
        "401":
          description: No or invalid API key provided to the request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema401"
        "500":
          description: Error occurred while performing search and replace
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponseSchema500"
webhooks: {}
