> ## Documentation Index
> Fetch the complete documentation index at: https://help.onetsolutions.net/llms.txt
> Use this file to discover all available pages before exploring further.

# [Web Hosting] Request web hosting cancellation

> Submit a cancellation request for a web hosting account.



## OpenAPI

````yaml https://api.onetsolutions.net/schema post /v1/organizations/{organization_id}/projects/{project_id}/hosting/{id}/cancel
openapi: 3.0.3
info:
  title: OnetSolutions API
  version: v1 (v1)
  description: >

    ## Overview


    The OnetSolutions API provides programmatic access to manage your cloud
    infrastructure, domains, and web hosting services.


    ## Authentication


    All API requests require authentication using one of the following methods:


    - **JWT Token**: Obtain a token via login endpoints and include it in the
    `Authorization: Bearer <token>` header

    - **API Key**: Generate an API key from your account settings and use it as
    `Authorization: Bearer sk-onetsolutions-...`


    ## Rate Limiting


    API requests are rate-limited to ensure fair usage:

    - **Standard**: 1000 requests per minute

    - **Burst**: 100 requests per second


    ## Pagination


    List endpoints return paginated results. Use `page` and `page_size` query
    parameters.


    ## Error Handling


    The API uses standard HTTP status codes:

    - `200` Success

    - `201` Created

    - `400` Bad Request

    - `401` Unauthorized

    - `403` Forbidden

    - `404` Not Found

    - `429` Too Many Requests
servers:
  - url: https://api.onetsolutions.net
    description: Production
security: []
tags:
  - name: Authentication
    description: >-
      Login, passwordless authentication, MFA, OAuth providers, and token
      management.
  - name: Organizations
    description: >-
      Organization management, members, roles, modules, audit logs, and
      notification settings.
  - name: Projects
    description: Project management, team members, and project-scoped resources.
  - name: Compute
    description: >-
      Cloud instances, volumes, snapshots, backups, VPCs, firewalls, SSH keys,
      uptime monitors, and instance tasks.
  - name: Domains
    description: >-
      Domain availability, registration, transfers, DNS zones, DNS records, and
      TLD information.
  - name: Web Hosting
    description: >-
      cPanel-based web hosting, emails, databases, subdomains, FTP accounts,
      addon domains, and SSL certificates.
paths:
  /v1/organizations/{organization_id}/projects/{project_id}/hosting/{id}/cancel:
    post:
      tags:
        - Web Hosting
      summary: '[Web Hosting] Request web hosting cancellation'
      description: Submit a cancellation request for a web hosting account.
      operationId: cancel_web_hosting
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          description: Web hosting unique identifier
          required: true
        - in: path
          name: organization_id
          schema:
            type: string
            format: uuid
          description: Organization unique identifier
          required: true
        - in: path
          name: project_id
          schema:
            type: string
            format: uuid
          description: Project unique identifier
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebHosting'
          description: Cancellation request submitted successfully
        '400':
          description: Cannot cancel hosting in current status
        '401':
          description: Authentication credentials missing or invalid
        '403':
          description: Insufficient permissions
        '404':
          description: Web hosting not found
      security:
        - BearerAuth: []
