Retrieve an asset's usage
GET/v1/assets/{id}/usage
Requires an API key with the templates:read scope. About keys and scopes
Works with integration, agent and partner keys.
Everything whose content contains the file's address, found by the asset id it carries, so raw HTML, CSS url(...) and addresses with a query string count: templates (the draft or any published version), shared blocks, campaigns and journeys in any status, journey enrollments in progress, unsent transactional messages, and the workspace brand, each list at most 50 long, with hasMore when one is longer. Deleting the asset is refused while any of these is listed. Each entry says whether it is locked: one that no edit or delete can free (a sent campaign, an ended journey, enrollments under way, a message about to go) keeps the image, and its bytes count toward storage, until that use ends, if ever.
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 200 OK with an AssetUsage in data. Otherwise returns an error; Errors lists every code and which to retry.
templatesobject[]requiredTemplates whose draft or any published version uses the image.
3 child attributes
idstringrequireduuid
namestringrequiredlockedbooleanrequiredTrue when no edit or delete can take the image out of this use (a sent campaign, an ended journey, enrollments under way, a message about to go); it is freed only when the use ends, if ever. False when editing or removing it frees the image.
sharedBlocksobject[]requiredShared blocks that use the image.
3 child attributes
idstringrequireduuid
namestringrequiredlockedbooleanrequiredTrue when no edit or delete can take the image out of this use (a sent campaign, an ended journey, enrollments under way, a message about to go); it is freed only when the use ends, if ever. False when editing or removing it frees the image.
campaignsobject[]requiredCampaigns, sent or not, that use the image; locked once sending has started.
3 child attributes
idstringrequireduuid
namestringrequiredlockedbooleanrequiredTrue when no edit or delete can take the image out of this use (a sent campaign, an ended journey, enrollments under way, a message about to go); it is freed only when the use ends, if ever. False when editing or removing it frees the image.
journeysobject[]requiredJourneys, in any status, whose steps use the image; locked once ended.
3 child attributes
idstringrequireduuid
namestringrequiredlockedbooleanrequiredTrue when no edit or delete can take the image out of this use (a sent campaign, an ended journey, enrollments under way, a message about to go); it is freed only when the use ends, if ever. False when editing or removing it frees the image.
journeysWithEnrollmentsobject[]requiredJourneys with enrollments in progress that follow steps using the image. An enrollment keeps the steps it started with, so these free the image only when those enrollments finish.
3 child attributes
idstringrequireduuid
namestringrequiredlockedbooleanrequiredTrue when no edit or delete can take the image out of this use (a sent campaign, an ended journey, enrollments under way, a message about to go); it is freed only when the use ends, if ever. False when editing or removing it frees the image.
messagesobject[]requiredTransactional messages not yet sent that use the image;
nameis the subject or title. A timed one can be cancelled; an immediate one is locked.3 child attributes
idstringrequireduuid
namestringrequiredlockedbooleanrequiredTrue when no edit or delete can take the image out of this use (a sent campaign, an ended journey, enrollments under way, a message about to go); it is freed only when the use ends, if ever. False when editing or removing it frees the image.
brandKitbooleanrequiredWhether it is the workspace's brand kit logo.
hasMorebooleanrequiredMore use it than are listed: each list stops at 50.