Skip to content
pdcli
Get started

Command reference

All 154 commands in pdcli v0.22.0. Every command also accepts the global flags --output, --jq, --fields, --resolve-fields, --profile, --no-color, --verbose, --no-retry, --timeout, and --limit. Run pdcli <command> --help for the live version.

Make a raw API request (host-locked to your Pipedrive company domain)

pdcli api <method> <path> [flags]

| Flag | Description | | --- | --- | | --body <value> | Request body (JSON string, @file, or pipe stdin) | | --paginate | Follow pagination and collect every page into one array (GET only; pager inferred from the /api/v1/ or /api/v2/ path). Note: —jq then sees the bare concatenated item array (filter with .[]), whereas without —paginate it sees the full envelope (.data[]). |

Terminal window
pdcli api GET /api/v2/deals
pdcli api GET /api/v1/currencies
pdcli api POST /api/v2/deals --body '{"title":"New deal"}'
pdcli api DELETE /api/v1/webhooks/1

Data-quality audit: stale deals, missing fields, duplicates, overdue pileups

pdcli audit [flags]

| Flag | Description | | --- | --- | | --checks <value> | Comma-separated subset of checks (stale-deals, no-next-activity, past-close-date, missing-fields, ancient-deals, missing-close-time, duplicate-persons, uncontactable-persons, duplicate-orgs, overdue-activities, currency-missing) | | --strict | Exit 1 when any must-severity check has findings |

Terminal window
pdcli audit
pdcli audit --checks stale-deals,duplicate-persons --verbose
pdcli audit --strict # exit 1 on must-severity findings (CI)

Export the whole account to a JSON tree (resumable, one file per resource)

pdcli backup [flags]

| Flag | Description | | --- | --- | | --dir <value> | Target directory for the export | | --resume | Skip resources already completed in a previous run |

Terminal window
pdcli backup
pdcli backup --dir ./my-backup
pdcli backup --dir ./my-backup --resume

Incremental change feed across deals/persons/orgs/activities/products. Self-advancing watermark: each run resumes where the last left off and advances it past the newest change only after a successful emit, so a failed run replays rather than skips (use —peek to read without advancing).

pdcli changes [flags]

| Flag | Description | | --- | --- | | --since <value> | Start point: RFC3339 timestamp or Nd/Nm. Omit to resume from the stored watermark. | | --peek | Read without advancing the stored watermark |

Terminal window
pdcli changes --since 7d
pdcli changes
pdcli changes --peek --output json

Monday packet: one pipeline-scoped fetch fanned into velocity, health, coverage, funnel, forecast and hygiene. —deep adds changelog-mined aging/slippage/stage-skips; —format md|html (+ —out) writes a shareable artifact for cron → Slack/email.

pdcli digest [flags]

| Flag | Description | | --- | --- | | --pipeline <value> | Pipeline ID (required when the account has several) | | --period <value> | Trailing window for closed deals / the goal (Nd or Nm) | | --target <value> | Manual revenue quota override (skips the Goals API) | | --commit-threshold <value> | Min effective win-probability (%) counted toward commit | | --deep | Mine each deal’s changelog to add aging/slippage/stage-skips (one request per deal; warns over 100) | | --format <md|html> | Render the packet as a shareable artifact | | --out <value> | Write the —format artifact to this file instead of stdout |

Terminal window
pdcli digest
pdcli digest --pipeline 1 --output json
pdcli digest --deep
pdcli digest --format md --out monday.md

Run diagnostic checks on the CLI environment. Exits 78 (EX_CONFIG) when any check fails. —offline skips the network probe — the CI preflight mode.

pdcli doctor [flags]

| Flag | Description | | --- | --- | | --offline | Skip the API reachability probe (CI preflight mode; zero network egress) |

Terminal window
pdcli doctor
pdcli doctor --offline
pdcli doctor --output json

Stage-to-stage conversion approximated from closed deals (final stage reached)

pdcli funnel [flags]

| Flag | Description | | --- | --- | | --period <value> | Trailing window for closed deals (Nd or Nm) | | --pipeline <value> | Pipeline ID (required when the account has several) | | --exact | Mine real stage transitions from each deal’s changelog instead of approximating from the final stage (one request per deal). —period scopes only closed (won/lost) deals; open deals are always included. |

Terminal window
pdcli funnel
pdcli funnel --pipeline 1 --period 180d

Find item IDs by an exact field value — the create-vs-update primitive.

pdcli lookup <entity> [flags]

| Flag | Description | | --- | --- | | --field <value> | Field name (built-in or custom) to search on | | --value <value> | Value to match against the field | | --match <exact|beginning|middle> | Match mode (case-sensitive) | | --first | Return only the first match (a single object) |

Terminal window
pdcli lookup deal --field "PO Number" --value PO-1234
pdcli lookup person --field Email --value a@b.com --first --jq .id
pdcli lookup org --field Name --value Acme --match beginning

Show the remaining Pipedrive daily API token budget. Makes one cheap probe request purely to read the rate-limit headers. The budget is COMPANY-WIDE — shared across every integration and user on the account — so treat the reading as a hint, not a guarantee. —min / —threshold gate CI: they exit 75 (rate-limited) when the budget is too low.

pdcli quota [flags]

| Flag | Description | | --- | --- | | --min <value> | Exit 75 if the remaining daily token budget is below this many tokens | | --threshold <value> | Exit 75 if the remaining daily token budget is below this percentage |

Terminal window
pdcli quota
pdcli quota --output json
pdcli quota --min 5000
pdcli quota --threshold 10

Search across deals, persons, organizations, products, leads, files, and projects

pdcli search <term> [flags]

| Flag | Description | | --- | --- | | --item-types <value> | Comma-separated item types (deal,person,organization,product,lead,file,mail_attachment,project) | | --exact | Exact match (allows 1-character terms) | | --status <open|won|lost> | Filter by deal status (only with —item-types deal) | | --person <value> | Filter by person ID (only with —item-types deal) | | --org <value> | Filter by organization ID (only with —item-types deal) |

Terminal window
pdcli search "acme"
pdcli search "acme" --item-types deal,person --output json
pdcli search "acme" --item-types deal --status open

Show CLI version and environment info

pdcli version [flags]
Terminal window
pdcli version

Anomaly poller: run the hygiene checks and emit only findings that are NEW since the last run, advancing a per-profile state. Exits 8 when new findings arm the gate (default: must-severity) so cron can branch — pdcli watch \|\| notify. —peek reads without advancing state.

pdcli watch [flags]

| Flag | Description | | --- | --- | | --checks <value> | Comma-separated subset of checks (stale-deals, no-next-activity, past-close-date, missing-fields, ancient-deals, missing-close-time, duplicate-persons, uncontactable-persons, duplicate-orgs, overdue-activities, currency-missing) | | --severity <must|should|all> | Which severities arm the exit-8 gate | | --peek | Emit and gate without advancing the stored state |

Terminal window
pdcli watch
pdcli watch --checks stale-deals,past-close-date
pdcli watch --severity all --output json
pdcli watch --peek

Create an activity

pdcli activity create [flags]

