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

# Documents commands - Omni CLI

> Reference for the omni documents command group, including the v2 draft/publish commands.

Create, manage, and configure [documents](/api/documents), including [permissions](/api/document-permissions), drafts, [labels](/api/document-labels), and [favorites](/api/document-favorites).

```bash theme={null}
omni documents <command>
```

| Command                      | Description                           |
| ---------------------------- | ------------------------------------- |
| `list`                       | List documents                        |
| `create`                     | Create a document                     |
| `get`                        | Get a document                        |
| `delete`                     | Delete a document                     |
| `get-queries`                | List document queries                 |
| `move`                       | Move a document                       |
| `upgrade-layout`             | Upgrade dashboard layout              |
| `create-draft`               | Create a document draft               |
| `list-drafts`                | List document drafts                  |
| `discard-draft`              | Discard a document draft              |
| `duplicate`                  | Duplicate a document                  |
| `get-permissions`            | Get document permissions              |
| `update-permission-settings` | Update document permission settings   |
| `add-permits`                | Add document permits                  |
| `update-permits`             | Update document permits               |
| `revoke-permits`             | Revoke document permits               |
| `access-list`                | List document access principals       |
| `add-favorite`               | Add document to favorites             |
| `remove-favorite`            | Remove document from favorites        |
| `list-favorites`             | List users who favorited the document |
| `bulk-update-labels`         | Bulk update document labels           |
| `add-label`                  | Add label to a document               |
| `remove-label`               | Remove label from a document          |

```bash wrap theme={null}
# List documents
omni documents list

# Search favorites for a document
omni documents list-favorites <identifier>

# View help for duplicate command, including arguments and flag details
omni documents duplicate --help
```

<Warning>
  `omni documents update` (rename) and `omni documents put` (full replace) are deprecated and were removed on July 31, 2026 - they now return a `410` error unless your organization has been granted a migration extension. Contact Omni support if you need one. `omni documents transfer-ownership` is also deprecated; grant the `OWNER` permission role via `add-permits` instead. Use the `v2` commands below for renaming, editing, and ownership changes going forward.
</Warning>

#### Document content (v2)

The `v2` commands manage a document's content (tiles, queries, dashboard layout) through an explicit draft/publish workflow, replacing the deprecated `update` and `put` commands above.

| Command                        | Description                        |
| ------------------------------ | ---------------------------------- |
| `v2-create`                    | Create document                    |
| `v2-get`                       | Read document state                |
| `v2-get-draft`                 | Read draft state                   |
| `v2-patch-draft`               | Create draft and patch document    |
| `v2-patch-draft-by-identifier` | Patch draft                        |
| `v2-publish-draft`             | Publish draft                      |
| `v2-update-identifier`         | Rename document identifier         |
| `v2-bind-query-model`          | Bind a tile to a query model       |
| `v2-unbind-query-model`        | Unbind a tile from its query model |
| `v2-remove-dashboard`          | Remove dashboard from document     |

```bash wrap theme={null}
# Patch a draft (creates one if none exists), then publish it
omni documents v2-patch-draft <identifier> --body '{"name":"New name"}'
omni documents v2-publish-draft <identifier>

# View help for v2-patch-draft, including arguments and flag details
omni documents v2-patch-draft --help
```

<Note>
  Every command in this group also accepts the [global flags](/developers/cli/reference/global-flags), including `--token`, `--profile`, `--format`, and `--compact`.
</Note>
