Salesly API
API Reference

Get a download URL for a document

Returns a short-lived pre-signed `download_url` for the stored file, valid for 300 seconds. Fetch that URL directly — it needs no authentication and must be requested **without** your `x-api-key` header. Treat `download_url` as a short-lived credential: anyone holding it can read the file until it expires, and it cannot be revoked. Do not log, cache or forward it. Request a fresh URL for each download. On deployments whose storage backend cannot sign URLs, this endpoint streams the file directly instead, as `application/octet-stream` with a `Content-Disposition: attachment` header.

GET
/documents/{id}/content

Authorization

x-api-key<token>

Your tenant API key

In: header

Path Parameters

id
Required
integer
curl -X GET "https://rest.salesly.app/api/v1/developers/documents/0/content" \
  -H "x-api-key: <token>"

A pre-signed download URL, or the file itself as a fallback

{
  "data": {
    "id": 0,
    "name": "string",
    "filename": "string",
    "mime_type": "string",
    "size_bytes": 0,
    "download_url": "http://example.com",
    "expires_at": "2019-08-24T14:15:22Z",
    "expires_in": 300
  }
}