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

{
  "id": "OIhcI_D9g5zfqUW9ZQBJZ",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.cmp.optimizely.com/v3/campaigns",
    "servers": [
      {
        "url": "https://api.cmp.optimizely.com/v3/campaigns",
        "description": "v3 version of Optimizely CMP Open API"
      }
    ],
    "name": "POST /campaigns",
    "description": "<p>Experimental Create a campaign</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 campaign",
          "customType": "CampaignCreateRequest",
          "schema": [
            {
              "name": "title",
              "kind": "required",
              "type": "string",
              "nullable": false,
              "description": "Title of the campaign",
              "example": "Sample Title"
            },
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Description of the campaign",
              "example": "Sample Description"
            },
            {
              "name": "parent_campaign",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "ID of the parent campaign",
              "example": "665d5717c8ba0201647a0992"
            },
            {
              "name": "start_date",
              "kind": "optional",
              "type": "string<date>",
              "nullable": false,
              "description": "<p>Start date of the campaign, in ISO 8601 UTC format (2025-02-10).</p>",
              "example": "2025-10-01",
              "format": "date"
            },
            {
              "name": "end_date",
              "kind": "optional",
              "type": "string<date>",
              "nullable": false,
              "description": "<p>End date of the campaign, in ISO 8601 UTC format (2026-02-10).</p>",
              "example": "2026-10-06",
              "format": "date"
            },
            {
              "name": "owner_id",
              "kind": "optional",
              "type": "string",
              "nullable": false,
              "description": "ID of the owner of the campaign",
              "example": "665d5717c8ba0201647a0991"
            },
            {
              "name": "color",
              "kind": "optional",
              "type": "string<#333 | #ec2e3b | #fc594b | #e2575b | #f45097 | #de55a9 | #bd417f | #a959cc | #6456b7 | #4db2fc | #3a97be | #36c5a3 | #9bc94e | #fdad3c | #ef803c | #fd8876 | #ea868a | #f781b5 | #e785c1 | #cf69a3 | #c187db | #9086cc | #79c8fd | #5ab5d0 | #4fd5bd | #b8d877 | #fec454 | #f3a35a | #d3998f | #c79697 | #d096af | #c897b4 | #ae7c98 | #b094be | #908bae | #97bed8 | #7aa8b6 | #7abeb2 | #bece9d | #e3c68d | #d3ac85 | #b9a29e | #b29f9f | #b9a1ac | #b5a1ae | #9a8692 | #a89bac | #908e9b | #a8b9c3 | #8ea1a7 | #96b1ac | #c1c8b5 | #d4c8b0 | #c0b0a1 | #212121 | #CE515B | #F16281 | #EB7777 | #A25555 | #B05F8C | #AF8EC3 | #21B7EC | #3AB0C9 | #669BA8 | #7ABEB2 | #5F9DCE | #717CB9 | #4C557E | #449C6C | #63B05F | #4D9B93 | #ACC050 | #A29F55 | #8AA872 | #E4844C | #EE9808 | #DE7009 | #FCD404 | #CBB039 | #99896A | #2e2a26 | #ccccdc>",
              "nullable": false,
              "description": "Color of the campaign",
              "example": "#ec2e3b",
              "enum": [
                "#333",
                "#ec2e3b",
                "#fc594b",
                "#e2575b",
                "#f45097",
                "#de55a9",
                "#bd417f",
                "#a959cc",
                "#6456b7",
                "#4db2fc",
                "#3a97be",
                "#36c5a3",
                "#9bc94e",
                "#fdad3c",
                "#ef803c",
                "#fd8876",
                "#ea868a",
                "#f781b5",
                "#e785c1",
                "#cf69a3",
                "#c187db",
                "#9086cc",
                "#79c8fd",
                "#5ab5d0",
                "#4fd5bd",
                "#b8d877",
                "#fec454",
                "#f3a35a",
                "#d3998f",
                "#c79697",
                "#d096af",
                "#c897b4",
                "#ae7c98",
                "#b094be",
                "#908bae",
                "#97bed8",
                "#7aa8b6",
                "#7abeb2",
                "#bece9d",
                "#e3c68d",
                "#d3ac85",
                "#b9a29e",
                "#b29f9f",
                "#b9a1ac",
                "#b5a1ae",
                "#9a8692",
                "#a89bac",
                "#908e9b",
                "#a8b9c3",
                "#8ea1a7",
                "#96b1ac",
                "#c1c8b5",
                "#d4c8b0",
                "#c0b0a1",
                "#212121",
                "#CE515B",
                "#F16281",
                "#EB7777",
                "#A25555",
                "#B05F8C",
                "#AF8EC3",
                "#21B7EC",
                "#3AB0C9",
                "#669BA8",
                "#7ABEB2",
                "#5F9DCE",
                "#717CB9",
                "#4C557E",
                "#449C6C",
                "#63B05F",
                "#4D9B93",
                "#ACC050",
                "#A29F55",
                "#8AA872",
                "#E4844C",
                "#EE9808",
                "#DE7009",
                "#FCD404",
                "#CBB039",
                "#99896A",
                "#2e2a26",
                "#ccccdc"
              ]
            }
          ],
          "modelRef": "#/components/schemas/CampaignCreateRequest",
          "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 campaign",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "CampaignResponse",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "string",
                "description": "Unique identifier of the campaign",
                "example": "8q7f910551b00a722e0418830cee6612"
              },
              {
                "name": "title",
                "kind": "required",
                "type": "string",
                "description": "Title of the campaign",
                "example": "The awesome campaign"
              },
              {
                "name": "description",
                "kind": "required",
                "type": "string",
                "nullable": true,
                "description": "Description of the campaign",
                "example": "The awesome campaign's description"
              },
              {
                "name": "start_date",
                "kind": "required",
                "type": "string",
                "nullable": true,
                "description": "<p>Start date of the campaign in ISO 8601 format: <code>YYYY-MM-DD</code></p>",
                "example": "2019-10-06"
              },
              {
                "name": "end_date",
                "kind": "required",
                "type": "string",
                "nullable": true,
                "description": "<p>End date of the campaign in ISO 8601 format: <code>YYYY-MM-DD</code></p>",
                "example": "2019-10-16"
              },
              {
                "name": "created_at",
                "kind": "required",
                "type": "string<date-time>",
                "description": "<p>Creation date and time of the campaign,  in ISO 8601 UTC format (<code>2035-02-10T10:40:45Z</code>)</p>",
                "example": "2035-10-06T13:15:30Z",
                "format": "date-time"
              },
              {
                "name": "is_hidden",
                "kind": "required",
                "type": "boolean",
                "description": "Whether the campaign is hidden or not",
                "example": false
              },
              {
                "name": "status",
                "kind": "required",
                "type": "string<Not Started | Off Track | On Track | Complete | At Risk>",
                "description": "Status of the campaign",
                "example": "On Track",
                "enum": [
                  "Not Started",
                  "Off Track",
                  "On Track",
                  "Complete",
                  "At Risk"
                ]
              },
              {
                "name": "reference_id",
                "kind": "required",
                "type": "string",
                "description": "Reference identifier of the campaign",
                "example": "CPN-1589"
              },
              {
                "name": "budget",
                "kind": "required",
                "type": "object",
                "nullable": true,
                "description": "",
                "complexType": "allOf",
                "complexItems": [
                  {
                    "name": "BudgetResponse",
                    "description": "",
                    "modelRef": "#/components/schemas/BudgetResponse",
                    "schema": [
                      {
                        "name": "currency_code",
                        "kind": "required",
                        "type": "string",
                        "description": "Currency code of the budget",
                        "example": "USD"
                      },
                      {
                        "name": "budgeted_amount",
                        "kind": "required",
                        "type": "string",
                        "description": "Planned amount for the campaign",
                        "example": "1000.50"
                      }
                    ]
                  }
                ],
                "schema": []
              },
              {
                "name": "labels",
                "kind": "required",
                "type": "array",
                "description": "Labels associated to the campaign",
                "modelRef": "#/components/schemas/ResourceLabelResponse",
                "customType": "ResourceLabelResponse[]",
                "schema": [
                  {
                    "name": "group",
                    "kind": "required",
                    "type": "object",
                    "description": "Label group",
                    "example": "",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "required",
                        "type": "string",
                        "description": "Identifier of the label group",
                        "example": "2467e583a60e23fda2b89db81a453cd2"
                      },
                      {
                        "name": "name",
                        "kind": "required",
                        "type": "string",
                        "description": "Name of the label group",
                        "example": "Content Format"
                      }
                    ]
                  },
                  {
                    "name": "values",
                    "kind": "required",
                    "type": "array",
                    "description": "List of values of the label",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "required",
                        "type": "string",
                        "description": "Identifier of the label value",
                        "example": "71c378f3fee3d822759d1bdc2aab628c"
                      },
                      {
                        "name": "name",
                        "kind": "required",
                        "type": "string",
                        "description": "Name of the label value",
                        "example": "Photos"
                      }
                    ]
                  }
                ]
              },
              {
                "name": "links",
                "kind": "required",
                "type": "object",
                "description": "Meta links",
                "example": "",
                "schema": [
                  {
                    "name": "self",
                    "kind": "required",
                    "type": "string",
                    "description": "URL of the campaign",
                    "example": "https://api.cmp.optimizely.com/v3/campaigns/8q7f910551b00a722e0418830cee6612"
                  },
                  {
                    "name": "brief",
                    "kind": "required",
                    "type": "string",
                    "nullable": true,
                    "description": "URL of the campaign brief",
                    "example": "https://api.cmp.optimizely.com/v3/campaigns/8q7f910551b00a722e0418830cee6612/brief"
                  },
                  {
                    "name": "owner",
                    "kind": "required",
                    "type": "string",
                    "nullable": true,
                    "description": "URL of the campaign owner",
                    "example": "https://api.cmp.optimizely.com/v3/users/6ea1bf781398c3147393arr1"
                  },
                  {
                    "name": "parent_campaign",
                    "kind": "required",
                    "type": "string",
                    "nullable": true,
                    "description": "URL of the parent campaign",
                    "example": "https://api.cmp.optimizely.com/v3/campaigns/7u7f910551b00a722e0418830cee6643"
                  },
                  {
                    "name": "child_campaigns",
                    "kind": "required",
                    "type": "array",
                    "description": "URLs of the child campaigns",
                    "example": "[\"https://api.cmp.optimizely.com/v3/campaigns/6fb21acf987094513ecb4b58\"]",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "https://api.cmp.optimizely.com/v3/campaigns/6fb21acf987094513ecb4b58",
                    "itemDefault": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/CampaignResponse",
            "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": "iARW1r3QNxzcEqI-RTrYv",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.cmp.optimizely.com/v3/campaigns \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"title\": \"Sample Title\"\n     }'"
        },
        {
          "id": "hj-FhEMb6WSaTJ6qta2Ch",
          "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   \"title\": \"Sample Title\"\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/campaigns\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "-kVrg0Fj2b0eiDgrfnMce",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.cmp.optimizely.com/v3/campaigns\")\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   \"title\": \"Sample Title\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "JokoizKLxWSvmIMBf5VbI",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.cmp.optimizely.com/v3/campaigns\"\n\npayload = json.dumps({\n   \"title\": \"Sample Title\"\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": "iARW1r3QNxzcEqI-RTrYv"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-201",
          "language": "201",
          "code": "// Created campaign\n{\n  \"id\": \"8q7f910551b00a722e0418830cee6612\",\n  \"title\": \"The awesome campaign\",\n  \"description\": \"The awesome campaign's description\",\n  \"start_date\": \"2019-10-06\",\n  \"end_date\": \"2019-10-16\",\n  \"created_at\": \"2035-10-06T13:15:30Z\",\n  \"is_hidden\": false,\n  \"status\": \"On Track\",\n  \"reference_id\": \"CPN-1589\",\n  \"budget\": {},\n  \"labels\": [\n    {\n      \"group\": {\n        \"id\": \"2467e583a60e23fda2b89db81a453cd2\",\n        \"name\": \"Content Format\"\n      },\n      \"values\": [\n        {\n          \"id\": \"71c378f3fee3d822759d1bdc2aab628c\",\n          \"name\": \"Photos\"\n        }\n      ]\n    }\n  ],\n  \"links\": {\n    \"self\": \"https://api.cmp.optimizely.com/v3/campaigns/8q7f910551b00a722e0418830cee6612\",\n    \"brief\": \"https://api.cmp.optimizely.com/v3/campaigns/8q7f910551b00a722e0418830cee6612/brief\",\n    \"owner\": \"https://api.cmp.optimizely.com/v3/users/6ea1bf781398c3147393arr1\",\n    \"parent_campaign\": \"https://api.cmp.optimizely.com/v3/campaigns/7u7f910551b00a722e0418830cee6643\",\n    \"child_campaigns\": [\n      \"https://api.cmp.optimizely.com/v3/campaigns/6fb21acf987094513ecb4b58\"\n    ]\n  }\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": ""
    }
  ]
}