Skip to main content
POST/v1/assets/upload
Upload a file up to 5 MB to the Truthlocks asset store. Assets are stored with AES-256 server-side encryption (AES-256) at rest and served with proper Content-Type headers and caching. Use this endpoint for logos, evidence files, supporting documentation, and other attachments that need to be referenced from your tenant resources.

Parameters

file
file
required
The file to upload. Send as multipart/form-data. Maximum size is 5 MB.
purpose
string
Optional tag describing the asset’s intended use. Common values: logo, evidence, documentation, branding.

Responses

{
  "id": "ast_a1b2c3d4e5f6",
  "url": "https://api.truthlocks.com/v1/assets/ast_a1b2c3d4e5f6",
  "content_type": "image/png",
  "size": 245760,
  "purpose": "evidence",
  "created_at": "2026-06-24T14:30:00Z"
}
curl -X POST https://api.truthlocks.com/v1/assets/upload \
  -H "X-API-Key: tl_live_..." \
  -F "file=@logo.png" \
  -F "purpose=branding"

Retrieve asset

GET/v1/assets/{id}
Retrieve a previously uploaded asset by its ID. The response streams the file with the original Content-Type and a Cache-Control: public, max-age=86400, immutable header.

Parameters

id
string
required
The asset ID returned from the upload endpoint.
curl https://api.truthlocks.com/v1/assets/ast_a1b2c3d4e5f6 \
  -H "X-API-Key: tl_live_..." \
  -o downloaded_file.png