Skip to content
Sign in Waitlist
Docs/API reference/Media/Upload media file

Upload media file

PUT /v1/media/:id/content scope write

Uploads the whole file at once (media created with simple: true, up to 50 MB). The body is the raw bytes.

HeadersAuthorization: Bearer praeko_… and X-Praeko-Contract: en. Always send both.

Legacy Portuguese alias (still answered, marked as deprecated): /v1/midia/:id/conteudo.

Parameters

Name In Description
id path Media item id.

Request body

The raw bytes of the file (not JSON), with the file's Content-Type.

Example

curl -X PUT "https://praeko.app/v1/media/01KA3VQ7M2T9XE4HB8N5RZ6C0D/content" \
  -H "Authorization: Bearer $PRAEKO_KEY" \
  -H "X-Praeko-Contract: en" \
  -H "Content-Type: video/mp4" \
  --data-binary @video.mp4

Response

Success status When
200 Success.
Response 200
{
  "id": "01KA3VQ7M2T9XE4HB8N5RZ6C0D",
  "type": "video",
  "name": "video.mp4",
  "mime": "video/mp4",
  "size": 18874368,
  "state": "ready",
  "createdAt": "2026-11-07T14:02:11.482Z"
}

Upload in a single request, for media created with simple: true. Returns the media item already ready.

Errors

No errors specific to this route besides the common ones.

Errors on any route

Status code When
401 unauthorized The Authorization: Bearer … header is missing.
401 invalid_api_key The key does not exist.
401 revoked_api_key The key has been revoked.
401 expired_api_key The key has expired.
403 forbidden The key's scope is not enough for this route (see the scope badge).
429 rate_limited The per-minute request limit was exceeded.

The body of every error is { "error": { "code", "message", "details"? } }. See all error codes.

Try it

Try it

The live test uses your key and your account. It stays off when you are not signed in.

Sign in to try it
Question or mistake on this page? contato@praeko.appView .md

Type to search pages, routes and error codes.