Upload a file
Returns a short-lived URL to upload one file directly to Tracira storage, bypassing the 4.5 MB request-body cap.
Flow for large files:
POST /api/uploads→{ uploadUrl, key, contentType }PUTthe raw file bytes touploadUrlwith headerContent-Type: <contentType>POST /api/logswithattachments: [{ source: "uploaded", key }]
The file stages in your workspace until an output references it, then it is copied into that output. Uploads never linked to an output are deleted automatically within 24 hours.
- Accepted types:
image/*,audio/*,application/pdf - Up to 32 MB per file
- Each in-flight upload reserves space against your workspace storage quota (the declared
sizeBytes, or the per-file max if omitted), so unlinked uploads can never push a workspace over its plan limit. The reservation is released when the upload is linked to an output or reaped.
This endpoint does not take a label. A staging upload has no output yet, so there is nothing for a label to describe: name the file when you attach it, on the attachments[].label field of POST /api/logs.
https://www.tracira.com/api/uploadswebhookTokenAuthorizationBearer <token>Workspace API token, from the Integrations page.
application/json- body
Create an upload: request a URL to PUT one file directly to Tracira storage.
filename?stringOriginal filename. Its extension infers the content type when contentType is omitted (e.g. invoice.pdf).
contentType?stringMIME type (e.g. application/pdf, image/png). Required if the filename has no recognizable extension. Accepted: image/, audio/, application/pdf.
sizeBytes?integerSize in bytes. Reserved against your storage quota while the upload is in flight (released on link or reap). If omitted, the per-file max is reserved, so declaring it lets more uploads be in flight at once.
1 <= valueUpload URL created.
application/json- response
uploadUrl?stringShort-lived presigned URL. PUT the raw file bytes here with header Content-Type: <contentType>.
urikey?stringPass this to POST /api/logs as attachments: [{ source: "uploaded", key }].
contentType?stringSend this exact value as the Content-Type header on your PUT.
method?stringheaders?Headers to include on the upload PUT.
expiresIn?integerSeconds until the upload URL expires.
maxBytes?integerHard per-file size limit.
curl -X POST 'https://www.tracira.com/api/uploads' \ -H 'Content-Type: application/json' \ -d '{ "filename": "invoice.pdf", "contentType": "application/pdf", "sizeBytes": 248192}'{ "uploadUrl": "http://example.com", "key": "string", "contentType": "string", "method": "PUT", "headers": { "property1": "string", "property2": "string" }, "expiresIn": 0, "maxBytes": 0}