Yapper Docs
Api reference
POST
/assets/uploads

For local image, video, or audio files with no URL (use POST /assets/import for remote media). Returns a short-lived signed PUT URL: upload the bytes to uploadUrl sending every header from the response headers map (Content-Type plus the x-goog-content-length-range size cap — the storage provider rejects the PUT if either is missing or altered), then call the complete endpoint to finalize the asset. Spends no credits.

Authorization

bearerAuth assets:write
AuthorizationBearer <token>

In: header

Scope: assets:write

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/assets/uploads" \  -H "Content-Type: application/json" \  -d '{    "mimeType": "image/jpeg"  }'
{  "assetId": "string",  "uploadUrl": "http://example.com",  "method": "PUT",  "headers": {    "property1": "string",    "property2": "string"  },  "maxBytes": 0,  "expiresAt": "2019-08-24T14:15:22Z",  "completeUrl": "string"}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}