01Run it
Replace the <placeholders> with your own values, or use the builder below.
p202 campaign clone <id>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 clone 1 aff_campaign_cloaking: 0 aff_campaign_currency: USD aff_campaign_foreign_payout: 0 aff_campaign_id: 9 aff_campaign_id_public: 498 aff_campaign_name: Spring Collection / US (Clone) aff_campaign_payout: 86 aff_campaign_rotate: 0 aff_campaign_url: https://example.com/shop/spring-collection aff_campaign_url_2: aff_campaign_url_3: aff_campaign_url_4: aff_campaign_url_5: aff_network_id: 1 app_registration_id: attribution_model_id: etag: "1a65a5cda0e358601662c8bcf870d6a1633deb56" identity_signals: 1 payout_mode: replace user_id: 1 version: 1a65a5cda0e358601662c8bcf870d6a1633deb56
03Build your command
Pick values and the command line writes itself, quoted and ready to paste.
p202 campaign cloneSet flags below; the command updates as you type.
04Flags
2 flags, plus the global flags every command takes.
| Flag | What it does |
|---|---|
| --idempotency-keystring | Retry-safe create: the server records the response under this key and replays it on a retry with the same key and payload instead of creating a duplicate |
| --namestring | Optional name override for the cloned campaign |
05For agents
Running this from an agent
- Read the same facts as JSON:
p202 commands campaign clone --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 clone",
"use": "clone <id>",
"short": "Clone a campaign",
"runnable": true,
"flags": [
{
"name": "idempotency-key",
"type": "string",
"default": "",
"usage": "Retry-safe create: the server records the response under this key and replays it on a retry with the same key and payload instead of creating a duplicate",
"required": false
},
{
"name": "name",
"type": "string",
"default": "",
"usage": "Optional name override for the cloned campaign",
"required": false
}
]
}