API referenceMedia

Start a file upload

POST
/v2/media

Declare the file; PUT its bytes to upload.url with exactly upload.headers within 15 minutes; then send it with mediaId. Pass connectionId to check the channel’s limits up front.

Authorization

ApiKey
headerAuthorizationBearer <token>

An API key from Developers → API keys: Authorization: Bearer gauge_live_… (or pulse_k_live_…).

Header Parameters

Gauge-Version?string

A dated version. Default 2026-10-21.

Idempotency-Key*string

Required on every POST. Retries with the same key replay the first response for 24 h.

Length1 <= length <= 255

Request Body

application/json
  1. body
contentType*string
Match^[a-z0-9.+-]+\/[a-z0-9.+-]+$
Length3 <= length <= 127
sizeBytes*integer
Range1 <= value
filename?string
Length1 <= length <= 200
connectionId?string
Formatuuid

Response Body

The media and its presigned upload.

application/json
  1. response
id*string
Formatuuid
contentType*string
sizeBytes*integer
filename*string|null
status*string
Value in"pending""uploaded"
createdAt*string
expiresAt*string
upload*|null
download*|null
Example Request
curl -X POST 'https://app.gauge.chat/api/v2/media' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "contentType": "string",  "sizeBytes": 1}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "contentType": "string",  "sizeBytes": 0,  "filename": "string",  "status": "pending",  "createdAt": "string",  "expiresAt": "string",  "upload": {    "url": "http://example.com",    "method": "PUT",    "headers": {      "property1": "string",      "property2": "string"    },    "expiresAt": "string"  },  "download": {    "url": "http://example.com",    "expiresAt": "string"  }}