Tracira
API referenceUploads

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:

  1. POST /api/uploads → { uploadUrl, key, contentType }
  2. PUT the raw file bytes to uploadUrl with header Content-Type: <contentType>
  3. POST /api/logs with attachments: [{ 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.

posthttps://www.tracira.com/api/uploads
POST
/api/uploads

Authorization

webhookToken
AuthorizationBearer <token>

Workspace API token, from the Integrations page.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Create an upload: request a URL to PUT one file directly to Tracira storage.

Response Body

application/json

curl -X POST "https://example.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}