Zoho CRM Download Email Attachments

Download attachments associated with emails in Zoho CRM. Published by Zoho in its first-party OpenAPI 3.1.0 repository github.com/zoho/crm-oas; 1 operation(s).

OpenAPI Specification

zoho-crm-download-attachments-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "Download Email Attachments",
    "description": "Download attachments associated with emails in Zoho CRM.",
    "version": "8.0"
  },
  "servers": [
    {
      "url": "https://zohoapis.{dc}/crm/{version}",
      "description": "API Server URL",
      "variables": {
        "dc": {
          "enum": [
            "com",
            "eu",
            "in",
            "cn",
            "au"
          ],
          "default": "com",
          "description": "API Server URL TLD"
        },
        "version": {
          "default": "v8",
          "description": "API Version"
        }
      }
    }
  ],
  "paths": {
    "/{module}/{recordId}/Emails/actions/download_attachments": {
      "get": {
        "summary": "Get Download Attachments Details",
        "description": "Fetches the binary content of an email attachment for a specific record.",
        "operationId": "downloadEmailAttachments",
        "parameters": [
          {
            "$ref": "#/components/parameters/Module"
          },
          {
            "$ref": "#/components/parameters/RecordId"
          },
          {
            "$ref": "#/components/parameters/UserId"
          },
          {
            "$ref": "#/components/parameters/MessageId"
          },
          {
            "$ref": "#/components/parameters/Id"
          },
          {
            "$ref": "#/components/parameters/Name"
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment downloaded successfully",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "description": "Binary stream of the attachment file.",
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Error response for validation or missing parameters.",
                  "oneOf": [
                    {
                      "description": "Generic validation error schema.",
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Error status",
                          "enum": [
                            "error"
                          ]
                        },
                        "code": {
                          "type": "string",
                          "description": "Error code",
                          "maxLength": 50
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message",
                          "maxLength": 500
                        },
                        "details": {
                          "type": "object",
                          "description": "Context details",
                          "additionalProperties": true
                        }
                      },
                      "required": [
                        "status",
                        "code",
                        "message"
                      ]
                    },
                    {
                      "description": "Error for missing mandatory fields.",
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Status",
                          "enum": [
                            "error"
                          ]
                        },
                        "code": {
                          "type": "string",
                          "description": "Code",
                          "const": "MANDATORY_NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Message",
                          "maxLength": 500
                        }
                      },
                      "required": [
                        "status",
                        "code",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.emails.READ",
              "ZohoCRM.modules.leads.READ"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "description": "Standard Zoho CRM error response structure.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "status": {
            "type": "string",
            "description": "Status",
            "enum": [
              "error"
            ]
          },
          "code": {
            "type": "string",
            "description": "Error code",
            "maxLength": 100
          },
          "message": {
            "type": "string",
            "description": "Error message",
            "maxLength": 1000
          },
          "details": {
            "type": "object",
            "description": "Details",
            "additionalProperties": true
          }
        },
        "required": [
          "status",
          "code",
          "message"
        ]
      }
    },
    "parameters": {
      "Module": {
        "name": "module",
        "in": "path",
        "required": true,
        "description": "The API name of the CRM module.",
        "schema": {
          "type": "string",
          "maxLength": 100
        }
      },
      "RecordId": {
        "name": "recordId",
        "in": "path",
        "required": true,
        "description": "The unique record ID.",
        "schema": {
          "type": "string",
          "maxLength": 20
        }
      },
      "UserId": {
        "name": "user_id",
        "in": "query",
        "required": true,
        "description": "The ID of the user.",
        "schema": {
          "type": "string",
          "maxLength": 20
        }
      },
      "MessageId": {
        "name": "message_id",
        "in": "query",
        "required": true,
        "description": "The ID of the email message.",
        "schema": {
          "type": "string",
          "maxLength": 100
        }
      },
      "Id": {
        "name": "id",
        "in": "query",
        "required": true,
        "description": "The attachment ID.",
        "schema": {
          "type": "string",
          "maxLength": 100
        }
      },
      "Name": {
        "name": "name",
        "in": "query",
        "required": true,
        "description": "The attachment name.",
        "schema": {
          "type": "string",
          "maxLength": 255
        }
      }
    },
    "securitySchemes": {
      "iam-oauth2-schema": {
        "type": "oauth2",
        "description": "Zoho CRM OAuth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
            "tokenUrl": "https://accounts.zoho.com/oauth/v2/token",
            "scopes": {
              "ZohoCRM.modules.emails.READ": "Read emails",
              "ZohoCRM.modules.leads.READ": "Read leads"
            }
          }
        }
      }
    }
  }
}