Skip to main content
POST
Get a URL to upload a template asset

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
file_format
enum<string>
required

File extension, lowercase

Available options:
png,
jpg,
jpeg,
gif,
webp,
pdf,
doc,
docx,
xls,
xlsx,
ppt,
pptx,
txt,
csv,
zip,
rar
Example:

"png"

file_name
string

Name of the file, at most 255 characters. The asset name is this value trimmed and cut to 50 characters; without it the asset is named after its file_id.

Maximum string length: 255
Example:

"hero-image.png"

Response

The upload URL and the ID the asset will have

upload_url
string
required

URL to upload to. Send a PUT request with the file as the body and the content_type value as the Content-Type header. Expires in 5 minutes.

Example:

"https://uploads.example.com/asset/workspace-id/template/asset-id.png?signature=abc"

content_type
string
required

The Content-Type header value required for your PUT request. Must match exactly.

Example:

"image/png"

cdn_url
string
required

Public URL of the file. It stops working if moderation rejects the file.

Example:

"https://cdn.example.com/asset/workspace-id/template/asset-id.png"

file_id
string<uuid>
required

ID the asset will have. It can be read a few seconds after the upload is processed.

Example:

"01234567-89ab-cdef-0123-456789abcdef"