List asset versions
Retrieve a paginated list of versions for a specific asset.
The unique identifier of the asset. Format: 'ast_' followed by alphanumeric characters.
Include archived versions in the results. Default is false
.
The number of items to return per page. The maximum pageSize
is 100 items.
A cursor for the next page of results.
Results are ordered from newest to oldest.
Authorizations
Path Parameters
The unique identifier of the asset. Format: 'ast_' followed by alphanumeric characters.
Query Parameters
Include archived versions in the results. Default is false
.
The number of items to return per page. The maximum pageSize
is 100 items.
A cursor for the next page of results.
Response
Array of items for the current page.
Unique identifier for the Asset Version. Format: 'astv_' followed by alphanumeric characters.
1 - 99999
Represents the status of an Asset Version.
-
draft
: An Asset Version that is being worked on and can be modified. This is the initial state for new Asset Version and cloned Asset Versions. -
published
: An Asset Version that is finalized and available for use. Published Asset Versions cannot be edited. -
archived
: An Asset Version unavailable for new uses but may still be accessible for historical purposes. It can be republished if needed. -
deleted
: An Asset Version that has been deleted from the system. This is a terminal state.
State transitions:
- Draft Asset Versions can be published, archived, or deleted.
- Published Asset Versions can only be archived or deleted.
- Archived Asset Versions can be republished (becoming published) or deleted.
- Deleted is a terminal state with no further transitions.
Notes:
- Only one Asset Version can be in the published state at a time for a given Asset.
- Publishing a new Asset Versions will automatically archive the previously published one, if there was one.
- Cloning any non-deleted Asset Versions will create a new one in draft state.
- Deletion is permanent and should be used with caution.
draft
, published
, archived
, deleted
Optional notes or comments about this specific Asset Version. Useful for tracking changes or providing context.
255
List of variables defined for this Asset Version. Used for content personalization in HTML templates.
Note: When using Assets with Variables with our Letter API, always review the variableHandling
option on the Letter. If validationScope
is set to none
in the request, the defined variables and their behavior will not be evaluated at all. See further information on the Letter object.
Name of the Variable. Used as the key for content personalization.
Must be unique within the Asset Version.
Example: firstName
1 - 64
Specifies the type of the Variable:
value
: A string value (default Variable type when not specified)asset
: References another Asset by its IdexternalUrl
: References content at an external URL (must be publicly available)
Note: We recommend using asset
type Variables instead of externalUrl
for better consistency,
security, compliance, and availability. External URLs might change without version control,
may be subject to throttling, or could become unavailable.
value
, asset
, externalUrl
Specifies how the Variable should be handled during rendering.
optional
: The Variable is optional and may or may not be provided in a request (such as create letter). IfallowEmpty
istrue
you can pass an empty string as its value.required
: The Variable must be provided in a request (such as create letter). IfallowEmpty
istrue
you can pass an empty string as its value.preset
: The preset value will be used and the variable should not be included in the request (such as create letter). ThepresetValue
must be defined when this behavior is used.allowEmpty
is not applicable to this behavior.overridablePreset
: The preset value will be used, unless a value is explicitly passed in a request to override the preset value. ThepresetValue
must be set when this behavior is used, and the variable can be included in a request if an override is necessary, otherwise thepresetValue
will be used. IfallowEmpty
istrue
you can pass an empty string as its value.
Note: When using Assets with Variables with our Letter API, always review the variableHandling
option on the Letter. If validationScope
is set to none
in the request, the defined variables and their behavior will not be evaluated at all. See further information on the Letter object.
For detailed examples and edge cases on how behavior
, allowEmpty
, and presetValue
interact, see the Assets Overview in our API reference.
optional
, required
, preset
, overridablePreset
Determines whether an empty value is acceptable for this Variable.
Example empty string: { "name": "firstName", "value": "" }
Note: null
is considered as no value, not an empty one.
For detailed examples and edge cases on how behavior
, allowEmpty
, and presetValue
interact, see the Assets Overview in our API reference.
Specifies a preset value for the Variable. This value may be used when:
- the Variable is not provided
- a value is provided but the behavior is set to
presetValue
For detailed examples and edge cases on how behavior
, allowEmpty
, and presetValue
interact, see the Assets Overview in our API reference.
Example: "ast_2k1UXnFem92yBFKxtTkQQYhVWyr"
512
Provides a sample value for the Variable, useful for documentation and UI purposes. This value is not used in the actual rendering process. It's primarily for demonstrating expected input in user interfaces or documentation.
Example: "Jane"
512
MIME type of the Asset Version content. Indicates the format of the content (e.g., 'text/html', 'image/jpeg', 'application/pdf').
1 - 99999
Length of the Asset Version content in bytes. Useful for content management and transfer considerations.
-1 < x < 999999999
URL where the rendered content of this asset version can be accessed. Available after publishing.
1 - 99999
The timestamp the resource was created at (UTC).
The timestamp the resource was last modified at (UTC).
A cursor for the next page of results.