openapi: 3.0.0
info:
  title: Web Hosting Offer API
  description: "Scaleway provides several Web Hosting plans for individuals, professionals,
    and everyone in between. Our Web Hosting plans include:\n\n- A domain name\n-
    A configurable webhosting service\n- The management of your emails, including
    anti-spam, antivirus and filter systems\n- Unlimited sub-domains\n- An FTP account
    to upload your website\n- At least one database\n\n(switchcolumn)\n(switchcolumn)\n\n##
    Concepts\n\nRefer to our [dedicated concepts page](https://www.scaleway.com/en/docs/managed-services/webhosting/concepts/)
    to find definitions of all Web Hosting-related terminology.\n\n(switchcolumn)\n(switchcolumn)\n\n##
    Quickstart\n\n1. Configure your environment variables.\n\n    <Message type=\"note\">\n
    \   This is an optional step that seeks to simplify your usage of the Web Hosting
    API.\n    </Message>\n\n    ```bash\n    export SCW_SECRET_KEY=\"<API secret key>\"\n
    \   export SCW_PROJECT_ID=\"<Scaleway Project ID>\"\n    ```\n\n2. **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.\n\n
    \   ```bash\n    curl -X GET \\\n        -H \"X-Auth-Token: $SCW_SECRET_KEY\"
    \\\n        -H \"Content-Type: application/json\" \\\n        \"https://api.scaleway.com/webhosting/v1/regions/fr-par/offers?without_options=true\"
    | jq\n    ```\n\n    <Message type=\"note\">\n    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.\n    </Message>\n\n3. **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.\n\n    ```bash\n    curl -X POST \\\n        -H \"X-Auth-Token: $SCW_SECRET_KEY\"
    \\\n        -H \"Content-Type: application/json\" \\\n        \"https://api.scaleway.com/webhosting/v1/regions/fr-par/hostings\"
    \\\n        -d '{\n        \"domain\": \"mydomain.net\",\n        \"offer_id\":
    \"f5c2ae8f-7625-4bca-b711-b44bb3d08694\",\n        \"project_id\": \"'\"$SCW_PROJECT_ID\"'\",\n
    \       \"tags\": [\"my-tag\"]\n    }'\n    ```\n\n    | Parameter        | Description
    \                                                                           |
    Valid values OR Example     | \n    |------------------|----------------------------------------------------------------------------------------|-----------------------------|\n
    \   | `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`               |\n    | `offer_id`       | The offer ID of the desired
    offer. Use one of the offer IDs returned in step 2         |`f5c2ae8f-7625-4bca-b711-b44bb3d08694`
    |\n    | `project_id`     | The ID of the Scaleway Project to create the Web Hosting
    plan in.                      | `277ed74e-ea73-11ed-a05b-0242ac120003`                   |\n
    \   | `tags`           | Any tags you would like to associate with this Web Hosting
    plan                         | `my-tag`                   |\n\n\n    <Message
    type=\"tip\">\n    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.\n    </Message>\n\n\n4. **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.\n\n    ```bash\n    curl -X DELETE \\\n        -H \"Content-Type:
    application/json\" \\\n        -H \"X-Auth-Token: $SCW_SECRET_KEY\" \\\n        \"https://api.scaleway.com/rest-of-endpoint/{hosting-id}\"\n
    \   ```\n\n(switchcolumn)       \n<Message type=\"requirement\">\n- You have a
    [Scaleway account](https://console.scaleway.com/)\n- You have created an [API
    key](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/)
    and that the API key has sufficient [IAM permissions](https://www.scaleway.com/en/docs/identity-and-access-management/iam/reference-content/permission-sets/)
    to perform the actions described on this page\n- You have [installed `curl`](https://curl.se/download.html)\n-
    You have [installaed `jq`](https://stedolan.github.io/jq/download/)\n</Message>\n(switchcolumn)\n\n##
    Technical information\n\nAll 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).\n\n\n###
    Regions\n\nThe 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.\n\nScaleway Web Hosting is available only in the `fr-par` region.
    \n\n## Going further\n\nFor more help using Scaleway Web Hosting, check out the
    following resources:\n- Our [main documentation](https://www.scaleway.com/en/docs/managed-services/webhosting/)\n-
    The #webhosting-early-access channel on our [Slack Community](https://www.scaleway.com/en/docs/tutorials/scaleway-slack-community/)\n-
    Our [support ticketing system](https://www.scaleway.com/en/docs/console/my-account/how-to/open-a-support-ticket/)."
  version: v1
servers:
- url: https://api.scaleway.com
tags:
- name: Offers
  description: |
    Offers represent the available Web Hosting plans and their associated options.
components:
  schemas:
    scaleway.webhosting.v1.ListOffersResponse:
      type: object
      properties:
        total_count:
          type: integer
          description: Total number of offers.
          format: uint64
        offers:
          type: array
          description: List of offers.
          items:
            $ref: '#/components/schemas/scaleway.webhosting.v1.Offer'
      x-properties-order:
      - total_count
      - offers
    scaleway.webhosting.v1.Offer:
      type: object
      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
      x-properties-order:
      - id
      - name
      - billing_operation_path
      - options
      - price
      - available
      - control_panel_name
      - end_of_life
      - quota_warning
    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
          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
  securitySchemes:
    scaleway:
      in: header
      name: X-Auth-Token
      type: apiKey
paths:
  /webhosting/v1/regions/{region}/offers:
    get:
      tags:
      - Offers
      operationId: ListOffers
      summary: List all available hosting offers along with their specific options.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          description: The region you want to target
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: query
        name: page
        description: Page number (must be a positive integer).
        schema:
          type: integer
          description: Page number (must be a positive integer).
          format: int32
      - in: query
        name: page_size
        description: Number of websites to return (must be a positive integer lower
          or equal to 100).
        schema:
          type: integer
          description: Number of websites to return (must be a positive integer lower
            or equal to 100).
          format: uint32
      - in: query
        name: order_by
        description: Sort order for Web Hosting offers in the response.
        schema:
          type: string
          description: Sort order for Web Hosting offers in the response.
          enum:
          - price_asc
          default: price_asc
      - in: query
        name: hosting_id
        description: UUID of the hosting plan.
        schema:
          type: string
          description: UUID of the hosting plan.
      - in: query
        name: control_panels
        description: Name of the control panel(s) to filter for.
        schema:
          type: array
          description: Name of the control panel(s) to filter for.
          items:
            type: string
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.webhosting.v1.ListOffersResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: |-
          curl -X GET \
            -H "X-Auth-Token: $SCW_SECRET_KEY" \
            "https://api.scaleway.com/webhosting/v1/regions/fr-par/offers"
      - lang: HTTPie
        source: |-
          http GET "https://api.scaleway.com/webhosting/v1/regions/fr-par/offers" \
            X-Auth-Token:$SCW_SECRET_KEY
