Skip to main content
POST
cURL
See Uploading files for the end-to-end upload flow.
Your plan limits how many library assets your company can have when you create them through the API: 25 on Free, 100 on Standard, 250 on Premium and unlimited on Enterprise. At the limit the request returns 403 and nothing is created.

Authorizations

Authorization
string
header
required

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

Query Parameters

properties
enum<string>[]

Select the asset properties that should be returned

Available options:
name,
description,
updatedAt,
createdAt,
views,
shares,
assetType,
assetUrl,
isInternal,
transcript,
thumbnailUrl,
tags.title,
tags.createdAt,
tags.updatedAt,
id,
object,
url,
tags.id,
tags.object,
tags.url

Body

application/json

Asset to create

type
enum<string>
required

Type of asset to create

Available options:
pdf,
image,
video,
audio,
docx,
ppt,
xlsx,
htmlPage
Example:

"pdf"

name
string
required

Name of the asset

Maximum string length: 255
Example:

"Sales deck"

fileId
string
required

Id of an uploaded file (from POST /files). Required for pdf, image, video, audio, docx, ppt, xlsx and htmlPage assets. The file's bytes must already be uploaded, its mimeType must match the asset type, and it can only back one asset.

Maximum string length: 64
Example:

"f9Ghw2n0Ju3D"

description
string

Description of the asset

Maximum string length: 20000
tagIds
string[]

Ids of existing tags to attach to the asset (create tags via POST /tags)

Maximum array length: 100
Maximum string length: 64
Example:
isInternal
boolean
default:false

Whether the asset is for internal use only

url
string

Source URL. Required for link assets; for embed assets provide either url or customCode (not both).

Maximum string length: 2048
Example:

"https://example.com/pricing"

customCode
string

Custom embed HTML. Only for embed assets, mutually exclusive with url.

Maximum string length: 200000
Example:

"<iframe src=\"https://example.com\"></iframe>"

metadata
object

Optional media metadata for file-backed assets. The server extracts pdf/image metadata automatically when omitted; video/audio dimensions and duration can only come from the caller.

Response

Asset created

data
object