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

# Create Domain

> Connect a new domain for the authenticated workspace.



## OpenAPI

````yaml post /customDomain
openapi: 3.0.1
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.cme.sh
security:
  - bearerAuth: []
paths:
  /customDomain:
    post:
      description: Connect a new domain for the authenticated workspace.
      requestBody:
        description: Connect a new domain for the authenticated workspace.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewDomain'
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                  data:
                    type: object
                    properties:
                      linkId:
                        type: string
                      mandatory:
                        type: object
                        properties:
                          pointsTo:
                            type: string
                          recordType:
                            type: string
                          hostname:
                            type: string
                      optional:
                        type: object
                        properties:
                          pointsTo:
                            type: string
                          recordType:
                            type: string
                          hostname:
                            type: string
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    NewDomain:
      allOf:
        - required:
            - workspaceId
            - domain
          type: object
          properties:
            workspaceId:
              type: string
              nullable: false
              description: Id of the Workspace
            domain:
              description: The domain name for connecting
              type: string
              nullable: false
    Error:
      type: object
      properties:
        status:
          type: boolean
          description: Indicates the status of the error response
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: Error code
              errorMessage:
                type: string
                description: Error message
            required:
              - code
              - errorMessage
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````