Upload new content
Uploads a file to the enterprise content library, creating a new Content record. Accepts a multipart/form-data payload with the binary file in the key field and returns the resulting Content object including id, download_url, MIME type, hash, and size. This is the primary mechanism for adding files to Esper's content library for device distribution.
About Upload Content
The content upload endpoint stores an arbitrary file in Esper's enterprise content library, which acts as a managed file repository for pushing files to enrolled devices. This is not intented for application uploads. Use the app upload enpoint instead. On successful upload, Esper returns a Content record with a download_url, a computed hash for integrity verification, and a detected kind (MIME type). The returned id is used to reference the content in distribution commands and PATCH operations. Unlike the APK upload endpoint, content upload accepts any supported file type — configuration files, scripts, media, documents, and more.
Key Fields
key — required; the binary file to upload, sent as multipart/form-data
id — returned in the response; integer identifier for this content record used in downstream operations
download_url — direct URL to retrieve the uploaded file
hash — SHA hash of the uploaded file for integrity verification
kind — MIME type detected from the uploaded file
tags / description — not set at upload; add via PATCH .../content/{content_id}/ after upload
Common Use Cases
Upload configuration files, scripts, or reference documents to the content library for device distribution. Add media or resource files that devices need to download as part of a provisioning Workflow. Automate content updates as part of a CI/CD or content management pipeline.
Best Practices
Tags and descriptions cannot be set at upload time — immediately follow a successful upload with PATCH .../content/{content_id}/ to add tags and a description, which are needed for the search parameter on the list endpoint to find this file later. Store the id from the response; it is an integer (not a UUID) and is the reference for all downstream content operations. Verify the returned hash against your local file hash to confirm upload integrity.
Workflow
POST the file binary as key in a multipart/form-data request. Capture the id, download_url, and hash from the response. Immediately PATCH the new content record to add tags and description for searchability.
Path parameters
A UUID string identifying this enterprise.
Response
Successful Operation