DevelopersAPI referenceUploads
Start an upload
POST
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.
bearerheader
AuthorizationBearer <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.
application/json- body
content_type*stringValue 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*integerAt most the server's MAX_UPLOAD_BYTES (50 MB by default); a larger value is a 422.
Range
1 <= valueWhere to send the file, and the headers to send with it
application/json- response
id*stringurl*stringFormat
urimethod*"PUT"Value in
"PUT"headers*expires_at*stringFormat
date-timecurl -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"}