---
title: /v2/advertisers/{advertiserId}/campaigns
slug: campaign-reporting-apis/v2advertisersadvertiseridcampaigns
docTags: 
createdAt: 2026-03-25T10:57:30.256Z
---

{
  "id": "nJsw-CgRHsWEKqFnM26Ta",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns",
    "servers": [
      {
        "url": "https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns",
        "description": "Generated server url"
      }
    ],
    "name": "",
    "description": "<p>Creates a campaign with mandatory fields <em>name</em>, <em>marketId</em> and <em>budget</em>.</p>\n<p><strong>Rules:</strong></p>\n<ul>\n<li>Campaign <em>name</em> must be unique under an advertiser.</li>\n</ul>\n<p><strong>Allowed values for attributes are as follows:</strong></p>\n<ul>\n<li><em>marketId</em>:\n<ul>\n<li><code>1</code>- Argentina(AR)</li>\n<li><code>2</code>- Australia(AU)</li>\n<li><code>3</code>- Austria(AT)</li>\n<li><code>4</code>- Belgium(BE)</li>\n<li><code>5</code>- Brazil(BR)</li>\n<li><code>6</code>- Canada(CA)</li>\n<li><code>7</code>- Colombia(CO)</li>\n<li><code>8</code>- Czech Republic(CZ)</li>\n<li><code>9</code>- Denmark(DK)</li>\n<li><code>10</code>- France(FR)</li>\n<li><code>11</code>- Germany(DE)</li>\n<li><code>12</code>- Hong Kong(HK)</li>\n<li><code>13</code>- India(IN)</li>\n<li><code>14</code>- Indonesia(ID)</li>\n<li><code>15</code>- Ireland(IE)</li>\n<li><code>16</code>- Israel(IL)</li>\n<li><code>17</code>- Italy(IT)</li>\n<li><code>18</code>- Malaysia(MY)</li>\n<li><code>19</code>- Mexico(MX)</li>\n<li><code>20</code>- Netherlands(NL)</li>\n<li><code>21</code>- New Zealand(NZ)</li>\n<li><code>22</code>- Norway(NO)</li>\n<li><code>23</code>- Philippines(PH)</li>\n<li><code>24</code>- Poland(PL)</li>\n<li><code>25</code>- Portugal(PT)</li>\n<li><code>26</code>- Russia(RU)</li>\n<li><code>27</code>- Saudi Arabia(SA)</li>\n<li><code>28</code>- Singapore(SG)</li>\n<li><code>29</code>- South Africa(ZA)</li>\n<li><code>30</code>- Spain(ES)</li>\n<li><code>31</code>- Sweden(SE)</li>\n<li><code>32</code>- Switzerland(CH)</li>\n<li><code>33</code>- Taiwan(TW)</li>\n<li><code>34</code>- Thailand(TH)</li>\n<li><code>35</code>- Turkey(TR)</li>\n<li><code>36</code>- Ukraine(UA)</li>\n<li><code>37</code>- United Arab Emirates(AE)</li>\n<li><code>38</code>- United Kingdom(GB)</li>\n<li><code>39</code>- USA(US)</li>\n</ul>\n</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "advertiserId",
          "type": "integer<int32>",
          "description": "",
          "format": "int32"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "CampaignCreateRequest",
          "schema": [
            {
              "name": "name",
              "kind": "required",
              "type": "string",
              "description": "",
              "example": "",
              "minLength": 3,
              "maxLength": 200,
              "pattern": "^(?!\\s*$).+"
            },
            {
              "name": "marketId",
              "kind": "required",
              "type": "integer<int32>",
              "description": "",
              "example": 0,
              "format": "int32"
            },
            {
              "name": "budget",
              "kind": "required",
              "type": "number",
              "description": "",
              "example": ""
            },
            {
              "name": "status",
              "kind": "optional",
              "type": "string<ADVERTISED | ARCHIVED | PAUSED>",
              "description": "",
              "example": "",
              "enum": [
                "ADVERTISED",
                "ARCHIVED",
                "PAUSED"
              ]
            }
          ],
          "modelRef": "#/components/schemas/CampaignCreateRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "CampaignResponse",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "",
                "example": 0,
                "format": "int32"
              },
              {
                "name": "marketId",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "",
                "example": 0,
                "format": "int32"
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "description": "",
                "example": ""
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "string<ADVERTISED | ARCHIVED | PAUSED>",
                "description": "",
                "example": "",
                "enum": [
                  "ADVERTISED",
                  "ARCHIVED",
                  "PAUSED"
                ]
              },
              {
                "name": "budget",
                "kind": "optional",
                "type": "number",
                "description": "",
                "example": ""
              },
              {
                "name": "budgetSpent",
                "kind": "optional",
                "type": "number",
                "description": "",
                "example": ""
              },
              {
                "name": "budgetUnallocated",
                "kind": "optional",
                "type": "number",
                "description": "The budget which is not used yet by the ad groups belonging to this campaign.",
                "example": ""
              },
              {
                "name": "deletable",
                "kind": "optional",
                "type": "boolean",
                "description": "",
                "example": ""
              },
              {
                "name": "spendVelocity",
                "kind": "optional",
                "type": "number<double>",
                "description": "The pacing of the campaign measures budget efficiency over time, where a value of 1.0 reflects ideal spend considering temporal progress of the campaign, less than 1.0 underspending, and more than 1.0 overspending. The value is not set for campaign creation/update or whenever there is at least one ad group without end date.",
                "example": "",
                "format": "double"
              },
              {
                "name": "startDate",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "The earliest start date of all ad groups belonging to this campaign.",
                "example": "",
                "format": "date-time"
              },
              {
                "name": "endDate",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "The latest end date of all ad groups belonging to this campaign. Value is not set whenever there is at least one ad group without end date.",
                "example": "",
                "format": "date-time"
              },
              {
                "name": "modifiedAt",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "",
                "example": "",
                "format": "date-time"
              },
              {
                "name": "advertised",
                "kind": "optional",
                "type": "boolean",
                "description": "",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/CampaignResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Not Found",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ExceptionResponse",
            "schema": [
              {
                "name": "messages",
                "kind": "optional",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/ExceptionResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "422",
        "description": "Unprocessable Entity",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ExceptionResponse",
            "schema": [
              {
                "name": "messages",
                "kind": "optional",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/ExceptionResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "VDJWclPQd6sP4SDFSmS7g",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"name\": \"\",\n     \"marketId\": 0,\n     \"budget\": \"\"\n     }'"
        },
        {
          "id": "Rie-1u4NZiptL-Z8MkbAb",
          "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\": \"\",\n   \"marketId\": 0,\n   \"budget\": \"\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "VJQNRU0MVEADbo0JDKGCC",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://<pcm-domain>/v2/advertisers/{advertiserId}/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   \"name\": \"\",\n   \"marketId\": 0,\n   \"budget\": \"\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "Z2GXQGGlMwQ7suz_KDeDR",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns\"\n\npayload = json.dumps({\n   \"name\": \"\",\n   \"marketId\": 0,\n   \"budget\": \"\"\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": "VDJWclPQd6sP4SDFSmS7g"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"id\": \"\",\n  \"marketId\": \"\",\n  \"name\": \"\",\n  \"status\": \"\",\n  \"budget\": 0,\n  \"budgetSpent\": 0,\n  \"budgetUnallocated\": 0,\n  \"deletable\": false,\n  \"spendVelocity\": \"\",\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"modifiedAt\": \"\",\n  \"advertised\": false\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Unauthorized\n"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// Forbidden\n"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// Not Found\n{\n  \"messages\": [\n    \"\"\n  ]\n}"
        },
        {
          "id": "response-4-422",
          "language": "422",
          "code": "// Unprocessable Entity\n{\n  \"messages\": [\n    \"\"\n  ]\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}