Create an asset
Create an asset. For file-backed types (pdf, image, video, audio, docx, ppt, xlsx, htmlPage), first create a file via POST /files and PUT the bytes to its upload URL, then pass the file id here. Link and embed assets are created from a URL (or custom embed code) directly. Office documents (docx, ppt, xlsx) are converted to a PDF rendition asynchronously and are returned as the corresponding microsoft*EmbedPdf asset type — poll GET /files/ on the asset’s file to track conversion.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Select the asset properties that should be returned
name, description, updatedAt, createdAt, views, shares, assetType, assetUrl, isInternal, transcript, tags.title, tags.createdAt, tags.updatedAt Body
Asset to create
- File-backed asset
- Link asset
- Embed asset from a URL
- Embed asset from custom code
Type of asset to create
pdf, image, video, audio, docx, ppt, xlsx, htmlPage "pdf"
Name of the asset
"Sales deck"
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.
"f9Ghw2n0Ju3D"
Description of the asset
Ids of existing tags to attach to the asset (create tags via POST /tags)
Whether the asset is for internal use only
Source URL. Required for link assets; for embed assets provide either url or customCode (not both).
"https://example.com/pricing"
Custom embed HTML. Only for embed assets, mutually exclusive with url.
"<iframe src=\"https://example.com\"></iframe>"
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