Downloads

📥 Downloads API

Download public files including brand kits and documents.

Health (liveness) check

get

Returns minimal liveness signal for monitoring.

Responses
200

OK

application/json
get
/health
cURL
curl -s "https://api.twnlabs.com/v1/health"
{
  "success": true,
  "status": "ok",
  "time": "2025-10-29T03:55:00Z"
}

Download file by slug

get

Download public files such as brand kits, whitepapers, and other documents.

Security: This endpoint uses secure slug-based mapping. File paths are never exposed to clients. The server validates the slug against an internal whitelist before streaming the file.

Available Downloads:

  • Brand assets and logos (e.g., brand-kit-2025)

  • Technical documentation (e.g., whitepaper-v1)

  • Token economy papers (e.g., tokeneconomy-v1)

  • Transparency reports (e.g., report-2025-10)

Response: Binary file stream with appropriate Content-Disposition header for browser download.

Rate Limiting: Downloads are subject to stricter rate limits to prevent abuse.

Path parameters
slugstringRequired

File identifier slug (lowercase alphanumeric with hyphens).

Available slugs:

  • brand-wordmark-black-png - Black wordmark (PNG)
  • brand-wordmark-black-svg - Black wordmark (SVG)
  • brand-wordmark-white-png - White wordmark (PNG)
  • brand-wordmark-white-svg - White wordmark (SVG)
  • brand-icon-png - Icon only (PNG)
  • brand-icon-svg - Icon only (SVG)
  • brand-wordmark-png - Standard wordmark (PNG)
  • brand-wordmark-svg - Standard wordmark (SVG)
  • brand-kit-complete - Complete brand kit (ZIP)
Example: brand-kit-completePattern: ^[a-z0-9\-]{3,64}$
Responses
200

Binary file stream with appropriate headers for download.

Headers:

  • Content-Type: MIME type based on file extension (e.g., application/pdf, image/png, image/svg+xml, application/zip)
  • Content-Disposition: attachment; filename="..." for browser download
  • Content-Length: File size in bytes
  • Content-Transfer-Encoding: binary
  • Cache-Control: private, max-age=0, must-revalidate (no CDN caching for downloads)
  • X-Content-Type-Options: nosniff (security)
  • X-Frame-Options: DENY (security)

Note: This endpoint streams files directly without loading them into memory. Large files are chunked (8KB chunks).

Responsestring · binary

Binary file content

get
/download/{slug}
curl -OJL "https://api.twnlabs.com/v1/download/brand-kit-complete"
# -O: Save to file
# -J: Use Content-Disposition filename
# -L: Follow redirects if any
binary

Last updated