Sign inGet Started

List editable resources that use an asset

GET
/v1/assets/{asset_id}/references
const references = await bird.assets.references.list(
  "ast_01krdgeqcxet5s7t44vh8rt9mg",
);
console.log(references.data, references.truncated);
Response200
{
  "data": [
    {
      "resource_type": "email_template",
      "resource_id": "emt_01j9zyq8k7f0ra2m6c4x5w8pv3",
      "usage": "draft"
    }
  ]
}

Returns editable resources that reference this asset. Each entry indicates whether the reference appears in the resource's draft, published version, or both. Results reflect the latest saved versions, so they exclude unsaved editor changes and older published versions.

Only resources you have permission to read are included. Email-template references require email_management:read in addition to assets:read. Hidden resources do not affect the truncated flag.

Removing an asset does not break existing references because its original URL keeps serving. Use this list to find content that should reference a replacement asset.

Parameters

asset_idstring

ID of the asset.

Response Payload

data
array of object
required
Show child attributes
data.resource_type
string
required

What kind of resource this is. New kinds appear as other products start using the media library, so treat an unfamiliar value as a resource this client does not know how to link to rather than as an error.

Possible values (may grow over time): email_template

data.resource_id
string
required

The resource's own identifier, carrying that resource's prefix (emt_ for an email template), for linking straight to it.

data.resource_name
string
required

The resource's current display name, read when you list references.

data.usage
string
required

Which copy of a resource uses an asset.

  • draft: it is not reaching anyone yet.
  • published: the change has to be published before recipients see it.
  • both: the asset is used in both copies.

Possible values (may grow over time): draft, published, both

truncated
boolean
required

True when more resources use this asset than one response can carry, so the list is a partial answer. Replace the asset's usages you can see, then list again to find the rest.

Continue with the documentation, guides and examples for this topic.