| Flag | Description | | --- | --- | | --subject <value> | Activity subject | | --type <value> | Activity type | | --due-date <value> | Due date (YYYY-MM-DD) | | --due-time <value> | Due time (HH:MM) | | --duration <value> | Duration (HH:MM) | | --deal <value> | Linked deal ID | | --person <value> | Linked person ID | | --org <value> | Linked organization ID | | --owner <value> | Owner (user) ID | | --note <value> | Activity note | | --done | Mark the activity as done | | --field <value> | Custom/standard field as “Name=Value” (repeatable) | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli activity create --subject "Demo call" --type call --due-date 2026-06-10
pdcli activity create --subject "Follow up" --field "Outcome=Positive"
pdcli activity create --subject "Raw" --body '{"priority":5}'

Delete an activity

pdcli activity delete <id> [flags]

| Flag | Description | | --- | --- | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli activity delete 9
pdcli activity delete 9 --yes

Get an activity by ID

pdcli activity get <id> [flags]
Terminal window
pdcli activity get 9
pdcli activity get 9 --output json

List activities

pdcli activity list [flags]

| Flag | Description | | --- | --- | | --owner <value> | Filter by owner (user) ID | | --deal <value> | Filter by deal ID | | --person <value> | Filter by person ID | | --org <value> | Filter by organization ID | | --type <value> | Filter by activity type key (applied client-side) | | --done | Only completed activities | | --todo | Only open (not done) activities | | --filter <value> | Filter by saved filter ID | | --ids <value> | Comma-separated IDs to fetch (max 100) | | --sort-by <id|update_time|add_time|due_date> | Sort field | | --sort-direction <asc|desc> | Sort direction | | --updated-since <value> | Only items updated at/after this RFC3339 time (no fractional seconds) | | --updated-until <value> | Only items updated before this RFC3339 time (no fractional seconds) |

Terminal window
pdcli activity list
pdcli activity list --todo --deal 42
pdcli activity list --type call --output json

List activity types. The Key (key_string) is what activity --type takes.

pdcli activity type list [flags]
Terminal window
pdcli activity type list
pdcli activity type list --output json

Update an activity (v2 PATCH — only provided fields change)

pdcli activity update <id> [flags]

| Flag | Description | | --- | --- | | --subject <value> | Activity subject | | --type <value> | Activity type | | --due-date <value> | Due date (YYYY-MM-DD) | | --due-time <value> | Due time (HH:MM) | | --duration <value> | Duration (HH:MM) | | --deal <value> | Linked deal ID | | --person <value> | Linked person ID | | --org <value> | Linked organization ID | | --owner <value> | Owner (user) ID | | --note <value> | Activity note | | --done | Mark the activity as done | | --undone | Mark the activity as not done | | --field <value> | Custom/standard field as “Name=Value” (repeatable) | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli activity update 9 --subject "Renamed"
pdcli activity update 9 --done
pdcli activity update 9 --field "Outcome=Positive"

List all configured aliases

pdcli alias list [flags]
Terminal window
pdcli alias list

Create or update an alias

pdcli alias set <name> <command> [flags]
Terminal window
pdcli alias set wd "deal list --status won"
pdcli alias set open "deal list --status open --limit 50"

Remove an alias

pdcli alias unset <name> [flags]
Terminal window
pdcli alias unset wd

Stage-skip & sandbagging audit: deals that jumped gates or were pulled backward, mined from each deal’s changelog (one request per deal)

pdcli audit stage-skips [flags]

| Flag | Description | | --- | --- | | --pipeline <value> | Pipeline ID (required when the account has several) |

Terminal window
pdcli audit stage-skips
pdcli audit stage-skips --pipeline 1 --output json

Authenticate with Pipedrive (personal API token, or OAuth with —oauth)

pdcli auth login [flags]

| Flag | Description | | --- | --- | | --company <value> | Company domain (“acme” from acme.pipedrive.com — full URL accepted) | | --api-token <value> | Personal API token (app.pipedrive.com/settings/api). Prefer the prompt or env so the token stays out of shell history | | --oauth | Use OAuth 2.0 via your own Developer Hub app (browser flow) | | --client-id <value> | OAuth app client ID (—oauth; env PDCLI_CLIENT_ID) | | --client-secret <value> | OAuth app client secret (—oauth; env PDCLI_CLIENT_SECRET) | | --port <value> | OAuth callback port — must match the app’s registered callback URL (—oauth) |

Terminal window
pdcli auth login
pdcli auth login --company acme --api-token <token>
pdcli auth login --oauth
pdcli auth login --oauth --client-id <id> --client-secret <secret>

Log out and remove the stored API token

pdcli auth logout [flags]
Terminal window
pdcli auth logout

Show current authentication status

pdcli auth status [flags]
Terminal window
pdcli auth status

Field-level diff between two backup snapshots — added/removed/modified records and per-field changes, computed locally with no API calls

pdcli backup diff <a> <b> [flags]

| Flag | Description | | --- | --- | | --raw | Do not resolve custom-field names/option labels (show raw hash keys/ids) |

Terminal window
pdcli backup diff ./backup-mon ./backup-tue
pdcli backup diff ./old ./new --output json
pdcli backup diff ./old ./new --raw

Get a config value for the active profile

pdcli config get <key> [flags]
Terminal window
pdcli config get company_domain
pdcli config get default_output

List all config for the active profile

pdcli config list [flags]
Terminal window
pdcli config list

Set a config value for the active profile

pdcli config set <key> <value> [flags]
Terminal window
pdcli config set company_domain acme
pdcli config set default_output json

Remove a config key from the active profile

pdcli config unset <key> [flags]
Terminal window
pdcli config unset default_output

Update many deals at once (by —ids, a saved —filter, or ids piped on stdin)

pdcli deal bulk-update [flags]

| Flag | Description | | --- | --- | | --ids <value> | Comma-separated deal IDs | | --filter <value> | Pipedrive saved filter ID to select deals | | --stage <value> | Move to stage ID | | --pipeline <value> | Move to pipeline ID | | --status <open|won|lost> | Set status | | --owner <value> | Assign owner (user) ID | | --field <value> | Custom/standard field as “Name=Value” (repeatable) | | --body <value> | Raw JSON body to merge (flags win) | | --dry-run | List the targets without updating anything | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli deal bulk-update --ids 1,2,3 --stage 5
pdcli deal bulk-update --filter 9 --status won
pdcli deal list --status open --jq '.[].id' | pdcli deal bulk-update --owner 42
pdcli deal bulk-update --filter 9 --stage 5 --dry-run

One-call denormalized deal bundle — deal + person + org + activities + notes + products + participants, custom fields resolved to names and risk flags derived. Prompt-ready for agents (the joins v2 will not do).

pdcli deal context <id> [flags]

| Flag | Description | | --- | --- | | --no-activities | Skip the activities slice | | --no-notes | Skip the notes slice | | --no-products | Skip the products slice | | --no-participants | Skip the participants slice | | --mail | Include a mail summary (off by default; needs the mail:read scope and email sync) | | --mail-limit <value> | Max mail messages to scan for the summary | | --activity-limit <value> | Max activities to include | | --note-limit <value> | Max notes to include |

