Dayli Docs

Reserve an opaque, owned R2 object path for a direct upload

POST
/api/v1/media-reservations

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/media-reservations" \  -H "Content-Type: application/json" \  -d '{    "contentType": "image/jpeg",    "byteSize": 1  }'
{  "id": "post_01K4Y6P8K2",  "contentType": "image/jpeg",  "byteSize": 1,  "status": "pending",  "createdAt": "2026-09-09T12:00:00Z",  "expiresAt": "2026-09-09T12:00:00Z",  "upload": {    "url": "http://example.com",    "method": "PUT",    "requiredHeaders": {      "property1": "string",      "property2": "string"    }  }}