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

# widgetic api canvases

> 5 commands for the Canvases operations of the REST API, generated from its OpenAPI description.

`widgetic api canvases <command>` runs the Canvases operations of the REST API. It has 5 commands. Every command also takes [the flags every command takes](https://widgetic.com/docs/cli/commands/index.md).

## `widgetic api canvases create-canvas`

Create Canvas

* Request: `POST /canvases`
* Operation: `createCanvas` (`widgetic api call createCanvas` runs it by that name)
* Also written: `widgetic api canvases create`
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--persistence-key <text>` | text | | Key used for persistent storage and reference |
| `--primary-widget-id <uuid>` | uuid | | Optional primary widget id (usually set after widget create) |
| `--managed-user-id <uuid>` | uuid | | Make the canvas for this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both. The tag is set here and does not change afterwards. |
| `--managed-user-external-id <text>` | text | | Make the canvas for the managed user you registered with this `externalId` (your own identifier for the user). Send this or `managedUserId`, not both. |
| `--project-id <uuid>` | uuid | | Project this canvas belongs to. Empty canvases show on that project's list. |
| `--data <json\|@file\|->` | JSON, `@path` or `-` | | The whole request document as JSON, `@path` to a file that holds it, or `-` for standard input. The flags above override its keys. |

The whole description and the schemas: `widgetic schema api canvases create-canvas`.

## `widgetic api canvases delete-canvas`

Delete Canvas

* Request: `DELETE /canvases/{id}`
* Operation: `deleteCanvas` (`widgetic api call deleteCanvas` runs it by that name)
* Also written: `widgetic api canvases delete`
* Works with any API key.
* It deletes something, so it asks first; without a terminal it needs `--yes`.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the canvas |

The whole description and the schemas: `widgetic schema api canvases delete-canvas`.

## `widgetic api canvases get-all-canvases`

Get All Canvases

* Request: `GET /canvases`
* Operation: `getAllCanvases` (`widgetic api call getAllCanvases` runs it by that name)
* Also written: `widgetic api canvases list`
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--page <int>` | integer | | Page number for pagination (default: 1) |
| `--size <int>` | integer | | Number of items per page (default: 20) |
| `--sort <text>` | text | | Sort field and direction (e.g., "created\_at:desc") (default: created\_at:desc) |
| `--created-after <date-time>` | date-time | | Filter canvases created after the specified date (ISO 8601 format) |
| `--created-before <date-time>` | date-time | | Filter canvases created before the specified date (ISO 8601 format) |
| `--updated-after <date-time>` | date-time | | Filter canvases updated after the specified date (ISO 8601 format) |
| `--updated-before <date-time>` | date-time | | Filter canvases updated before the specified date (ISO 8601 format) |
| `--managed-user-id <uuid>` | uuid | | List only the canvases made for this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both. |
| `--managed-user-external-id <text>` | text | | List only the canvases made for the managed user you registered with this `externalId` (your own identifier for the user). Send this or `managedUserId`, not both. |

The whole description and the schemas: `widgetic schema api canvases get-all-canvases`.

## `widgetic api canvases get-canvas`

Get Canvas

* Request: `GET /canvases/{id}`
* Operation: `getCanvas` (`widgetic api call getCanvas` runs it by that name)
* Also written: `widgetic api canvases get`
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the canvas |

The whole description and the schemas: `widgetic schema api canvases get-canvas`.

## `widgetic api canvases update-canvas`

Update Canvas

* Request: `PUT /canvases/{id}`
* Operation: `updateCanvas` (`widgetic api call updateCanvas` runs it by that name)
* Also written: `widgetic api canvases update`
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the canvas to update |
| `--persistence-key <text>` | text | | Updated key used for persistent storage and reference |
| `--primary-widget-id <uuid>` | uuid | | Primary widget for list/deep-link; omit to leave unchanged |
| `--data <json\|@file\|->` | JSON, `@path` or `-` | | The whole request document as JSON, `@path` to a file that holds it, or `-` for standard input. The flags above override its keys. |

The whole description and the schemas: `widgetic schema api canvases update-canvas`.


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