Skip to main content
GET

Get a processed thumbnail of a file from an inbox document

Scope:inbox:inbox.read
https://api.holded.com/api/v2/inbox/{incomingDocumentId}/files/{filename}/preview

Returns a PNG thumbnail of the file, resized to one of a closed set of platform widths. Omitting both width and height returns the original image unresized.

Parameters

Path parameters

incomingDocumentIdstringrequired

Incoming document identifier

filenamestringrequired

Name of the file to retrieve

Query parameters

widthintegeroptional

Target width in pixels. Must be one of the allowed platform presets; any other value returns 404. Omit together with height to get the original image unresized.

"32""40""86""248"
heightintegeroptional

Target height in pixels. Optional: only allowed when equal to width and width is one of the platform square presets, to request an exact square crop instead of an auto height.

"32""40"

Request

python
import requests

url = "https://api.holded.com/api/v2/inbox/507f1f77bcf86cd799439011/files/document.pdf/preview?width=86&height=40"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())

Responses

Response

json
"string"

Success responses

200Processed image thumbnailimage/png
string<binary>

Error responses

401Invalid or missing API keyapplication/json
403Insufficient permissionsapplication/json
404Document or file not foundapplication/json
429Rate limit exceededapplication/json