p202 conversion delete-subids

Delete the conversions of a list of subids, one per line (the UI's Delete Subids)

Web UIUpdate › Delete SubidsNew in 1.9.77Writescannot be staged
All commands

01Jobs it does

Each one is a real command line. Copy it, or open it in the builder below to change it.

Delete Subids

p202 conversion delete-subids <file|->
Web UIUpdate › Delete Subids

02What you get

Pick the shape you need. People get a table. Add --json, --csv or --ndjson for scripts, or -q for ids only. An AI agent gets compact JSON without asking. All output formats

03Build your command

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

p202 conversion delete-subids

Set flags below; the command updates as you type.

04Flags

2 flags, plus the global flags every command takes.

FlagWhat it does
--dry-runboolSay what each line would clear and write nothing
--force, -fboolDelete without asking

05How it works

The reverse of mark-subids: every live conversion of each subid's click is cleared through the ledger (soft-deleted, its revenue voided, the click's value recomputed), so the click is no longer a lead; the click itself stays. A subid of another account is left alone.

It reads the list first (--dry-run stops there), says how many conversions it would clear, and asks (--force skips). Lines are answered cleared (would_clear), not_found, not_a_subid or duplicate_in_list, with the file's line numbers. Running it twice is safe.

Needs a role with access_to_update_section AND delete_individual_subids, and a key with conversions:write. Cannot be staged. To clear a whole campaign, use reset-subids.

06For agents

Running this from an agent

  • Read the same facts as JSON: p202 commands conversion delete-subids --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 conversion delete-subids --json
{
  "path": "p202 conversion delete-subids",
  "use": "delete-subids <file|->",
  "short": "Delete the conversions of a list of subids, one per line (the UI's Delete Subids)",
  "long": "The reverse of mark-subids: every live conversion of each subid's click is cleared through\nthe ledger (soft-deleted, its revenue voided, the click's value recomputed), so the click\nis no longer a lead; the click itself stays. A subid of another account is left alone.\n\nIt reads the list first (--dry-run stops there), says how many conversions it would clear,\nand asks (--force skips). Lines are answered cleared (would_clear), not_found, not_a_subid\nor duplicate_in_list, with the file's line numbers. Running it twice is safe.\n\nNeeds a role with access_to_update_section AND delete_individual_subids, and a key with\nconversions:write. Cannot be staged. To clear a whole campaign, use reset-subids.",
  "runnable": true,
  "example": "p202 conversion delete-subids wrong-subids.txt --dry-run\n  p202 conversion delete-subids wrong-subids.txt --force --json",
  "tasks": [
    {
      "run": "p202 conversion delete-subids",
      "ui_pages": [
        "Update › Delete Subids"
      ]
    }
  ],
  "flags": [
    {
      "name": "dry-run",
      "type": "bool",
      "default": "false",
      "usage": "Say what each line would clear and write nothing",
      "required": false
    },
    {
      "name": "force",
      "shorthand": "f",
      "type": "bool",
      "default": "false",
      "usage": "Delete without asking",
      "required": false
    }
  ]
}