Delete an asset
const url = 'https://api.ebitex.io/assets/management/v1/assets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.ebitex.io/assets/management/v1/assets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'Permanently deletes one asset: it leaves the library, its stored files and every public copy are purged, and its public URL stops working. Anything that referenced it, such as a Content page, stops resolving it. Deleting does not check references and never refuses because something uses the asset, so read where it is used first and delete only what you were asked to delete. It cannot be undone. One asset per call.
It needs the top level of key, assets.management.delete, which only the Assets screen can make and only while ebitex has the level switched on; a write key answers 403 scope_denied naming it. The delete is recorded in the activity log against the key.
Key: an Assets management key with assets.management.delete.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Responses
Section titled “ Responses ”No content.
missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired.
payment_required: the organization’s subscription needs attention.
scope_denied naming assets.management.delete: the key is not a delete key.
scope_denied: the key is not an Assets management key. permission_denied: a read key was used for a write. app_not_available: Assets is not enabled for the organization. origin_denied or ip_denied: the key was used from an origin or address outside its restrictions.
There is no such asset in the organization.
too_many_failed_authentications: too many bad keys from this address; rate_limited: too many requests from the organization. Retry-After says how long to wait.