Skip to main content
POST
/
v1
/
assets
/
upload
Upload asset
curl --request POST \
  --url https://api.truthlocks.com/v1/assets/upload \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-API-Key: <api-key>' \
  --form file='@example-file' \
  --form 'purpose=<string>'
{
  "id": "<string>",
  "url": "<string>",
  "content_type": "<string>",
  "size": 123,
  "purpose": "<string>",
  "created_at": "<string>"
}
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


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.

Authorizations

X-API-Key
string
header
required

API key for machine-to-machine authentication

Body

multipart/form-data
file
file
required

File to upload (max 5 MB)

purpose
string

Asset purpose tag

Response

Asset uploaded

id
string
url
string
content_type
string
size
integer
purpose
string
created_at
string