openapi: 3.1.0
info:
  title: Web Hosting API
  description: |-
    Scaleway provides several Web Hosting plans for individuals, professionals, and everyone in between. Our Web Hosting plans include:

    - A domain name
    - A configurable webhosting service
    - The management of your emails, including anti-spam, antivirus and filter systems
    - Unlimited sub-domains
    - An FTP account to upload your website
    - At least one database




    ## Concepts

    Refer to our [dedicated concepts page](https://www.scaleway.com/en/docs/managed-services/webhosting/concepts/) to find definitions of all Web Hosting-related terminology.




    ## Quickstart

    1. Configure your environment variables.

        <Message type="note">
        This is an optional step that seeks to simplify your usage of the Web Hosting API.
        </Message>

        ```bash
        export SCW_SECRET_KEY="<API secret key>"
        export SCW_PROJECT_ID="<Scaleway Project ID>"
        ```

    2. **Choose a Web Hosting offer**: run the following command to list all Web Hosting offers. The `| jq` appendage at the end of the command makes the output easier to read.

        ```bash
        curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            "https://api.scaleway.com/webhosting/v1/regions/fr-par/offers?without_options=true" | jq
        ```

        <Message type="note">
        In the above example, we choose to get offers only. Adjust the query parameter if you would also like to get information about the different options you can add to offers.
        </Message>

    3. **Order a Web Hosting plan**: run the following command to create a Web Hosting plan. You can customize the details in the payload to your needs, using the table below to help.

        ```bash
        curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            "https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings" \
            -d '{
            "domain": "mydomain.net",
            "offer_id": "f5c2ae8f-7625-4bca-b711-b44bb3d08694",
            "project_id": "'"$SCW_PROJECT_ID"'",
            "tags": ["my-tag"]
        }'
        ```

        | Parameter        | Description                                                                            | Valid values OR Example     |
        |------------------|----------------------------------------------------------------------------------------|-----------------------------|
        | `domain`         | The domain name you would like to link to your Web Hosting account. You must already own this domain name and have completed the DNS validation process beforehand.                                                            | `mydomain.net`               |
        | `offer_id`       | The offer ID of the desired offer. Use one of the offer IDs returned in step 2         |`f5c2ae8f-7625-4bca-b711-b44bb3d08694` |
        | `project_id`     | The ID of the Scaleway Project to create the Web Hosting plan in.                      | `277ed74e-ea73-11ed-a05b-0242ac120003`                   |
        | `tags`           | Any tags you would like to associate with this Web Hosting plan                         | `my-tag`                   |


        <Message type="tip">
        Once you've ordered your Web Hosting plan, check out our [dedicated documentation](https://www.scaleway.com/en/docs/managed-services/webhosting/quickstart/) to get started with your configuration.
        </Message>


    4. **Delete your Web Hosting plan**: run the following command to delete your Web Hosting plan. Ensure that you replace `{hosting-id}` in the URL with the ID of the Web Hosting plan you want to delete.

        ```bash
        curl -X DELETE \
            -H "Content-Type: application/json" \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/rest-of-endpoint/{hosting-id}"
        ```


    <Message type="requirement">
    - You have a [Scaleway account](https://console.scaleway.com/)
    - You have created an [API key](https://www.scaleway.com/en/docs/iam/how-to/create-api-keys/) and that the API key has sufficient [IAM permissions](https://www.scaleway.com/en/docs/iam/reference-content/permission-sets/) to perform the actions described on this page
    - You have [installed `curl`](https://curl.se/download.html)
    - You have [installaed `jq`](https://stedolan.github.io/jq/download/)
    </Message>


    ## Technical information

    All Scaleway Web Hosting plans now offer a choice between cPanel and Plesk for website management. Both tools provide a graphical interface and fast access icons, allowing you to configure and monitor your hosting solutions with ease. You can access cPanel or Plesk via the [Scaleway console](https://www.scaleway.com/en/docs/managed-services/webhosting/quickstart/#how-to-access-the-web-hosting-control-panel-from-the-scaleway-console).


    ### Regions

    The Scaleway Web Hosting API is a **regional** API, meaning that each call must specify in its path parameters the region for the resources concerned by the call.

    Scaleway Web Hosting is available only in the `fr-par` region.

    ## Going further

    For more help using Scaleway Web Hosting, check out the following resources:
    - Our [main documentation](https://www.scaleway.com/en/docs/managed-services/webhosting/)
    - The #webhosting-early-access channel on our [Slack Community](https://www.scaleway.com/en/docs/tutorials/scaleway-slack-community/)
    - Our [support ticketing system](https://www.scaleway.com/en/docs/account/how-to/open-a-support-ticket/).
  version: v1
servers:
- url: https://api.scaleway.com
tags:
- name: Web Hosting
  description: |
    With a Scaleway Web Hosting plan, you can manage your domain, configure your web hosting services, manage your emails and more. Create, list, update and delete your Web Hosting plans with these calls
components:
  schemas:
    scaleway.std.LanguageCode:
      type: string
      enum:
      - unknown_language_code
      - en_US
      - fr_FR
      - de_DE
      default: unknown_language_code
    scaleway.webhosting.v1.ControlPanel:
      type: object
      properties:
        name:
          type: string
          description: Control panel name.
        available:
          type: boolean
          description: Define if the control panel type is available to order.
        logo_url:
          type: string
          description: URL of the control panel's logo.
        available_languages:
          type: array
          description: List of available languages for the control panel.
          items:
            $ref: '#/components/schemas/scaleway.std.LanguageCode'
      x-properties-order:
      - name
      - available
      - logo_url
      - available_languages
    scaleway.webhosting.v1.Hosting:
      type: object
      properties:
        id:
          type: string
          description: ID of the Web Hosting plan.
        project_id:
          type: string
          description: ID of the Scaleway Project the Web Hosting plan belongs to.
        updated_at:
          type: string
          description: Date on which the Web Hosting plan was last updated. (RFC 3339
            format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        created_at:
          type: string
          description: Date on which the Web Hosting plan was created. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        status:
          type: string
          description: Status of the Web Hosting plan.
          enum:
          - unknown_status
          - delivering
          - ready
          - deleting
          - error
          - locked
          - migrating
          - updating
          default: unknown_status
        domain:
          type: string
          description: Main domain associated with the Web Hosting plan (deprecated,
            use domain_info).
          deprecated: true
        offer:
          type: object
          description: Details of the Web Hosting plan offer and options.
          properties:
            id:
              type: string
              description: Offer ID.
            name:
              type: string
              description: Offer name.
            billing_operation_path:
              type: string
              description: Unique identifier used for billing.
            options:
              type: array
              description: Options available for the offer.
              items:
                $ref: '#/components/schemas/scaleway.webhosting.v1.Offer.Option'
            price:
              type: object
              description: Price of the offer.
              properties:
                currency_code:
                  type: string
                units:
                  type: integer
                  format: int64
                nanos:
                  type: integer
                  format: int32
              x-properties-order:
              - currency_code
              - units
              - nanos
            available:
              type: boolean
              description: If a hosting_id was specified in the call, defines whether
                the offer is available for a specified hosting plan to migrate (update)
                to.
            control_panel_name:
              type: string
              description: Name of the control panel.
            end_of_life:
              type: boolean
              description: Indicates if the offer has reached its end of life.
            quota_warning:
              type: string
              description: Defines a warning if the maximum value for an option in
                the offer is exceeded.
              enum:
              - unknown_warning
              - quota_exceeded_warning
              - usage_low_warning
              default: unknown_warning
            control_panels:
              type: array
              description: Lists available control panels for the specified offer.
              items:
                $ref: '#/components/schemas/scaleway.webhosting.v1.ControlPanel'
            commitments:
              type: array
              description: Lists available offer commitments for the specified offer.
              items:
                $ref: '#/components/schemas/scaleway.webhosting.v1.OfferCommitment'
            region:
              type: string
              description: Region where the offer is hosted.
          x-properties-order:
          - id
          - name
          - billing_operation_path
          - options
          - price
          - available
          - control_panel_name
          - end_of_life
          - quota_warning
          - control_panels
          - commitments
          - region
        platform:
          type: object
          description: Details of the hosting platform.
          properties:
            hostname:
              type: string
              description: Hostname of the host platform.
            number:
              type: integer
              description: Number of the host platform.
              format: int32
            group_name:
              type: string
              description: Group name of the hosting's host platform.
              enum:
              - unknown_group
              - default
              - premium
              default: unknown_group
            ipv4:
              type: string
              description: IPv4 address of the hosting's host platform. (IPv4 address)
              example: 1.2.3.4
            ipv6:
              type: string
              description: IPv6 address of the hosting's host platform. (IPv6 address)
              example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
            control_panel:
              type: object
              description: Details of the platform control panel.
              properties:
                name:
                  type: string
                  description: Name of the control panel.
                urls:
                  type: object
                  description: URL to connect to control panel dashboard and to Webmail
                    interface.
                  properties:
                    dashboard:
                      type: string
                      description: URL to connect to the hosting control panel dashboard.
                    webmail:
                      type: string
                      description: URL to connect to the hosting Webmail interface.
                  x-properties-order:
                  - dashboard
                  - webmail
              x-properties-order:
              - name
              - urls
          x-properties-order:
          - hostname
          - number
          - group_name
          - ipv4
          - ipv6
          - control_panel
        tags:
          type: array
          description: List of tags associated with the Web Hosting plan.
          items:
            type: string
        dns_status:
          type: string
          description: DNS status of the Web Hosting plan (deprecated, use domain_info).
          deprecated: true
          enum:
          - unknown_status
          - valid
          - invalid
          default: unknown_status
        ipv4:
          type: string
          description: Current IPv4 address of the hosting. (IPv4 address)
          example: 1.2.3.4
        protected:
          type: boolean
          description: Whether the hosting is protected or not.
        user:
          type: object
          description: Details of the hosting user.
          properties:
            username:
              type: string
              description: Main Web Hosting control panel username.
            one_time_password:
              type: string
              description: One-time-password used for the first login to the control
                panel, cleared after first use (deprecated, use password_b64 instead).
              deprecated: true
              nullable: true
            contact_email:
              type: string
              description: Contact email used for the hosting.
            one_time_password_b64:
              type: string
              description: One-time-password used for the first login to the control
                panel, cleared after first use, encoded in base64.
              nullable: true
          x-properties-order:
          - username
          - one_time_password
          - contact_email
          - one_time_password_b64
        domain_status:
          type: string
          description: Main domain status of the Web Hosting plan (deprecated, use
            domain_info).
          deprecated: true
          enum:
          - unknown_status
          - valid
          - invalid
          - validating
          - error
          x-enum-descriptions:
            values:
              unknown_status: The status of the domain is unknown.
              valid: The domain is valid and operational.
              invalid: The domain is invalid, potentially due to incorrect settings
                or configuration issues.
              validating: The domain is in the process of being validated.
              error: The domain is in an error status, it should be checked in Domain&DNS.
          default: unknown_status
        region:
          type: string
          description: Region where the Web Hosting plan is hosted.
        domain_info:
          type: object
          description: Domain configuration block (subdomain, optional custom domain,
            and DNS settings).
          properties:
            subdomain:
              type: string
              description: Optional free subdomain linked to the Web Hosting plan.
            custom_domain:
              type: object
              description: Optional custom domain linked to the Web Hosting plan.
              properties:
                domain:
                  type: string
                  description: Custom domain linked to the hosting plan.
                domain_status:
                  type: string
                  description: Status of the custom domain verification.
                  enum:
                  - unknown_status
                  - valid
                  - invalid
                  - validating
                  - error
                  x-enum-descriptions:
                    values:
                      unknown_status: The status of the domain is unknown.
                      valid: The domain is valid and operational.
                      invalid: The domain is invalid, potentially due to incorrect
                        settings or configuration issues.
                      validating: The domain is in the process of being validated.
                      error: The domain is in an error status, it should be checked
                        in Domain&DNS.
                  default: unknown_status
                dns_status:
                  type: string
                  description: Status of the DNS configuration for the custom domain.
                  enum:
                  - unknown_status
                  - valid
                  - invalid
                  default: unknown_status
                auto_config_domain_dns:
                  type: object
                  description: Indicates whether to auto-configure DNS for this domain.
                  properties:
                    nameservers:
                      type: boolean
                      description: Whether or not to synchronize domain nameservers.
                    web_records:
                      type: boolean
                      description: Whether or not to synchronize web records.
                    mail_records:
                      type: boolean
                      description: Whether or not to synchronize mail records.
                    all_records:
                      type: boolean
                      description: Whether or not to synchronize all types of records.
                        Takes priority over the other fields.
                    none:
                      type: boolean
                      description: No automatic domain configuration. Users must configure
                        their domain for the Web Hosting to work.
                  x-properties-order:
                  - nameservers
                  - web_records
                  - mail_records
                  - all_records
                  - none
              x-properties-order:
              - domain
              - domain_status
              - dns_status
              - auto_config_domain_dns
          x-properties-order:
          - subdomain
          - custom_domain
        commitment:
          type: object
          description: Commitment details to which the hosting is engaged.
          properties:
            offer_commitment:
              type: object
              description: Offer commitment for the specified hosting.
              properties:
                id:
                  type: string
                  description: Offer commitment ID.
                type:
                  type: string
                  description: Offer commitment type.
                  enum:
                  - unknown_commitment_type
                  - first_commitment
                  - next_commitment
                  default: unknown_commitment_type
                billing_mode:
                  type: string
                  description: Offer commitment name.
                  enum:
                  - unknown_billing_mode
                  - sample
                  - purchase_order
                  default: unknown_billing_mode
                billing_operation_path:
                  type: string
                  description: Unique identifier used for billing.
                price:
                  type: object
                  description: Price of the offer commitment.
                  properties:
                    currency_code:
                      type: string
                    units:
                      type: integer
                      format: int64
                    nanos:
                      type: integer
                      format: int32
                  x-properties-order:
                  - currency_code
                  - units
                  - nanos
                duration_in_month:
                  type: integer
                  description: Duration of the offer commitment in months.
                  format: int32
                next:
                  description: Next offer commitment.
                  $ref: '#/components/schemas/scaleway.webhosting.v1.OfferCommitment'
              x-properties-order:
              - id
              - type
              - billing_mode
              - billing_operation_path
              - price
              - duration_in_month
              - next
            start_at:
              type: string
              description: Date and time the commitment started. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            end_at:
              type: string
              description: Date and time the commitment ends. (RFC 3339 format)
              format: date-time
              example: "2022-03-22T12:34:56.123456Z"
              nullable: true
            delete_hosting_at_end:
              type: boolean
              description: "Determines what happens at the end of the commitment period:.\nThe
                hosting may be deleted, automatically renewed, or switched to\nits
                configured post-commitment offer, which may have a different \nprice
                and billing period."
          x-properties-order:
          - offer_commitment
          - start_at
          - end_at
          - delete_hosting_at_end
      x-properties-order:
      - id
      - project_id
      - updated_at
      - created_at
      - status
      - domain
      - offer
      - platform
      - tags
      - dns_status
      - ipv4
      - protected
      - user
      - domain_status
      - region
      - domain_info
      - commitment
    scaleway.webhosting.v1.Hosting.Status:
      type: string
      enum:
      - unknown_status
      - delivering
      - ready
      - deleting
      - error
      - locked
      - migrating
      - updating
      default: unknown_status
    scaleway.webhosting.v1.HostingSummary:
      type: object
      properties:
        id:
          type: string
          description: ID of the Web Hosting plan.
        project_id:
          type: string
          description: ID of the Scaleway Project the Web Hosting plan belongs to.
        created_at:
          type: string
          description: Date on which the Web Hosting plan was created. (RFC 3339 format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        updated_at:
          type: string
          description: Date on which the Web Hosting plan was last updated. (RFC 3339
            format)
          format: date-time
          example: "2022-03-22T12:34:56.123456Z"
          nullable: true
        status:
          type: string
          description: Status of the Web Hosting plan.
          enum:
          - unknown_status
          - delivering
          - ready
          - deleting
          - error
          - locked
          - migrating
          - updating
          default: unknown_status
        domain:
          type: string
          description: Main domain associated with the Web Hosting plan (deprecated,
            use domain_info).
          deprecated: true
        protected:
          type: boolean
          description: Whether the hosting is protected or not.
        dns_status:
          type: string
          description: DNS status of the Web Hosting plan.
          deprecated: true
          enum:
          - unknown_status
          - valid
          - invalid
          default: unknown_status
        offer_name:
          type: string
          description: Name of the active offer for the Web Hosting plan.
        domain_status:
          type: string
          description: Main domain status of the Web Hosting plan.
          deprecated: true
          enum:
          - unknown_status
          - valid
          - invalid
          - validating
          - error
          x-enum-descriptions:
            values:
              unknown_status: The status of the domain is unknown.
              valid: The domain is valid and operational.
              invalid: The domain is invalid, potentially due to incorrect settings
                or configuration issues.
              validating: The domain is in the process of being validated.
              error: The domain is in an error status, it should be checked in Domain&DNS.
          default: unknown_status
        region:
          type: string
          description: Region where the Web Hosting plan is hosted.
        domain_info:
          type: object
          description: Domain configuration block (subdomain, optional custom domain,
            and DNS settings).
          properties:
            subdomain:
              type: string
              description: Optional free subdomain linked to the Web Hosting plan.
            custom_domain:
              type: object
              description: Optional custom domain linked to the Web Hosting plan.
              properties:
                domain:
                  type: string
                  description: Custom domain linked to the hosting plan.
                domain_status:
                  type: string
                  description: Status of the custom domain verification.
                  enum:
                  - unknown_status
                  - valid
                  - invalid
                  - validating
                  - error
                  x-enum-descriptions:
                    values:
                      unknown_status: The status of the domain is unknown.
                      valid: The domain is valid and operational.
                      invalid: The domain is invalid, potentially due to incorrect
                        settings or configuration issues.
                      validating: The domain is in the process of being validated.
                      error: The domain is in an error status, it should be checked
                        in Domain&DNS.
                  default: unknown_status
                dns_status:
                  type: string
                  description: Status of the DNS configuration for the custom domain.
                  enum:
                  - unknown_status
                  - valid
                  - invalid
                  default: unknown_status
                auto_config_domain_dns:
                  type: object
                  description: Indicates whether to auto-configure DNS for this domain.
                  properties:
                    nameservers:
                      type: boolean
                      description: Whether or not to synchronize domain nameservers.
                    web_records:
                      type: boolean
                      description: Whether or not to synchronize web records.
                    mail_records:
                      type: boolean
                      description: Whether or not to synchronize mail records.
                    all_records:
                      type: boolean
                      description: Whether or not to synchronize all types of records.
                        Takes priority over the other fields.
                    none:
                      type: boolean
                      description: No automatic domain configuration. Users must configure
                        their domain for the Web Hosting to work.
                  x-properties-order:
                  - nameservers
                  - web_records
                  - mail_records
                  - all_records
                  - none
              x-properties-order:
              - domain
              - domain_status
              - dns_status
              - auto_config_domain_dns
          x-properties-order:
          - subdomain
          - custom_domain
      x-properties-order:
      - id
      - project_id
      - created_at
      - updated_at
      - status
      - domain
      - protected
      - dns_status
      - offer_name
      - domain_status
      - region
      - domain_info
    scaleway.webhosting.v1.ListHostingsResponse:
      type: object
      properties:
        total_count:
          type: integer
          description: Number of Web Hosting plans returned.
          format: uint64
        hostings:
          type: array
          description: List of Web Hosting plans.
          items:
            $ref: '#/components/schemas/scaleway.webhosting.v1.HostingSummary'
      x-properties-order:
      - total_count
      - hostings
    scaleway.webhosting.v1.Offer.Option:
      type: object
      properties:
        id:
          type: string
          description: Option ID.
        name:
          type: string
          description: Name of the option.
          enum:
          - unknown_name
          - domain_count
          - email_count
          - storage_gb
          - vcpu_count
          - ram_gb
          - backup
          - dedicated_ip
          - email_storage_gb
          - database_count
          - support
          - additional_email
          default: unknown_name
        billing_operation_path:
          type: string
          description: Unique identifier used for billing.
        min_value:
          type: integer
          description: Minimum value for the option in the offer.
          format: int32
        current_value:
          type: integer
          description: If a hosting_id was specified in the call, defines the current
            value of the option in the hosting.
          format: int32
        max_value:
          type: integer
          description: Maximum value for the option in the offer.
          format: int32
        quota_warning:
          type: string
          description: Defines a warning if the maximum value for the option has been
            reached.
          enum:
          - unknown_warning
          - quota_exceeded_warning
          - usage_low_warning
          default: unknown_warning
        price:
          type: object
          description: Price of the option for 1 value.
          properties:
            currency_code:
              type: string
            units:
              type: integer
              format: int64
            nanos:
              type: integer
              format: int32
          x-properties-order:
          - currency_code
          - units
          - nanos
      x-properties-order:
      - id
      - name
      - billing_operation_path
      - min_value
      - current_value
      - max_value
      - quota_warning
      - price
    scaleway.webhosting.v1.OfferCommitment:
      type: object
      properties:
        id:
          type: string
          description: Offer commitment ID.
        type:
          type: string
          description: Offer commitment type.
          enum:
          - unknown_commitment_type
          - first_commitment
          - next_commitment
          default: unknown_commitment_type
        billing_mode:
          type: string
          description: Offer commitment name.
          enum:
          - unknown_billing_mode
          - sample
          - purchase_order
          default: unknown_billing_mode
        billing_operation_path:
          type: string
          description: Unique identifier used for billing.
        price:
          type: object
          description: Price of the offer commitment.
          properties:
            currency_code:
              type: string
            units:
              type: integer
              format: int64
            nanos:
              type: integer
              format: int32
          x-properties-order:
          - currency_code
          - units
          - nanos
        duration_in_month:
          type: integer
          description: Duration of the offer commitment in months.
          format: int32
        next:
          description: Next offer commitment.
          $ref: '#/components/schemas/scaleway.webhosting.v1.OfferCommitment'
      x-properties-order:
      - id
      - type
      - billing_mode
      - billing_operation_path
      - price
      - duration_in_month
      - next
    scaleway.webhosting.v1.OfferOptionRequest:
      type: object
      properties:
        id:
          type: string
          description: Offer option ID.
        quantity:
          type: integer
          description: The option requested quantity to set for the Web Hosting plan.
          format: int64
      x-properties-order:
      - id
      - quantity
    scaleway.webhosting.v1.ResetHostingPasswordResponse:
      type: object
      properties:
        one_time_password:
          type: string
          description: New temporary password (deprecated, use password_b64 instead).
          deprecated: true
        one_time_password_b64:
          type: string
          description: New temporary password, encoded in base64.
      x-properties-order:
      - one_time_password
      - one_time_password_b64
    scaleway.webhosting.v1.ResourceSummary:
      type: object
      properties:
        databases_count:
          type: integer
          description: Total number of active databases in the Web Hosting plan.
          format: uint32
        mail_accounts_count:
          type: integer
          description: Total number of active email accounts in the Web Hosting plan.
          format: uint32
        ftp_accounts_count:
          type: integer
          description: Total number of active FTP accounts in the Web Hosting plan.
          format: uint32
        websites_count:
          type: integer
          description: Total number of active domains in the Web Hosting plan.
          format: uint32
      x-properties-order:
      - databases_count
      - mail_accounts_count
      - ftp_accounts_count
      - websites_count
    scaleway.webhosting.v1.Session:
      type: object
      properties:
        url:
          type: string
          description: Logged user's session URL.
      x-properties-order:
      - url
  securitySchemes:
    scaleway:
      in: header
      name: X-Auth-Token
      type: apiKey
paths:
  /webhosting/v1/regions/{region}/hostings:
    get:
      tags:
      - Web Hosting
      operationId: ListHostings
      summary: List all Web Hosting plans
      description: List all of your existing Web Hosting plans. Various filters are
        available to limit the results, including filtering by domain, status, tag
        and Project ID.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: query
        name: page
        description: Page number to return, from the paginated results (must be a
          positive integer).
        schema:
          type: integer
          format: int32
      - in: query
        name: page_size
        description: Number of Web Hosting plans to return (must be a positive integer
          lower or equal to 100).
        schema:
          type: integer
          format: uint32
      - in: query
        name: order_by
        description: Sort order for Web Hosting plans in the response.
        schema:
          type: string
          enum:
          - created_at_asc
          - created_at_desc
          default: created_at_asc
      - in: query
        name: tags
        description: Tags to filter for, only Web Hosting plans with matching tags
          will be returned.
        schema:
          type: array
          items:
            type: string
      - in: query
        name: statuses
        description: Statuses to filter for, only Web Hosting plans with matching
          statuses will be returned.
        schema:
          type: array
          items:
            $ref: '#/components/schemas/scaleway.webhosting.v1.Hosting.Status'
      - in: query
        name: domain
        description: Domain to filter for, only Web Hosting plans associated with
          this domain will be returned.
        schema:
          type: string
      - in: query
        name: project_id
        description: Project ID to filter for, only Web Hosting plans from this Project
          will be returned.
        schema:
          type: string
      - in: query
        name: organization_id
        description: Organization ID to filter for, only Web Hosting plans from this
          Organization will be returned.
        schema:
          type: string
      - in: query
        name: control_panels
        description: Name of the control panel to filter for, only Web Hosting plans
          from this control panel will be returned.
        schema:
          type: array
          items:
            type: string
      - in: query
        name: subdomain
        description: Optional free subdomain linked to the Web Hosting plan.
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.ListHostingsResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings" \
            X-Auth-Token:$SCW_SECRET_KEY
    post:
      tags:
      - Web Hosting
      operationId: CreateHosting
      summary: Order a Web Hosting plan
      description: Order a Web Hosting plan, specifying the offer type required via
        the `offer_id` parameter.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.Hosting'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                offer_id:
                  type: string
                  description: ID of the selected offer for the Web Hosting plan.
                project_id:
                  type: string
                  description: ID of the Scaleway Project in which to create the Web
                    Hosting plan.
                email:
                  type: string
                  description: Contact email for the Web Hosting client.
                tags:
                  type: array
                  description: List of tags for the Web Hosting plan.
                  items:
                    type: string
                domain:
                  type: string
                  description: Domain name to link to the Web Hosting plan. You must
                    already own this domain name, and have completed the DNS validation
                    process beforehand.
                subdomain:
                  type: string
                  description: The name prefix to use as a free subdomain (for example,
                    `mysite`) assigned to the Web Hosting plan. The full domain will
                    be automatically created by adding it to the fixed base domain
                    (e.g. `mysite.scw.site`). You do not need to include the base
                    domain yourself.
                  nullable: true
                offer_options:
                  type: array
                  description: List of the Web Hosting plan options IDs with their
                    quantities.
                  items:
                    $ref: '#/components/schemas/scaleway.webhosting.v1.OfferOptionRequest'
                language:
                  type: string
                  description: Default language for the control panel interface.
                  enum:
                  - unknown_language_code
                  - en_US
                  - fr_FR
                  - de_DE
                  default: unknown_language_code
                domain_configuration:
                  type: object
                  description: Indicates whether to update hosting domain name servers
                    and DNS records for domains managed by Scaleway Elements (deprecated,
                    use auto_config_domain_dns instead).
                  deprecated: true
                  properties:
                    update_nameservers:
                      type: boolean
                    update_web_record:
                      type: boolean
                    update_mail_record:
                      type: boolean
                    update_all_records:
                      type: boolean
                  x-properties-order:
                  - update_nameservers
                  - update_web_record
                  - update_mail_record
                  - update_all_records
                skip_welcome_email:
                  type: boolean
                  description: Indicates whether to skip a welcome email to the contact
                    email containing hosting info.
                  nullable: true
                auto_config_domain_dns:
                  type: object
                  description: Indicates whether to update hosting domain name servers
                    and DNS records for domains managed by Scaleway Elements (deprecated,
                    use auto_update_* fields instead).
                  properties:
                    nameservers:
                      type: boolean
                      description: Whether or not to synchronize domain nameservers.
                    web_records:
                      type: boolean
                      description: Whether or not to synchronize web records.
                    mail_records:
                      type: boolean
                      description: Whether or not to synchronize mail records.
                    all_records:
                      type: boolean
                      description: Whether or not to synchronize all types of records.
                        Takes priority over the other fields.
                    none:
                      type: boolean
                      description: No automatic domain configuration. Users must configure
                        their domain for the Web Hosting to work.
                  x-properties-order:
                  - nameservers
                  - web_records
                  - mail_records
                  - all_records
                  - none
                offer_commitment_id:
                  type: string
                  description: Offer commitment ID to which the hosting will be engaged.
                  nullable: true
              x-properties-order:
              - offer_id
              - project_id
              - email
              - tags
              - domain
              - subdomain
              - offer_options
              - language
              - domain_configuration
              - skip_welcome_email
              - auto_config_domain_dns
              - offer_commitment_id
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "domain": "string",
              "email": "string",
              "offer_id": "string",
              "project_id": "string"
            }' \
            "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings" \
            X-Auth-Token:$SCW_SECRET_KEY \
            domain="string" \
            email="string" \
            offer_id="string" \
            project_id="string"
  /webhosting/v1/regions/{region}/hostings/{hosting_id}:
    get:
      tags:
      - Web Hosting
      operationId: GetHosting
      summary: Get a Web Hosting plan
      description: Get the details of one of your existing Web Hosting plans, specified
        by its `hosting_id`.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: Hosting ID.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.Hosting'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    patch:
      tags:
      - Web Hosting
      operationId: UpdateHosting
      summary: Update a Web Hosting plan
      description: Update the details of one of your existing Web Hosting plans, specified
        by its `hosting_id`. You can update parameters including the contact email
        address, tags, options and offer.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: Hosting ID.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.Hosting'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: New contact email for the Web Hosting plan.
                  nullable: true
                tags:
                  type: array
                  description: New tags for the Web Hosting plan.
                  nullable: true
                  items:
                    type: string
                offer_options:
                  type: array
                  description: List of the Web Hosting plan options IDs with their
                    quantities.
                  items:
                    $ref: '#/components/schemas/scaleway.webhosting.v1.OfferOptionRequest'
                offer_id:
                  type: string
                  description: ID of the new offer for the Web Hosting plan.
                  nullable: true
                protected:
                  type: boolean
                  description: Whether the hosting is protected or not.
                  nullable: true
              x-properties-order:
              - email
              - tags
              - offer_options
              - offer_id
              - protected
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X PATCH \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
    delete:
      tags:
      - Web Hosting
      operationId: DeleteHosting
      summary: Delete a Web Hosting plan
      description: 'Delete a Web Hosting plan, specified by its `hosting_id`. Note
        that deletion is not immediate: it will take place at the end of the calendar
        month, after which time your Web Hosting plan and all its data (files and
        emails) will be irreversibly lost.'
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: Hosting ID.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.Hosting'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X DELETE \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}"
      - lang: HTTPie
        source: |-
          http DELETE "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}" \
            X-Auth-Token:$SCW_SECRET_KEY
  /webhosting/v1/regions/{region}/hostings/{hosting_id}/add-custom-domain:
    post:
      tags:
      - Web Hosting
      operationId: AddCustomDomain
      summary: Attach a custom domain to a webhosting as an alias to the main domain
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: Hosting ID to which the custom domain is attached to.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.HostingSummary'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_name:
                  type: string
                  description: The custom domain name to attach to the hosting.
              x-properties-order:
              - domain_name
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"domain_name":"string"}' \
            "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/add-custom-domain"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/add-custom-domain" \
            X-Auth-Token:$SCW_SECRET_KEY \
            domain_name="string"
  /webhosting/v1/regions/{region}/hostings/{hosting_id}/delete-domains:
    post:
      tags:
      - Web Hosting
      operationId: DeleteHostingDomains
      summary: Delete domains from a Web Hosting plan
      description: Remove one or more domains from a Web Hosting plan, specified by
        its `hosting_id`. This permanently deletes the domains and all services tied
        to them, including mailboxes, FTP accounts and DNS zones.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: Hosting ID of the Web Hosting plan from which to delete domains.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.Hosting'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domains:
                  type: array
                  description: List of domains to delete from the Web Hosting plan.
                  items:
                    type: string
              x-properties-order:
              - domains
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/delete-domains"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/delete-domains" \
            X-Auth-Token:$SCW_SECRET_KEY
  /webhosting/v1/regions/{region}/hostings/{hosting_id}/migrate-control-panel:
    post:
      tags:
      - Web Hosting
      operationId: MigrateControlPanel
      summary: Migrate a hosting to a new control panel.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: Hosting ID to migrate to a new control panel.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.HostingSummary'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                control_panel_name:
                  type: string
                  description: |-
                    The name of the new control panel. Using the same name as the current.
                    Control panel will migrate the hosting to a new server.
                offer_id:
                  type: string
                  description: |-
                    ID of the new offer for the Web Hosting plan after control panel.
                    Migration.
              x-properties-order:
              - control_panel_name
              - offer_id
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"control_panel_name":"string","offer_id":"string"}' \
            "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/migrate-control-panel"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/migrate-control-panel" \
            X-Auth-Token:$SCW_SECRET_KEY \
            control_panel_name="string" \
            offer_id="string"
  /webhosting/v1/regions/{region}/hostings/{hosting_id}/remove-custom-domain:
    post:
      tags:
      - Web Hosting
      operationId: RemoveCustomDomain
      summary: Detach a custom domain from a webhosting
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: Hosting ID to which the custom domain is detached from.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.HostingSummary'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain_name:
                  type: string
                  description: The custom domain name to detach from the hosting.
              x-properties-order:
              - domain_name
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"domain_name":"string"}' \
            "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/remove-custom-domain"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/remove-custom-domain" \
            X-Auth-Token:$SCW_SECRET_KEY \
            domain_name="string"
  /webhosting/v1/regions/{region}/hostings/{hosting_id}/reset:
    post:
      tags:
      - Web Hosting
      operationId: ResetHosting
      summary: Reset a Web Hosting plan
      description: Reset a Web Hosting plan to its initial state, specified by its
        `hosting_id`. This permanently deletes all hosting data including files, databases
        and emails. The hosting will be re-provisioned.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: Hosting ID of the Web Hosting plan to reset.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.Hosting'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/reset"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/reset" \
            X-Auth-Token:$SCW_SECRET_KEY
  /webhosting/v1/regions/{region}/hostings/{hosting_id}/reset-password:
    post:
      tags:
      - Web Hosting
      operationId: ResetHostingPassword
      summary: Reset a Web Hosting plan password
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: UUID of the hosting.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.ResetHostingPasswordResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/reset-password"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/reset-password" \
            X-Auth-Token:$SCW_SECRET_KEY
  /webhosting/v1/regions/{region}/hostings/{hosting_id}/resource-summary:
    get:
      tags:
      - Web Hosting
      operationId: GetResourceSummary
      summary: Get the total counts of websites, databases, email accounts, and FTP
        accounts of a Web Hosting plan
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: Hosting ID.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.ResourceSummary'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/resource-summary"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/resource-summary" \
            X-Auth-Token:$SCW_SECRET_KEY
  /webhosting/v1/regions/{region}/hostings/{hosting_id}/sessions:
    post:
      tags:
      - Web Hosting
      operationId: CreateSession
      summary: Create a user session
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: Hosting ID.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.Session'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X POST \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{}' \
            "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/sessions"
      - lang: HTTPie
        source: |-
          http POST "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/sessions" \
            X-Auth-Token:$SCW_SECRET_KEY
  /webhosting/v1/regions/{region}/hostings/{hosting_id}/update-free-domain:
    patch:
      tags:
      - Web Hosting
      operationId: UpdateHostingFreeDomain
      summary: Update the free domain of a Web Hosting plan
      description: Change the free domain associated with a Web Hosting plan, specified
        by its `hosting_id`.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: hosting_id
        description: Hosting ID of the Web Hosting plan to update.
        required: true
        schema:
          type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.Hosting'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                free_domain:
                  type: string
                  description: New free domain to associate with the Web Hosting plan.
              x-properties-order:
              - free_domain
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X PATCH \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            -H "Content-Type: application/json" \
            -d '{"free_domain":"string"}' \
            "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/update-free-domain"
      - lang: HTTPie
        source: |-
          http PATCH "https://api.scaleway.com/webhosting/v1/regions/{region}/hostings/{hosting_id}/update-free-domain" \
            X-Auth-Token:$SCW_SECRET_KEY \
            free_domain="string"