Terminal window
pdcli deal context 42
pdcli deal context 42 --no-notes --no-products
pdcli deal context 42 --output json

Convert a deal to a lead. The conversion runs as an async job; use —wait to poll until it finishes. WARNING: on success the source deal is deleted.

pdcli deal convert <id> [flags]

| Flag | Description | | --- | --- | | --wait | Poll the conversion status until it finishes | | --timeout-secs <value> | Max seconds to poll when —wait is set | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli deal convert 42
pdcli deal convert 42 --yes
pdcli deal convert 42 --wait

Create a deal

pdcli deal create [flags]

| Flag | Description | | --- | --- | | --title <value> | Deal title | | --value <value> | Deal value | | --currency <value> | Deal currency (e.g. EUR) | | --status <open|won|lost> | Deal status | | --stage <value> | Stage ID | | --pipeline <value> | Pipeline ID | | --person <value> | Linked person ID | | --org <value> | Linked organization ID | | --owner <value> | Owner (user) ID | | --probability <value> | Success probability (0-100) | | --expected-close-date <value> | Expected close date (YYYY-MM-DD) | | --field <value> | Custom/standard field as “Name=Value” (repeatable) | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli deal create --title "Acme renewal" --value 5000 --currency EUR
pdcli deal create --title "Sized" --field "Deal Size=Large"
pdcli deal create --title "Raw" --body '{"probability":75}'

Delete a deal

pdcli deal delete <id> [flags]

| Flag | Description | | --- | --- | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli deal delete 42
pdcli deal delete 42 --yes

Add a follower (user) to a deal

pdcli deal follower add <id> [flags]

| Flag | Description | | --- | --- | | --user <value> | User ID |

Terminal window
pdcli deal follower add 42 --user 5
pdcli deal follower add 42 --user 5 --output json

List followers of a deal

pdcli deal follower list <id> [flags]
Terminal window
pdcli deal follower list 42
pdcli deal follower list 42 --output json

Remove a follower from a deal

pdcli deal follower remove <id> [flags]

| Flag | Description | | --- | --- | | --user <value> | User ID | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli deal follower remove 42 --user 5
pdcli deal follower remove 42 --user 5 --yes

Get a deal by ID

pdcli deal get <id> [flags]
Terminal window
pdcli deal get 42
pdcli deal get 42 --output json

Field-change history for a deal, newest-first (the API’s native order)

pdcli deal history <id> [flags]

| Flag | Description | | --- | --- | | --field <value> | Show only changes to this field key (e.g. stage_id) |

Terminal window
pdcli deal history 42
pdcli deal history 42 --field stage_id
pdcli deal history 42 --limit 20 --resolve-fields

List deals

pdcli deal list [flags]

| Flag | Description | | --- | --- | | --archived | List archived deals instead of active ones | | --status <open|won|lost|deleted> | Filter by status | | --stage <value> | Filter by stage ID | | --pipeline <value> | Filter by pipeline ID | | --owner <value> | Filter by owner (user) ID | | --person <value> | Filter by person ID | | --org <value> | Filter by organization ID | | --filter <value> | Filter by saved filter ID | | --ids <value> | Comma-separated IDs to fetch (max 100) | | --sort-by <id|update_time|add_time> | Sort field | | --sort-direction <asc|desc> | Sort direction | | --updated-since <value> | Only items updated at/after this RFC3339 time (no fractional seconds) | | --updated-until <value> | Only items updated before this RFC3339 time (no fractional seconds) |

Terminal window
pdcli deal list
pdcli deal list --status won --limit 50
pdcli deal list --stage 3 --output json

Add a participant (person) to a deal

pdcli deal participant add <id> [flags]

| Flag | Description | | --- | --- | | --person <value> | Person ID |

Terminal window
pdcli deal participant add 42 --person 10
pdcli deal participant add 42 --person 10 --output json

List participants of a deal

pdcli deal participant list <id> [flags]
Terminal window
pdcli deal participant list 42
pdcli deal participant list 42 --output json

Remove a participant from a deal

pdcli deal participant remove <id> [flags]

| Flag | Description | | --- | --- | | --participant <value> | Deal-participant ID | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli deal participant remove 42 --participant 3
pdcli deal participant remove 42 --participant 3 --yes

Attach a product to a deal

pdcli deal product add <id> [flags]

| Flag | Description | | --- | --- | | --product <value> | Product ID | | --price <value> | Item price (per unit) | | --quantity <value> | Quantity | | --discount <value> | Discount value | | --discount-type <percentage|amount> | Discount type | | --tax <value> | Product tax percentage | | --comments <value> | Comments |

Terminal window
pdcli deal product add 42 --product 10 --price 90
pdcli deal product add 42 --product 10 --price 90 --quantity 3
pdcli deal product add 42 --product 10 --price 90 --discount 10 --discount-type percentage

List products attached to a deal

pdcli deal product list <id> [flags]

| Flag | Description | | --- | --- | | --sort-by <id|add_time|update_time|order_nr> | Field to sort by | | --sort-direction <asc|desc> | Sort direction |

Terminal window
pdcli deal product list 42
pdcli deal product list 42 --sort-by add_time --sort-direction desc
pdcli deal product list 42 --output json

Remove a product attached to a deal

pdcli deal product remove <id> [flags]

| Flag | Description | | --- | --- | | --attachment <value> | Deal-product (attachment) ID | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli deal product remove 42 --attachment 3
pdcli deal product remove 42 --attachment 3 --yes

Update a product attached to a deal (v2 PATCH — only provided fields change)

pdcli deal product update <id> [flags]

| Flag | Description | | --- | --- | | --attachment <value> | Deal-product (attachment) ID | | --product <value> | Product ID | | --price <value> | Item price (per unit) | | --quantity <value> | Quantity | | --discount <value> | Discount value | | --discount-type <percentage|amount> | Discount type | | --tax <value> | Product tax percentage | | --comments <value> | Comments |

Terminal window
pdcli deal product update 42 --attachment 3 --quantity 5
pdcli deal product update 42 --attachment 3 --price 120
pdcli deal product update 42 --attachment 3 --discount 15 --discount-type amount

Summary of open/won/lost deals, totalled per currency

pdcli deal summary [flags]

| Flag | Description | | --- | --- | | --status <open|won|lost> | Filter by status | | --pipeline <value> | Filter by pipeline ID | | --stage <value> | Filter by stage ID | | --filter <value> | Filter by saved filter ID |

Terminal window
pdcli deal summary
pdcli deal summary --status open --pipeline 1
pdcli deal summary --output json

Update a deal (v2 PATCH — only provided fields change)

pdcli deal update <id> [flags]

| Flag | Description | | --- | --- | | --title <value> | Deal title | | --value <value> | Deal value | | --currency <value> | Deal currency (e.g. EUR) | | --status <open|won|lost> | Deal status | | --stage <value> | Stage ID | | --pipeline <value> | Pipeline ID | | --person <value> | Linked person ID | | --org <value> | Linked organization ID | | --owner <value> | Owner (user) ID | | --probability <value> | Success probability (0-100) | | --expected-close-date <value> | Expected close date (YYYY-MM-DD) | | --field <value> | Custom/standard field as “Name=Value” (repeatable) | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli deal update 42 --stage 5
pdcli deal update 42 --status won
pdcli deal update 42 --field "Deal Size=Large"

