Zoho CRM Deal Link Emails

Record Actions. Published by Zoho in its first-party OpenAPI 3.1.0 repository github.com/zoho/crm-oas; 4 operation(s).

OpenAPI Specification

zoho-crm-deal-link-emails-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "Deal Link Emails",
    "description": "Record Actions",
    "version": "8.0"
  },
  "servers": [
    {
      "url": "https://zohoapis.{dc}/crm/{version}",
      "description": "API Server URL",
      "variables": {
        "version": {
          "default": "v8",
          "description": "API Version"
        },
        "dc": {
          "enum": [
            "com",
            "eu",
            "in",
            "cn",
            "au"
          ],
          "default": "com",
          "description": "API Server URL TLD"
        }
      }
    }
  ],
  "paths": {
    "/Contacts/{contactId}/Emails/actions/link_record": {
      "post": {
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.emails.CREATE",
              "ZohoCRM.modules.deals.CREATE",
              "ZohoCRM.modules.contacts.CREATE"
            ]
          }
        ],
        "summary": "Link Emails to Deals",
        "description": "Links the emails to the specified deals in CRM.",
        "operationId": "linkEmailsToDeals",
        "parameters": [
          {
            "$ref": "#/components/parameters/ContactId"
          }
        ],
        "requestBody": {
          "description": "Request body",
          "content": {
            "application/json": {
              "schema": {
                "description": "Request body schema",
                "additionalProperties": false,
                "type": "object",
                "properties": {
                  "Emails": {
                    "description": "List of emails to be linked to deals",
                    "type": "array",
                    "maxItems": 20,
                    "items": {
                      "description": "Email link details",
                      "additionalProperties": false,
                      "type": "object",
                      "properties": {
                        "message_id": {
                          "description": "Unique identifier of the email message",
                          "type": "string",
                          "enum": [
                            "fa3efd2e3d21c63dfb3a1ead81cfbcac3428b9eb290577709d7f12289b5aa1bf5b2bd0f6744144c7a9aae67068ccdc7f"
                          ]
                        },
                        "owner": {
                          "description": "Owner of the email",
                          "additionalProperties": false,
                          "type": "object",
                          "properties": {
                            "id": {
                              "description": "Unique identifier of the owner",
                              "type": "string",
                              "enum": [
                                "1238016000000362001"
                              ]
                            }
                          }
                        },
                        "linked_record": {
                          "description": "Details of the record to which the email is to be linked",
                          "additionalProperties": false,
                          "type": "object",
                          "properties": {
                            "module": {
                              "description": "Module information",
                              "additionalProperties": false,
                              "type": "object",
                              "properties": {
                                "api_name": {
                                  "description": "API name of the module",
                                  "type": "string",
                                  "enum": [
                                    "Deals"
                                  ]
                                },
                                "id": {
                                  "description": " Unique identifier of the module",
                                  "type": "string",
                                  "enum": [
                                    "1238016000000000131"
                                  ]
                                }
                              },
                              "required": [
                                "id"
                              ]
                            },
                            "name": {
                              "description": "Name of the linked record",
                              "type": "string",
                              "enum": [
                                "Sai Deal"
                              ]
                            },
                            "id": {
                              "description": "Unique identifier of the linked record",
                              "type": "string",
                              "enum": [
                                "1238016000000514024",
                                "1238016000000002676"
                              ]
                            }
                          },
                          "required": [
                            "module",
                            "id"
                          ]
                        }
                      },
                      "required": [
                        "message_id",
                        "owner",
                        "linked_record"
                      ]
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "success response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Response schema",
                  "additionalProperties": false,
                  "type": "object",
                  "properties": {
                    "Emails": {
                      "description": "List of email link operation results",
                      "maxItems": 20,
                      "type": "array",
                      "items": {
                        "additionalProperties": false,
                        "description": "Email link operation result",
                        "type": "object",
                        "properties": {
                          "status": {
                            "description": "Status of the link operation",
                            "type": "string",
                            "enum": [
                              "success"
                            ]
                          },
                          "code": {
                            "description": "Result code of the link operation",
                            "type": "string",
                            "enum": [
                              "SUCCESS"
                            ]
                          },
                          "message": {
                            "description": "Detailed message about the link operation",
                            "type": "string",
                            "maxLength": 256
                          },
                          "details": {
                            "description": "Additional details about the link operation",
                            "additionalProperties": false,
                            "type": "object",
                            "properties": {
                              "message_id": {
                                "description": "Unique identifier of the email message",
                                "maxLength": 255,
                                "type": "string"
                              }
                            },
                            "required": [
                              "message_id"
                            ]
                          }
                        },
                        "required": [
                          "status",
                          "code",
                          "message",
                          "details"
                        ]
                      }
                    }
                  },
                  "required": [
                    "Emails"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Error response schema",
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "Details of errors for each email link operation",
                      "additionalProperties": false,
                      "properties": {
                        "Emails": {
                          "description": "List of error details for each email link operation",
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "array",
                                "description": "Errors due to missing mandatory fields",
                                "maxItems": 20,
                                "items": {
                                  "description": "Details of a mandatory field missing error",
                                  "additionalProperties": false,
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "description": "Status of the error",
                                      "type": "string",
                                      "enum": [
                                        "error"
                                      ]
                                    },
                                    "code": {
                                      "description": "Error code",
                                      "type": "string",
                                      "enum": [
                                        "MANDATORY_NOT_FOUND"
                                      ]
                                    },
                                    "message": {
                                      "description": "Error message",
                                      "maxLength": 256,
                                      "type": "string"
                                    },
                                    "details": {
                                      "description": "Additional details about the error",
                                      "additionalProperties": false,
                                      "type": "object",
                                      "properties": {
                                        "api_name": {
                                          "description": "API name of the missing field",
                                          "maxLength": 255,
                                          "type": "string"
                                        },
                                        "json_path": {
                                          "description": "JSON path to the missing field",
                                          "maxLength": 255,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "api_name",
                                        "json_path"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "code",
                                    "message",
                                    "details"
                                  ]
                                }
                              },
                              {
                                "type": "array",
                                "description": "Errors due to invalid data",
                                "maxItems": 20,
                                "items": {
                                  "description": "Details of an invalid data error",
                                  "additionalProperties": false,
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "description": "Status of the error",
                                      "type": "string",
                                      "enum": [
                                        "error"
                                      ]
                                    },
                                    "code": {
                                      "description": "Error code",
                                      "type": "string",
                                      "enum": [
                                        "INVALID_DATA"
                                      ]
                                    },
                                    "message": {
                                      "description": "Error message",
                                      "maxLength": 256,
                                      "type": "string"
                                    },
                                    "details": {
                                      "description": "Additional details about the error",
                                      "additionalProperties": false,
                                      "type": "object",
                                      "properties": {
                                        "api_name": {
                                          "description": "API name of the field with invalid data",
                                          "maxLength": 255,
                                          "type": "string"
                                        },
                                        "json_path": {
                                          "description": "JSON path to the field with invalid data",
                                          "maxLength": 255,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "api_name",
                                        "json_path"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "code",
                                    "message",
                                    "details"
                                  ]
                                }
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "Emails"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "General error response for link emails to deals operation",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "description": "Status of the error",
                          "type": "string",
                          "enum": [
                            "error"
                          ]
                        },
                        "code": {
                          "description": "Error code",
                          "type": "string",
                          "enum": [
                            "MANDATORY_NOT_FOUND"
                          ]
                        },
                        "message": {
                          "description": "Error message",
                          "maxLength": 256,
                          "type": "string"
                        },
                        "details": {
                          "description": "Additional details about the error",
                          "additionalProperties": false,
                          "type": "object",
                          "properties": {
                            "api_name": {
                              "description": "API name of the missing field",
                              "maxLength": 255,
                              "type": "string"
                            },
                            "json_path": {
                              "maxLength": 255,
                              "description": "JSON path to the missing field",
                              "type": "string"
                            }
                          },
                          "required": [
                            "api_name",
                            "json_path"
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "code",
                        "message",
                        "details"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Details of not found error",
                  "additionalProperties": false,
                  "type": "object",
                  "properties": {
                    "status": {
                      "description": "Status of the error",
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "code": {
                      "description": "Error code",
                      "type": "string",
                      "enum": [
                        "INVALID_URL_PATTERN"
                      ]
                    },
                    "message": {
                      "description": "Error message",
                      "type": "string",
                      "enum": [
                        "Please check if the URL trying to access is a correct one"
                      ]
                    },
                    "details": {
                      "description": "Additional details about the error",
                      "additionalProperties": false,
                      "type": "object"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "message",
                    "details"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.contacts.CREATE",
              "ZohoCRM.modules.emails.CREATE",
              "ZohoCRM.modules.deals.CREATE"
            ]
          }
        ],
        "summary": "Unlink Emails from Records",
        "description": "Unlinks the emails from the specified records in CRM.",
        "operationId": "getRecordActions",
        "parameters": [
          {
            "$ref": "#/components/parameters/ContactId"
          },
          {
            "$ref": "#/components/parameters/MessageIds"
          },
          {
            "$ref": "#/components/parameters/OwnerId"
          }
        ],
        "responses": {
          "200": {
            "description": "success response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Response schema",
                  "additionalProperties": false,
                  "type": "object",
                  "properties": {
                    "Emails": {
                      "description": "List of email unlink operation results",
                      "maxItems": 20,
                      "type": "array",
                      "items": {
                        "description": "Email unlink operation result",
                        "additionalProperties": false,
                        "type": "object",
                        "properties": {
                          "status": {
                            "description": "Status of the unlink operation",
                            "type": "string",
                            "enum": [
                              "success"
                            ]
                          },
                          "code": {
                            "description": "Result code of the unlink operation",
                            "type": "string",
                            "enum": [
                              "SUCCESS"
                            ]
                          },
                          "message": {
                            "description": "Detailed message about the unlink operation",
                            "maxLength": 256,
                            "type": "string"
                          },
                          "details": {
                            "description": "Additional details about the unlink operation",
                            "additionalProperties": false,
                            "type": "object",
                            "properties": {
                              "message_id": {
                                "description": "Unique identifier of the email message",
                                "maxLength": 256,
                                "type": "string"
                              }
                            },
                            "required": [
                              "message_id"
                            ]
                          }
                        },
                        "required": [
                          "status",
                          "code",
                          "message",
                          "details"
                        ]
                      }
                    }
                  },
                  "required": [
                    "Emails"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "description": "Details of errors for each email unlink operation",
                      "additionalProperties": false,
                      "type": "object",
                      "properties": {
                        "Emails": {
                          "description": " Unique identifier of the module",
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "description": "Errors due to missing mandatory fields",
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "description": " Unique identifier of the module",
                                  "additionalProperties": false,
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "description": "Status of the error",
                                      "type": "string",
                                      "enum": [
                                        "error"
                                      ]
                                    },
                                    "code": {
                                      "description": "Error code",
                                      "type": "string",
                                      "enum": [
                                        "MANDATORY_NOT_FOUND"
                                      ]
                                    },
                                    "message": {
                                      "description": "Error message",
                                      "maxLength": 256,
                                      "type": "string"
                                    },
                                    "details": {
                                      "description": " Unique identifier of the module",
                                      "additionalProperties": false,
                                      "type": "object",
                                      "properties": {
                                        "api_name": {
                                          "description": "API name of the missing field",
                                          "maxLength": 255,
                                          "type": "string"
                                        },
                                        "json_path": {
                                          "description": "JSON path to the missing field",
                                          "maxLength": 255,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "api_name",
                                        "json_path"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "code",
                                    "message",
                                    "details"
                                  ]
                                }
                              },
                              {
                                "description": "Errors due to invalid data",
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "description": " Unique identifier of the module",
                                  "additionalProperties": false,
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "description": "Status of the error",
                                      "type": "string",
                                      "enum": [
                                        "error"
                                      ]
                                    },
                                    "code": {
                                      "description": "Error code",
                                      "type": "string",
                                      "enum": [
                                        "INVALID_DATA"
                                      ]
                                    },
                                    "message": {
                                      "description": "Error message",
                                      "maxLength": 256,
                                      "type": "string",
                                      "enum": [
                                        "invalid data"
                                      ]
                                    },
                                    "details": {
                                      "description": " Unique identifier of the module",
                                      "additionalProperties": false,
                                      "type": "object",
                                      "properties": {
                                        "api_name": {
                                          "description": "API name of the field with invalid data",
                                          "maxLength": 255,
                                          "type": "string"
                                        },
                                        "json_path": {
                                          "description": "JSON path to the field with invalid data",
                                          "maxLength": 255,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "api_name",
                                        "json_path"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "code",
                                    "message",
                                    "details"
                                  ]
                                }
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "Emails"
                      ]
                    },
                    {
                      "description": "General error response for unlink emails from records operation",
                      "additionalProperties": false,
                      "type": "object",
                      "properties": {
                        "status": {
                          "description": " Unique identifier of the module",
                          "type": "string",
                          "enum": [
                            "error"
                          ]
                        },
                        "code": {
                          "description": " Unique identifier of the module",
                          "type": "string",
                          "enum": [
                            "MANDATORY_NOT_FOUND"
                          ]
                        },
                        "message": {
                          "description": " Unique identifier of the module",
                          "maxLength": 256,
                          "type": "string"
                        },
                        "details": {
                          "description": " Unique identifier of the module",
                          "additionalProperties": false,
                          "type": "object",
                          "properties": {
                            "api_name": {
                              "description": " Unique identifier of the module",
                              "maxLength": 255,
                              "type": "string"
                            },
                            "json_path": {
                              "description": " Unique identifier of the module",
                              "maxLength": 255,
                              "type": "string"
                            }
                          },
                          "required": [
                            "api_name",
                            "json_path"
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "code",
                        "message",
                        "details"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Details of not found error",
                  "additionalProperties": false,
                  "type": "object",
                  "oneOf": [
                

# --- truncated at 32 KB (80 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/zoho-crm/refs/heads/main/openapi/zoho-crm-deal-link-emails-openapi.json