API referenceUploads

Send the file to an upload link

The upload_url POST /uploads returned.

Authorised by the signed token in the path, not an API key: send the raw bytes (curl -X PUT --data-binary @file). Text and fonts only: text must be UTF-8, a font must carry its container's magic number (otherwise 415 type_mismatch). An audio, image or video token is refused here (400 wrong_door): those go to their presigned upload_url, then complete_url.

PUT
/uploads/{token}

Path Parameters

token*string

Request Body

application/octet-stream

TypeScript Definitions

Use the request body type in TypeScript.

body*file
Formatbinary

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/uploads/string" \  -H "Content-Type: application/octet-stream" \  -d 'string'
{
  "data": {
    "public_url": "http://example.com",
    "bytes": 0,
    "content_type": "string",
    "asset_id": "b4695157-0d1d-4da0-8f9e-5c53149389e4",
    "track_id": "89443c0f-6172-4ccb-98e3-b20b8a4e4aba",
    "analysis": "queued",
    "next": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}