Idempotent deal upsert: match by —by, then create or PATCH only the changed fields. Refuses (exit 65) if more than one record matches.

pdcli deal upsert <value> [flags]

| Flag | Description | | --- | --- | | --by <value> | Match field: title, or a searchable custom field | | --field <value> | Field to set as “Name=Value” (repeatable) | | --body <value> | Raw JSON body to merge | | --dry-run | Preview the action without writing |

Terminal window
pdcli deal upsert "Acme expansion" --by title --field "Stage=Won"
pdcli deal upsert "D-42" --by "External ID" --body '{"value":5000}'
pdcli deal upsert "Acme expansion" --by title --field "Stage=Won" --dry-run

Create a custom field on an entity

pdcli field create <entity> [flags]

| Flag | Description | | --- | --- | | --name <value> | Field name (label) | | --type <value> | Field type (e.g. varchar, double, monetary, enum, set) | | --options <value> | Comma-separated option labels (required for enum/set) |

Terminal window
pdcli field create deal --name "Budget" --type double
pdcli field create person --name "Tier" --type enum --options "Gold,Silver,Bronze"

Delete a custom field (data stored on records is lost)

pdcli field delete <entity> <field> [flags]

| Flag | Description | | --- | --- | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli field delete deal dcf558aac1ae4e8c4f849ba5e668430d8df9be12
pdcli field delete deal dcf558aac1ae4e8c4f849ba5e668430d8df9be12 --yes

Show one field by human name or hashed key

pdcli field get <entity> <field> [flags]
Terminal window
pdcli field get deal "Deal Size"
pdcli field get deal dcf558aac1ae4e8c4f849ba5e668430d8df9be12

List fields for an entity, including custom-field hash keys

pdcli field list <entity> [flags]
Terminal window
pdcli field list deal
pdcli field list person --output json

Add an option to an enum/set custom field

pdcli field option add <entity> <field> [flags]

| Flag | Description | | --- | --- | | --label <value> | Label for the new option |

Terminal window
pdcli field option add deal dcf558aac1ae4e8c4f849ba5e668430d8df9be12 --label "Critical"

Remove an option from an enum/set custom field (records lose the value)

pdcli field option remove <entity> <field> [flags]

| Flag | Description | | --- | --- | | --option <value> | Option ID to remove (see field get) | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli field option remove deal dcf558aac1ae4e8c4f849ba5e668430d8df9be12 --option 4

Update a custom field (field_code and field_type cannot change)

pdcli field update <entity> <field> [flags]

| Flag | Description | | --- | --- | | --name <value> | New field name (label) |

Terminal window
pdcli field update deal dcf558aac1ae4e8c4f849ba5e668430d8df9be12 --name "New name"

Delete a file

pdcli file delete <id> [flags]

| Flag | Description | | --- | --- | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli file delete 5
pdcli file delete 5 --yes

Download a file by ID

pdcli file download <id> [flags]

| Flag | Description | | --- | --- | | --out <value> | Path to write to (default: file name) |

Terminal window
pdcli file download 5
pdcli file download 5 --out ./report.pdf

Get a file by ID

pdcli file get <id> [flags]
Terminal window
pdcli file get 5
pdcli file get 5 --output json

List files

pdcli file list [flags]
Terminal window
pdcli file list
pdcli file list --limit 50 --output json

Link an existing remote file (Google Drive) to an item

pdcli file remote-link [flags]

| Flag | Description | | --- | --- | | --deal <value> | Link to a deal ID | | --org <value> | Link to an organization ID | | --person <value> | Link to a person ID | | --remote-id <value> | ID of the remote file (e.g. Google Drive file ID) | | --remote-location <googledrive> | Remote storage location |

Terminal window
pdcli file remote-link --deal 42 --remote-id 1AbC
pdcli file remote-link --person 9 --remote-id 1AbC --output json

Update a file name and/or description

pdcli file update <id> [flags]

| Flag | Description | | --- | --- | | --name <value> | The visible name of the file | | --description <value> | The description of the file |

Terminal window
pdcli file update 5 --name report.pdf
pdcli file update 5 --description "Signed contract"

Upload a file

pdcli file upload <path> [flags]

| Flag | Description | | --- | --- | | --deal <value> | Associate with a deal ID | | --person <value> | Associate with a person ID | | --org <value> | Associate with an organization ID |

Terminal window
pdcli file upload ./report.pdf
pdcli file upload ./report.pdf --deal 42

Create a filter

pdcli filter create [flags]

| Flag | Description | | --- | --- | | --name <value> | Filter name | | --type <deals|leads|org|people|products|activity|projects> | Filter type | | --conditions <value> | Conditions JSON (a value, @file, or piped stdin). Fields are referenced by numeric field_id — run pdcli filter helpers for the valid operators. The blob needs the two-level glue structure {“glue”:“and”,“conditions”:[{“glue”:“and”,…},{“glue”:“or”,…}]}. |

Terminal window
pdcli filter create --name "Open deals" --type deals --conditions @conditions.json
cat conditions.json | pdcli filter create --name "Open deals" --type deals

Delete a filter

pdcli filter delete <id> [flags]

| Flag | Description | | --- | --- | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli filter delete 5
pdcli filter delete 5 --yes

Export a filter (or all filters) as portable {name, type, conditions} JSON. To recreate it, feed the fields to filter create separately (the create command takes —name/—type/—conditions, not one blob).

pdcli filter export [id] [flags]

| Flag | Description | | --- | --- | | --all | Export every filter |

Terminal window
pdcli filter export 5 > filter.json
pdcli filter export --all > filters.json
# recreate on another account (conditions reference numeric field_id):
pdcli filter create --name "$(jq -r .name filter.json)" --type "$(jq -r .type filter.json)" --conditions "$(jq -c .conditions filter.json)"

Get a filter by ID

pdcli filter get <id> [flags]
Terminal window
pdcli filter get 5
pdcli filter get 5 --output json

List the operators available for authoring filter conditions

pdcli filter helpers [flags]

| Flag | Description | | --- | --- | | --type <value> | Only show operators for this field data type (e.g. varchar, date, int) |

Terminal window
pdcli filter helpers
pdcli filter helpers --type varchar
pdcli filter helpers --output json

List filters

pdcli filter list [flags]

| Flag | Description | | --- | --- | | --type <deals|leads|org|people|products|activity|projects> | Filter by type |

Terminal window
pdcli filter list
pdcli filter list --type deals --output json

Update a filter (only provided fields change)

pdcli filter update <id> [flags]

| Flag | Description | | --- | --- | | --name <value> | Filter name | | --conditions <value> | Conditions JSON (a value or @file). Fields are referenced by numeric field_id — run pdcli filter helpers for the valid operators. |

Terminal window
pdcli filter update 5 --name "Renamed filter"
pdcli filter update 5 --conditions @conditions.json

List goals

pdcli goal list [flags]

| Flag | Description | | --- | --- | | --assignee <value> | Filter by assignee (user) ID | | --type <value> | Filter by goal type name |