components:
  schemas:
    WebHosting:
      type: object
      properties:
        id:
          type: string
          format: uuid
        organization_id:
          type: string
          format: uuid
          readOnly: true
        project_id:
          type: string
          format: uuid
          readOnly: true
        project_name:
          type: string
          readOnly: true
        domain:
          type: string
          description: Primary domain
          maxLength: 255
        username:
          type: string
          description: cPanel username
          maxLength: 50
        status:
          enum:
            - pending
            - active
            - suspended
            - terminated
            - cancelled
            - failed
          type: string
          description: |-
            * `pending` - Pending
            * `active` - Active
            * `suspended` - Suspended
            * `terminated` - Terminated
            * `cancelled` - Cancelled
            * `failed` - Failed
          x-spec-enum-id: d109fd339b80bd1e
        plan:
          allOf:
            - $ref: '#/components/schemas/WebHostingPlan'
          readOnly: true
        server:
          allOf:
            - $ref: '#/components/schemas/CPanelServer'
          readOnly: true
        disk_usage_mb:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Current disk usage in MB
        disk_limit_mb:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Disk limit in MB
        bandwidth_usage_mb:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Current bandwidth usage in MB
        bandwidth_limit_mb:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Bandwidth limit in MB
        dedicated_ip:
          type: string
          nullable: true
          description: Dedicated IP if assigned
        ns1:
          type: string
          description: Primary nameserver
          maxLength: 255
        ns2:
          type: string
          description: Secondary nameserver
          maxLength: 255
        billing_cycle:
          enum:
            - free
            - one_time
            - monthly
            - quarterly
            - semi_annually
            - annually
            - biennially
            - triennially
          type: string
          description: |-
            * `free` - Free
            * `one_time` - One Time
            * `monthly` - Monthly
            * `quarterly` - Quarterly
            * `semi_annually` - Semi-Annually
            * `annually` - Annually
            * `biennially` - Biennially
            * `triennially` - Triennially
          x-spec-enum-id: 77ae26705af8e5e4
        next_billing_date:
          type: string
          format: date-time
          nullable: true
        suspension_reason:
          enum:
            - insufficient_balance
            - payment_failed
            - card_expired
            - manual
            - ''
          type: string
          x-spec-enum-id: 0f2a015f68befe56
          description: |-
            Reason for suspension

            * `insufficient_balance` - Insufficient Balance
            * `payment_failed` - Payment Failed
            * `card_expired` - Card Expired
            * `manual` - Manual Suspension
        cancellation_requested_at:
          type: string
          format: date-time
          nullable: true
          description: When cancellation was requested
        website_preview:
          allOf:
            - $ref: '#/components/schemas/WebsitePreview'
          readOnly: true
        is_active:
          type: boolean
        created:
          type: string
          format: date-time
          readOnly: true
        modified:
          type: string
          format: date-time
          readOnly: true
      required:
        - created
        - domain
        - modified
        - organization_id
        - plan
        - project_id
        - project_name
        - server
        - website_preview
    WebHostingPlan:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          maxLength: 255
        name_en:
          type: string
          maxLength: 255
        name_fr:
          type: string
          maxLength: 255
        slug:
          type: string
          maxLength: 50
          pattern: ^[-a-zA-Z0-9_]+$
        description:
          type: string
        description_en:
          type: string
        description_fr:
          type: string
        hosting_type:
          enum:
            - hostingaccount
            - reselleraccount
          type: string
          description: |-
            * `hostingaccount` - Standard Hosting
            * `reselleraccount` - Reseller Hosting
          x-spec-enum-id: 6fc75a35f7baf954
        group:
          allOf:
            - $ref: '#/components/schemas/WebHostingPlanGroup'
          readOnly: true
        disk_space_mb:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Disk space in MB, 0 for unlimited
        bandwidth_mb:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Bandwidth in MB per month, 0 for unlimited
        max_email_accounts:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Maximum email accounts, 0 for unlimited
        max_databases:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Maximum databases, 0 for unlimited
        max_subdomains:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Maximum subdomains, 0 for unlimited
        max_addon_domains:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Maximum addon domains, 0 for unlimited
        max_parked_domains:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Maximum parked domains, 0 for unlimited
        max_ftp_accounts:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Maximum FTP accounts, 0 for unlimited
        max_accounts:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Maximum accounts for reseller plans
        pricing:
          type: array
          items:
            $ref: '#/components/schemas/WebHostingPlanPricing'
          readOnly: true
        is_active:
          type: boolean
        created:
          type: string
          format: date-time
          readOnly: true
        modified:
          type: string
          format: date-time
          readOnly: true
      required:
        - created
        - group
        - modified
        - name
        - pricing
        - slug
    CPanelServer:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          maxLength: 255
        hostname:
          type: string
          maxLength: 255
        ns1:
          type: string
          description: Primary nameserver
          maxLength: 255
        ns2:
          type: string
          description: Secondary nameserver
          maxLength: 255
        is_active:
          type: boolean
      required:
        - hostname
        - name
    WebsitePreview:
      type: object
      properties:
        url:
          type: string
          format: uri
          readOnly: true
        http_status:
          type: integer
          readOnly: true
          nullable: true
        page_title:
          type: string
          readOnly: true
        meta_description:
          type: string
          readOnly: true
        favicon_url:
          type: string
          format: uri
          readOnly: true
        thumbnail_url:
          type: string
          format: uri
          readOnly: true
        ssl_status:
          enum:
            - valid
            - expired
            - invalid
            - none
            - unknown
          type: string
          description: |-
            * `valid` - Valid
            * `expired` - Expired
            * `invalid` - Invalid
            * `none` - No SSL
            * `unknown` - Unknown
          x-spec-enum-id: 4ae8d4d9c42dd29d
          readOnly: true
        ssl_issuer:
          type: string
          readOnly: true
        ssl_issued_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        ssl_expires_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        last_check_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        last_successful_check_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        error_message:
          type: string
          readOnly: true
      required:
        - error_message
        - favicon_url
        - http_status
        - last_check_at
        - last_successful_check_at
        - meta_description
        - page_title
        - ssl_expires_at
        - ssl_issued_at
        - ssl_issuer
        - ssl_status
        - thumbnail_url
        - url
    WebHostingPlanGroup:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          maxLength: 255
        name_en:
          type: string
          maxLength: 255
        name_fr:
          type: string
          maxLength: 255
        slug:
          type: string
          maxLength: 50
          pattern: ^[-a-zA-Z0-9_]+$
        headline:
          type: string
          maxLength: 500
        headline_en:
          type: string
          maxLength: 500
        headline_fr:
          type: string
          maxLength: 500
        tagline:
          type: string
          maxLength: 500
        tagline_en:
          type: string
          maxLength: 500
        tagline_fr:
          type: string
          maxLength: 500
        display_order:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
        is_active:
          type: boolean
      required:
        - name
        - slug
    WebHostingPlanPricing:
      type: object
      properties:
        billing_cycle:
          enum:
            - monthly
            - quarterly
            - semi_annually
            - annually
            - biennially
            - triennially
          type: string
          description: |-
            * `monthly` - Monthly
            * `quarterly` - Quarterly
            * `semi_annually` - Semi-Annually
            * `annually` - Annually
            * `biennially` - Biennially
            * `triennially` - Triennially
          x-spec-enum-id: b8c932dbec4bc515
        price:
          type: string
          pattern: ^-?\d{0,6}(?:\.\d{0,4})?$
        discount_percent:
          type: string
          pattern: ^-?\d{0,3}(?:\.\d{0,2})?$
          description: Discount percentage compared to monthly
        is_default:
          type: boolean
      required:
        - billing_cycle
        - price
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or API Key
      description: >-
        Use `Authorization: Bearer <token>` header. Token can be a JWT token or
        an API key (format: `sk-onetsolutions-...`).

````