Clone asset version
Clone an Asset Version.
- This creates a new draft version with the same content and variable definitions as the source version.
- The new version will be associated with the same Asset as the original version.
- Cloning is useful for making changes to a published or archived version without affecting the original.
- The cloned version will have a new unique identifier and its status will be set to ‘draft’.
Authorizations
Headers
Unique idempotency key for each request (e.g., V4 UUID).
Path Parameters
The unique identifier of the asset. Format: 'ast_' followed by alphanumeric characters.
The unique identifier of the asset version. Format: 'astv_' followed by alphanumeric string.
Body
Optional notes or comments about this specific Asset Version. Useful for tracking changes or providing context.
255
If set to true
, this Asset Version will be published immediately after creation. Default is false
.
Response
Represents a specific version of an Asset, containing the actual content and metadata. Asset Versions are the core entities for version control, compliance tracking, and content management in Posta.
Key aspects:
- Content: Can be HTML templates (with variable support), images, fonts, or documents (e.g., PDFs).
- Status: Determines the overall status of the parent Asset (
draft
,published
,archived
, ordeleted
). - Version Control: Allows tracking changes and maintaining multiple iterations of an Asset.
- Compliance: Facilitates auditing and regulatory compliance through versioning.
HTML templates can use variables for dynamic content. Images and fonts can be referenced as variables within HTML templates. Documents (like PDFs) are static and used for rendering documents without dynamic components.
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
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).
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.