p202 campaign update

Update a campaign

Writessupports --staged
All commands

01Run it

Straight from the command's own help.

p202 campaign update <id from p202 campaign list> --aff-campaign-name <new value> --json

02What you get

Captured from the real binary, run against a demo store with 30 days of traffic. Switch tabs to see the same run as JSON, the shape scripts and agents parse.

p202 campaign update 4 --aff-campaign-payout 360 --staged
$ p202 campaign update 4 --aff-campaign-payout 360 --staged
applied_at:        
applied_by:        
change_id:         chg_4cb6d3d594b96e85bacb3dbb
created_at:        2026-10-09T10:03:19+00:00
created_at_epoch:  1791540199
created_by:        1
discarded_at:      
discarded_by:      
expired:           false
expires_at_epoch:  1791626599
last_error:        
method:            PUT
path:              /campaigns/4
payload:           {"aff_campaign_payout":"360"}
preview:           
resource_area:     campaigns
status:            staged
summary:           PUT /campaigns/4
Real output · p202 1.9.77 · demo dataexit 0

03Build your command

Pick values and the command line writes itself, quoted and ready to paste.

p202 campaign update

Set flags below; the command updates as you type.

04Flags

16 flags, plus the global flags every command takes.

FlagWhat it does
--aff-campaign-cloakingstringEnable cloaking (1) or not (0): 0, 1
01
--aff-campaign-currencystringCurrency code (e.g. USD)
--aff-campaign-foreign-payoutstringForeign currency payout
--aff-campaign-namestringCampaign name
--aff-campaign-payoutstringDefault payout
--aff-campaign-rotatestringEnable rotation (1) or not (0): 0, 1
01
--aff-campaign-urlstringPrimary offer URL
--aff-campaign-url-2stringOffer URL 2 (used with --aff-campaign-rotate 1) ("" clears it)
--aff-campaign-url-3stringOffer URL 3 ("" clears it)
--aff-campaign-url-4stringOffer URL 4 ("" clears it)
--aff-campaign-url-5stringOffer URL 5 ("" clears it)
--aff-network-idstringCategory (affiliate network) id, from p202 aff-network list
--app-registration-idstringThe Android app registration this campaign's store links install (p202 app list --platform android; 0 unlinks). An install of another app on its click is foreign_click
--attribution-model-idstringThe attribution model this campaign's conversions are credited with, overriding the account default (p202 attribution model list; 0 returns it to the default)
--identity-signalsstringLink this campaign's clicks into multi-touch journeys (1, default) or not (0): 0, 1
01
--payout-modestringHow conversions set a click's value, replace (latest payout, default) or accumulate (sum): replace, accumulate
replaceaccumulate

05For agents

Running this from an agent

  • Read the same facts as JSON: p202 commands campaign update --json.
  • With AI_AGENT, CLAUDECODE or another agent variable set, output is compact JSON and errors arrive on stderr as a JSON envelope with a hint.
  • Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure.
  • This command writes. Add --staged to record it as a proposal a person applies with p202 change apply.
p202 commands campaign update --json
{
  "path": "p202 campaign update",
  "use": "update <id>",
  "short": "Update a campaign",
  "runnable": true,
  "example": "p202 campaign update <id from p202 campaign list> --aff-campaign-name <new value> --json\n  (only the flags given are sent; the rest of the campaign is unchanged)",
  "flags": [
    {
      "name": "aff-campaign-cloaking",
      "type": "string",
      "default": "",
      "usage": "Enable cloaking (1) or not (0): 0, 1",
      "allowed_values": [
        "0",
        "1"
      ],
      "required": false
    },
    {
      "name": "aff-campaign-currency",
      "type": "string",
      "default": "",
      "usage": "Currency code (e.g. USD)",
      "required": false
    },
    {
      "name": "aff-campaign-foreign-payout",
      "type": "string",
      "default": "",
      "usage": "Foreign currency payout",
      "required": false
    },
    {
      "name": "aff-campaign-name",
      "type": "string",
      "default": "",
      "usage": "Campaign name",
      "required": false
    },
    {
      "name": "aff-campaign-payout",
      "type": "string",
      "default": "",
      "usage": "Default payout",
      "required": false
    },
    {
      "name": "aff-campaign-rotate",
      "type": "string",
      "default": "",
      "usage": "Enable rotation (1) or not (0): 0, 1",
      "allowed_values": [
        "0",
        "1"
      ],
      "required": false
    },
    {
      "name": "aff-campaign-url",
      "type": "string",
      "default": "",
      "usage": "Primary offer URL",
      "required": false
    },
    {
      "name": "aff-campaign-url-2",
      "type": "string",
      "default": "",
      "usage": "Offer URL 2 (used with --aff-campaign-rotate 1) (\"\" clears it)",
      "required": false
    },
    {
      "name": "aff-campaign-url-3",
      "type": "string",
      "default": "",
      "usage": "Offer URL 3 (\"\" clears it)",
      "required": false
    },
    {
      "name": "aff-campaign-url-4",
      "type": "string",
      "default": "",
      "usage": "Offer URL 4 (\"\" clears it)",
      "required": false
    },
    {
      "name": "aff-campaign-url-5",
      "type": "string",
      "default": "",
      "usage": "Offer URL 5 (\"\" clears it)",
      "required": false
    },
    {
      "name": "aff-network-id",
      "type": "string",
      "default": "",
      "usage": "Category (affiliate network) id, from `p202 aff-network list`",
      "required": false
    },
    {
      "name": "app-registration-id",
      "type": "string",
      "default": "",
      "usage": "The Android app registration this campaign's store links install (`p202 app list --platform android`; 0 unlinks). An install of another app on its click is foreign_click",
      "required": false
    },
    {
      "name": "attribution-model-id",
      "type": "string",
      "default": "",
      "usage": "The attribution model this campaign's conversions are credited with, overriding the account default (`p202 attribution model list`; 0 returns it to the default)",
      "required": false
    },
    {
      "name": "identity-signals",
      "type": "string",
      "default": "",
      "usage": "Link this campaign's clicks into multi-touch journeys (1, default) or not (0): 0, 1",
      "allowed_values": [
        "0",
        "1"
      ],
      "required": false
    },
    {
      "name": "payout-mode",
      "type": "string",
      "default": "",
      "usage": "How conversions set a click's value, replace (latest payout, default) or accumulate (sum): replace, accumulate",
      "allowed_values": [
        "replace",
        "accumulate"
      ],
      "required": false
    }
  ]
}