Delete Asset

Permanently deletes an uploaded asset by its ID. Once deleted, the asset becomes inaccessible via any URL and is removed from storage.

DELETE

DELETE

https://api.cortado.com/v1/assets/{asset_id}

Request

This request does not require a body. The asset’s ID is passed in the path. Authentication is required to ensure the user’s permission.

Body Parameters

Parameters

Type

Description

asset_id

string

Unique identifier of the asset

label

string

Bearer token for authentication

Based on the steps above, your code might look something like this. It brings together the key concepts covered — from setup and configuration to routing, authentication, or event handling. Feel free to adapt it to suit your specific use case.

main.ts

import axios from 'axios';

async function deleteAsset(assetId: string) {
  const res = await axios.delete(`https://api.cortado.com/v1/assets/${assetId}`, {
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN'
    }
  });

  return res.data;
}

main.ts

import axios from 'axios';

async function deleteAsset(assetId: string) {
  const res = await axios.delete(`https://api.cortado.com/v1/assets/${assetId}`, {
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN'
    }
  });

  return res.data;
}

main.ts

import axios from 'axios';

async function deleteAsset(assetId: string) {
  const res = await axios.delete(`https://api.cortado.com/v1/assets/${assetId}`, {
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN'
    }
  });

  return res.data;
}

Response

Returns a confirmation message upon successful deletion. If the asset does not exist or the user lacks permission, an appropriate error is returned.

main.ts

{
  "success": true,
  "message": "Asset asset_64f1b2cc has been deleted."
}

main.ts

{
  "success": true,
  "message": "Asset asset_64f1b2cc has been deleted."
}

main.ts

{
  "success": true,
  "message": "Asset asset_64f1b2cc has been deleted."
}

Was this helpful?

Dismiss

Was this helpful?

Dismiss

Last updated on

Jul 27, 2025