Upload a file
Upload a raw file body. Pass the filename as a query parameter and set the Content-Type header to the file's actual MIME type (e.g. image/png, video/mp4). The Content-Type is validated against an allowlist; application/octet-stream is rejected.
Authorization
Bearer AuthorizationBearer <token>
API key (rlay_live_* or rlay_test_*)
In: header
Query Parameters
filename*string
Original filename
Request Body
application/octet-stream
Raw file bytes
TypeScript Definitions
Use the request body type in TypeScript.
body*file
Format
binaryResponse Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/media/upload?filename=string" \ -H "Content-Type: application/octet-stream" \ -d 'string'{ "url": "http://example.com", "type": "string", "size": 0, "filename": "string"}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}Found something wrong? Help us improve this page.