Terminal window
pdcli goal list
pdcli goal list --assignee 7 --type deals_won --output json

Convert a lead to a deal. The conversion runs as an async job; use —wait to poll until it finishes. On success the lead is deleted.

pdcli lead convert <id> [flags]

| Flag | Description | | --- | --- | | --stage <value> | Stage ID for the new deal (a pipeline is inferred from it) | | --pipeline <value> | Pipeline ID for the new deal (ignored when —stage is set) | | --wait | Poll the conversion status until it finishes | | --timeout-secs <value> | Max seconds to poll when —wait is set |

Terminal window
pdcli lead convert adf21080-0e10-11eb-879b-05d71fb426ec
pdcli lead convert adf21080-0e10-11eb-879b-05d71fb426ec --stage 7
pdcli lead convert adf21080-0e10-11eb-879b-05d71fb426ec --wait

Create a lead

pdcli lead create [flags]

| Flag | Description | | --- | --- | | --title <value> | Lead title | | --person <value> | Linked person ID | | --org <value> | Linked organization ID | | --owner <value> | Owner (user) ID | | --value <value> | Lead value amount (requires —currency) | | --currency <value> | Lead value currency (requires —value) | | --expected-close-date <value> | Expected close date (YYYY-MM-DD) | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli lead create --title "Acme renewal" --value 5000 --currency EUR
pdcli lead create --title "Linked" --person 4 --org 5
pdcli lead create --title "Raw" --body '{"visible_to":"3"}'

Delete a lead

pdcli lead delete <id> [flags]

| Flag | Description | | --- | --- | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli lead delete adf21080-0e10-11eb-879b-05d71fb426ec
pdcli lead delete adf21080-0e10-11eb-879b-05d71fb426ec --yes

Get a lead by ID

pdcli lead get <id> [flags]
Terminal window
pdcli lead get adf21080-0e10-11eb-879b-05d71fb426ec
pdcli lead get adf21080-0e10-11eb-879b-05d71fb426ec --output json

List lead labels

pdcli lead label list [flags]
Terminal window
pdcli lead label list
pdcli lead label list --output json

List leads

pdcli lead list [flags]

| Flag | Description | | --- | --- | | --owner <value> | Filter by owner (user) ID | | --person <value> | Filter by person ID | | --org <value> | Filter by organization ID |

Terminal window
pdcli lead list
pdcli lead list --owner 3 --output json

Update a lead (v1 PATCH — only provided fields change)

pdcli lead update <id> [flags]

| Flag | Description | | --- | --- | | --title <value> | Lead title | | --person <value> | Linked person ID | | --org <value> | Linked organization ID | | --owner <value> | Owner (user) ID | | --value <value> | Lead value amount (requires —currency) | | --currency <value> | Lead value currency (requires —value) | | --expected-close-date <value> | Expected close date (YYYY-MM-DD) | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli lead update adf21080-0e10-11eb-879b-05d71fb426ec --title "Renamed"
pdcli lead update adf21080-0e10-11eb-879b-05d71fb426ec --value 7500 --currency USD

List the synced email linked to a deal. Message bodies are excluded by design (privacy posture) — the 225-char snippet is the preview; each row carries has_body_flag and body_url so you can fetch a body yourself. Requires the mail:read scope and a configured email sync.

pdcli mail list [flags]

| Flag | Description | | --- | --- | | --deal <value> | Deal ID to list mail for |

Terminal window
pdcli mail list --deal 42
pdcli mail list --deal 42 --output json

Run pdcli as a Model Context Protocol (MCP) server over stdio.

pdcli mcp serve [flags]

| Flag | Description | | --- | --- | | --allow-writes | Expose mutating tools (create/update/delete/merge/bulk). Off by default — read-only. | | --all-tools | Expose every command as a tool instead of the curated core set | | --topics <value> | Comma-separated topics to expose (e.g. deal,person) instead of the curated set | | --tool-timeout <value> | Seconds a tool call may run before its child process is terminated |

Terminal window
pdcli mcp serve
pdcli mcp serve --allow-writes
pdcli mcp serve --topics deal,person,org
pdcli mcp serve --all-tools --allow-writes

Deal aging: days-in-current-stage per open deal, bucketed, with a p90-dwell flag (mines each open deal’s changelog, one request per deal)

pdcli metrics aging [flags]

| Flag | Description | | --- | --- | | --pipeline <value> | Pipeline ID (required when the account has several) | | --buckets <value> | Comma-separated day thresholds; cohorts are 0-N1/N1-N2/…/last+ (lower bound inclusive, upper exclusive) |

Terminal window
pdcli metrics aging
pdcli metrics aging --pipeline 1 --buckets 30,60,90

Stage-transition matrix: every stage move (incl. backward & re-entry) mined from per-deal changelogs, with Won/Lost terminal columns

pdcli metrics conversion-matrix [flags]

| Flag | Description | | --- | --- | | --pipeline <value> | Pipeline ID (required when the account has several) |

Terminal window
pdcli metrics conversion-matrix
pdcli metrics conversion-matrix --pipeline 1 --output json

Pipeline coverage: probability-weighted open pipeline vs the revenue still needed to hit quota

pdcli metrics coverage [flags]

| Flag | Description | | --- | --- | | --pipeline <value> | Pipeline ID (required when the account has several) | | --period <value> | Goal measurement window (Nd or Nm) | | --target <value> | Manual revenue quota override (skips the Goals API entirely) | | --currency <value> | Restrict the open pipeline to this currency code (required when the pipeline holds deals in more than one currency) |

Terminal window
pdcli metrics coverage
pdcli metrics coverage --pipeline 1
pdcli metrics coverage --target 250000
pdcli metrics coverage --period 1m --output json

Time-phased forecast: open pipeline bucketed by close-month into commit / best-case / weighted views, segregated per currency

pdcli metrics forecast [flags]

| Flag | Description | | --- | --- | | --pipeline <value> | Pipeline ID (required when the account has several) | | --commit-threshold <value> | Min effective win-probability (%) for a deal to count toward commit |

Terminal window
pdcli metrics forecast
pdcli metrics forecast --pipeline 1
pdcli metrics forecast --commit-threshold 80 --output json

Close-date slippage: open deals whose expected close date keeps getting pushed out (mined per-deal changelog)

pdcli metrics slippage [flags]

| Flag | Description | | --- | --- | | --pipeline <value> | Pipeline ID (required when the account has several) | | --min-pushes <value> | Only show deals pushed forward at least this many times |

Terminal window
pdcli metrics slippage
pdcli metrics slippage --pipeline 1
pdcli metrics slippage --min-pushes 2 --output json

Sales Velocity Equation: (open × win rate × avg won value) / cycle days

pdcli metrics velocity [flags]

| Flag | Description | | --- | --- | | --period <value> | Trailing window for closed deals (Nd or Nm) | | --pipeline <value> | Restrict to a pipeline ID | | --owner <value> | Restrict to an owner (user) ID |

Terminal window
pdcli metrics velocity
pdcli metrics velocity --period 30d --pipeline 1

Add a comment to a note

pdcli note comment add <noteId> [flags]

| Flag | Description | | --- | --- | | --content <value> | Comment content |

