---
title: Clone Space
slug: test-mdx-pdf/clone-space
docTags: 
createdAt: 2026-07-21T14:09:11.897Z
---

{
  "id": "WLWyhV5R-642L2BLDqQqm",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.archbee.com/api/public-api/space/clone",
    "servers": [
      {
        "url": "https://api.archbee.com/api/public-api/space/clone",
        "description": "Archbee API Server"
      }
    ],
    "name": "Clone Space",
    "description": "<p>Clone Archbee space from given <code>docSpaceId</code></p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        },
        {
          "kind": "required",
          "name": "Content-Type",
          "type": "string",
          "example": "application/json",
          "description": ""
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "targetSpaceGroupId",
              "kind": "optional",
              "type": "string",
              "description": "Space group id where space will be cloned.",
              "example": "21-character__string0"
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "bearerAuth",
          "name": "bearerAuth",
          "kind": "optional",
          "type": "http",
          "description": "<p>Requires the <code>Authorization</code> header in the form <code>Authorization: Bearer {base64(docSpaceId~apiKey)}</code> Where the token is base64 encoding of docSpaceId, tilde, and apiKey.</p>",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Process status",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Process status",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string<OK>",
                "description": "Response Status",
                "enum": [
                  "OK"
                ]
              },
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "description": "DocSpace id",
                "example": "",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "description": "doc space id"
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Invalid request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Response400",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string<OK | Not OK>",
                "description": "Response Status",
                "example": "Not OK",
                "enum": [
                  "OK",
                  "Not OK"
                ]
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "array",
                "description": "Array of messages",
                "example": "[\"Some error message\"]",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "Some error message",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/Response400",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "TqzIKLUzJdCk0cSFrXqKK",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.archbee.com/api/public-api/space/clone \\\n     --header 'accept: application/json'"
        },
        {
          "id": "58jrF1xYKLwbP_uFJPefW",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.archbee.com/api/public-api/space/clone\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "XvFLDPQbptYZqUb6eHfka",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.archbee.com/api/public-api/space/clone\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "yFTM1wZlDSdrDCwPBMj6N",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.archbee.com/api/public-api/space/clone\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "TqzIKLUzJdCk0cSFrXqKK"
    },
    "results": {
      "languages": [
        {
          "id": "8kz-y1AUdETzQjFPy2ZZ6",
          "language": "200",
          "code": "// Process status\n{\n  \"status\": \"\",\n  \"data\": {\n    \"id\": \"\"\n  }\n}"
        },
        {
          "id": "O0XXlzv5zDcTsDqYMFpuY",
          "language": "400",
          "code": "// Invalid request\n{\n  \"status\": \"Not OK\",\n  \"messages\": [\n    \"Some error message\"\n  ]\n}"
        }
      ],
      "selectedLanguageId": "8kz-y1AUdETzQjFPy2ZZ6"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}