---
title: "Upload a new asset."
method: POST
path: "/api/apps/{app}/assets"
tags: ["Assets"]
---

# Upload a new asset.

`POST /api/apps/{app}/assets`

You can only upload one file at a time. The mime type of the file is not calculated by Squidex and is required correctly.

## Path parameters

- `app` string, required

## Query parameters

- `ParentId` string
- `id` string, nullable
- `duplicate` boolean

## Response `201`

Asset created.

- AssetDto
  - `_links` object, required — The links.
  - `id` string, required — The ID of the asset.
  - `parentId` string, required — The ID of the parent folder. Empty for files without parent.
  - `fileName` string, required — The file name.
  - `fileHash` string, nullable — The file hash.
  - `isProtected` boolean, required — True, when the asset is not public.
  - `slug` string, required — The slug.
  - `mimeType` string, required — The mime type.
  - `fileType` string, required — The file type.
  - `metadataText` string, required — The formatted text representation of the metadata.
  - `editToken` string, nullable — The UI token.
  - `metadata` object, required — The asset metadata.
  - `tags` string[], nullable — The asset tags.
  - `fileSize` integer, required — The size of the file in bytes.
  - `fileVersion` integer, required — The version of the file.
  - `type` 'Unknown' | 'Image' | 'Audio' | 'Video', required
  - `createdBy` string, required — The user that has created the schema.
  - `lastModifiedBy` string, required — The user that has updated the asset.
  - `created` string, date-time, required — The date and time when the asset has been created.
  - `lastModified` string, date-time, required — The date and time when the asset has been modified last.
  - `version` integer, required — The version of the asset.
  - `_meta` AssetMeta
    - `isDuplicate` string, required — Indicates whether the asset is a duplicate.
  - `isImage` boolean, required — Determines of the created file is an image.
  - `pixelWidth` integer, nullable — The width of the image in pixels if the asset is an image.
  - `pixelHeight` integer, nullable — The height of the image in pixels if the asset is an image.

## Other responses

- `400` — Asset request not valid.
- `404` — App not found.
- `413` — Asset exceeds the maximum upload size.
- `500` — Operation failed.

---

[API](https://skmtc.net/squidex/apis/squidex-api.md) · [All operations](https://skmtc.net/squidex/apis/squidex-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/squidex/squidex-api/versions/b4a9b62f113a/schema)
