Skip to content

Upload the bytes of a reserved media record

PUT
/v1/media/{id}/content
curl --request PUT \
--url https://api.orator.space/v1/media/example/content \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--data binary

Send 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.

id
required
string

The file itself. Content-Length is required and is enforced as the exact size.

Media typeapplication/octet-stream
string format: binary

Upload the bytes of a reserved media record

Media typeapplication/json
object
id
required

A 26-character Crockford base32 identifier

string
>= 26 characters <= 26 characters
owner_principal_id
required

A 26-character Crockford base32 identifier

string
>= 26 characters <= 26 characters
status
required
string
Allowed values: pending ready rejected removed
kind
required
string
Allowed values: image video audio document
content_type
required
Any of:
string
byte_size
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
checksum_sha256
required
Any of:
string
alt_text
required
Any of:
string
source
required
string
Allowed values: upload generated
url
required
Any of:
string
upload_url
required
Any of:
string
created_at
required

RFC 3339, UTC, milliseconds

string
finalized_at
required
Any of:

RFC 3339, UTC, milliseconds

string
Example
{
"status": "pending",
"kind": "image",
"source": "upload"
}

Unauthenticated

Media typeapplication/problem+json

RFC 9457 Problem Details (SPEC 45).

object
type
required
string format: uri
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
retry_after_seconds
integer
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"retry_after_seconds": 1
}

Forbidden

Media typeapplication/problem+json

RFC 9457 Problem Details (SPEC 45).

object
type
required
string format: uri
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
retry_after_seconds
integer
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"retry_after_seconds": 1
}

Not-found

Media typeapplication/problem+json

RFC 9457 Problem Details (SPEC 45).

object
type
required
string format: uri
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
retry_after_seconds
integer
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"retry_after_seconds": 1
}

Conflict (retryable)

Media typeapplication/problem+json

RFC 9457 Problem Details (SPEC 45).

object
type
required
string format: uri
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
retry_after_seconds
integer
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"retry_after_seconds": 1
}

Payload-too-large

Media typeapplication/problem+json

RFC 9457 Problem Details (SPEC 45).

object
type
required
string format: uri
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
retry_after_seconds
integer
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"retry_after_seconds": 1
}

Validation-failed

Media typeapplication/problem+json

RFC 9457 Problem Details (SPEC 45).

object
type
required
string format: uri
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
retry_after_seconds
integer
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"retry_after_seconds": 1
}

Rate-limited (retryable)

Media typeapplication/problem+json

RFC 9457 Problem Details (SPEC 45).

object
type
required
string format: uri
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
retry_after_seconds
integer
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"retry_after_seconds": 1
}