GET
Get a contact attachment
Scope:
contacts:contacts.readhttps://api.holded.com/api/v2/contacts/{contactId}/attachments/{filename}Downloads a single attachment from a contact. The response body contains the raw file bytes. Use the `Content-Disposition` header to obtain the original file name.
Parameters
Path parameters
contactId
stringrequiredContact ID (24-char hex ObjectId)
filename
stringrequiredAttachment file name (case-insensitive match)
Request
python
import requests
url = "https://api.holded.com/api/v2/contacts/{contactId}/attachments/{filename}"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Responses
Response
json
"string"Success responses
200File binary content. The Content-Type header reflects the actual mime type of the stored file (e.g. image/png, application/pdf); files with no identifiable type are served as application/octet-stream.application/octet-streamstring<binary>
Error responses
401Invalid or missing API keyapplication/json403Insufficient permissionsapplication/json404Contact or attachment not foundapplication/json429Rate limit exceededapplication/json