p202 change apply

Apply a staged change (performs the recorded write)

Writescannot be staged
All commands

01Run it

Replace the <placeholders> with your own values, or use the builder below.

p202 change apply <change_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 change apply chg_cd4a4cbac4dacbe0a75c049b --force
$ p202 change apply chg_cd4a4cbac4dacbe0a75c049b --force
change:  {"applied_at":"2026-10-09T10:03:19+00:00","applied_by":1,"applying_since":1791540199,"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":"applied","summary":"PUT /campaigns/4"}
result:  {"aff_campaign_cloaking":0,"aff_campaign_currency":"USD","aff_campaign_foreign_payout":0,"aff_campaign_id":4,"aff_campaign_id_public":946,"aff_campaign_name":"Project Tool Pro Annual / US","aff_campaign_payout":360,"aff_campaign_rotate":0,"aff_campaign_url":"https://app.example.com/pricing/pro-annual","aff_campaign_url_2":null,"aff_campaign_url_3":null,"aff_campaign_url_4":null,"aff_campaign_url_5":null,"aff_network_id":2,"app_registration_id":null,"attribution_model_id":null,"etag":"\"2821c6a14a4a74b0978217897b5d697903f368ff\"","identity_signals":1,"payout_mode":"replace","user_id":1,"version":"2821c6a14a4a74b0978217897b5d697903f368ff"}
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 change apply

Set flags below; the command updates as you type.

04Flags

1 flag, plus the global flags every command takes.

FlagWhat it does
--force, -fboolSkip confirmation prompt

05How it works

Apply a staged change. This performs the recorded write, re-validated on the server against current state and this key's authorization — a propose-only (stage-scoped) key cannot apply; the applier needs the write scope for the area the change touches. Running apply IS the approval, so it confirms interactively unless --force is passed.

06For agents

Running this from an agent

  • Read the same facts as JSON: p202 commands change apply --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 and cannot be staged: --staged is refused before anything is sent. Have a person run it, or give the agent a key without write scope.
p202 commands change apply --json
{
  "path": "p202 change apply",
  "use": "apply <change_id>",
  "short": "Apply a staged change (performs the recorded write)",
  "long": "Apply a staged change. This performs the recorded write, re-validated on the\nserver against current state and this key's authorization — a propose-only\n(`stage`-scoped) key cannot apply; the applier needs the write scope for the\narea the change touches. Running apply IS the approval, so it confirms\ninteractively unless --force is passed.",
  "runnable": true,
  "flags": [
    {
      "name": "force",
      "shorthand": "f",
      "type": "bool",
      "default": "false",
      "usage": "Skip confirmation prompt",
      "required": false
    }
  ]
}