Files
The Files API provides a multipart upload workflow for securely uploading binary files, such as audio recordings and
cover artwork. Once assembled, the API returns a permanent fileUrl that you can reference in other catalog endpoint
payloads.
Files uploaded through these endpoints can only be used with the V2.0 API endpoints. They are not compatible
with V1.0 API endpoints. Likewise, files uploaded via V1.0 endpoints (e.g., POST /media/image/upload) cannot be
referenced in V2.0 API payloads.
Upload Workflow
Uploading a file is a three-step process:
-
Create - Call POST
/files/v1/uploads/createto initialize the upload. The response provides anuploadId, the suggested total number ofparts, and the defaultchunkSizeBytes(10,000,000 bytes / 10MB) -
Sign & upload each part - For every part number from
1toparts, call POST/files/v1/uploads/sign-partto receive a pre-signedurl, the required HTTPmethod(typicallyPUT), necessaryheaders, and an expiry timestamp.
- Optional Splitting (Recommended for Speed): Splitting your file into the suggested number of chunks allows you to sign and upload multiple parts in parallel, which significantly reduces total upload time.
- Single Upload (Alternative): Chunking is optional. If the API suggests 2 parts, you can simply sign part
1, upload the entire file to that single signed URL, and ignore part 2. - Time Limit: Pre-signed URLs are valid for exactly 20 minutes. If you attempt to upload to the URL after it
expires, it will return a
403 Forbiddenerror.
- Complete - Once your parts (or single full file) have been uploaded successfully, call
POST
/files/v1/uploads/completewith theuploadIdand an array of the uploaded part numbers.
- Note: The
partsarray only needs to contain the parts you actually uploaded (e.g., just[1]if you uploaded the whole file at once). - On success, the API returns the final assembled
fileUrl.
Supported File Types
The purpose field determines which content types are accepted for a given upload.
| Purpose | Accepted content types |
|---|---|
Image, CoverImage | image/jpeg image/jpg image/png image/gif image/webp image/bmp |
File, GenericFile | image/jpeg image/jpg image/png image/gif image/webp image/bmp audio/wav application/pdf application/msword application/vnd.openxmlformats-officedocument.wordprocessingml.document |
Video | video/mp4 video/mpeg video/quicktime video/webm video/x-msvideo |
Audio | audio/wav audio/mpeg audio/mp3 audio/ogg audio/webm audio/aac |
Create Upload
/files/v1/uploads/create Initializes a new upload session. Returns the upload ID, the suggested chunk size, and the suggested number of parts.
Request Body *
object fileName string cover.jpg, recording.wav contentType string image/jpeg, image/png, audio/wav, audio/mpeg, video/mp4, application/pdf size integer purpose string Image, CoverImage, File, GenericFile, Video, Audio Responses
object uploadId string chunkSizeBytes integer parts integer /files/v1/uploads/create curl -X POST "https://platform.revelator.com/files/v1/uploads/create" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"fileName": "midnight-tides-cover",
"contentType": "image/jpeg",
"size": 10485760,
"purpose": "CoverImage"
}' curl -X POST "https://platform.revelator.com/files/v1/uploads/create" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"fileName": "midnight-tides-cover",
"contentType": "image/jpeg",
"size": 10485760,
"purpose": "CoverImage"
}' Example response 200
{
"uploadId": "d9fad28c-c3d5-459b-9aa4-2e64ab679924",
"chunkSizeBytes": 10000000,
"parts": 2
} {
"uploadId": "d9fad28c-c3d5-459b-9aa4-2e64ab679924",
"chunkSizeBytes": 10000000,
"parts": 2
} Sign Part
/files/v1/uploads/sign-part Returns a pre-signed URL for uploading a file part. PUT the binary chunk directly to the returned URL using the provided headers.
Request Body *
object uploadId string partNumber integer Responses
object method string url string headers object expiresAtUtc string (date-time) /files/v1/uploads/sign-part curl -X POST "https://platform.revelator.com/files/v1/uploads/sign-part" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"uploadId": "d9fad28c-c3d5-459b-9aa4-2e64ab679924",
"partNumber": 1
}' curl -X POST "https://platform.revelator.com/files/v1/uploads/sign-part" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"uploadId": "d9fad28c-c3d5-459b-9aa4-2e64ab679924",
"partNumber": 1
}' Example response 200
{
"method": "PUT",
"url": "https://revelatorstage.blob.core.windows.net/temp-uploads/...",
"headers": {
"Content-Type": "application/octet-stream",
"x-ms-blob-type": "BlockBlob"
},
"expiresAtUtc": "2026-03-17T10:18:53.7017793Z"
} {
"method": "PUT",
"url": "https://revelatorstage.blob.core.windows.net/temp-uploads/...",
"headers": {
"Content-Type": "application/octet-stream",
"x-ms-blob-type": "BlockBlob"
},
"expiresAtUtc": "2026-03-17T10:18:53.7017793Z"
} Complete Upload
/files/v1/uploads/complete Finalizes the upload workflow after your parts (or single file) have been uploaded to their signed URLs. Returns the permanent file URL.
Request Body *
object uploadId string parts integer[] Responses
object fileUrl string /files/v1/uploads/complete curl -X POST "https://platform.revelator.com/files/v1/uploads/complete" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"uploadId": "dad5931c-c728-4dfb-bda5-bd67a1905303",
"parts": [
2,
1
]
}' curl -X POST "https://platform.revelator.com/files/v1/uploads/complete" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"uploadId": "dad5931c-c728-4dfb-bda5-bd67a1905303",
"parts": [
2,
1
]
}' Example response 200
{
"fileUrl": "https://revelatorstage.blob.core.windows.net/images/00000000-0000-0000-0000-000000000000/file.jpg"
} {
"fileUrl": "https://revelatorstage.blob.core.windows.net/images/00000000-0000-0000-0000-000000000000/file.jpg"
}