Represents a digital asset in Posta, primarily used for rendering documents.

Assets are version-controlled containers, where the actual content is stored in Asset Versions. This structure allows for efficient management, compliance tracking, and monitoring of changes over time.

Assets support HTML templates with variables for document personalization, as well as static content like images, fonts, and documents.

id
string
required

Unique identifier for the Asset. Format: 'ast_' followed by alphanumeric characters.

Required string length: 1 - 99999
status
enum<string>
required

Represents the overall status of an Asset, derived from the status(es) of its associated Asset Version(s).

  • draft: Indicates an Asset that is not yet published. This status applies when:

    1. The Asset has no associated Asset Versions, or
    2. At least one Asset Version is in draft status and no version is published.
  • published: Indicates that the Asset has a published Asset Version. The Asset is available for use.

  • archived: Indicates that all associated Asset Versions are archived. This status makes the Asset unavailable for new uses but may still be accessible for historical purposes.

  • deleted: Indicates that all associated Asset Versions have been deleted. This is a terminal status for the Asset.

Note:

  1. Deleted Asset Versions are not considered when determining the Asset's status, except for the deleted status.
  2. An Asset can transition from archived back to draft if a new Asset Version is created, or to published if a new or existing Asset Version is published.
Available options:
draft,
published,
archived,
deleted
type
enum<string>
required

Specifies the type of Asset, determining its content format and how it's processed in Posta. Each type has specific use cases and handling mechanisms.

Available options:
template,
image,
font,
document
name
string
required

Name of the Asset, used for display and organizational purposes.

Required string length: 1 - 255
versionCount
integer
required

Number of versions associated with the asset. Deleted asset versions are not counted.

Required range: 0 < x < 99999
createdAt
string
required

The timestamp the resource was created at (UTC).

modifiedAt
string
required

The timestamp the resource was last modified at (UTC).

description
string

Optional description of the Asset. Provides additional context or details about its purpose or content.

Maximum length: 255
latestVersionId
string

The unique identifier of the latest version of the asset. Format: 'astv_' followed by alphanumeric characters.

Maximum length: 99999
statusVersionId
string

The unique identifier of the status version of the asset. Format: 'astv_' followed by alphanumeric characters.

Maximum length: 99999
statusVersion
object

The asset version that defines the status of the asset. Hierarchical order: published > draft > archived > deleted. Deleted versions are not considered.

metadata
object[] | null

A key-value store for custom metadata.

Limitations:

  1. Up to 20 metadata key-value pairs
  2. Key must be no more than 64 characters
  3. Value must be no more than 512 characters