---
title: "Delete a media asset"
method: DELETE
path: "/media/{workspaceId}/assets/{assetId}"
tags: ["Media library"]
---

# Delete a media asset

`DELETE /media/{workspaceId}/assets/{assetId}`

## Request

- Base URL: `https://api.dynapictures.com`
- URL: `https://api.dynapictures.com/media/{workspaceId}/assets/{assetId}`
- Auth: HTTP bearer

Permanently deletes an asset.

## Path parameters

- `workspaceId` string, required
- `assetId` string, required

## Response `200`

The deleted asset.

- MediaAsset
  - `id` string, required: The ID of the asset.
  - `folder` boolean: Whether this asset is a folder rather than an image.
  - `mimeType` string: The MIME type of the image.
  - `filename` string: The file name.
  - `animated` boolean: Whether the image is animated.
  - `size` integer: The size in bytes.
  - `url` string, uri: URL of the image.
  - `thumbnailUrl` string, uri: URL of the thumbnail.
  - `dateCreated` string, date-time: When the asset was created.
  - `dateUpdated` string, date-time: When the asset was last changed.

## Other responses

- `400`: The request is invalid. `message` says why.
- `401`: The API key is missing or wrong.
- `403`: The plan limit is reached, the trial has expired, or the key has no access to this resource.
- `404`: The resource does not exist, or the key has no access to it.

---

[API](https://skmtc.dev/dynapictures/apis/dynapictures-api.md) - [All operations](https://skmtc.dev/dynapictures/apis/dynapictures-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dynapictures/apis/dynapictures-api/revisions/a9820777cfb3?raw)
