Skip to main content
POST
create_upload_grant

Authorizations

X-API-Key
string
header
required

Path Parameters

workspace_id
string<uuid>
required

Workspace identifier.

Body

application/json

Body for POST /workspaces/{workspace_id}/upload-grants.

Every field narrows what the grant's holder may do; an empty body mints a grant for one upload anywhere in the workspace with the default TTL.

max_bytes
integer | null

Per-grant byte cap, tighter than the service-wide NDI_MAX_UPLOAD_BYTES. Omit for the service cap.

Required range: x >= 1
path
string | null

Pin the upload to exactly this destination path. Omit to let the holder choose.

Required string length: 1 - 1024
Pattern: ^[^/]
total_size_bytes
integer | null

Exact expected upload size frozen into the grant. Distinct from max_bytes: a short body is rejected even when it fits under the cap.

Required range: x >= 0
ttl_seconds
integer
default:3600

How long the grant verifies, in seconds.

Required range: 1 <= x <= 3600

Response

Successful Response

A minted upload grant, ready to hand to an end client.

The holder sends token in the X-Upload-Token header of a multipart POST to upload_url (the workspace's upload_file route). The grant authorizes that one method only, and is single-use where the deployment runs Redis.

expires_at
string<date-time>
required

When the grant stops verifying.

token
string
required

Send in the X-Upload-Token header of the upload request.

upload_url
string
required

The upload_file route the token is valid against.