Terminal window
pdcli note comment add 5 --content "Nice work"
pdcli note comment add 5 --content "Reviewed" --output json

Delete a comment from a note

pdcli note comment delete <noteId> [flags]

| Flag | Description | | --- | --- | | --comment <value> | Comment ID (UUID) | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli note comment delete 5 --comment <uuid>
pdcli note comment delete 5 --comment <uuid> --yes

List comments on a note

pdcli note comment list <noteId> [flags]
Terminal window
pdcli note comment list 5
pdcli note comment list 5 --output json

Update a comment on a note

pdcli note comment update <noteId> [flags]

| Flag | Description | | --- | --- | | --comment <value> | Comment ID (UUID) | | --content <value> | New comment content |

Terminal window
pdcli note comment update 5 --comment <uuid> --content "Edited"

Create a note

pdcli note create [flags]

| Flag | Description | | --- | --- | | --content <value> | Note content | | --deal <value> | Attach to deal ID | | --person <value> | Attach to person ID | | --org <value> | Attach to organization ID | | --lead <value> | Attach to lead ID (UUID) | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli note create --content "Called the lead"
pdcli note create --content "Follow up" --deal 42
pdcli note create --content "Pinned" --body '{"pinned_to_deal_flag":1}'

Delete a note

pdcli note delete <id> [flags]

| Flag | Description | | --- | --- | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli note delete 5
pdcli note delete 5 --yes

Get a note by ID

pdcli note get <id> [flags]
Terminal window
pdcli note get 5
pdcli note get 5 --output json

List notes

pdcli note list [flags]

| Flag | Description | | --- | --- | | --deal <value> | Filter by deal ID | | --person <value> | Filter by person ID | | --org <value> | Filter by organization ID |

Terminal window
pdcli note list
pdcli note list --deal 42 --output json

Update a note (only provided fields change)

pdcli note update <id> [flags]

| Flag | Description | | --- | --- | | --content <value> | Note content | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli note update 5 --content "Revised note"
pdcli note update 5 --body '{"pinned_to_deal_flag":1}'

Create an organization

pdcli org create [flags]

| Flag | Description | | --- | --- | | --name <value> | Organization name | | --owner <value> | Owner (user) ID | | --field <value> | Custom/standard field as “Name=Value” (repeatable) | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli org create --name "Acme Corp"
pdcli org create --name "Tiered" --field "Tier=Gold"
pdcli org create --name "Raw" --body '{"visible_to":3}'

Delete an organization

pdcli org delete <id> [flags]

| Flag | Description | | --- | --- | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli org delete 7
pdcli org delete 7 --yes

Add a follower (user) to an organization

pdcli org follower add <id> [flags]

| Flag | Description | | --- | --- | | --user <value> | User ID |

Terminal window
pdcli org follower add 42 --user 5
pdcli org follower add 42 --user 5 --output json

List followers of an organization

pdcli org follower list <id> [flags]
Terminal window
pdcli org follower list 42
pdcli org follower list 42 --output json

Remove a follower from an organization

pdcli org follower remove <id> [flags]

| Flag | Description | | --- | --- | | --user <value> | User ID | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli org follower remove 42 --user 5
pdcli org follower remove 42 --user 5 --yes

Get an organization by ID

pdcli org get <id> [flags]
Terminal window
pdcli org get 7
pdcli org get 7 --output json

Bulk-create organizations from a CSV (headers map to fields, custom fields by name)

pdcli org import <file> [flags]

| Flag | Description | | --- | --- | | --upsert | Match each row on —match-on, then create or update | | --match-on <value> | Field to match rows on in —upsert mode (e.g. name) | | --dry-run | Validate every row without creating anything | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli org import orgs.csv
pdcli org import orgs.csv --dry-run

List organizations

pdcli org list [flags]

| Flag | Description | | --- | --- | | --owner <value> | Filter by owner (user) ID | | --filter <value> | Filter by saved filter ID | | --ids <value> | Comma-separated IDs to fetch (max 100) | | --sort-by <id|update_time|add_time> | Sort field | | --sort-direction <asc|desc> | Sort direction | | --updated-since <value> | Only items updated at/after this RFC3339 time (no fractional seconds) | | --updated-until <value> | Only items updated before this RFC3339 time (no fractional seconds) |

Terminal window
pdcli org list
pdcli org list --owner 3 --output json

Merge one organization into another. WARNING: the positional <id> is the LOSING record — Pipedrive deletes it. —into is the surviving record whose data wins on conflict. All related data (deals, activities, notes, files) is transferred to the survivor.

pdcli org merge <id> [flags]

| Flag | Description | | --- | --- | | --into <value> | ID of the surviving organization to keep (the winner) | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli org merge 123 --into 456
pdcli org merge 123 --into 456 --yes

Create an organization relationship. For a parent relationship the —owner organization is the parent and —linked is the daughter.

pdcli org relationship add [flags]

| Flag | Description | | --- | --- | | --type <parent|related> | Relationship type | | --owner <value> | Owner organization ID (the parent for type parent) | | --linked <value> | Linked organization ID (the daughter for type parent) |

Terminal window
pdcli org relationship add --type parent --owner 1481 --linked 1480
pdcli org relationship add --type related --owner 1 --linked 2

List relationships for an organization

pdcli org relationship list [flags]

| Flag | Description | | --- | --- | | --org <value> | Organization ID to list relationships for |

Terminal window
pdcli org relationship list --org 1481
pdcli org relationship list --org 1481 --output json

Delete an organization relationship

pdcli org relationship remove <id> [flags]

| Flag | Description | | --- | --- | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli org relationship remove 7
pdcli org relationship remove 7 --yes

Update an organization (v2 PATCH — only provided fields change)

pdcli org update <id> [flags]

| Flag | Description | | --- | --- | | --name <value> | Organization name | | --owner <value> | Owner (user) ID | | --field <value> | Custom/standard field as “Name=Value” (repeatable) | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli org update 7 --name "Acme Inc"
pdcli org update 7 --owner 9
pdcli org update 7 --field "Tier=Gold"

Idempotent organization upsert: match by —by, then create or PATCH only the changed fields. Refuses (exit 65) if more than one record matches.

pdcli org upsert <value> [flags]

| Flag | Description | | --- | --- | | --by <value> | Match field: name, or a searchable custom field | | --field <value> | Field to set as “Name=Value” (repeatable) | | --body <value> | Raw JSON body to merge | | --dry-run | Preview the action without writing |

Terminal window
pdcli org upsert Acme --by name --field "Tier=Gold"
pdcli org upsert "D-42" --by "External ID" --body '{"owner_id":42}'
pdcli org upsert Acme --by name --field "Tier=Gold" --dry-run

Create a person

pdcli person create [flags]

| Flag | Description | | --- | --- | | --name <value> | Person name | | --email <value> | Email address (repeatable; first is primary) | | --phone <value> | Phone number (repeatable; first is primary) | | --org <value> | Linked organization ID | | --owner <value> | Owner (user) ID | | --field <value> | Custom/standard field as “Name=Value” (repeatable) | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli person create --name "Jane Doe" --email jane@acme.com
pdcli person create --name "Jane" --field "Segment=Enterprise"
pdcli person create --name "Raw" --body '{"visible_to":"3"}'

