Skip to main content

Upload Attachments

Upload Attachments​

Add files to a candidate, contact, organization, job, or deal. Send 1 to 5 files per request, up to 10 MB each. Supported formats: JPG, JPEG, PNG, GIF, PDF, DOC, DOCX, TXT, CSV, XLS, and XLSX. A record can have up to 20 uploaded attachments.

Request​

Send your access token in the Authorization: Bearer your_access_token header. Use either application/json with public HTTPS file URLs or multipart/form-data with file uploads.

ParameterTypeRequiredDescription
related_entity_slugstringYesSlug of the candidate, contact, organization, job, or deal.
filesURL string array or file partsYesBetween 1 and 5 files. For JSON, provide an array of HTTPS URL strings. For multipart, repeat the files field for each file.

JSON example​

{
"related_entity_slug": "candidate_61e4b08a7c23d95f1046",
"files": [
"https://files.example.com/portfolio.pdf",
"https://files.example.com/references.docx"
]
}

The file URL must be directly downloadable by the API; a URL that only opens in a browser may be rejected by its host.

Multipart example​

curl -X POST 'https://api.atzcrm.com/v1/attachment' \
-H 'Authorization: Bearer your_access_token' \
-F 'related_entity_slug=candidate_61e4b08a7c23d95f1046' \
-F 'files=@./portfolio.pdf' \
-F 'files=@./references.docx'

Response​

201

All files were uploaded. total is the number of files added.

{
"related_entity": {"slug": "candidate_61e4b08a7c23d95f1046"},
"total": 2,
"data": [
{
"file_name": "portfolio.pdf",
"size_bytes": 184320,
"content_type": "application/pdf",
"uploaded_at": "2026-09-27T10:30:00.000Z",
"file_link": "https://api.atzcrm.com/v1/file/public/6eab17026d0a49a498a32bf44b8d8338%3A0f1eaca282ac4eb1b562127a2cc37b61"
},
{
"file_name": "references.docx",
"size_bytes": 96384,
"content_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"uploaded_at": "2026-09-27T10:30:01.000Z",
"file_link": "https://api.atzcrm.com/v1/file/public/aa9c2a3311674566b38064771ceba3d8%3A85edc81969604979a147bb8fe5ab8426"
}
],
"errors": []
}
200

Some files were uploaded. Each error identifies the failed file by its zero-based position in the request's files array.

{
"related_entity": {"slug": "candidate_61e4b08a7c23d95f1046"},
"total": 1,
"data": [
{
"file_name": "portfolio.pdf",
"size_bytes": 184320,
"content_type": "application/pdf",
"uploaded_at": "2026-09-27T10:30:00.000Z",
"file_link": "https://api.atzcrm.com/v1/file/public/6eab17026d0a49a498a32bf44b8d8338%3A0f1eaca282ac4eb1b562127a2cc37b61"
}
],
"errors": [
{"index": 1, "file_name": "references.docx", "message": "Could not download file"}
]
}
400

Invalid request parameters return validation errors. Individual file failures appear in the errors array, with an empty data array if none succeed.

[
{
"field_name": "files",
"error_message": "At least one file is required"
}
]
401
{"message": "Missing Bearer token in the header"}
404
{"message": "Record not found"}
403, 409, or 502

Files that exceed the account's storage allowance, the record's attachment limit, or cannot be downloaded or uploaded are returned in errors. The response includes any files that were uploaded successfully.