> ## 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] Order a web hosting

> Create an order for web hosting. Supports four domain source types:
- **register**: Register a new domain with the hosting
- **transfer**: Transfer an existing domain from another registrar (EPP code required)
- **existing**: Use a domain already in your organization
- **external**: Use an external domain you own (DNS pointing only)



## OpenAPI

````yaml https://api.onetsolutions.net/schema post /v1/organizations/{organization_id}/projects/{project_id}/hosting/order
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/order:
    post:
      tags:
        - Web Hosting
      summary: '[Web Hosting] Order a web hosting'
      description: >-
        Create an order for web hosting. Supports four domain source types:

        - **register**: Register a new domain with the hosting

        - **transfer**: Transfer an existing domain from another registrar (EPP
        code required)

        - **existing**: Use a domain already in your organization

        - **external**: Use an external domain you own (DNS pointing only)
      operationId: create_hosting_order
      parameters:
        - in: path
          name: organization_id
          schema:
            type: string
          description: Organization UUID
          required: true
        - in: path
          name: project_id
          schema:
            type: string
          description: Project UUID
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostingOrderRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostingOrderResponse'
          description: Hosting order created successfully
        '400':
          description: Invalid request
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainNotAvailableForHostingResponse'
          description: Domain not available for registration
      security:
        - BearerAuth: []
components:
  schemas:
    HostingOrderRequest:
      type: object
      properties:
        plan_id:
          type: string
          format: uuid
        domain_source:
          enum:
            - register
            - transfer
            - existing
            - external
          type: string
          description: |-
            * `register` - Register new domain
            * `transfer` - Transfer existing domain
            * `existing` - Use existing domain in system
            * `external` - Use external domain
          x-spec-enum-id: ded6795b0a106ec1
        domain_name:
          type: string
          maxLength: 253
        domain_id:
          type: string
          format: uuid
          nullable: true
        epp_code:
          type: string
        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
          default: monthly
      required:
        - domain_source
        - plan_id
    HostingOrderResponse:
      type: object
      properties:
        order_id:
          type: integer
          nullable: true
        order_number:
          type: string
          nullable: true
        invoice_id:
          type: integer
          nullable: true
        local_order_id:
          type: string
          format: uuid
          nullable: true
        total:
          type: number
          format: double
        amount_due:
          type: number
          format: double
        credit_applied:
          type: number
          format: double
        status:
          type: string
        invoice_payment_url:
          type: string
          nullable: true
        hosting_id:
          type: string
          format: uuid
        hosting_status:
          type: string
        domain_id:
          type: string
          format: uuid
          nullable: true
        domain_name:
          type: string
      required:
        - amount_due
        - credit_applied
        - domain_id
        - domain_name
        - hosting_id
        - hosting_status
        - invoice_id
        - invoice_payment_url
        - local_order_id
        - order_id
        - order_number
        - status
        - total
    DomainNotAvailableForHostingResponse:
      type: object
      properties:
        error:
          type: string
        domain_name:
          type: string
        available:
          type: boolean
          default: false
        suggestions:
          type: array
          items:
            $ref: '#/components/schemas/DomainSuggestion'
      required:
        - domain_name
        - error
        - suggestions
    DomainSuggestion:
      type: object
      properties:
        domain_name:
          type: string
        tld:
          type: string
        available:
          type: boolean
        price:
          type: string
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
          nullable: true
      required:
        - available
        - domain_name
        - price
        - tld
  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-...`).

````