Delete an asset
DELETE/v1/assets/{id}
Requires an API key with the templates:write scope. About keys and scopes
Works with integration, agent and partner keys.
A repeat after success returns 404 or 409: treat that as done. About idempotency
Removes the image from the library and deletes its file, which frees its bytes from the storage limit. Email loads an image from its address, so deletion is refused with 409 IN_USE while a template (its draft or any published version), a shared block, a campaign or journey in any status, a journey enrollment in progress, an unsent transactional message, or the workspace brand uses it. details is the AssetUsage of GET /v1/assets/{id}/usage, each use with locked: true where no edit or delete can free the image (a sent campaign keeps it for as long as the campaign exists), false where changing or removing that use frees it. An image in use stays, and counts toward storage, until nothing uses it. Uses are found by the image id in the address, including inside raw HTML and CSS. Messages already sent with inline content through the API cannot be checked. The check is not serialised against saves: a save landing within milliseconds of the delete can still reference the removed image. Agent keys may delete images.
Path parameters
idstringrequiredThe asset's id.
uuid
Header parameters
Kirora-WorkspacestringoptionalPartner keys only: the child workspace to act in, by the external id the partner gave it. Without it, a partner key acts in its own workspace. Any other key that sends it is refused with 403, and an unknown workspace is 404.
pattern
^[A-Za-z0-9._:-]{1,128}$
Returns
Returns 204 No Content with an empty body. It can also return 409 Conflict; see the statuses below. Otherwise returns an error; Errors lists every code and which to retry.
204 No ContentDeleted.409 ConflictThe request conflicts with current state — a duplicate unique value, or a resource whose status does not allow this operation.