v1

latestOpenAPI 3.0.1Apache 2.02026-08-063494581.6 MB
esper_cloud_api_Content

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.

post/v0/enterprise/{enterprise_id}/content/upload/

Path parameters

enterprise_idstring required

A UUID string identifying this enterprise.

Response

Successful Operation

idinteger required

Unique content Identifier

download_urlstring url

URL to download the content

namestring

Name of the content

keystring
is_dirboolean
kindstring nullable

The mime type of the content

hashstring

Hash string of the content

sizestring

Size of the content in bytes

pathstring

Path to the content

permissionsstring

The permssion string for the content

tagsstring[]

Tags for the content

descriptionstring nullable

Description for the content

createdstring date-time
modifiedstring date-time
enterprisestring url

URL of the enterprise resource