PUT
/
assets
/
{id}
/
versions
/
{versionId}

Only draft or published Asset Versions can be updated. On a published Asset Version only notes can be updated.

Authorizations

X-Api-Key
string
headerrequired

Headers

Idempotency-Key
string

Unique idempotency key for each request (e.g., V4 UUID).

Path Parameters

id
string
required

The unique identifier of the asset. Format: 'ast_' followed by alphanumeric characters.

versionId
string
required

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

Body

application/json

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, or deleted).
  • 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.

notes
string

Optional notes or comments about this specific Asset Version. Useful for tracking changes or providing context.

Maximum length: 255
content
object

Defines the content of an Asset Version, supporting multiple content sources. The source property determines how the content is provided and managed.

  • inline: Content is stored directly in Posta. It can be provided upon creation or added/edited later, used primarily for HTML templates. Maximum 102,400 bytes.

  • import: A convenience feature for initial content creation. Accepts a publicly available URL, downloads the content, and stores it in Posta. After import, it doesn't retain its external reference.

  • externalUrl: Content remains externally hosted and is fetched every time it's needed. Posta does not store this content but maintains a reference to the external URL.

Choose the appropriate type based on your content management needs, update frequency, and integration requirements. inline and import are recommended over externalUrl for security, compliance, and performance reasons.

variableDefinitions
object[]

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.

publish
boolean

If set to true, this Asset Version will be published immediately after creation. Default is false.