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

# Purchase domain

> Purchase a domain; charged in workspace credits



## OpenAPI

````yaml https://api.getcargo.io/openapi.json post /domainManagement/domains
openapi: 3.1.0
info:
  title: Cargo API
  version: 1.0.0
  description: Cargo Platform API v1
servers:
  - url: https://api.getcargo.io/v1
    description: Cargo API
security:
  - bearerAuth: []
paths:
  /domainManagement/domains:
    post:
      tags:
        - Domain Management - Domains
      summary: Purchase domain
      description: Purchase a domain; charged in workspace credits
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  title: Name
                  description: Domain name to purchase (e.g. acme-outreach.com).
                  type: string
                  minLength: 4
                  maxLength: 253
              required:
                - name
              additionalProperties: false
              title: Request body
              description: Request body schema.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  domain:
                    type: object
                    properties:
                      uuid:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      workspaceUuid:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      name:
                        type: string
                      status:
                        type: string
                        enum:
                          - pending
                          - active
                          - failed
                          - cancelled
                          - expired
                      registrar:
                        type: string
                        enum:
                          - mailpool
                      providerRef:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      dnsRecords:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - A
                                - AAAA
                                - CNAME
                                - MX
                                - TXT
                                - NS
                                - SRV
                                - CAA
                            name:
                              type: string
                            value:
                              type: string
                            ttl:
                              anyOf:
                                - type: number
                                - type: 'null'
                            priority:
                              anyOf:
                                - type: number
                                - type: 'null'
                          required:
                            - type
                            - name
                            - value
                            - ttl
                            - priority
                          additionalProperties: false
                      priceCredits:
                        anyOf:
                          - type: number
                          - type: 'null'
                      billingUsageUuid:
                        anyOf:
                          - type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          - type: 'null'
                      expiresAt:
                        anyOf:
                          - type: string
                          - type: 'null'
                      renewalChargedUntil:
                        anyOf:
                          - type: string
                          - type: 'null'
                      autoRenew:
                        type: boolean
                      userUuid:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                      deletedAt:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - uuid
                      - workspaceUuid
                      - name
                      - status
                      - registrar
                      - providerRef
                      - dnsRecords
                      - priceCredits
                      - billingUsageUuid
                      - expiresAt
                      - renewalChargedUntil
                      - autoRenew
                      - userUuid
                      - createdAt
                      - updatedAt
                      - deletedAt
                    additionalProperties: false
                    title: Domain
                    description: >-
                      Newly purchased domain. The purchase was charged in
                      workspace credits.
                required:
                  - domain
                additionalProperties: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````