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

Upload media part

PUT /v1/media/:id/parts/:part scope write

Uploads one part of the file (raw bytes in the body). Re-sending the same part is safe. Every part except the last must have the same size (at least 5 MiB).

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

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

Parameters

Name In Description
id path Media item id.
part path Part number, from 1 to 10000.

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/parts/1" \
  -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",
  "part": 1,
  "size": 16777216,
  "etag": "eb4fc1b20b020225bebfd48686d92517"
}

Send the same part again to replace it.

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.