Files

Reserve presigned upload URLs for 1–10 files (all-or-nothing)

POST/files/upload

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

organization?string

Organization slug (OAuth actors with several orgs); API keys imply theirs.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/files/upload" \  -H "Content-Type: application/json" \  -d '{    "files": [      {        "mime_type": "image/gif",        "bytes": 0      }    ],    "idempotency_key": "string"  }'
{  "files": [    {      "file": {        "id": "string",        "kind": "image",        "readiness": "ready",        "status": "pending_upload",        "scan_status": "unscanned",        "mime_type": "string",        "bytes": 0,        "width": 0,        "height": 0,        "duration_ms": 0,        "variants": [          {            "name": "string",            "width": 0,            "height": 0,            "bytes": 0,            "mime_type": "string"          }        ],        "error": {          "reason": "too_large",          "message": "string"        },        "created_at": "string",        "url": "string",        "url_expires_in_seconds": 0      },      "upload": {        "url": "string",        "headers": {          "property1": "string",          "property2": "string"        },        "expires_in_seconds": 0      }    }  ],  "replayed": true}