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

# Duplicate Site

> Duplicates an existing site with all its content and configuration.

export const ReadinessBadge = ({type}) => {
  const validTags = ["beta", "alpha", "experimental"];
  const tagText = type?.trim().toLowerCase();
  if (!tagText || !validTags.includes(tagText)) return null;
  useEffect(() => {
    const titleElement = document.querySelector("#page-title, .page-title, h1");
    if (!titleElement) return;
    if (titleElement.querySelector(".badge")) return;
    const badge = document.createElement("span");
    badge.className = `badge ${tagText}-badge`;
    badge.textContent = tagText;
    badge.style.transform = "translateY(-3px)";
    titleElement.appendChild(badge);
  }, []);
  return null;
};

<ReadinessBadge type="beta" />


## OpenAPI

````yaml POST /v2/sites/{siteId}/duplicate
openapi: 3.1.0
info:
  title: Makeswift API
  description: Documentation for the Makeswift public REST API.
  version: '1.0'
servers:
  - url: https://api.makeswift.com
    description: Production server
security:
  - Authentication: []
tags:
  - name: Authentication
    description: ''
  - name: Workspace
    description: ''
  - name: Workspace Member
    description: ''
  - name: Site
    description: ''
  - name: Locale
    description: ''
  - name: Route
    description: ''
  - name: Page
    description: ''
  - name: Webhook Management
    description: ''
paths:
  /v2/sites/{siteId}/duplicate:
    post:
      tags:
        - Site
      summary: Duplicate Site
      description: Duplicates an existing site with all its content and configuration.
      operationId: SiteController_duplicateV2_v2
      parameters:
        - name: siteId
          in: path
          description: The site ID for the site you are duplicating.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DuplicateSiteV2RequestBodyDto'
      responses:
        '201':
          description: Returns the newly created duplicated site.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DuplicateSiteV2ResponseBodyDto'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponseDto'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponseDto'
components:
  schemas:
    DuplicateSiteV2RequestBodyDto:
      type: object
      properties:
        name:
          description: The name for the duplicated site.
          type: string
          example: Hearth Furniture Duplicate
      required:
        - name
    DuplicateSiteV2ResponseBodyDto:
      description: >-
        The newly created duplicated site with all content and configuration
        copied from the original
      type: object
      properties:
        object:
          description: The type of the object
          type: string
          example: site
          enum:
            - site
        id:
          type: string
          format: uuid
        name:
          description: The site name.
          type: string
          example: Hearth Furniture Company
        hostOrigin:
          description: >-
            The public URL where your site is hosted. This is the URL that
            Makeswift uses to render your site for editing.
          type: string
          format: uri
          example: https://hearthfurniture.com
          nullable: true
        publicApiKey:
          description: >-
            The publishable API key that a host can use to get page and
            component data for rendering your site.
          type: string
          format: uuid
        defaultLocale:
          description: The primary locale of this site.
          type: string
          example: en-US
          examples:
            - en
            - es
            - fr-FR
            - ar-EG
            - ja-JP
      required:
        - object
        - id
        - name
        - hostOrigin
        - publicApiKey
        - defaultLocale
    BadRequestResponseDto:
      type: object
      properties:
        object:
          type: string
          enum:
            - error
        code:
          type: string
          enum:
            - bad_request
        message:
          type: string
      required:
        - object
        - code
        - message
    ForbiddenResponseDto:
      type: object
      properties:
        object:
          type: string
          enum:
            - error
        code:
          type: string
          enum:
            - forbidden
        message:
          type: string
      required:
        - object
        - code
        - message
  securitySchemes:
    Authentication:
      type: apiKey
      in: header
      name: x-api-key
      description: |-
        API key authentication. Accepts either:
        - App API key (e.g. sk_eczMHVBY9fV6GYFhvs53qcnxq7yptlXL3ABKOZtn6dQ)
        - Site API key (UUID format, e.g. 550e8400-e29b-41d4-a716-446655440000)

````