{ "openapi": "3.1.0", "info": { "description": "This is a Zoho Mail API OpenAPI 3.0 specification", "title": "Zoho Mail API", "version": "1.0.0" }, "tags": [ { "name": "threads", "description": "The Threads APIs help you in accessing and managing threads in the user account.\n\n", "externalDocs": { "url": "https://www.zoho.com/mail/help/api/threads-api.html", "description": "Find out more" } } ], "paths": { "/api/accounts/{accountIdToMarkThreadNotSpam}/updatethread": { "put": { "tags": [ "threads" ], "x-mcp-group": [ "Threads" ], "summary": "Mark Thread(s) as Not Spam", "description": "This API is used to mark single or multiple threads as not spam.", "operationId": "markThreadsAsNotSpam", "parameters": [ { "name": "accountIdToMarkThreadNotSpam", "in": "path", "description": "This is the unique identifier for a particular user account. This parameter can be fetched from User Account Details API.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarkAsNotSpamThreadRequest" } } } }, "responses": { "200": { "description": "Successfully marked thread(s) as not spam", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdToMarkThreadSpam}/updatethread": { "put": { "tags": [ "threads" ], "x-mcp-group": [ "Threads" ], "summary": "Mark Thread(s) as Spam", "description": "This API is used to mark single or multiple threads as spam.", "operationId": "markThreadSpam", "parameters": [ { "name": "accountIdToMarkThreadSpam", "in": "path", "description": "This is the unique identifier for a particular user account. This parameter can be fetched from User Account Details API.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarkAsSpamThreadRequest" } } } }, "responses": { "200": { "description": "Successfully marked thread(s) as spam", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdToMarkThreadUnread}/updatethread": { "put": { "tags": [ "threads" ], "x-mcp-group": [ "Threads" ], "summary": "Mark Thread(s) as Unread", "description": "This API is used to mark single or multiple threads as unread.", "operationId": "markThreadUnread", "parameters": [ { "name": "accountIdToMarkThreadUnread", "in": "path", "description": "This is the unique identifier for a particular user account. This parameter can be fetched from User Account Details API.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarkAsUnreadThreadRequest" } } } }, "responses": { "200": { "description": "Successfully marked thread(s) as unread", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdToMarkThread}/updatethread": { "put": { "tags": [ "threads" ], "x-mcp-group": [ "Threads" ], "summary": "Mark Thread(s) as Read", "description": "This API is used to mark single or multiple threads as read.", "operationId": "markThreadsAsRead", "parameters": [ { "name": "accountIdToMarkThread", "in": "path", "description": "This is the unique identifier for a particular user account. This parameter can be fetched from User Account Details API.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarkAsReadThreadRequest" } } } }, "responses": { "200": { "description": "Successfully marked thread(s) as read", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdRemoveAllLabelsFromThread}/updatethread": { "put": { "tags": [ "threads" ], "x-mcp-group": [ "Threads" ], "summary": "Remove All Labels from Thread(s)", "description": "This API is used to remove all labels from single or multiple threads.", "operationId": "removeAllLabelsFromThreads", "parameters": [ { "name": "accountIdRemoveAllLabelsFromThread", "in": "path", "description": "This is the unique identifier for a particular user account. This parameter can be fetched from User Account Details API.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RemoveAllLabelsFromThreadRequest" } } } }, "responses": { "200": { "description": "Successfully removed all labels from thread(s)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdToRemoveLabelFromThread}/updatethread": { "put": { "tags": [ "threads" ], "x-mcp-group": [ "Threads" ], "summary": "Remove Label(s) from Thread(s)", "description": "This API is used to remove the label(s) from single or multiple threads.", "operationId": "removeLabelFromThreads", "parameters": [ { "name": "accountIdToRemoveLabelFromThread", "in": "path", "description": "This is the unique identifier for a particular user account. This parameter can be fetched from User Account Details API.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RemoveLabelFromThreadRequest" } } } }, "responses": { "200": { "description": "Successfully removed label(s) from thread(s)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdToApplyLabelToThread}/updatethread": { "put": { "tags": [ "threads" ], "x-mcp-group": [ "Threads" ], "summary": "Apply Label to Thread(s)", "description": "This API is used to apply label to single or multiple threads.", "operationId": "applyLabelToThreads", "parameters": [ { "name": "accountIdToApplyLabelToThread", "in": "path", "description": "This is the unique identifier for a particular user account. This parameter can be fetched from User Account Details API.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApplyLabelToThreadRequest" } } } }, "responses": { "200": { "description": "Successfully applied label to thread(s)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdToMoveThread}/updatethread": { "put": { "tags": [ "threads" ], "x-mcp-group": [ "Threads" ], "summary": "Move Thread(s)", "description": "This API is used to move single or multiple threads.", "operationId": "moveThreads", "parameters": [ { "name": "accountIdToMoveThread", "in": "path", "description": "This is the unique identifier for a particular user account. This parameter can be fetched from User Account Details API.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MoveThreadRequest" } } } }, "responses": { "200": { "description": "Successfully moved thread(s)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } }, "/api/accounts/{accountIdToFlagThread}/updatethread": { "put": { "tags": [ "threads" ], "x-mcp-group": [ "Threads" ], "summary": "Apply Flag to Thread(s)", "description": "This API is used to apply a flag to single or multiple threads.", "operationId": "applyFlagToThreads", "parameters": [ { "name": "accountIdToFlagThread", "in": "path", "description": "This is the unique identifier for a particular user account. This parameter can be fetched from User Account Details API.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApplyFlagToThreadRequest" } } } }, "responses": { "200": { "description": "Successfully applied flag to thread(s)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoDataResponse" } } } } }, "security": [ { "iam-oauth2-schema": [ "ZohoMail.messages.ALL", "ZohoMail.messages.UPDATE" ] } ] } } }, "components": { "schemas": { "Status": { "type": "object", "properties": { "code": { "type": "integer", "examples": [ 200 ] }, "description": { "type": "string", "examples": [ "success" ] } } }, "NoDataResponse": { "type": "object", "properties": { "status": { "$ref": "#/components/schemas/Status" } } }, "ApplyFlagToThreadRequest": { "type": "object", "required": [ "mode", "threadId", "flagid" ], "properties": { "mode": { "type": "string", "description": "This parameter represents the type of operation that is to be performed.", "enum": [ "setFlag" ], "example": "setFlag" }, "threadId": { "type": "array", "items": { "description": "This parameter needs to be passed as an array of single or multiple thread IDs for which the flag has to be set.", "type": "string" }, "description": "This parameter needs to be passed as an array of single or multiple thread IDs for which the flag has to be set.", "example": [ 123456789012345, 987654321098765 ] }, "flagid": { "type": "string", "description": "This parameter is passed to update threads with the specific flag.", "enum": [ "info", "important", "followup", "flag_not_set" ], "example": "important" }, "isArchive": { "type": "boolean", "description": "This parameter indicates whether the threads to be flagged are archived or not.", "example": false }, "isFolderSpecific": { "type": "boolean", "description": "This parameter indicates whether the threads to be flagged are specific to a folder or not.", "example": false }, "folderId": { "type": "string", "description": "This parameter represents the ID of the folder whose email threads need to be flagged. This is a mandatory parameter if the 'isFolderSpecific' parameter has the value 'true'.", "example": "1234567890abcdef1234567890abcdef" } } }, "MoveThreadRequest": { "type": "object", "required": [ "mode", "threadId" ], "properties": { "mode": { "type": "string", "description": "This parameter represents the type of operation that is to be performed.", "enum": [ "moveMessage" ], "example": "moveMessage" }, "threadId": { "type": "array", "items": { "description": "This parameter should be passed as an array of single or multiple thread IDs that need to be moved.", "type": "string" }, "description": "This parameter should be passed as an array of single or multiple thread IDs that need to be moved.", "example": [ 123456789012345, 987654321098765 ] }, "isArchive": { "type": "boolean", "description": "This parameter indicates whether the threads to be moved are archived or not.", "example": false }, "isFolderSpecific": { "type": "boolean", "description": "This parameter specifies whether the threads to be moved are folder specific or not.", "example": false }, "folderId": { "type": "string", "description": "This is the ID of the folder whose email threads need to be moved. This is a mandatory parameter if the 'isFolderSpecific' parameter has the value 'true'.", "example": "1234567890abcdef1234567890abcdef" } } }, "ApplyLabelToThreadRequest": { "type": "object", "required": [ "mode", "threadId", "labelId" ], "properties": { "mode": { "type": "string", "description": "This parameter represents the type of operation that is to be performed.", "enum": [ "applyLabel" ], "default": "applyLabel" }, "threadId": { "type": "array", "items": { "description": "This parameter should be passed as an array of single or multiple thread IDs that need to be labelled.", "type": "string" }, "description": "This parameter should be passed as an array of single or multiple thread IDs that need to be labelled.", "example": [ 123456789012345, 987654321098765 ] }, "labelId": { "type": "array", "items": { "description": "This parameter should be passed as an array of single or multiple label IDs that need to be applied.", "type": "string" }, "description": "This parameter should be passed as an array of single or multiple label IDs that need to be applied.", "example": [ "1234567890abcdef1234567890abcdef", "fedcba9876543210fedcba9876543210" ] }, "isArchive": { "type": "boolean", "description": "This parameter indicates whether the threads to be labelled are archived or not.", "example": false }, "isFolderSpecific": { "type": "boolean", "description": "This parameter specifies whether the threads to be labelled are folder specific or not.", "example": false }, "folderId": { "type": "string", "description": "This is the ID of the folder whose email threads needs to be labelled. This is a mandatory parameter if the 'isFolderSpecific' parameter has the value 'true'.", "example": "1234567890abcdef1234567890abcdef" } } }, "RemoveLabelFromThreadRequest": { "type": "object", "required": [ "mode", "threadId", "labelId" ], "properties": { "mode": { "type": "string", "description": "This parameter represents the type of operation that is to be performed.", "enum": [ "removeLabel" ], "example": "removeLabel" }, "threadId": { "type": "array", "items": { "description": "This parameter should be passed as an array of single or multiple thread IDs that need to be unlabelled.", "type": "string" }, "description": "This parameter should be passed as an array of single or multiple thread IDs that need to be unlabelled.", "example": [ 123456789012345, 987654321098765 ] }, "labelId": { "type": "array", "items": { "description": "This parameter should be passed as an array of single or multiple label IDs that need to be removed.", "type": "string" }, "description": "This parameter should be passed as an array of single or multiple label IDs that need to be removed.", "example": [ "1234567890abcdef1234567890abcdef", "fedcba9876543210fedcba9876543210" ] }, "isArchive": { "type": "boolean", "description": "This parameter indicates whether the threads to be unlabelled are archived or not.", "example": false }, "isFolderSpecific": { "type": "boolean", "description": "This parameter specifies whether the threads to be unlabelled are folder specific or not.", "example": false }, "folderId": { "type": "string", "description": "This is the ID of the folder whose email threads need to be unlabelled. This is a mandatory parameter if the 'isFolderSpecific' parameter has the value 'true'.", "example": "1234567890abcdef1234567890abcdef" } } }, "RemoveAllLabelsFromThreadRequest": { "type": "object", "required": [ "mode", "threadId" ], "properties": { "mode": { "type": "string", "description": "This parameter represents the type of operation that is to be performed.", "enum": [ "removeAllLabels" ], "example": "removeAllLabels" }, "threadId": { "type": "array", "items": { "description": "This parameter should be passed as an array of single or multiple thread IDs whose all labels need to be removed.", "type": "string" }, "description": "This parameter should be passed as an array of single or multiple thread IDs whose all labels need to be removed.", "example": [ 123456789012345, 987654321098765 ] }, "isArchive": { "type": "boolean", "description": "This parameter indicates whether the threads whose all labels need to be removed are archived or not.", "example": false }, "isFolderSpecific": { "type": "boolean", "description": "This parameter specifies whether the threads whose all labels need to be removed are folder specific or not.", "example": false }, "folderId": { "type": "string", "description": "This is the ID of the folder whose email threads need to be unlabelled. This is a mandatory parameter if the 'isFolderSpecific' parameter has the value 'true'.", "example": "1234567890abcdef1234567890abcdef" } } }, "MarkAsReadThreadRequest": { "type": "object", "required": [ "mode", "threadId" ], "properties": { "mode": { "type": "string", "description": "This parameter represents the type of operation that is to be performed.", "enum": [ "markAsRead" ], "example": "markAsRead" }, "threadId": { "type": "array", "items": { "description": "This parameter should be passed as an array of single or multiple thread IDs that need to be marked as read.", "type": "string" }, "description": "This parameter should be passed as an array of single or multiple thread IDs that need to be marked as read.", "example": [ 123456789012345, 987654321098765 ] }, "isArchive": { "type": "boolean", "description": "This parameter indicates whether the threads to be marked as read are archived or not.", "example": false }, "isFolderSpecific": { "type": "boolean", "description": "This parameter specifies whether the threads to be marked as read are folder specific or not.", "example": false }, "folderId": { "type": "string", "description": "This is the ID of the folder for which the email threads need to be marked as read. This is a mandatory parameter if the 'isFolderSpecific' parameter has the value 'true'.", "example": "1234567890abcdef1234567890abcdef" } } }, "MarkAsUnreadThreadRequest": { "type": "object", "required": [ "mode", "threadId" ], "properties": { "mode": { "type": "string", "description": "This parameter represents the type of operation that is to be performed.", "enum": [ "markAsUnread" ], "example": "markAsUnread" }, "threadId": { "type": "array", "items": { "description": "This parameter should be passed as an array of single or multiple thread IDs that need to be marked as unread.", "type": "string" }, "description": "This parameter should be passed as an array of single or multiple thread IDs that need to be marked as unread.", "example": [ 123456789012345, 987654321098765 ] }, "isArchive": { "type": "boolean", "description": "This parameter indicates whether the threads to be marked as unread are archived or not.", "example": false }, "isFolderSpecific": { "type": "boolean", "description": "This parameter specifies whether the threads to be marked as unread are folder specific or not.", "example": false }, "folderId": { "type": "string", "description": "This is the ID of the folder for which the email threads need to be marked as unread. This is a mandatory parameter if the 'isFolderSpecific' parameter has the value 'true'.", "example": "1234567890abcdef1234567890abcdef" } } }, "MarkAsSpamThreadRequest": { "type": "object", "required": [ "mode", "threadId" ], "properties": { "mode": { "type": "string", "description": "This parameter represents the type of operation that is to be performed.", "enum": [ "moveToSpam" ], "example": "moveToSpam" }, "threadId": { "type": "array", "items": { "description": "This parameter should be passed as an array of single or multiple thread IDs that need to be marked as spam.", "type": "string" }, "description": "This parameter should be passed as an array of single or multiple thread IDs that need to be marked as spam.", "example": [ 123456789012345, 987654321098765 ] }, "isArchive": { "type": "boolean", "description": "This parameter indicates whether the threads to be marked as spam are archived or not.", "example": false }, "isFolderSpecific": { "type": "boolean", "description": "This parameter specifies whether the threads to be marked as spam are folder specific or not.", "example": false }, "folderId": { "type": "string", "description": "This is the ID of the folder for which the email threads need to be marked as spam. This is a mandatory parameter if the 'isFolderSpecific' parameter has the value 'true'.", "example": "1234567890abcdef1234567890abcdef" } } }, "MarkAsNotSpamThreadRequest": { "type": "object", "required": [ "mode", "threadId" ], "properties": { "mode": { "type": "string", "description": "This parameter represents the type of operation that is to be performed.", "enum": [ "markNotSpam" ], "example": "markNotSpam" }, "threadId": { "type": "array", "items": { "description": "This parameter should be passed as an array of single or multiple thread IDs that need to be marked as not spam.", "type": "string" }, "description": "This parameter should be passed as an array of single or multiple thread IDs that need to be marked as not spam.", "example": [ 123456789012345, 987654321098765 ] }, "isArchive": { "type": "boolean", "description": "This parameter indicates whether the threads to be marked as not spam are archived or not.", "example": false }, "isFolderSpecific": { "type": "boolean", "description": "This parameter specifies whether the threads to be marked as not spam are folder specific or not.", "example": false }, "folderId": { "type": "string", "description": "This is the ID of the folder for which the email threads need to be marked as not spam. This is a mandatory parameter if the 'isFolderSpecific' parameter has the value 'true'.", "example": "1234567890abcdef1234567890abcdef" } } } }, "securitySchemes": { "iam-oauth2-schema": { "type": "oauth2", "flows": { "authorizationCode": { "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth", "tokenUrl": "https://accounts.zoho.com/oauth/v2/token", "scopes": { "ZohoMail.messages.ALL": "Full access to messages", "ZohoMail.messages.UPDATE": "Update access to messages" } } } } } } }