Delete a person

pdcli person delete <id> [flags]

| Flag | Description | | --- | --- | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli person delete 42
pdcli person delete 42 --yes

Add a follower (user) to a person

pdcli person follower add <id> [flags]

| Flag | Description | | --- | --- | | --user <value> | User ID |

Terminal window
pdcli person follower add 42 --user 5
pdcli person follower add 42 --user 5 --output json

List followers of a person

pdcli person follower list <id> [flags]
Terminal window
pdcli person follower list 42
pdcli person follower list 42 --output json

Remove a follower from a person

pdcli person follower remove <id> [flags]

| Flag | Description | | --- | --- | | --user <value> | User ID | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli person follower remove 42 --user 5
pdcli person follower remove 42 --user 5 --yes

Get a person by ID

pdcli person get <id> [flags]
Terminal window
pdcli person get 5
pdcli person get 5 --output json

Bulk-create persons from a CSV (headers map to fields, custom fields by name)

pdcli person import <file> [flags]

| Flag | Description | | --- | --- | | --upsert | Match each row on —match-on, then create or update | | --match-on <value> | Field to match rows on in —upsert mode (e.g. email) | | --dry-run | Validate every row without creating anything | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli person import people.csv
pdcli person import people.csv --dry-run

List persons (contacts)

pdcli person list [flags]

| Flag | Description | | --- | --- | | --owner <value> | Filter by owner (user) ID | | --org <value> | Filter by organization ID | | --filter <value> | Filter by saved filter ID | | --ids <value> | Comma-separated IDs to fetch (max 100) | | --sort-by <id|update_time|add_time> | Sort field | | --sort-direction <asc|desc> | Sort direction | | --updated-since <value> | Only items updated at/after this RFC3339 time (no fractional seconds) | | --updated-until <value> | Only items updated before this RFC3339 time (no fractional seconds) |

Terminal window
pdcli person list
pdcli person list --org 7 --output json

Merge one person into another. WARNING: the positional <id> is the LOSING record — Pipedrive deletes it. —into is the surviving record whose data wins on conflict. All related data (deals, activities, notes, files) is transferred to the survivor.

pdcli person merge <id> [flags]

| Flag | Description | | --- | --- | | --into <value> | ID of the surviving person to keep (the winner) | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli person merge 123 --into 456
pdcli person merge 123 --into 456 --yes

Update a person (v2 PATCH — only provided fields change)

pdcli person update <id> [flags]

| Flag | Description | | --- | --- | | --name <value> | Person name | | --email <value> | Email address (repeatable; first is primary) | | --phone <value> | Phone number (repeatable; first is primary) | | --org <value> | Linked organization ID | | --owner <value> | Owner (user) ID | | --field <value> | Custom/standard field as “Name=Value” (repeatable) | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli person update 42 --name "New name"
pdcli person update 42 --email new@acme.com
pdcli person update 42 --field "Segment=Enterprise"

Idempotent person upsert: match by —by, then create or PATCH only the changed fields. Refuses (exit 65) if more than one record matches.

pdcli person upsert <value> [flags]

| Flag | Description | | --- | --- | | --by <value> | Match field: email, name, phone, or a searchable custom field | | --field <value> | Field to set as “Name=Value” (repeatable) | | --body <value> | Raw JSON body to merge | | --dry-run | Preview the action without writing |

Terminal window
pdcli person upsert a@x.com --by email --field "Tier=Gold"
pdcli person upsert "Jane Doe" --by name --body '{"owner_id":42}'
pdcli person upsert a@x.com --by email --field "Tier=Gold" --dry-run

Get a pipeline by ID

pdcli pipeline get <id> [flags]
Terminal window
pdcli pipeline get 1
pdcli pipeline get 1 --output json

Per-stage pipeline health: value, weighted value, stale deals, missing next steps

pdcli pipeline health [flags]

| Flag | Description | | --- | --- | | --pipeline <value> | Pipeline ID (required when the account has several) |

Terminal window
pdcli pipeline health
pdcli pipeline health --pipeline 1

List pipelines

pdcli pipeline list [flags]
Terminal window
pdcli pipeline list
pdcli pipeline list --output json

Create a product

pdcli product create [flags]

| Flag | Description | | --- | --- | | --name <value> | Product name | | --code <value> | Product code (SKU) | | --unit <value> | Unit of measure | | --description <value> | Product description | | --owner <value> | Owner (user) ID | | --price <value> | Unit price (requires —currency) | | --currency <value> | Price currency (requires —price) | | --field <value> | Custom/standard field as “Name=Value” (repeatable) | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli product create --name "Widget" --code W-1 --price 9.99 --currency EUR
pdcli product create --name "Sized" --field "Material=Steel"
pdcli product create --name "Raw" --body '{"tax":19}'

Delete a product

pdcli product delete <id> [flags]

| Flag | Description | | --- | --- | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli product delete 7
pdcli product delete 7 --yes

Get a product by ID

pdcli product get <id> [flags]
Terminal window
pdcli product get 7
pdcli product get 7 --output json

List products

pdcli product list [flags]

| Flag | Description | | --- | --- | | --owner <value> | Filter by owner (user) ID | | --filter <value> | Filter by saved filter ID | | --ids <value> | Comma-separated IDs to fetch (max 100) | | --sort-by <id|name|add_time|update_time> | Sort field | | --sort-direction <asc|desc> | Sort direction | | --updated-since <value> | Only items updated at/after this RFC3339 time (no fractional seconds) |

Terminal window
pdcli product list
pdcli product list --owner 3 --output json

Update a product (v2 PATCH — only provided fields change)

pdcli product update <id> [flags]

| Flag | Description | | --- | --- | | --name <value> | Product name | | --code <value> | Product code (SKU) | | --unit <value> | Unit of measure | | --description <value> | Product description | | --owner <value> | Owner (user) ID | | --price <value> | Unit price (requires —currency) | | --currency <value> | Price currency (requires —price) | | --field <value> | Custom/standard field as “Name=Value” (repeatable) | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli product update 7 --name "New name"
pdcli product update 7 --price 12.50 --currency USD
pdcli product update 7 --field "Material=Steel"

Show the active profile

pdcli profile current [flags]
Terminal window
pdcli profile current

List all configured profiles

pdcli profile list [flags]
Terminal window
pdcli profile list

Switch the active profile

pdcli profile use <name> [flags]
Terminal window
pdcli profile use work

Create a project

pdcli project create [flags]

| Flag | Description | | --- | --- | | --title <value> | Project title | | --description <value> | Project description | | --status <value> | Project status | | --start-date <value> | Start date (YYYY-MM-DD) | | --end-date <value> | End date (YYYY-MM-DD) | | --owner <value> | Owner (user) ID | | --board <value> | Board ID | | --phase <value> | Phase ID | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli project create --title "Launch"
pdcli project create --title "Launch" --owner 3 --status open
pdcli project create --title "Raw" --body '{"deal_ids":[1,2]}'

Delete a project

pdcli project delete <id> [flags]

| Flag | Description | | --- | --- | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli project delete 7
pdcli project delete 7 --yes

