# taggor data

> Read the data your components collected. Usage, options, examples and exit codes.

## taggor data

Read the data your components collected.

Subcommands: `taggor data collections`, `taggor data notifications`, `taggor data export`, `taggor data files`.

## taggor data collections

List the collections of the workspace.

```sh title="Usage"
npx taggor data collections [options]
```

| Argument | What it does | Default |
| --- | --- | --- |
| `--site <value>` | Only the collections of the components attached to this site (its id or either of its site keys). | - |
| `--component <value>` | Only the collections of this component (its tag or id). | - |

Also takes the [common options](https://taggor.dev/docs/reference/cli.md#common-options): `--api-url`, `--workspace`, `--verbose`, `--store`, `--json`, `--no-input`.

```sh title="Examples"
npx taggor data collections --site st_0123456789abcdefghjkmnpqrs
```

Exit codes: `0` ok, `1` generic, `2` usage, `3` unauthenticated, `4` not_found, `5` conflict, `7` rate_limited, `8` network, `9` forbidden. [What each code means](https://taggor.dev/docs/reference/cli.md#exit-codes).

## taggor data notifications

See and set the e-mails a collection sends when someone submits.

Subcommands: `taggor data notifications show`, `taggor data notifications set`.

## taggor data notifications show

Show a collection's e-mail notifications: mode, language and who gets them; for owners and admins.

```sh title="Usage"
npx taggor data notifications show <collection> [options]
```

| Argument | What it does | Default |
| --- | --- | --- |
| `<collection>` | Collection name or id (col_...). Required. | - |

Also takes the [common options](https://taggor.dev/docs/reference/cli.md#common-options): `--api-url`, `--workspace`, `--verbose`, `--store`, `--json`, `--no-input`.

```sh title="Examples"
npx taggor data notifications show contact-form
```

Exit codes: `0` ok, `1` generic, `2` usage, `3` unauthenticated, `4` not_found, `5` conflict, `7` rate_limited, `8` network, `9` forbidden. [What each code means](https://taggor.dev/docs/reference/cli.md#exit-codes).

## taggor data notifications set

Set a collection's e-mail notifications; what you do not name stays as it is; for owners and admins.

```sh title="Usage"
npx taggor data notifications set <collection> [options]
```

| Argument | What it does | Default |
| --- | --- | --- |
| `<collection>` | Collection name or id (col_...). Required. | - |
| `--mode <value>` | instant (one e-mail per submission that is not marked suspect; suspect ones go only in the summary) or daily_digest (one summary a day). | - |
| `--locale <value>` | en or pt-BR: the language saved for the collection (default: yours). | - |
| `--recipient <value>` | An address to notify; repeat it for up to 5. The list replaces the old one. An address outside the workspace is added in the portal. Can be given more than once. | - |
| `--off` | Turn the e-mails off: empty the recipient list. | - |

Also takes the [common options](https://taggor.dev/docs/reference/cli.md#common-options): `--api-url`, `--workspace`, `--verbose`, `--store`, `--json`, `--no-input`.

```sh title="Examples"
npx taggor data notifications set contact-form --mode daily_digest --recipient ana@example.com
```

Exit codes: `0` ok, `1` generic, `2` usage, `3` unauthenticated, `4` not_found, `5` conflict, `7` rate_limited, `8` network, `9` forbidden. [What each code means](https://taggor.dev/docs/reference/cli.md#exit-codes).

## taggor data export

Export a collection's submissions to a file (streamed, CSV, NDJSON or JSON).

```sh title="Usage"
npx taggor data export <collection> [options]
```

| Argument | What it does | Default |
| --- | --- | --- |
| `<collection>` | Collection name or id (col_...). Required. | - |
| `--format <value>` | csv (default), ndjson or json (one array). | - |
| `--from <value>` | Only submissions created at or after this date or date-time (ISO 8601). | - |
| `--to <value>` | Only submissions created before this date or date-time (ISO 8601). | - |
| `--site <value>` | Only the submissions of this site (its id or either of its site keys). | - |
| `--environment <value>` | Only the submissions sent with one environment's snippet: production (the live website) or staging (the test copy and localhost). Default: both; every row says its environment. | - |
| `--out <value>` | Write to this file instead of the terminal (mode 0600; never overwrites). | - |
| `--force` | With `--out`: replace the file if it exists (never through a symlink). | - |
| `--excel` | CSV: start the file with a UTF-8 BOM so Excel reads accents right. | - |

Also takes the [common options](https://taggor.dev/docs/reference/cli.md#common-options): `--api-url`, `--workspace`, `--verbose`, `--store`, `--json`, `--no-input`.

```sh title="Examples"
npx taggor data export contact-form --format csv --out contacts.csv
npx taggor data export contact-form --from 2026-11-01 --to 2026-12-01 --format ndjson
```

Exit codes: `0` ok, `1` generic, `2` usage, `3` unauthenticated, `4` not_found, `5` conflict, `7` rate_limited, `8` network, `9` forbidden. [What each code means](https://taggor.dev/docs/reference/cli.md#exit-codes).

## taggor data files

Get a private download link, valid for ten minutes, to a file a visitor uploaded with a submission.

Subcommands: `taggor data files show`.

## taggor data files show

Get a private download link, valid for ten minutes, to a file a visitor uploaded with a submission.

```sh title="Usage"
npx taggor data files show <submission> <file> [options]
```

| Argument | What it does | Default |
| --- | --- | --- |
| `<submission>` | The submission id (sub_…). Required. | - |
| `<file>` | The file id (upl_…), the `id` of the file in the submission's data. Required. | - |

Also takes the [common options](https://taggor.dev/docs/reference/cli.md#common-options): `--api-url`, `--workspace`, `--verbose`, `--store`, `--json`, `--no-input`.

```sh title="Examples"
npx taggor data files show sub_0123456789abcdefghjkmnpqrs upl_0123456789abcdefghjkmnpqrs
```

Exit codes: `0` ok, `1` generic, `2` usage, `3` unauthenticated, `4` not_found, `5` conflict, `7` rate_limited, `8` network, `9` forbidden. [What each code means](https://taggor.dev/docs/reference/cli.md#exit-codes).
