Skip to content
Skip to Content
DevelopersAPI referenceUploads

Start an upload

POST
/v1/uploads

Returns a signed URL to PUT the file to (valid 15 minutes), with the headers to send. Then create an image or pdf item, or a note from a Markdown file, with upload_id, or attach it to an item with POST /v1/items/{id}/assets. Unused uploads are removed after 24 hours.

Authorization

bearer
headerAuthorizationBearer <token>

A personal API key (ga_…), sent as Authorization: Bearer ga_…. A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Request Body

application/json
  1. body
content_type*string
Value in"image/jpeg""image/png""image/webp""image/gif""image/avif""image/heic""image/heif""image/jxl""image/bmp""image/tiff""image/vnd.adobe.photoshop""image/svg+xml""text/markdown""video/mp4""video/quicktime""video/webm""video/x-matroska""video/x-msvideo""audio/mpeg""audio/mp4""audio/wav""audio/aac""audio/aiff""audio/flac""audio/ogg""application/pdf"
size_bytes*integer

At most the server's MAX_UPLOAD_BYTES (50 MB by default); a larger value is a 422.

Range1 <= value

Response Body

Where to send the file, and the headers to send with it

application/json
  1. response
id*string
url*string
Formaturi
method*"PUT"
Value in"PUT"
headers*
expires_at*string
Formatdate-time
Example Request
curl -X POST 'https://example.com/v1/uploads' \  -H 'Content-Type: application/json' \  -d '{  "content_type": "image/jpeg",  "size_bytes": 1}'
Example Response
{  "id": "string",  "url": "http://example.com",  "method": "PUT",  "headers": {    "property1": "string",    "property2": "string"  },  "expires_at": "2019-08-24T14:15:22Z"}