---
title: /form/{key}
slug: cms-12/api/formkey
docTags: 
createdAt: 2026-08-28T13:16:06.833Z
---

{
  "id": "LNncks0DENnCUQKWjuWuP",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "/_form/v1/form/{key}",
    "servers": [
      {
        "url": "/_form/v1/form/{key}",
        "description": "Optimizely Headless Form API"
      }
    ],
    "name": "",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "key",
          "type": "string",
          "description": ""
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json",
            "application/problem+json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "locale",
          "type": "string",
          "description": ""
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Http",
          "name": "Http",
          "kind": "optional",
          "type": "http",
          "description": "Use this scheme if you already have an access token.",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Success",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "FormContainer",
            "schema": [
              {
                "name": "key",
                "kind": "optional",
                "type": "string",
                "readOnly": true,
                "description": "",
                "default": "41A07E4D3A634CC581F399CAAC75789C"
              },
              {
                "name": "properties",
                "kind": "optional",
                "type": "map",
                "description": "",
                "example": "",
                "default": "\r\n        {\r\n            \"title\":\"\",\r\n            \"allowToStoreSubmissionData\":true,\r\n            \"description\":\"\",\r\n            \"showSummarizedData\":false,\r\n            \"confirmationMessage\":\"\",\r\n            \"resetConfirmationMessage\":\"\",\r\n            \"redirectToPage\":\"\",\r\n            \"submitSuccessMessage\":\"\",\r\n            \"allowAnonymousSubmission\":false,\r\n            \"allowMultipleSubmission\":false,\r\n            \"showNavigationBar\":false\r\n        }\r\n    ",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "formElements",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/FormElement",
                "customType": "FormElement[]",
                "schema": [
                  {
                    "name": "key",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": ""
                  },
                  {
                    "name": "contentType",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": ""
                  },
                  {
                    "name": "displayName",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "properties",
                    "kind": "optional",
                    "type": "map",
                    "description": "",
                    "example": "",
                    "customType": "map<string, string>",
                    "schema": []
                  },
                  {
                    "name": "locale",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": ""
                  },
                  {
                    "name": "localizations",
                    "kind": "optional",
                    "type": "map",
                    "description": "",
                    "example": "",
                    "customType": "map<string, string>",
                    "schema": []
                  }
                ]
              },
              {
                "name": "locale",
                "kind": "optional",
                "type": "string",
                "readOnly": true,
                "description": "",
                "default": "en"
              },
              {
                "name": "localizations",
                "kind": "optional",
                "type": "map",
                "description": "",
                "example": "",
                "default": "\r\n        {\r\n            \"allowAnonymousSubmissionErrorMessage\":\"You must be logged in to submit this form. If you are logged in and still cannot post, make sure 'Do not track' in your browser settings is disabled.\",\r\n            \"allowMultipleSubmissionErrorMessage\":\"You already submitted this form.\"\r\n        }\r\n    ",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/FormContainer",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Not Found",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "m70wMka7UmGMt5aiVpGgD",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url /_form/v1/form/{key} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "RRSTcBKqmLp4roPifeI95",
          "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: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/_form/v1/form/{key}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "7Ua1uCM_4eFRM5Sb_x3vj",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/_form/v1/form/{key}\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "n8aXlGyge-lQ5dw5jJmqC",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/_form/v1/form/{key}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "m70wMka7UmGMt5aiVpGgD"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Success\n{\n  \"key\": \"\",\n  \"properties\": \"\",\n  \"formElements\": [\n    {\n      \"key\": \"\",\n      \"contentType\": \"\",\n      \"displayName\": \"\",\n      \"properties\": \"\",\n      \"locale\": \"\",\n      \"localizations\": \"\"\n    }\n  ],\n  \"locale\": \"\",\n  \"localizations\": \"\"\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad Request\n"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// Forbidden\n"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// Not Found\n"
        },
        {
          "id": "response-4-500",
          "language": "500",
          "code": "// Internal Server Error\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}