Skip to main content
Creating an asset from a file is a two-step process: upload the file, then create the asset from it. Link and embed assets skip the upload entirely — create them directly with a url (or customCode).

1. Create a file and upload the bytes

Call Create a file with the file’s name and MIME type. The response contains the file id and a presigned upload target:
Then PUT the raw bytes directly to upload.url with the returned Content-Type header, before expiresAt (1 hour):
The Content-Type header on the PUT request must exactly match the mimeType the file was created with, or Google Cloud Storage rejects the upload.

2. Create the asset

Call Create an asset with the file id. Dock verifies the upload completed, marks the file ready, and creates the asset — optionally tagged with existing tags:
Calling this before the bytes are uploaded returns a 400 — retry after the PUT completes. A file can back exactly one asset.

Supported asset types

Office documents convert asynchronously

Uploaded office documents (docx, ppt, xlsx) are rendered to PDF in the background. The asset is created immediately, but its backing file reports uploadStatus: "in_progress" until conversion finishes. Poll Retrieve a file with properties[]=uploadStatus to track it.