files

Register a file upload

Registers an image or video in the org's file library and returns a presigned S3 URL to upload the bytes to. PUT the raw file to upload_url with the declared Content-Type and Content-Length headers before the URL expires. The file becomes pushable to phones once uploaded; the first push verifies the object. Uploads are capped per file by media type and per org by count and total size.

post/files

Request body

$schemastring uri

A URL to the JSON Schema for this object.

filenamestring required

Display name for the file (also its name on the phone).

mime_typestring required

MIME type of the upload; must be an allowed image or video type.

size_bytesinteger required

Exact size of the upload in bytes; the presigned URL pins it.

Example request

{
  "$schema": "/api/v1/FileCreateRequest.json"
}

Response

Created

$schemastring uri

A URL to the JSON Schema for this object.

upload_expires_in_secondsinteger required

How long the upload URL stays valid.

upload_urlstring required

Presigned S3 PUT URL. PUT the raw file bytes to it with the declared Content-Type and Content-Length headers.

Example response

{
  "$schema": "/api/v1/FileUploadResponse.json"
}

Changes