Developers

Assets API

All of the Assets API endpoint will be available from version 25.5

The Assets API allows you to upload assets using our public api.

Images and Files

Uploading a resource

Uploading a new resource. This operation will fail if the item already exists in the given location.

POST /assets/resources -F "file=@image.png"

Optional: -F "folder=Campaigns/Images"

Updating a resource

Updating a resource. This operation will either create or update the item if it exists in the given location.

PUT /assets/resources -F "file=@image.png" -F "folder=Campaigns/Images"

Extensions

Uploading an extension

Uploading a new resource. This operation will fail if the item already exists in the given location.

POST /assets/extensions -F "file=@extension.js" -F "type=step"

Optional: -F "folder=Automations"

Types must be one of the following:

Updating an extension

Updating a resource. This operation updates the item if it exists in the given location. Please note, the operation will fail if the item does not exist at the given location.

PUT /assets/extensions -F "file=@extension.js" -F "folder=Automations"

Templates

Uploading a template

Uploading a new template. This operation will fail if the item already exists in the given location.

POST /assets/templates -F "file=@template.html"

Optional: -F "folder=email/automations"

Updating a template

Updating a template. This operation will either create or update the item if it exists in the given location.

PUT /assets/templates -F "file=@template.html" -F "folder=email/automations"

Contextual Schemas

Uploading a schema

Uploading a new schema. This operation will fail if the item already exists in the given location.

POST /assets/contexts -F "file=@schema.json"

Updating a schema

Updating a schema. This operation will either create or update the item if it exists in the given location.

PUT /assets/contexts -F "file=@schema.json"

Webapps

Uploading a webapp

Uploading a new webapp. This operation will fail if the item already exists in the given location.

A .zip archive must passed as the file form value. Please note – the name of the webapp will be the folder name, not the name of the .zip archive.

webapp
 - index.jsp
 - receipt.jsp
 - style.css
 - images
   - logo.png
POST /assets/webapps -F "file=@webapp.zip"

Updating a webapp

Updating a webapp. This operation will either create or update the item if it exists in the given location.

PUT /assets/webapps -F "file=@webapp.zip"