> ## 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 uploads

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

`widgetic api uploads <command>` runs the Uploads 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 uploads delete-upload`

Delete an upload

* Request: `DELETE /uploads/{id}`
* Operation: `deleteUpload` (`widgetic api call deleteUpload` runs it by that name)
* Also written: `widgetic api uploads 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 | |

The whole description and the schemas: `widgetic schema api uploads delete-upload`.

## `widgetic api uploads get-upload`

Get an upload by id

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

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | The upload to read |

The whole description and the schemas: `widgetic schema api uploads get-upload`.

## `widgetic api uploads get-upload-limits`

Upload size limits and accepted file types

* Request: `GET /uploads/limits`
* Operation: `getUploadLimits` (`widgetic api call getUploadLimits` runs it by that name)
* Works with any API key.

This command takes only the flags every command takes.

The whole description and the schemas: `widgetic schema api uploads get-upload-limits`.

## `widgetic api uploads list-uploads`

List the account's uploads

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

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--limit <int>` | integer | | Maximum number of files to return (default: 50) |
| `--managed-user-id <uuid>` | uuid | | List only the files uploaded 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 files uploaded 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 uploads list-uploads`.

## `widgetic api uploads upload-file`

Upload a file

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

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--file <path>` | path of a file | yes | The file to store |
| `--context-type <text>` | one of `widget-codegen`, `browser-ic`, `content-property` | | What the file is for. Send `content-property` for media that becomes widget content (images, video and PDF); the other values are used by Widgetic's own editor. (default: content-property) |
| `--source <text>` | one of `chat-upload`, `chat-screenshot`, `browser-ic-screenshot`, `preview-screenshot`, `file-browser-upload` | | Which part of the product, or which client, the file comes from (default: file-browser-upload) |
| `--managed-user-id <uuid>` | uuid | | Upload the file for one of your managed users, by Widgetic's id for the user. Send this or `managedUserExternalId`, not both. |
| `--managed-user-external-id <text>` | text | | The same, by your own identifier for the user, the `externalId` you gave when you created the managed user. Send this or `managedUserId`, not both. |
| `--purpose <text>` | one of `canvas`, `chat`, `field` | | Where in your product you use the file. It is kept with the file, so that a customer's storage can be counted by purpose (`getManagedUserStorageUsage`). |

The whole description and the schemas: `widgetic schema api uploads upload-file`.


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