Get a project by ID

pdcli project get <id> [flags]
Terminal window
pdcli project get 3
pdcli project get 3 --output json

List projects

pdcli project list [flags]

| Flag | Description | | --- | --- | | --archived | List archived projects instead of active ones |

Terminal window
pdcli project list
pdcli project list --output json

Update a project (v2 PATCH — only provided fields change)

pdcli project update <id> [flags]

| Flag | Description | | --- | --- | | --title <value> | Project title | | --description <value> | Project description | | --status <value> | Project status | | --start-date <value> | Start date (YYYY-MM-DD) | | --end-date <value> | End date (YYYY-MM-DD) | | --owner <value> | Owner (user) ID | | --board <value> | Board ID | | --phase <value> | Phase ID | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli project update 7 --title "Relaunch"
pdcli project update 7 --status closed
pdcli project update 7 --owner 9

Per-rep scorecard: win rate, cycle, velocity and deal hygiene by owner, across all pipelines (account-wide) unless narrowed

pdcli rep scorecard [flags]

| Flag | Description | | --- | --- | | --period <value> | Trailing window for closed deals (Nd or Nm) | | --pipeline <value> | Restrict to a pipeline ID | | --owner <value> | Restrict to a single owner (user) ID |

Terminal window
pdcli rep scorecard
pdcli rep scorecard --period 30d --pipeline 1
pdcli rep scorecard --owner 42 --output json

Get a stage by ID

pdcli stage get <id> [flags]
Terminal window
pdcli stage get 5
pdcli stage get 5 --output json

List stages

pdcli stage list [flags]

| Flag | Description | | --- | --- | | --pipeline <value> | Filter by pipeline ID |

Terminal window
pdcli stage list
pdcli stage list --pipeline 1 --output json

Incremental NDJSON export for a data warehouse: appends only records changed since the last run, per-entity, with high-water marks in manifest.json. First run seeds a full export. NOTE: pull-based CDC sees creates/updates only — hard deletes are not captured; reconcile against a periodic full backup.

pdcli sync warehouse [flags]

| Flag | Description | | --- | --- | | --dir <value> | Output directory for the NDJSON files + manifest | | --since <value> | Override the start for all entities (RFC3339 or Nd/Nm) | | --full | Ignore watermarks and rebuild from scratch (truncates files) | | -y, --yes | Skip the —full truncation confirmation |

Terminal window
pdcli sync warehouse --dir ./warehouse
pdcli sync warehouse --dir ./warehouse --since 7d
pdcli sync warehouse --dir ./warehouse --full

Create a task

pdcli task create [flags]

| Flag | Description | | --- | --- | | --title <value> | Task title | | --project <value> | Project ID | | --description <value> | Task description | | --assignee <value> | Assignee (user) ID | | --due-date <value> | Due date (YYYY-MM-DD) | | --parent <value> | Parent task ID | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli task create --title "Write spec" --project 3
pdcli task create --title "Subtask" --project 3 --parent 5 --assignee 7
pdcli task create --title "Raw" --project 3 --body '{"priority":5}'

Delete a task

pdcli task delete <id> [flags]

| Flag | Description | | --- | --- | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli task delete 7
pdcli task delete 7 --yes

Get a task by ID

pdcli task get <id> [flags]
Terminal window
pdcli task get 9
pdcli task get 9 --output json

List tasks

pdcli task list [flags]

| Flag | Description | | --- | --- | | --project <value> | Filter by project ID | | --assignee <value> | Filter by assignee (user) ID | | --parent <value> | Filter by parent task ID | | --done | Only completed tasks | | --todo | Only open (not done) tasks |

Terminal window
pdcli task list
pdcli task list --project 3 --todo
pdcli task list --assignee 7 --output json

Update a task (v2 PATCH — only provided fields change)

pdcli task update <id> [flags]

| Flag | Description | | --- | --- | | --title <value> | Task title | | --project <value> | Project ID | | --description <value> | Task description | | --assignee <value> | Assignee (user) ID | | --due-date <value> | Due date (YYYY-MM-DD) | | --parent <value> | Parent task ID | | --done | Mark the task as done | | --undone | Mark the task as not done | | --body <value> | Raw JSON body to merge (flags win) |

Terminal window
pdcli task update 7 --title "Renamed"
pdcli task update 7 --done
pdcli task update 7 --assignee 9

Find users by name

pdcli user find <term> [flags]

| Flag | Description | | --- | --- | | --by-email | Match the term against email addresses only |

Terminal window
pdcli user find "jane"
pdcli user find "jane@acme.com" --by-email --output json

List all users

pdcli user list [flags]
Terminal window
pdcli user list
pdcli user list --output json

Show the authenticated user

pdcli user me [flags]
Terminal window
pdcli user me

Create a webhook

pdcli webhook create [flags]

| Flag | Description | | --- | --- | | --url <value> | Webhook subscription URL | | --event-action <create|change|delete|> | Event action to subscribe to | | --event-object <activity|board|deal|deal_installment|deal_product|lead|note|organization|person|phase|pipeline|product|project|stage|task|user|> | Event object to subscribe to | | --name <value> | Webhook name | | --version <value> | Webhook payload version | | --http-auth-user <value> | HTTP basic auth username for the endpoint | | --http-auth-password <value> | HTTP basic auth password for the endpoint |

Terminal window
pdcli webhook create --url https://example.com/hook --event-action change --event-object deal
pdcli webhook create --url https://example.com/hook --event-action "*" --event-object "*"

Delete a webhook

pdcli webhook delete <id> [flags]

| Flag | Description | | --- | --- | | -y, --yes | Skip the confirmation prompt |

Terminal window
pdcli webhook delete 3
pdcli webhook delete 3 --yes

List webhooks

pdcli webhook list [flags]
Terminal window
pdcli webhook list
pdcli webhook list --output json

Run a local webhook dev loop. In tunnel mode it registers a temporary Pipedrive webhook pointing at your public tunnel (—url) and prints/forwards each delivery, deleting the webhook on exit. In —synthetic mode it polls the changes feed instead and emits the same delivery envelope with zero inbound network — useful behind a firewall or for reactive agents.

pdcli webhook listen [flags]

| Flag | Description | | --- | --- | | --url <value> | Public tunnel URL that forwards to the local receiver (tunnel mode) | | --forward-to <value> | POST each delivery to this local URL as well | | --events <value> | Comma-separated entity.action filters, e.g. deal.change,person.* | | --port <value> | Local receiver port (tunnel mode) | | --synthetic | Poll the changes feed and emit webhook-shaped events (no inbound network) | | --since <value> | Synthetic start point: RFC3339 timestamp or Nd/Nm (else the stored watermark) | | --interval <value> | Milliseconds between synthetic poll cycles | | --once | Process a single delivery / poll cycle then exit | | --max-events <value> | Exit after emitting this many events |

Terminal window
pdcli webhook listen --url https://abc123.ngrok.app --forward-to http://localhost:3000
pdcli webhook listen --url https://abc123.ngrok.app --events deal.change,person.*
pdcli webhook listen --synthetic --since 15m
pdcli v0.22.0 · MIT · not affiliated with Pipedrive