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

# Output formats

> Pretty tables, JSON, quiet, and TOON - and when to use each.

Every command can return one of four output formats. In an interactive terminal, pretty output is the default. Use the flags below for machine-readable output.

| Format | Flag | Best for |
| - | - | - |
| Pretty | *(default in a terminal)* | Reading a result yourself. |
| JSON | `--json` | Machine-readable payloads with pagination metadata. |
| Quiet | `--quiet` | Piping an identifier into another command or `jq`. |
| TOON | `--toon` | Feeding list/show output back to an LLM (fewer tokens than JSON). |

If more than one is set, precedence is `--toon` > `--quiet` > `--json` > pretty. `--verbose` changes pretty output only, so it has no effect alongside the other three.

## Global flags

These flags work on every command:

| Flag | Description |
| - | - |
| `--json` | Output as JSON |
| `--quiet` | Output raw data only (no envelope) |
| `--toon` | Output in TOON format (token-optimized for AI agents) |
| `--verbose` | Expand every field of a record instead of a table |
| `--subdomain` | Override saved subdomain |

`--subdomain` selects the signed-in workspace a command targets. See [Authentication](/cli/authentication).

## Pretty

The default in a terminal: tables for lists and key-value pairs for a single record. It is intended for people, not scripts.

A table shows at most seven columns. The CLI picks identifier and name fields first (`id`, `number`, `subject`, `status`, and similar), fills the remaining columns alphabetically, and keeps any URL fields as the last columns without truncating them.

```bash theme={"system"}
neetodesk tickets list --status open
```

## Verbose

`--verbose` prints every field of every record instead of a table, one label per line, with nested objects and lists indented underneath. Use it when a table leaves out a field you need.

```bash theme={"system"}
neetodesk tickets list --status open --verbose
```

## JSON

JSON wraps the resource body with breadcrumbs and, for list commands, pagination details:

```json theme={"system"}
{
  "data": [
    { "id": "0f1e4c9a-6d3b-4f92-8a71-25b0c8d4e6f3", "number": 1042, "subject": "Refund not received", "status": "open" }
  ],
  "breadcrumbs": [
    { "label": "Show", "command": "neetodesk tickets show <ticket-number>" },
    { "label": "Update", "command": "neetodesk tickets update <ticket-number>" }
  ],
  "pagination": {
    "total_records": 250,
    "total_pages": 9,
    "current_page_number": 1,
    "page_size": 30
  }
}
```

For list commands, `data` is the array of records; the CLI removes the API response's resource key. For `show`, `create`, and `update`, `data` holds the API response body, such as `{ "ticket": { ... } }`.

`breadcrumbs` is omitted when empty, and `pagination` appears only on list commands. The CLI automatically uses JSON when output is piped (a non-TTY); use `--json` to force it.

## Quiet

`--quiet` returns only the `data` payload. For `create` and `update`, it prints the resource identifier; for `delete`, it prints `success`. This is useful in scripts:

```bash theme={"system"}
neetodesk tickets create \
  --email oliver@example.com --subject "Refund not received" \
  --description "Card was charged twice." \
  --quiet
# → prints the new ticket id
```

## TOON

`--toon` encodes the same data as [TOON](https://github.com/alpkeskin/gotoon) (Token-Optimized Output Notation). It keeps the JSON shape while compressing whitespace and keys, typically using 30-60% fewer tokens. Use it when giving list or show output to an AI assistant.

```bash theme={"system"}
neetodesk tickets list --status open --toon
```

## Pagination

List commands return results in pages. The flags below control paging, and the JSON envelope's `pagination` block shows your position in the result set.

### Pagination parameters

<ParamField body="--page" type="integer">
  The page of results to retrieve, starting from 1.
</ParamField>

<ParamField body="--page-size" type="integer">
  The number of records to return per page (max 100).
</ParamField>

### Example usage

```bash theme={"system"}
neetodesk tickets list --page 2 --page-size 50
```

This returns the second page of tickets, with 50 records per page.

### Response structure

For list commands the JSON envelope carries a `pagination` block alongside the data:

```json theme={"system"}
{
  "pagination": {
    "total_records": 250,
    "total_pages": 5,
    "current_page_number": 2,
    "page_size": 50
  }
}
```

<ResponseField name="pagination.total_records" type="integer">
  The total number of records across all pages.
</ResponseField>

<ResponseField name="pagination.total_pages" type="integer">
  The total number of pages available.
</ResponseField>

<ResponseField name="pagination.current_page_number" type="integer">
  The page you are currently on.
</ResponseField>

<ResponseField name="pagination.page_size" type="integer">
  The number of records returned per page.
</ResponseField>

### Default behavior

If you omit both flags, the CLI lets the server use its defaults: page 1 with 30 records. Either flag overrides the defaults; `--page-size` accepts up to 100.

### Best practices

* To retrieve every page, increment `--page` until `current_page_number == total_pages`.
* Use `--json` or `--toon` in scripts when you need the `pagination` block. `--quiet` removes the envelope, so it does not include pagination metadata.
* Check `total_records` before you begin to estimate the work involved.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.