Retrieving attachments from records in Zoho CRM and Zoho Desk is straightforward once you know the correct API endpoints and URL patterns to use. This guide walks you through the process step by step.
Why this matters
Attachments — such as contracts, images, or supporting documents — are often stored directly against CRM or Desk records. If you're building an integration, automating document retrieval, or auditing files linked to accounts, you need a reliable way to fetch these programmatically. Knowing the right endpoint for each record type saves significant debugging time and prevents common mistakes around record IDs and module paths.
> Beam Help is independent expert support for Zoho — we are not official Zoho support.
---
Step-by-step
Step 1. Identify the record type and its ID.
Before making any API call, confirm whether you're working with a CRM module (e.g., Contacts, Leads, Accounts) or a Zoho Desk entity (e.g., an Account or Ticket). You'll also need the unique record ID — this is the {accountId}, {attachmentId}, or equivalent identifier that appears in the record's URL. For CRM records, the direct URL follows the pattern https://crm.zoho.{dc}/crm/tab/{Module}/{RecordId}, where {dc} is your data centre suffix (e.g., com, eu, in). [1]
Step 2. List all attachments on a Desk Account record.
To retrieve every attachment associated with a specific Desk Account, send a GET request to the following endpoint, substituting the real account identifier:
GET /api/v1/accounts/{accountId}/attachments
This operation (listaccountattachments) accepts the accountId as a required path parameter, plus an optional p parameter for pagination or filtering. [8]
Step 3. Fetch a single specific attachment from a Desk Account.
Once you have the list of attachments and know the attachmentId you need, retrieve that individual file using:
GET /api/v1/accounts/{accountId}/attachments/{attachmentId}
This operation (getaccountattachment) requires both accountId and attachmentId as path parameters, with an optional p parameter available. [5]
Step 4. Access general attachment documentation.
If you need to review the broader attachments schema or explore attachment-related metadata across record types, the documentation endpoint is:
GET /api/v1/_doc/attachments
This get_attachments operation accepts an optional p parameter and returns attachment reference documentation. [7]
Step 5. Build direct links back to the records.
After retrieving attachment data, you may want to surface clickable links to the parent records in your UI or logs. For CRM records, construct the link as https://crm.zoho.{dc}/crm/tab/{Module}/{RecordId}. For Desk records, the pattern is https://desk.zoho.{dc}/agent/{portal}/tickets/details/{TicketId}. Adjust the {dc} segment to match your organisation's data centre. [1]
Step 6. Handle the API response and surface links.
When your tool or integration returns results, check the response payload for the attachment data. If your system builds record links automatically, these are typically appended in an "Open in Zoho" section formatted as 🔗 {name}: {url} for easy navigation. [2] [4]
---
Common pitfalls
- Wrong data centre suffix. The
{dc}value in your base URL must match where your Zoho organisation is hosted. Usingcomwhen your org is oneuwill result in authentication failures or 404 errors. Always confirm your data centre before constructing URLs. [1]
- Mixing up CRM and Desk endpoints. The attachment endpoints shown above (
/api/v1/accounts/{accountId}/attachments) are Zoho Desk endpoints, not Zoho CRM. Sending Desk-style requests to a CRM base URL — or vice versa — will fail. Confirm which product holds the record before choosing your endpoint. [5] [8]
- Missing or incorrect
accountId. Both the list and single-attachment endpoints require a validaccountId. Passing a CRM record ID to a Desk endpoint, or omitting the ID entirely, will return an error. Always source the ID directly from the target system's record. [5] [8]
- Forgetting pagination parameters. The optional
pparameter on list endpoints controls pagination. If an account has many attachments, omitting pagination handling may mean you only receive the first page of results. [8]
---
What to check
- Confirm the correct base URL and data centre (
com,eu,in, etc.) matches your Zoho organisation's region before making any API calls. [1] - Verify both
accountIdandattachmentIdare sourced from Zoho Desk, not from a CRM record, when using the Desk attachment endpoints. [5] [8] - Check the response payload for an
errorkey — if present, review the message to diagnose permission issues, invalid IDs, or malformed requests before retrying. [6]