RelayAPI

Upload a file

Upload a raw file body. Pass the filename as a query parameter and set Content-Type to one of the documented media types. Generic application/octet-stream bodies are rejected.

POST
/v1/media/upload
AuthorizationBearer <token>

API key (rlay_live_* or rlay_test_). Invite redemption also accepts a server-derived rlay_session_ bearer for a current user session.

In: header

Query Parameters

filename*string

Original filename

workspace_id?string

Workspace ID for the media record

Request Body

Raw file bytes

TypeScript Definitions

Use the request body type in TypeScript.

body*file
Formatbinary

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/media/upload?filename=string" \  -H "Content-Type: application/pdf" \  -d 'string'
{  "filename": "string",  "id": "string",  "size": 0,  "type": "string",  "url": "http://example.com"}

Found something wrong? Help us improve this page.