---
title: POST /fields
slug: content-marketing-platform/api/post-fields
docTags: 
createdAt: 2026-10-01T18:51:28.134Z
---

{
  "id": "HPftlx1lHrC_HuqIwAAts",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.cmp.optimizely.com/v3/fields",
    "servers": [
      {
        "url": "https://api.cmp.optimizely.com/v3/fields",
        "description": "v3 version of Optimizely CMP Open API"
      }
    ],
    "name": "POST /fields",
    "description": "<p>Experimental Add a new field to an Organization.</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"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "Payload to create a new field in an Organization",
          "discriminator": {
            "propertyName": "type",
            "mapping": {
              "checkbox": "#/components/schemas/CheckboxAndRadioTypeSettingsFieldCreatePayload",
              "currency_number": "#/components/schemas/CurrencyNumberTypeSettingsFieldCreatePayload",
              "date": "#/components/schemas/BaseSettingsFieldCreatePayload",
              "dropdown": "#/components/schemas/DropdownTypeSettingsFieldCreatePayload",
              "image": "#/components/schemas/BaseSettingsFieldCreatePayload",
              "label": "#/components/schemas/LabelTypeSettingsFieldCreatePayload",
              "percentage_number": "#/components/schemas/GenericNumberTypeSettingsFieldCreatePayload",
              "radio_button": "#/components/schemas/CheckboxAndRadioTypeSettingsFieldCreatePayload",
              "rich_text": "#/components/schemas/BaseSettingsFieldCreatePayload",
              "simple_number": "#/components/schemas/GenericNumberTypeSettingsFieldCreatePayload",
              "text": "#/components/schemas/BaseSettingsFieldCreatePayload",
              "text_area": "#/components/schemas/BaseSettingsFieldCreatePayload",
              "video": "#/components/schemas/BaseSettingsFieldCreatePayload"
            }
          },
          "customType": "SettingsFieldCreateRequest",
          "schema": [],
          "modelRef": "#/components/schemas/SettingsFieldCreateRequest",
          "complexItems": [
            {
              "name": "object",
              "schema": [
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "Name of the field",
                  "example": "Sample Checkbox",
                  "minLength": 1
                },
                {
                  "name": "helper_text",
                  "kind": "optional",
                  "type": "string",
                  "description": "Used to help understand the functionality of the field.",
                  "example": "This field is used to check options",
                  "maxLength": 120
                },
                {
                  "name": "is_active",
                  "kind": "required",
                  "type": "boolean",
                  "description": "<p>Indicates active status of field. Inactive fields cannot be accessed in tasks, campaigns or workflows.</p>",
                  "example": true
                },
                {
                  "name": "type",
                  "kind": "required",
                  "type": "string",
                  "description": "Type of the field",
                  "example": "checkbox"
                }
              ],
              "modelRef": "#/components/schemas/BaseSettingsFieldCreatePayload",
              "customType": "BaseSettingsFieldCreatePayload"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "Name of the field",
                  "example": "Sample Checkbox",
                  "minLength": 1
                },
                {
                  "name": "helper_text",
                  "kind": "optional",
                  "type": "string",
                  "description": "Used to help understand the functionality of the field.",
                  "example": "This field is used to check options",
                  "maxLength": 120
                },
                {
                  "name": "is_active",
                  "kind": "required",
                  "type": "boolean",
                  "description": "<p>Indicates active status of field. Inactive fields cannot be accessed in tasks, campaigns or workflows.</p>",
                  "example": true
                },
                {
                  "name": "type",
                  "kind": "required",
                  "type": "string",
                  "description": "Type of the field",
                  "example": "checkbox"
                },
                {
                  "name": "is_multi_select",
                  "kind": "required",
                  "type": "boolean",
                  "description": "Allow users to select multiple values"
                },
                {
                  "name": "choices",
                  "kind": "required",
                  "type": "array",
                  "description": "Choices of the field",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "schema": [
                    {
                      "name": "name",
                      "kind": "required",
                      "type": "string",
                      "description": "Name of the choice",
                      "example": "Choice 1",
                      "minLength": 1
                    },
                    {
                      "name": "color",
                      "kind": "required",
                      "type": "string",
                      "description": "<p>Code of choice color. Colors are limited to the following:</p>\n<ul>\n<li>Electric Blue (#4ECFD5)</li>\n<li>Golden Rod (#FFC700)</li>\n<li>Salmon Pink (#FF98A7)</li>\n<li>Blue Violet (#702BD5)</li>\n<li>Spring Green (#5FEEAD)</li>\n<li>Lavender Blue (#D6C4F2)</li>\n<li>Sky (#5F9FF6)</li>\n<li>Persian blue (#CB5DEB)</li>\n<li>Cool Gray (#9694B3)</li>\n</ul>",
                      "example": "#FFC700"
                    }
                  ]
                }
              ],
              "modelRef": "#/components/schemas/LabelTypeSettingsFieldCreatePayload",
              "customType": "LabelTypeSettingsFieldCreatePayload"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "Name of the field",
                  "example": "Sample Checkbox",
                  "minLength": 1
                },
                {
                  "name": "helper_text",
                  "kind": "optional",
                  "type": "string",
                  "description": "Used to help understand the functionality of the field.",
                  "example": "This field is used to check options",
                  "maxLength": 120
                },
                {
                  "name": "is_active",
                  "kind": "required",
                  "type": "boolean",
                  "description": "<p>Indicates active status of field. Inactive fields cannot be accessed in tasks, campaigns or workflows.</p>",
                  "example": true
                },
                {
                  "name": "type",
                  "kind": "required",
                  "type": "string",
                  "description": "Type of the field",
                  "example": "checkbox"
                },
                {
                  "name": "is_multi_select",
                  "kind": "required",
                  "type": "boolean",
                  "description": "Allow users to select multiple values"
                },
                {
                  "name": "choices",
                  "kind": "required",
                  "type": "array",
                  "description": "Choices of the field",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "schema": [
                    {
                      "name": "name",
                      "kind": "required",
                      "type": "string",
                      "description": "Name of the choice",
                      "example": "Choice 1",
                      "minLength": 1
                    }
                  ]
                }
              ],
              "modelRef": "#/components/schemas/DropdownTypeSettingsFieldCreatePayload",
              "customType": "DropdownTypeSettingsFieldCreatePayload"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "Name of the field",
                  "example": "Sample Checkbox",
                  "minLength": 1
                },
                {
                  "name": "helper_text",
                  "kind": "optional",
                  "type": "string",
                  "description": "Used to help understand the functionality of the field.",
                  "example": "This field is used to check options",
                  "maxLength": 120
                },
                {
                  "name": "is_active",
                  "kind": "required",
                  "type": "boolean",
                  "description": "<p>Indicates active status of field. Inactive fields cannot be accessed in tasks, campaigns or workflows.</p>",
                  "example": true
                },
                {
                  "name": "type",
                  "kind": "required",
                  "type": "string",
                  "description": "Type of the field",
                  "example": "checkbox"
                },
                {
                  "name": "choices",
                  "kind": "required",
                  "type": "array",
                  "description": "Choices of the field",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "schema": [
                    {
                      "name": "name",
                      "kind": "required",
                      "type": "string",
                      "description": "Name of the choice",
                      "example": "Choice 1",
                      "minLength": 1
                    }
                  ]
                }
              ],
              "modelRef": "#/components/schemas/CheckboxAndRadioTypeSettingsFieldCreatePayload",
              "customType": "CheckboxAndRadioTypeSettingsFieldCreatePayload"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "Name of the field",
                  "example": "Sample Checkbox",
                  "minLength": 1
                },
                {
                  "name": "helper_text",
                  "kind": "optional",
                  "type": "string",
                  "description": "Used to help understand the functionality of the field.",
                  "example": "This field is used to check options",
                  "maxLength": 120
                },
                {
                  "name": "is_active",
                  "kind": "required",
                  "type": "boolean",
                  "description": "<p>Indicates active status of field. Inactive fields cannot be accessed in tasks, campaigns or workflows.</p>",
                  "example": true
                },
                {
                  "name": "type",
                  "kind": "required",
                  "type": "string",
                  "description": "Type of the field",
                  "example": "checkbox"
                },
                {
                  "name": "has_thousand_separator",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "Whether the numerical field has a thousand separator",
                  "example": true,
                  "default": false
                },
                {
                  "name": "decimal_places",
                  "kind": "optional",
                  "type": "integer",
                  "description": "<p>Decimal place of the numerical field. This must be greather than 0. If this field is empty, 2 is set as the default.</p>",
                  "example": 2,
                  "default": 2
                }
              ],
              "modelRef": "#/components/schemas/GenericNumberTypeSettingsFieldCreatePayload",
              "customType": "GenericNumberTypeSettingsFieldCreatePayload"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "Name of the field",
                  "example": "Sample Checkbox",
                  "minLength": 1
                },
                {
                  "name": "helper_text",
                  "kind": "required",
                  "type": "string",
                  "description": "Used to help understand the functionality of the field.",
                  "example": "This field is used to check options",
                  "maxLength": 120
                },
                {
                  "name": "is_active",
                  "kind": "required",
                  "type": "boolean",
                  "description": "",
                  "example": true
                },
                {
                  "name": "type",
                  "kind": "required",
                  "type": "string",
                  "description": "Type of the field",
                  "example": "checkbox"
                },
                {
                  "name": "has_thousand_separator",
                  "kind": "required",
                  "type": "boolean",
                  "description": "Whether the numerical field has a thousand separator",
                  "example": true,
                  "default": false
                },
                {
                  "name": "decimal_places",
                  "kind": "required",
                  "type": "integer",
                  "description": "",
                  "example": 2,
                  "default": 2
                },
                {
                  "name": "currency_code",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Currency code of the numerical field. This must be a valid currency code. If this field is empty, <code>USD</code> is set as the default.</p>",
                  "example": "USD",
                  "default": "USD"
                }
              ],
              "modelRef": "#/components/schemas/CurrencyNumberTypeSettingsFieldCreatePayload",
              "customType": "CurrencyNumberTypeSettingsFieldCreatePayload"
            }
          ],
          "complexType": "oneOf",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "OAuth2",
          "name": "OAuth2",
          "kind": "optional",
          "type": "oauth2",
          "oauth2Flows": {
            "clientCredentials": {
              "tokenUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/token",
              "scopes": {}
            },
            "authorizationCode": {
              "authorizationUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/auth",
              "tokenUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/token",
              "scopes": {
                "openid": "Grants the ability to receive a unique identifier for the user.",
                "profile": "Grants access to user profile information.",
                "offline_access": "Grants the ability to refresh access_token using the refresh token even when user is not present (not logged in)."
              }
            }
          },
          "requiredScopes": [
            "openid",
            "profile",
            "offline_access"
          ]
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "Created new field in an Organization",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "string",
                "description": "Identifier of the field that has been created.",
                "example": "6ceee2f4fa3411ecb37802420ac8001b"
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Client error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Unsupported arguments: a,b,c\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Authorization error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Unauthorized\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Permission error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"You do not have the permission to perform this operation\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not found error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Resource not found\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "422",
        "description": "Unprocessable entity error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Resource cannot be processed\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "2Of2LbI2A4KjS-9B5IhCu",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.cmp.optimizely.com/v3/fields \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"name\": \"Sample Checkbox\",\n     \"is_active\": true,\n     \"type\": \"checkbox\"\n     }'"
        },
        {
          "id": "oU-cJwnFrWwN23RQbT8EA",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"name\": \"Sample Checkbox\",\n   \"is_active\": true,\n   \"type\": \"checkbox\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.cmp.optimizely.com/v3/fields\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "SijAeOmW-_lORfuJHbrSO",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.cmp.optimizely.com/v3/fields\")\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\"\nrequest.body = JSON.dump({\n   \"name\": \"Sample Checkbox\",\n   \"is_active\": true,\n   \"type\": \"checkbox\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "jnKq6zdodqDbo7C-cGZc_",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.cmp.optimizely.com/v3/fields\"\n\npayload = json.dumps({\n   \"name\": \"Sample Checkbox\",\n   \"is_active\": True,\n   \"type\": \"checkbox\"\n})\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": "2Of2LbI2A4KjS-9B5IhCu"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-201",
          "language": "201",
          "code": "// Created new field in an Organization\n{\n  \"id\": \"6ceee2f4fa3411ecb37802420ac8001b\"\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Client error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Authorization error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// Permission error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// Not found error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-5-422",
          "language": "422",
          "code": "// Unprocessable entity error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-201"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}