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

# Transfer Domain

> Transfers an existing domain to the registrar. Creates the order, bills the reseller, and initiates the transfer.



## OpenAPI

````yaml api-reference/openapi.json post /order/domains/transfer
openapi: 3.1.0
info:
  title: Domains Reseller API
  description: >-
    Domain name management API for resellers. Manage domains, renewals, billing,
    and other domain-related operations.
  version: 2.4.1
servers:
  - url: https://vicem.com/modules/addons/DomainsReseller/api/index.php
    description: Production server
security: []
paths:
  /order/domains/transfer:
    post:
      tags:
        - Orders
      summary: Transfer Domain
      description: >-
        Transfers an existing domain to the registrar. Creates the order, bills
        the reseller, and initiates the transfer.
      operationId: orderDomainTransfer
      parameters:
        - $ref: '#/components/parameters/UsernameHeader'
        - $ref: '#/components/parameters/TokenHeader'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - domain
                - regperiod
                - nameservers
                - contacts
              properties:
                domain:
                  type: string
                  description: Full domain name to transfer
                  example: example.com
                regperiod:
                  type: integer
                  description: Registration period in years
                  example: 1
                eppcode:
                  type: string
                  description: EPP/Auth code for the domain (optional depending on TLD)
                nameservers:
                  $ref: '#/components/schemas/Nameservers'
                contacts:
                  $ref: '#/components/schemas/Contacts'
                addons:
                  $ref: '#/components/schemas/Addons'
                domainfields:
                  type: string
                  description: >-
                    TLD-specific additional fields, encoded as
                    base64(serialize(array))
                idnLanguage:
                  type: string
                  description: Language code for IDN domains
                originalvars:
                  type: object
                  description: Original parameters from the reseller WHMCS
      responses:
        '200':
          description: Success - Returns `"success"`
          content:
            application/json:
              schema:
                type: string
                example: success
        '400':
          description: Parameter validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Domain not found in reseller account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    UsernameHeader:
      name: username
      in: header
      required: true
      description: Reseller email address registered in WHMCS
      schema:
        type: string
        format: email
        example: reseller@example.com
    TokenHeader:
      name: token
      in: header
      required: true
      description: >-
        HMAC-SHA256 authentication token.


        PHP formula: `base64_encode(hash_hmac('sha256', $apiKey, $email . ':' .
        gmdate('y-m-d H')))`


        **Important**: `hash_hmac` **without** the 3rd parameter `true` (returns
        hex, not binary), then `base64_encode` of the hex result. The token is
        88 characters long.


        An optional `timestamp` header (Unix timestamp, 60-second tolerance) can
        be sent to synchronize time.
      schema:
        type: string
        example: YTk4YjRmNjI...
  schemas:
    Nameservers:
      type: object
      required:
        - ns1
        - ns2
      properties:
        ns1:
          type: string
          description: First nameserver (required)
          example: ns1.example.com
        ns2:
          type: string
          description: Second nameserver (required)
          example: ns2.example.com
        ns3:
          type: string
          description: Third nameserver (optional)
        ns4:
          type: string
          description: Fourth nameserver (optional)
        ns5:
          type: string
          description: Fifth nameserver (optional)
    Contacts:
      type: object
      required:
        - Registrant
      description: >-
        WHOIS contacts. Keys: Registrant (required), Admin, Tech, Billing. Each
        value is a key-value object of contact fields.
      properties:
        Registrant:
          type: object
          description: Registrant contact (required)
          additionalProperties:
            type: string
        Admin:
          type: object
          description: Administrative contact
          additionalProperties:
            type: string
        Tech:
          type: object
          description: Technical contact
          additionalProperties:
            type: string
        Billing:
          type: object
          description: Billing contact
          additionalProperties:
            type: string
    Addons:
      type: object
      description: >-
        Domain addons. Each key is an addon name, value is a boolean indicating
        whether it is enabled.
      properties:
        dnsmanagement:
          type: boolean
          description: DNS management
          example: false
        emailforwarding:
          type: boolean
          description: Email forwarding
          example: false
        idprotection:
          type: boolean
          description: WHOIS ID protection
          example: false
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
      example:
        error: Invalid API Token provided

````