p202 ppc-account create

Create a new ppc-account

Writessupports --staged
All commands

01Run it

Straight from the command's own help.

p202 ppc-account create --ppc-account-name <account_name> --ppc-network-id <id from p202 ppc-network list> --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 ppc-account create --ppc-account-name "Social Ads - Prospecting" --ppc-network-id 2
$ p202 ppc-account create --ppc-account-name "Social Ads - Prospecting" --ppc-network-id 2
etag:                 "5f968880c3d7993197371b15cdddff1b76e64a23"
ppc_account_default:  0
ppc_account_id:       7
ppc_account_name:     Social Ads - Prospecting
ppc_network_id:       2
user_id:              1
version:              5f968880c3d7993197371b15cdddff1b76e64a23
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 ppc-account create

Set flags below; the command updates as you type.

04Flags

4 flags, plus the global flags every command takes.

FlagWhat it does
--idempotency-keystringRetry-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
--ppc-account-defaultstringSet as default account (1) or not (0): 0, 1
01
--ppc-account-namestringrequiredAccount name (required)
--ppc-network-idstringrequiredPPC network ID (from p202 ppc-network list) (required)

05For agents

Running this from an agent

  • Read the same facts as JSON: p202 commands ppc-account create --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 ppc-account create --json
{
  "path": "p202 ppc-account create",
  "use": "create",
  "short": "Create a new ppc-account",
  "runnable": true,
  "example": "p202 ppc-account create --ppc-account-name <account_name> --ppc-network-id <id from p202 ppc-network list> --json",
  "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": "ppc-account-default",
      "type": "string",
      "default": "",
      "usage": "Set as default account (1) or not (0): 0, 1",
      "allowed_values": [
        "0",
        "1"
      ],
      "required": false
    },
    {
      "name": "ppc-account-name",
      "type": "string",
      "default": "",
      "usage": "Account name (required)",
      "required": true
    },
    {
      "name": "ppc-network-id",
      "type": "string",
      "default": "",
      "usage": "PPC network ID (from `p202 ppc-network list`) (required)",
      "required": true
    }
  ]
}