Skip to main content
PUT
/
api
/
resources
/
{id}
/
content
Upload resource content
curl --request PUT \
  --url https://api.empirical.run/api/resources/{id}/content \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/octet-stream' \
  --data '"<string>"'
{
  "data": {
    "success": true
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
integer
required

Resource ID.

Required range: x >= 1

Query Parameters

scope
enum<string>
required

Capability scope: r (read) or w (write).

Available options:
r,
w
exp
integer | null

Expiry as a Unix timestamp (seconds).

sig
string
required

HMAC signature for the capability.

Body

application/octet-stream

Raw file bytes to store in R2.

Response

The upload was stored.

data
object
required

Response payload.