Skip to main content
POST
POST /uploads
Required permissions: library.upload. Creates an upload session, not the file itself. Save the returned data.id, then call POST /uploads/{id}/capability to get the temporary PUT URL. Send your original file to that URL as binary. Follow the step-by-step Postman upload guide, including PUT and the final verification step. Send an Idempotency-Key for this change. It is an operation ID, not an API key. Generate a UUID and reuse it when retrying the same request.
Use your Platform API key in Postman or your backend. Keep it private; do not enter it in this public page. Your workspace permissions and plan limits apply.
See the quickstart for request examples. Required fields and responses are listed below.

Authorizations

Authorization
string
header
required

Platform API key for one workspace. Create it in Settings with an expiry date or Never expire. Keep it private; use it from Postman or your backend, not browser code. Widget keys are not accepted.

Headers

Idempotency-Key
string
required

An operation ID, not your API key. Generate a UUID for each new change and reuse it when retrying the same request. See https://docs.layarva.com/developers/platform-request-keys for Postman, PowerShell and Node.js examples. Upload instructions are refreshed when requested again.

Pattern: ^[A-Za-z0-9._:-]{1,128}$

Body

application/json

Send application/json using the fields below. JSON requests must be no larger than 64 KiB.

PNG/JPEG/WebP/GIF/AVIF ≤32 MiB, PCM WAV ≤16 MiB, self-contained Lottie JSON ≤2 MiB. MP3/MP4/PDF uploads: MP3 ≤32 MiB in MEDIA/AUDIO, MP4 ≤128 MiB in MEDIA/VIDEO, PDF ≤32 MiB in DOCUMENTS only. PDF is not a playable Playlist item. SHA-256 and size must match the actual file. Unsupported SVG/fonts are refused. Missing or unavailable folder falls back to No group.

fileName
string
required
Maximum string length: 255
contentType
string
required
Maximum string length: 160
sizeBytes
integer
required
Required range: 1 <= x <= 2147483647
checksumSha256
string
required
Pattern: ^[a-f0-9]{64}$
folderId
string | null
Pattern: ^[A-Za-z0-9_-]{1,100}$
libraryType
enum<string>
default:MEDIA
Available options:
MEDIA,
IMAGE,
VIDEO,
AUDIO,
BACKGROUND,
LOTTIE,
DOCUMENTS

Response

Safe live-authorized result

data
object
required