Purpose
This API is used to mark a particular email or a group of emails as not spam.
OAuth Scope
Use the scope
ZohoMail.messages.ALL (or) ZohoMail.messages.UPDATE
to generate the Authtoken.
ALL - Grants full access to messages.
UPDATE - Grants access to update messages.
Request URL
Method: PUT
https://mail.zoho.com/api/accounts/{accountId}/updatemessage
Path Parameters
- accountId* long
- This key is used to identify the specific account.
- This parameter can be retrieved from Get User Account Details API.
Request Body (JSON object)
- mode* string
- This parameter represents the type of operation that is to be performed.
- Provide the value as moveNotSpam.
- messageId* JSON Array of long
- This parameter should be passed as an array containing one or more message IDs for which are to be marked as not spam. A message ID is a unique identifier for an email.
- This parameter can be retrieved from List Emails API.
- folderId long
- This parameter is the unique identifier of the respective folder.
- This parameter can be retrieved from Get All Folders API.
- isArchive boolean
- This parameter specifies that whether the respective email(s) are to be archived or not.
- Allowed values:
- true - The email(s) should be archived.
- false - The email(s) should not be archived.
* - Mandatory parameter
Response Codes
Refer here for the response codes and their meaning.
Sample Request Body
Copiedcurl "https://mail.zoho.com/api/accounts/12345678/updatemessage" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****" \
-d '{
"mode":"markNotSpam",
"messageId" : [11000000004001]
}'