> ## Documentation Index
> Fetch the complete documentation index at: https://f82cc46-productmetrics.manicule.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://f82cc46-productmetrics.manicule.dev/docs/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://f82cc46-productmetrics.manicule.dev/docs/api/mcp.
> Every agent surface: https://f82cc46-productmetrics.manicule.dev/docs/.well-known/llms-manifest.json

# CLI commands (/docs/cli/commands)

<!-- agent-signals: reading_time_min: 14 · est_tokens: 8801 · updated: 2026-11-16 -->
Related: [Product Metrics CLI](/docs/cli/overview.md), [Quickstart for developers and agents](/docs/cli/quickstart.md), [CLI authentication](/docs/cli/authentication.md), [Use the CLI from an AI agent](/docs/cli/for-agents.md), [JSON output and exit codes](/docs/cli/json-and-exit-codes.md)

> Every productmetrics command group with its commands, the scope each needs and its key flags, plus productmetrics capabilities and productmetrics call.

`productmetrics` has one command per public API operation, grouped by the part before the dot in its capability id.



* [Onboarding](/docs/cli/commands#onboarding): where you are in onboarding, and moving it forward
* [Setup](/docs/cli/commands#setup): the setup status and the next open step
* [Workspaces and billing](/docs/cli/commands#workspaces-and-billing): properties, workspaces, checkout, invitations and ad spend
* [Google Ads](/docs/cli/commands#google-ads): Google access, accounts, conversion actions and customer lists
* [Merchant Center](/docs/cli/commands#merchant-center): connect Merchant Center and apply its auto-setup
* [Stores and tracking](/docs/cli/commands#stores-and-tracking): connect a store and check that purchases arrive
* [Destinations](/docs/cli/commands#destinations): Meta Conversions API and ChatGPT Ads (OpenAI Conversions API)
* [Settings](/docs/cli/commands#settings): Product Segmentation settings: read, preview, save
* [Product rules](/docs/cli/commands#product-rules): rules that override segments or priorities
* [Feed](/docs/cli/commands#feed): feed source settings and generating the feed
* [Inventory](/docs/cli/commands#inventory): inventory planning settings and stock state
* [Store data](/docs/cli/commands#store-data): orders, Business Health, analytics and data queries

## Find a command

The live list always comes from the server:

```bash
# every operation: command, scope, whether it changes data
productmetrics capabilities
productmetrics capabilities --search "merchant center"
productmetrics capabilities --scope write --json
# one group
productmetrics <group> --help
# one command: request, scope, every flag, an example
productmetrics <group> <command> --help
```

## How to read the tables

* **Command** is `productmetrics <group> <command>`. `productmetrics call <capability-id>` runs the same operation: `productmetrics call google_ads.list_accounts` is `productmetrics google-ads list-accounts`.
* **What it does** links to the operation's [API reference](/docs/api/overview) page, with every field.
* **Scope** is the one scope your sign-in needs. See [Authentication](/docs/cli/authentication#scopes).
* **Must pass** lists the flags the command fails without: its required path, query and body fields, and `--body-file`, `--if-match`, `--auto-idempotency-key` or `--yes` where the operation needs them. Every other flag is in `productmetrics <group> <command> --help`.
* Commands marked **Deletes** cannot be undone. In a terminal, `productmetrics` asks you to type the id instead of `--yes`.

Ids come from earlier results, never from guesses: `property_id` and `company_id` from `productmetrics whoami`, installation, connection and scope ids from `productmetrics tracking get-configuration`, rule ids from `productmetrics product-rules list`.

## Onboarding

Where you are in Product Metrics onboarding, and moving it forward.

| Command                                                    | What it does                                                                             | Scope   | Must pass                      |
| ---------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ------- | ------------------------------ |
| `productmetrics onboarding get-state`                      | [Get onboarding state](/docs/api/account/onboarding-get-state)                                | `read`  |                                |
| `productmetrics onboarding update-step`                    | [Move onboarding to a step](/docs/api/account/onboarding-update-step)                         | `setup` | `--step`                       |
| `productmetrics onboarding set-account-type`               | [Set account type](/docs/api/account/onboarding-set-account-type)                             | `setup` | `--account-type`               |
| `productmetrics onboarding set-google-ads-connection-mode` | [Set Google Ads connection mode](/docs/api/account/onboarding-set-google-ads-connection-mode) | `setup` | `--google-ads-connection-mode` |
| `productmetrics onboarding complete`                       | [Complete onboarding](/docs/api/account/onboarding-complete)                                  | `setup` |                                |
| `productmetrics onboarding skip`                           | [Skip onboarding](/docs/api/account/onboarding-skip)                                          | `setup` |                                |

## Setup

| Command                           | What it does                                      | Scope  | Must pass |
| --------------------------------- | ------------------------------------------------- | ------ | --------- |
| `productmetrics setup get-status` | [Get setup status](/docs/api/account/setup-get-status) | `read` |           |

The answer carries `journey_stage`, `user.google_grant`, `hub.company.next_action` and `hub.property.next_action`.

## Workspaces and billing

| Command                                       | What it does                                                        | Scope   | Must pass                                    |
| --------------------------------------------- | ------------------------------------------------------------------- | ------- | -------------------------------------------- |
| `productmetrics properties list`              | [List properties](/docs/api/account/properties-list)                     | `read`  |                                              |
| `productmetrics companies list`               | [List workspaces](/docs/api/account/companies-list)                      | `read`  |                                              |
| `productmetrics companies create`             | [Create workspace](/docs/api/account/companies-create)                   | `setup` | `--name`, `--auto-idempotency-key`           |
| `productmetrics billing create-checkout-link` | [Create a checkout link](/docs/api/account/billing-create-checkout-link) | `setup` | `--company-id`                               |
| `productmetrics invitations send`             | [Invite teammates](/docs/api/account/invitations-send)                   | `write` | `--company-id`, `--invitees`                 |
| `productmetrics usage get-ad-spend`           | [Get ad spend usage](/docs/api/store-data/usage-get-ad-spend)            | `read`  | `--company-id`, `--start-date`, `--end-date` |

`invitations send` takes the invitees as JSON in `--invitees` (or the whole body in `--body`). Each role is `admin`, `editor` or `viewer`:

```bash
productmetrics invitations send \
  --company-id <company_id> \
  --invitees '[{ "email": "anna@example.com", "role": "editor" }]'
```

## Google Ads

Granting Google access, connecting Google Ads accounts (which creates properties), conversion actions and customer lists.

| Command                                                 | What it does                                                                               | Scope   | Must pass                                            |
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ------- | ---------------------------------------------------- |
| `productmetrics google get-connect-link`                | [Get the Google connect link](/docs/api/account/google-get-connect-link)                        | `setup` | `--scope`                                            |
| `productmetrics google-ads list-accounts`               | [List reachable Google Ads accounts](/docs/api/google-ads/list-accounts)                        | `read`  |                                                      |
| `productmetrics google-ads list-property-connections`   | [List Google Ads connections](/docs/api/google-ads/list-property-connections)                   | `read`  | `--company-id`                                       |
| `productmetrics google-ads create-property-connection`  | [Connect a Google Ads account](/docs/api/google-ads/create-property-connection)                 | `setup` | `--company-id`, `--connection-mode`, `--customer-id` |
| `productmetrics google-ads list-pending-invites`        | [List pending Google Ads invites](/docs/api/google-ads/list-pending-invites)                    | `read`  | `--company-id`                                       |
| `productmetrics google-ads send-invite`                 | [Invite a Google Ads account](/docs/api/google-ads/send-invite)                                 | `setup` | `--company-id`, `--customer-id`                      |
| `productmetrics google-ads recheck-property-connection` | [Recheck a Google Ads connection](/docs/api/google-ads/recheck-property-connection)             | `setup` | `--property-id`                                      |
| `productmetrics google-ads delete-property-connection`  | **Deletes.** [Disconnect a Google Ads account](/docs/api/google-ads/delete-property-connection) | `setup` | `--property-id`, `--yes`                             |
| `productmetrics google-ads get-setup-status`            | [Get workspace setup status](/docs/api/google-ads/get-setup-status)                             | `read`  | `--company-id`                                       |
| `productmetrics google-ads get-plan-results`            | [Get plan results](/docs/api/google-ads/get-plan-results)                                       | `read`  | `--property-id`                                      |
| `productmetrics google-ads get-conversion-actions`      | [Get conversion action readiness](/docs/api/google-ads/get-conversion-actions)                  | `read`  | `--property-id`                                      |
| `productmetrics google-ads create-conversion-actions`   | [Create conversion actions](/docs/api/google-ads/create-conversion-actions)                     | `setup` | `--property-id`, `--company-id`                      |
| `productmetrics google-ads get-customer-lists`          | [Get customer lists](/docs/api/google-ads/get-customer-lists)                                   | `read`  | `--property-id`, `--company-id`                      |
| `productmetrics google-ads create-customer-lists`       | [Create customer lists](/docs/api/google-ads/create-customer-lists)                             | `setup` | `--property-id`, `--company-id`                      |

## Merchant Center

| Command                                                | What it does                                                                        | Scope   | Must pass                        |
| ------------------------------------------------------ | ----------------------------------------------------------------------------------- | ------- | -------------------------------- |
| `productmetrics merchant-center create-connection`     | [Connect Merchant Center](/docs/api/merchant-center/create-connection)                   | `setup` | `--property-id`, `--merchant-id` |
| `productmetrics merchant-center recheck-connection`    | [Recheck a Merchant Center connection](/docs/api/merchant-center/recheck-connection)     | `setup` | `--property-id`                  |
| `productmetrics merchant-center delete-connection`     | **Deletes.** [Disconnect Merchant Center](/docs/api/merchant-center/delete-connection)   | `setup` | `--property-id`, `--yes`         |
| `productmetrics merchant-center inspect-auto-setup`    | [Inspect Merchant Center auto-setup](/docs/api/merchant-center/inspect-auto-setup)       | `read`  | `--property-id`                  |
| `productmetrics merchant-center get-auto-setup-status` | [Get Merchant Center auto-setup status](/docs/api/merchant-center/get-auto-setup-status) | `read`  | `--property-id`                  |
| `productmetrics merchant-center apply-auto-setup`      | [Apply Merchant Center auto-setup](/docs/api/merchant-center/apply-auto-setup)           | `setup` | `--property-id`                  |

## Stores and tracking

Connecting a store and checking that purchases arrive.

| Command                                                | What it does                                                                                                           | Scope   | Must pass                                                                                                                                                                           |
| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `productmetrics stores select-platform`                | [Choose the store platform](/docs/api/stores-and-tracking/stores-select-platform)                                           | `setup` | `--company-id`, `--platform`                                                                                                                                                        |
| `productmetrics stores connect`                        | [Connect a store](/docs/api/stores-and-tracking/stores-connect)                                                             | `setup` | `--company-id`, `--provider`                                                                                                                                                        |
| `productmetrics stores create-woocommerce-setup-claim` | [New WooCommerce setup token](/docs/api/stores-and-tracking/stores-create-woocommerce-setup-claim)                          | `setup` | `--installation-id`                                                                                                                                                                 |
| `productmetrics tracking get-configuration`            | [Get tracking configuration](/docs/api/stores-and-tracking/tracking-get-configuration)                                      | `read`  | `--company-id`, `--property-id`                                                                                                                                                     |
| `productmetrics tracking get-commerce-configuration`   | [Get store connections](/docs/api/stores-and-tracking/tracking-get-commerce-configuration)                                  | `read`  | `--company-id`                                                                                                                                                                      |
| `productmetrics tracking create-website-installation`  | [Track a website](/docs/api/stores-and-tracking/tracking-create-website-installation)                                       | `setup` | `--company-id`, `--verified-domain`                                                                                                                                                 |
| `productmetrics tracking get-last-purchase`            | [Check tracking works](/docs/api/stores-and-tracking/tracking-get-last-purchase)                                            | `read`  | `--company-id`, `--installation-id`                                                                                                                                                 |
| `productmetrics tracking get-shopware6-status`         | [Get Shopware 6 status](/docs/api/stores-and-tracking/tracking-get-shopware6-status)                                        | `read`  | `--company-id`, `--installation-id`                                                                                                                                                 |
| `productmetrics tracking update-installation-features` | [Set the cookie consent manager and tracking features](/docs/api/stores-and-tracking/tracking-update-installation-features) | `setup` | `--company-id`, `--installation-id`, `--identity-discovery`, `--dynamic-checkout-observation`, `--cmp-adapter`, `--expanded-bot-signals`, `--server-authoritative-attribution-mode` |
| `productmetrics tracking update-margin-policy`         | [Set the profit cost fallback and margin costs](/docs/api/stores-and-tracking/tracking-update-margin-policy)                | `setup` | `--company-id`, `--connection-id`, `--expected-revision`, `--policy`, `--auto-idempotency-key`                                                                                      |
| `productmetrics tracking update-scope-dimensions`      | [Set a store's countries and currencies](/docs/api/stores-and-tracking/tracking-update-scope-dimensions)                    | `setup` | `--company-id`, `--scope-id`, `--installation-id`, `--country-codes`, `--path-prefixes`, `--locale-codes`, `--currency-codes`                                                       |
| `productmetrics tracking set-scope-destination`        | [Send a store's purchases to Google Ads](/docs/api/stores-and-tracking/tracking-set-scope-destination)                      | `setup` | `--company-id`, `--scope-id`, `--installation-id`, `--property-id`, `--pageview-destination`, `--consent-policy-version`                                                            |
| `productmetrics tracking assign-property`              | [Assign a store to a property](/docs/api/stores-and-tracking/tracking-assign-property)                                      | `setup` | `--company-id`, `--scope-id`, `--installation-id`, `--property-id`                                                                                                                  |
| `productmetrics tracking get-enhanced-conversions`     | [Get enhanced conversions readiness](/docs/api/stores-and-tracking/tracking-get-enhanced-conversions)                       | `read`  | `--company-id`, `--property-id`                                                                                                                                                     |

`stores connect` answers per platform:

| Platform                                                                                         | Answer                                                                                                            | Exit                                    |
| ------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
| **Shopify**                                                                                      | `mode: redirect` and an `authorizationUrl` to approve in Shopify Admin                                            | `4`, `next_action.type: "browser"`      |
| **WooCommerce**, **Shopware 6** (`--store-url`)                                                  | `mode: plugin_claim` and a one-time setup token to paste into the Product Metrics plugin before `claim.expiresAt` | `4`, `next_action.type: "store_plugin"` |
| **Lightspeed C-Series** (`--cluster`, `--shop-domain`, `--shop-id`, `--api-key`, `--api-secret`) | `mode: provisioning`: the connection is being set up                                                              |                                         |

Pass `--auto-idempotency-key` too, so a retry does not start a second connection. `stores connect` and `stores create-woocommerce-setup-claim` hide the setup token unless you pass `--show-secrets`. Then `productmetrics tracking get-commerce-configuration` shows the connection become active.

A WooCommerce store on plugin 1.0.12 or later sends its country and currency when it pairs. For any other store, set them with `tracking update-scope-dimensions` before `tracking update-margin-policy`: the default margin costs (`marginDefaultCatalog` in `tracking get-configuration`) need exactly one country and one currency per store scope.

## Destinations

Meta Conversions API and OpenAI Conversions API (ChatGPT Ads) destinations, one per property.

| Command                                     | What it does                                                                                            | Scope   | Must pass                                                                       |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------- |
| `productmetrics destinations list-meta`     | [List Meta destinations](/docs/api/destinations/list-meta)                                                   | `read`  | `--company-id`                                                                  |
| `productmetrics destinations set-meta`      | [Save Meta destination](/docs/api/destinations/set-meta)                                                     | `setup` | `--company-id`, `--property-id`, `--pixel-id`, `--test-event-code`, `--enabled` |
| `productmetrics destinations test-meta`     | [Send Meta test event](/docs/api/destinations/test-meta)                                                     | `setup` | `--company-id`, `--property-id`                                                 |
| `productmetrics destinations delete-meta`   | **Deletes.** [Delete Meta destination](/docs/api/destinations/delete-meta)                                   | `setup` | `--company-id`, `--property-id`, `--yes`                                        |
| `productmetrics destinations list-openai`   | [List ChatGPT Ads (OpenAI Conversions API) destinations](/docs/api/destinations/list-openai)                 | `read`  | `--company-id`                                                                  |
| `productmetrics destinations set-openai`    | [Save ChatGPT Ads (OpenAI Conversions API) destination](/docs/api/destinations/set-openai)                   | `setup` | `--company-id`, `--property-id`, `--pixel-id`, `--enabled`                      |
| `productmetrics destinations test-openai`   | [Send ChatGPT Ads (OpenAI Conversions API) test event](/docs/api/destinations/test-openai)                   | `setup` | `--company-id`, `--property-id`                                                 |
| `productmetrics destinations delete-openai` | **Deletes.** [Delete ChatGPT Ads (OpenAI Conversions API) destination](/docs/api/destinations/delete-openai) | `setup` | `--company-id`, `--property-id`, `--yes`                                        |

## Settings

Product Segmentation settings: read, get a recommended minimum clicks, preview a draft, save it. Every command takes `--feed-scope` (a feed id, or `all`).

| Command                                        | What it does                                                    | Scope   | Must pass                               |
| ---------------------------------------------- | --------------------------------------------------------------- | ------- | --------------------------------------- |
| `productmetrics settings get`                  | [Get Product Segmentation settings](/docs/api/settings/get)          | `read`  | `--property-id`                         |
| `productmetrics settings recommend-min-clicks` | [Recommend minimum clicks](/docs/api/settings/recommend-min-clicks)  | `read`  | `--property-id`                         |
| `productmetrics settings preview`              | [Preview Product Segmentation settings](/docs/api/settings/preview)  | `read`  | `--property-id`, `--body-file`          |
| `productmetrics settings preview-strategy`     | [Preview segmentation strategy](/docs/api/settings/preview-strategy) | `read`  | `--property-id`, `--body-file`          |
| `productmetrics settings update`               | [Save Product Segmentation settings](/docs/api/settings/update)      | `write` | `--property-id`, `--labelizer-settings` |

```bash
productmetrics settings get --property-id <property_id> --json > settings.json
productmetrics settings recommend-min-clicks --property-id <property_id>
productmetrics settings preview \
  --property-id <property_id> \
  --feed-scope <feed> \
  --body-file draft.json
productmetrics settings update \
  --property-id <property_id> \
  --body-file new-settings.json \
  --if-match '"<settings_version>"'
```

## Product rules

Rules that override segments or priorities for the products they match. Every command takes `--feed-scope`.

| Command                                   | What it does                                                             | Scope   | Must pass                                                                                                            |
| ----------------------------------------- | ------------------------------------------------------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------- |
| `productmetrics product-rules list`       | [List product rules](/docs/api/settings/product-rules-list)                   | `read`  | `--property-id`                                                                                                      |
| `productmetrics product-rules get-impact` | [Get product rules impact](/docs/api/settings/product-rules-get-impact)       | `read`  | `--property-id`                                                                                                      |
| `productmetrics product-rules preview`    | [Preview product rule conditions](/docs/api/settings/product-rules-preview)   | `read`  | `--property-id`, `--when-cols`, `--when-ops`, `--when-vals`                                                          |
| `productmetrics product-rules create`     | [Create a product rule](/docs/api/settings/product-rules-create)              | `write` | `--property-id`, `--name`, `--when-cols`, `--when-ops`, `--when-vals`, `--target-cols`, `--action`, `--action-value` |
| `productmetrics product-rules reorder`    | [Reorder product rules](/docs/api/settings/product-rules-reorder)             | `write` | `--property-id`, `--rules`                                                                                           |
| `productmetrics product-rules update`     | [Update a product rule](/docs/api/settings/product-rules-update)              | `write` | `--property-id`, `--rule-id`                                                                                         |
| `productmetrics product-rules toggle`     | [Turn a product rule on or off](/docs/api/settings/product-rules-toggle)      | `write` | `--property-id`, `--rule-id`                                                                                         |
| `productmetrics product-rules delete`     | **Deletes.** [Delete a product rule](/docs/api/settings/product-rules-delete) | `write` | `--property-id`, `--rule-id`, `--yes`                                                                                |

## Feed

| Command                                      | What it does                                                           | Scope   | Must pass                                                   |
| -------------------------------------------- | ---------------------------------------------------------------------- | ------- | ----------------------------------------------------------- |
| `productmetrics feed-source-settings get`    | [Get feed source settings](/docs/api/settings/feed-source-settings-get)     | `read`  | `--property-id`                                             |
| `productmetrics feed-source-settings update` | [Save feed source settings](/docs/api/settings/feed-source-settings-update) | `write` | `--property-id`, `--product-segment`, `--category-priority` |
| `productmetrics feed generate`               | [Generate the feed now](/docs/api/settings/feed-generate)                   | `write` | `--property-id`                                             |

## Inventory

| Command                                    | What it does                                                                  | Scope   | Must pass                                                                                 |
| ------------------------------------------ | ----------------------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------- |
| `productmetrics inventory-settings get`    | [Get inventory planning settings](/docs/api/settings/inventory-settings-get)       | `read`  | `--property-id`                                                                           |
| `productmetrics inventory-settings update` | [Save an inventory planning setting](/docs/api/settings/inventory-settings-update) | `write` | `--property-id`, `--store-id`, `--scope-kind`, `--lead-time-days`, `--safety-buffer-days` |
| `productmetrics inventory get-state`       | [Get inventory state](/docs/api/store-data/inventory-get-state)                    | `read`  | `--property-id`                                                                           |

## Store data

The store's own data. Orders, Business Health and inventory need Pro.

| Command                                     | What it does                                                                | Scope  | Must pass                                             |
| ------------------------------------------- | --------------------------------------------------------------------------- | ------ | ----------------------------------------------------- |
| `productmetrics orders get-availability`    | [Check orders are available](/docs/api/store-data/orders-get-availability)       | `read` |                                                       |
| `productmetrics orders list`                | [List orders](/docs/api/store-data/orders-list)                                  | `read` | `--company-id`, `--storefront-scope-id`               |
| `productmetrics orders get`                 | [Get an order](/docs/api/store-data/orders-get)                                  | `read` | `--company-id`, `--order-id`, `--storefront-scope-id` |
| `productmetrics store list-shops`           | [List shops](/docs/api/store-data/store-list-shops)                              | `read` | `--property-id`                                       |
| `productmetrics store get-health-slice`     | [Get Business Health](/docs/api/store-data/store-get-health-slice)               | `read` | `--property-id`, `--window-days`, `--compare`         |
| `productmetrics store get-health-series`    | [Get Business Health series](/docs/api/store-data/store-get-health-series)       | `read` | `--property-id`, `--weeks`, `--compare`               |
| `productmetrics store list-health-products` | [List Business Health products](/docs/api/store-data/store-list-health-products) | `read` | `--property-id`, `--window-days`                      |
| `productmetrics analytics get-status`       | [Get analytics status](/docs/api/store-data/analytics-get-status)                | `read` | `--property-id`                                       |
| `productmetrics data query`                 | [Query the lake](/docs/api/store-data/data-query)                                | `read` | `--property-id`, `--sql`                              |
| `productmetrics insights get`               | [Get an insight card](/docs/api/store-data/insights-get)                         | `read` | `--property-id`, `--spot`                             |

```bash
productmetrics tracking get-configuration \
  --company-id <company_id> \
  --property-id <property_id>
productmetrics orders list \
  --company-id <company_id> \
  --storefront-scope-id <scope_id> \
  --limit 20
productmetrics data query \
  --property-id <property_id> \
  --sql "select count(*) from orders" \
  --max-rows 10
```

## Feedback

`productmetrics feedback` sends feedback to the Product Metrics team through `feedback.send` (scope `read`). It is not a support channel; leave out personal data. The message can be the argument or `--message`; `--about <capability-id>` fills `--context` and `--feature`, and `--request-id` adds a failed call's request id.

```bash
productmetrics feedback \
  --sentiment negative \
  --about settings.update \
  --request-id <request_id> \
  --message "The save answered 500 twice."
```

## Capabilities and call

`productmetrics capabilities` lists every operation the server offers, with the command that runs each, its scope and whether it changes data. With `--json`, each entry also has `command`, `secret_fields` and `browser_step`.

| Flag                         | What it does                                                      |
| ---------------------------- | ----------------------------------------------------------------- |
| `--search <text>`            | Only operations whose id, title or description contains this text |
| `--scope read\|setup\|write` | Only operations that need this scope                              |

`productmetrics call <capability-id>` runs an operation by its id (with `_` or `-`), with the same field flags as the generated command:

```bash
productmetrics call google_ads.list_accounts
productmetrics call settings.get --param propertyId=<property_id> --json
```

## Flags every API command takes

Besides its field flags, every API command takes these.

| Flag                       | What it does                                                              |
| -------------------------- | ------------------------------------------------------------------------- |
| `--param <key=value>`      | Set a path parameter by its API name (wins over its field flag)           |
| `--query <key=value>`      | Set a query parameter by its API name (wins over its field flag)          |
| `--body <json>`            | The JSON body; its keys win over field flags                              |
| `--body-file <path>`       | Read the JSON body from a file                                            |
| `--body-stdin`             | Read the JSON body from stdin                                             |
| `--idempotency-key <uuid>` | Idempotency-Key header: the same key makes a retry safe                   |
| `--auto-idempotency-key`   | Send a new random Idempotency-Key (a failed call prints it for the retry) |
| `--if-match <version>`     | If-Match header: the version of the resource this change is based on      |
| `--show-secrets`           | Print fields the API marks as secret instead of hiding them               |
| `--yes`                    | Confirm an operation that deletes data, without a prompt                  |
| `--dry-run`                | Print the request that would be sent, and send nothing                    |

Only these commands take an Idempotency-Key; on any other, `--auto-idempotency-key` or `--idempotency-key` is a usage error (exit 2):

* `productmetrics companies create` (required)
* `productmetrics stores connect`
* `productmetrics tracking update-margin-policy` (required)

## Where next



* [For agents](/docs/cli/for-agents): idempotency, `--if-match`, `--dry-run`
* [JSON and exit codes](/docs/cli/json-and-exit-codes): the `--json` envelope, `next_action` and exit codes
* [API overview](/docs/api/overview): the same operations over HTTP
