> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qonto.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using the CLI

> Commands, output formats, filters, pagination, and write operations

Every command follows the same shape:

```bash theme={null}
qonto <resource> <action> [id] [flags]
```

For example `qonto transactions list`, `qonto cards lock <card-id>`, or `qonto client-invoices send <invoice-id>`. Resources with sub-resources nest one level further, such as `qonto transactions attachments list <transaction-id>`.

## Finding your way

The CLI documents itself:

```bash theme={null}
qonto --help                      # every resource
qonto cards --help                # every action on cards
qonto cards update-options --help # one command in detail
```

`--help` on a command shows the API endpoint it calls, the OAuth scope it needs, and one flag per API parameter, with the allowed values when the API defines them:

```
$ qonto client-invoices create --help
Create a client invoice
…
Endpoint: POST /v2/client_invoices
OAuth scope: client_invoice.write
```

The [command reference](/cli/commands/overview) lists every command and links to its page in the API reference.

## Output

On a terminal, results are printed as a **table** (or, for a single item, one field per line). When the output goes anywhere else (a pipe, a file, a script, an AI agent), it is the API's **JSON**, unchanged.

```bash theme={null}
qonto transactions list --per-page 5                      # a table
qonto transactions list --per-page 5 > transactions.json  # JSON
```

Informational messages, warnings, and errors go to standard error, so they never mix with the data on standard output.

| Flag                  | What it does                                                                                                                                                                                                                                  |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-o`, `--output`      | Force a format: `table`, `json`, `yaml`, or `raw` (the response body exactly as received).                                                                                                                                                    |
| `--fields`            | Keep only these fields, comma-separated. On a list, applies to each item: `--fields id,amount,side,label`. On a single item, to that item: `qonto organization get --fields slug,legal_name`. Nested fields use dots: `--fields client.name`. |
| `--jq`                | Filter the JSON with a [jq](https://jqlang.org) expression. No need to install `jq`.                                                                                                                                                          |
| `-O`, `--output-file` | Write the response body to a file instead of printing it. Use it for commands that return a PDF, such as `credit-notes download` or `bank-accounts iban-certificate`.                                                                         |
| `--no-color`          | Disable colors. The `NO_COLOR` environment variable does the same.                                                                                                                                                                            |

A few examples:

```bash theme={null}
# Debit transactions over €1,000, as label and amount
qonto transactions list --side debit --all \
  --jq '.transactions[] | select(.amount > 1000) | {label, amount}'

# How many clients you have
qonto clients list --per-page 1 --jq '.meta.total_count'

# The IBAN certificate of an account, as a PDF
qonto bank-accounts iban-certificate <account-id> -O iban-certificate.pdf
```

## Filters

List commands take the API's query parameters as flags: `--status`, `--side`, `--settled-at-from`, `--updated-at-to`, and so on. Flags marked `(repeatable)` in `--help` accept several values, either repeated or comma-separated:

```bash theme={null}
qonto transactions list --status pending --status declined
qonto transactions list --status pending,declined --settled-at-from 2026-01-01
```

Dates follow the API: ISO 8601 date-times (`2026-01-01T00:00:00Z`) or dates (`2026-01-01`), as described on each flag.

<Note>
  `qonto transactions list` needs a bank account. Without `--bank-account-id` or `--iban`, the CLI uses your main account and says so on standard error.
</Note>

## Pagination

List commands return one page at a time, like the API. You can choose which one with `--page` and `--per-page`, or pass `--all` to follow every page and get one JSON document with all the items:

```bash theme={null}
qonto supplier-invoices list --filter-status to_review --all
```

With `--all`, a large collection means many API calls. Narrow it with filters (a date range, a status) where you can, see [Rate limitations](/get-started/general/rate-limitations).

## Creating and changing things

Write commands take the fields of the request as flags:

```bash theme={null}
qonto teams create --name Finance
qonto cards update-nickname <card-id> --nickname "Ads"
qonto client-invoices mark-paid <invoice-id> --paid-at 2026-09-01
```

For larger requests, pass the whole JSON body with `--body`, inline, from a file with `@`, or from standard input with `-`. Flags you add override the matching keys in the body.

```bash theme={null}
qonto clients create --body @client.json
qonto client-invoices create --body @invoice.json --due-date 2026-10-31
cat quote.json | qonto quotes create --body -
```

Some requests only exist as a body, because their shape depends on a type field (cards, clients, payment links, card limits). Their `--help` says so, and the fields are described in the [API reference](/api-reference/introduction).

Uploads take a file path:

```bash theme={null}
qonto transactions attachments upload <transaction-id> --file receipt.pdf
```

Commands whose endpoint supports [idempotent requests](/get-started/general/idempotent-requests) (they have an `--idempotency-key` flag) send a new key automatically each time. To retry one safely after a network error, pass your own key and reuse it on the retry.

## Strong Customer Authentication

Some actions, such as creating a physical card, require **Strong Customer Authentication (SCA)**. When the API asks for it, the command waits and tells you what to do:

```
Strong Customer Authentication required. Approve the request in the Qonto app on your paired phone…
Approved.
```

Once you approve, the CLI sends the request again and prints the result. If you decline, or do not answer within 15 minutes, the command stops with an error and **the action is not executed**.

Choose how you authenticate with `--sca-method` (or the `sca_method` setting, see [Configuration](/cli/configuration)):

| Method                    | What happens                                                                  |
| ------------------------- | ----------------------------------------------------------------------------- |
| `paired-device` (default) | Approve in the Qonto app on your paired phone.                                |
| `passkey`                 | Follow the passkey link Qonto sends you.                                      |
| `sms-otp`                 | Type the one-time code Qonto sends you by SMS. Needs an interactive terminal. |

If no device is paired with your Qonto account, the command tells you to pair one in the Qonto app first.

## Troubleshooting a command

`-v` (`--verbose`) logs one line per HTTP request to standard error, with the method, the path, the response status, the size, and the time taken:

```
$ qonto -v memberships me
* GET /v2/membership -> 200 (313 bytes, 156ms)
```

It never logs tokens, so you can share those lines when asking for help.

## Exit codes

| Code | Meaning                                                                                              |
| ---- | ---------------------------------------------------------------------------------------------------- |
| `0`  | Success.                                                                                             |
| `1`  | The API refused the request, or authentication failed. The API's error is printed on standard error. |
| `2`  | The command was used incorrectly: an unknown flag, a missing argument, an invalid value.             |
| `3`  | This version of the CLI is no longer supported. [Update it](/cli/install#update).                    |
