Download Email Attachments

Purpose

To download the attachments of an email.

Request Details

Request URL

{api-domain}/crm/{version}/{module_api_name}/{record_id}/Emails/actions/download_attachments

Supported modules

Leads, Accounts, Contacts, Deals, Quotes, Invoices, Sales Orders, Purchase Orders, and Custom

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

scope=ZohoCRM.modules.READ
or
scope=ZohoCRM.modules.{module_name}.READ
and
scope=ZohoCRM.modules.emails.READ

Possible Module Names

leads, accounts, contacts, deals, quotes, invoices, salesorders, purchaseorders, and custom

Parameters

  • message_idmandatory

    The message ID you get in the response when you send an email. Refer to the "message_id" key in the response of Send Mail API or Get Emails of a Record API to get the message ID.

  • user_idmandatory

    Represents the unique ID of the user who sent the email. Use the Get Users API to retrieve the user's ID.

  • idmandatory

    The unique ID of the attachment you want to download. Refer to the id key in the attachments array of the Get Emails of a record API.

  • namemandatory

    The name of the attachment in the response of Get Emails of a record API.

Possible Errors

  • MANDATORY_NOT_FOUNDHTTP 400

    You have not specified one or more mandatory parameters.
    Resolution: Refer to the "details" key in the response to find out the missing parameter.

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v7/Leads/3652397000002379001/Emails/actions/download_attachments?message_id=2cceafxxx7c9d&user_id=3652397000000186017&id=72daxxxx1ce66&name=email_templates.png"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"