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

# Update custom domain



## OpenAPI

````yaml /api-reference/openapi.json post /apps/{app_id}/domain
openapi: 3.0.0
info:
  title: Cloud Website API
  description: API documentation for database and app management endpoints
  version: 1.0.0
servers:
  - url: https://shardcloud.app/api
    description: API base path
security: []
tags:
  - name: Databases
    description: Database management operations
  - name: Apps
    description: Application management operations
paths:
  /apps/{app_id}/domain:
    post:
      tags:
        - Apps
      summary: Update custom domain
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomDomainRequest'
      responses:
        '200':
          description: Custom domain updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  custom_hostname:
                    type: object
                  cname:
                    type: string
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/Error'
                  - $ref: '#/components/schemas/ValidationError'
      security:
        - JWTAuth: []
components:
  schemas:
    UpdateCustomDomainRequest:
      type: object
      required:
        - custom_domain
      properties:
        custom_domain:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
    ValidationError:
      type: object
      properties:
        error:
          type: string
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
  securitySchemes:
    JWTAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````