v1

latestOpenAPI 3.0.42026-08-06124112344.5 KB
Media

Create a presigned direct-to-S3 upload slot.

Returns a short-lived presigned S3 PUT URL so a client can upload large binary artifacts (e.g. Revel Digital .webapp zip bundles) DIRECTLY to storage without the bytes streaming through the API. After uploading, call POST /media/uploads/{id}/finalize to ingest the object into the media library.

The account is always derived from the authenticated key/token — never from the body. The presigned URL is scoped to a single object key under the account's namespace, so it can never overwrite another account's objects.

Three-step flow:

# 1) Request a slot
curl -X POST "https://api.reveldigital.com/api/media/uploads" \
     -H "X-Reveldigital-Apikey: <API_KEY>" \
     -H "Content-Type: application/json" \
     -d '{ "name": "myapp.webapp", "group_id": "<GROUP_ID>", "tags": ["env=Production"], "content_type": "application/zip" }'
            
# 2) Upload the bytes straight to S3 (Content-Type MUST match the returned header)
curl -T myapp.webapp -H "Content-Type: application/zip" "<upload_url>"
            
# 3) Finalize / ingest
curl -X POST "https://api.reveldigital.com/api/media/uploads/<id>/finalize" \
     -H "X-Reveldigital-Apikey: <API_KEY>"

All media types supported by the multipart upload work here too (images, audio, video, presentations, PDF, and .webapp bundles): finalize downloads the staged object to the server and runs the SAME ingestion pipeline, so video is transcoded just as it is for a multipart upload.

post/media/uploads

Request body

namestring nullable

The file name of the asset to upload, including extension (e.g. myapp.webapp). The extension determines the resulting media type, so preserve .webapp for webapp bundles.

group_idstring nullable

Optional media group id the finalized media will be placed in. When omitted the account's root media group is used.

tagsstring[] nullable

Optional tags applied to the finalized media (stored newline-delimited on the media record).

content_typestring nullable

Optional content type the client will send on the S3 PUT. Defaults to application/zip for .webapp bundles, otherwise the type inferred from the file extension. The value is pinned into the presigned signature and the client MUST send the same header.

advertiser_idstring nullable

Optional advertiser/user id the finalized media is attributed to.

is_sharedboolean nullable

Optional flag marking the finalized media as shared with other accounts.

sizeinteger nullable

Optional declared object size in bytes. When supplied it is validated against the configured maximum up front; the real size is always re-validated at finalize.

Response

Returns the created upload slot

idstring nullable

The opaque upload slot id. Use it to finalize (POST /media/uploads/{id}/finalize) or to query status (GET /media/uploads/{id}).

upload_urlstring nullable

The presigned S3 URL the client uploads the raw bytes to.

methodstring nullable

The HTTP method to use against RevelDigital.Core.PublicApi.Models.MediaUploadResponse.UploadUrl. Always PUT.

headersobject nullable

The exact headers the client MUST send on the upload request (at minimum Content-Type).

keystring nullable

The S3 object key the bytes are written to. Scoped to the authenticated account.

expires_atstring date-time

The UTC time the presigned URL expires (ISO-8601).