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

{
  "id": "m1gAcmIf3IlfPsK4hLdLt",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId}",
    "servers": [
      {
        "url": "https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId}",
        "description": "Generated server url"
      }
    ],
    "name": "",
    "description": "<p>Updates attributes of a campaign specified by id. Attributes <em>name, budget</em> and <em>status</em> can be updated.</p>\n<p><strong>Rules:</strong></p>\n<ul>\n<li>Campaign <em>name</em> must be unique under an advertiser.</li>\n<li><em>budget</em> must be greater than or equal to the sum of the budgets of all ad groups belonging to this campaign.</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "advertiserId",
          "type": "integer<int32>",
          "description": "",
          "format": "int32"
        },
        {
          "kind": "required",
          "name": "campaignId",
          "type": "integer<int32>",
          "description": "",
          "format": "int32"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "CampaignUpdateRequest",
          "schema": [
            {
              "name": "name",
              "kind": "optional",
              "type": "string",
              "description": "",
              "example": "",
              "minLength": 3,
              "maxLength": 200,
              "pattern": "^(?!\\s*$).+"
            },
            {
              "name": "budget",
              "kind": "optional",
              "type": "number",
              "description": "",
              "example": ""
            },
            {
              "name": "status",
              "kind": "optional",
              "type": "string<ADVERTISED | ARCHIVED | PAUSED>",
              "description": "",
              "example": "",
              "enum": [
                "ADVERTISED",
                "ARCHIVED",
                "PAUSED"
              ]
            }
          ],
          "modelRef": "#/components/schemas/CampaignUpdateRequest",
          "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": "O6DluiqtzmquDHu1UKK1D",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "PCC-9LrBsXnJoIxvjrN-b",
          "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: 'PUT',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "RXjbqgni32J29YeX8h-aN",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "V4Pv2AdJIQaQ35ixCpE_I",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://<pcm-domain>/v2/advertisers/{advertiserId}/campaigns/{campaignId}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "O6DluiqtzmquDHu1UKK1D"
    },
    "results": {
      "languages": [
        {
          "id": "varHuJOVWbt3AcSjoech5",
          "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": "deIzJnx0k6ouaO1gsS56u",
          "language": "401",
          "code": "// Unauthorized\n"
        },
        {
          "id": "biwxxJx44w0ptxcMbUkZK",
          "language": "403",
          "code": "// Forbidden\n"
        },
        {
          "id": "soj1cI7RytwsUDc4fyClc",
          "language": "404",
          "code": "// Not Found\n{\n  \"messages\": [\n    \"\"\n  ]\n}"
        },
        {
          "id": "XNvEgE-RkCHYcsmrCn7ep",
          "language": "422",
          "code": "// Unprocessable Entity\n{\n  \"messages\": [\n    \"\"\n  ]\n}"
        }
      ],
      "selectedLanguageId": "varHuJOVWbt3AcSjoech5"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}