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

# Create a domain



## OpenAPI

````yaml POST /domains
openapi: 3.0.1
info:
  title: SupaQR
  description: ''
  version: 1.0.0
servers:
  - url: https://api.supaqr.com
    description: 正式环境
security:
  - bearer: []
tags: []
paths:
  /domains:
    post:
      tags: []
      summary: Create a domain
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                domain:
                  type: string
                  description: Name of the domain.
                  minLength: 1
                  maxLength: 190
                  example: iqr.im
                notFoundUrl:
                  type: string
                  description: >-
                    Redirect users to a specific URL when a link(QR code) under
                    this domain doesn't exist.
                  format: uri
                  minLength: 1
                  maxLength: 2000
                  example: https://example.com
                expiredUrl:
                  type: string
                  description: >-
                    Redirect users to a specific URL when any link(QR code)
                    under this domain has expired.
                  minLength: 1
                  maxLength: 2000
                  format: uri
                  example: https://example.com
                assetLinks:
                  type: string
                  description: >-
                    assetLinks.json configuration file (for deep link support on
                    Android).
                  minLength: 1
                  maxLength: 2000
                appleAppSiteAssociation:
                  type: string
                  description: >-
                    apple-app-site-association configuration file (for deep link
                    support on iOS).
                  minLength: 1
                  maxLength: 2000
              required:
                - domain
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/domainData'
                properties:
                  slug:
                    type: string
                  destination:
                    type: string
                  clicks:
                    type: integer
                  expiredUrl:
                    type: string
                  notFoundUrl:
                    type: string
                  assetLinks:
                    type: string
                  appleAppSiteAssociation:
                    type: string
                  cnameStatus:
                    type: string
                  sslStatus:
                    type: string
                required:
                  - slug
                  - destination
                  - clicks
                  - cnameStatus
                  - sslStatus
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - bad_request
                    default: bad_request
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - unauthorized
                    default: unauthorized
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
        '403':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - forbidden
                    default: forbidden
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
        '422':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - parameter_error
                    default: parameter_error
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
        '429':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - rate_limit_exceeded
                    default: rate_limit_exceeded
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
        '500':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - internal_server_error
                    default: internal_server_error
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
      deprecated: false
      security:
        - bearer: []
components:
  schemas:
    domainData:
      type: object
      properties:
        slug:
          type: string
        destination:
          type: string
        clicks:
          type: integer
        expiredUrl:
          type: string
        notFoundUrl:
          type: string
        assetLinks:
          type: string
        appleAppSiteAssociation:
          type: string
        cnameStatus:
          type: string
        sslStatus:
          type: string
      required:
        - slug
        - destination
        - clicks
        - cnameStatus
        - sslStatus
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````