01Run it
Straight from the command's own help.
p202 campaign update <id from p202 campaign list> --aff-campaign-name <new value> --json02What 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 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
$ p202 campaign update 4 --aff-campaign-payout 360 --staged --json { "data": { "applied_at": null, "applied_by": null, "change_id": "chg_cd4a4cbac4dacbe0a75c049b", "created_at": "2026-10-09T10:03:19+00:00", "created_at_epoch": 1791540199, "created_by": 1, "discarded_at": null, "discarded_by": null, "expired": false, "expires_at_epoch": 1791626599, "last_error": null, "method": "PUT", "path": "/campaigns/4", "payload": { "aff_campaign_payout": "360" }, "preview": null, "resource_area": "campaigns", "status": "staged", "summary": "PUT /campaigns/4" }, "hint": "Apply with POST /staged-changes/chg_cd4a4cbac4dacbe0a75c049b/apply, or discard with POST /staged-changes/chg_cd4a4cbac4dacbe0a75c049b/discard. The write re-validates against current state when applied." }
03Build your command
Pick values and the command line writes itself, quoted and ready to paste.
p202 campaign updateSet flags below; the command updates as you type.
04Flags
16 flags, plus the global flags every command takes.
| Flag | What it does |
|---|---|
| --aff-campaign-cloakingstring | Enable cloaking (1) or not (0): 0, 101 |
| --aff-campaign-currencystring | Currency code (e.g. USD) |
| --aff-campaign-foreign-payoutstring | Foreign currency payout |
| --aff-campaign-namestring | Campaign name |
| --aff-campaign-payoutstring | Default payout |
| --aff-campaign-rotatestring | Enable rotation (1) or not (0): 0, 101 |
| --aff-campaign-urlstring | Primary offer URL |
| --aff-campaign-url-2string | Offer URL 2 (used with --aff-campaign-rotate 1) ("" clears it) |
| --aff-campaign-url-3string | Offer URL 3 ("" clears it) |
| --aff-campaign-url-4string | Offer URL 4 ("" clears it) |
| --aff-campaign-url-5string | Offer URL 5 ("" clears it) |
| --aff-network-idstring | Category (affiliate network) id, from p202 aff-network list |
| --app-registration-idstring | 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 |
| --attribution-model-idstring | The attribution model this campaign's conversions are credited with, overriding the account default (p202 attribution model list; 0 returns it to the default) |
| --identity-signalsstring | Link this campaign's clicks into multi-touch journeys (1, default) or not (0): 0, 101 |
| --payout-modestring | How conversions set a click's value, replace (latest payout, default) or accumulate (sum): replace, accumulatereplaceaccumulate |
05For agents
Running this from an agent
- Read the same facts as JSON:
p202 commands campaign update --json. - With
AI_AGENT,CLAUDECODEor another agent variable set, output is compact JSON and errors arrive on stderr as a JSON envelope with ahint. - Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure.
- This command writes. Add
--stagedto record it as a proposal a person applies withp202 change apply.
{
"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
}
]
}