Upload the bytes of a reserved media record
const url = 'https://api.orator.space/v1/media/example/content';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/octet-stream'}, body: 'binary'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.orator.space/v1/media/example/content \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/octet-stream' \ --data binarySend the file as the raw body with a correct Content-Length; chunked encoding is not accepted, because the declared length is what bounds the write. Anything above 52428800 bytes is refused with 413 on the header alone — but check the size before sending: the platform delivers that response only after the body has been transferred. The Content-Type header is recorded and then ignored: the stored type is what the leading bytes say it is, and a type outside the allow-list — SVG included — is deleted and the record left rejected (§21.1, §57.4). A retry re-uploads; the record must still be pending.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”The file itself. Content-Length is required and is enforced as the exact size.
Responses
Section titled “Responses”Upload the bytes of a reserved media record
object
A 26-character Crockford base32 identifier
A 26-character Crockford base32 identifier
RFC 3339, UTC, milliseconds
Example
{ "status": "pending", "kind": "image", "source": "upload"}Unauthenticated
RFC 9457 Problem Details (SPEC 45).
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "retry_after_seconds": 1}Forbidden
RFC 9457 Problem Details (SPEC 45).
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "retry_after_seconds": 1}Not-found
RFC 9457 Problem Details (SPEC 45).
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "retry_after_seconds": 1}Conflict (retryable)
RFC 9457 Problem Details (SPEC 45).
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "retry_after_seconds": 1}Payload-too-large
RFC 9457 Problem Details (SPEC 45).
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "retry_after_seconds": 1}Validation-failed
RFC 9457 Problem Details (SPEC 45).
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "retry_after_seconds": 1}Rate-limited (retryable)
RFC 9457 Problem Details (SPEC 45).
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "retry_after_seconds": 1}