PUT - Update Vacation Reply of an Account

Purpose

This API is used to update vacation reply to an account. This can be done by the admin for a user or by the user for themselves.

OAuth Scope

Use the scope

Using admin authentication:

ZohoMail.organization.accounts.ALL (or) ZohoMail.organization.accounts.UPDATE

Using user authentication:

ZohoMail.accounts.ALL (or) ZohoMail.accounts.UPDATE

to generate the Authtoken.

ALL - Grants full access to accounts.

UPDATE - Grants access to update account information.

Request URL

Method: PUT

Using admin authentication:

https://mail.zoho.com/api/organization/{zoid}/accounts/{accountId}

Using user authentication:

https://mail.zoho.com/api/accounts/{accountId}

Path Parameters

  • zoid long
    • This parameter denotes the unique Zoho Organization Identifier for the organization.
    • This parameter can be retrieved from the Get Organization Details API.
    • This parameter is mandatory while using admin authentication. 
  • accountId* long
    • This parameter is used to identify the account whose details are retrieved.
    • This parameter can be retrieved from the Get User Account Details API.

 

Request Body ( JSON Object)

  • zuid long
    • This parameter denotes the unique Zoho User Identifier for the user.
    • This parameter can be fetched from the Get All Org Users Details API.
    • This parameter is mandatory while using admin authentication. 
  • mode* string
    • This parameter represents the type of operation that is to be performed.
    • Provide the value as updateVacationReply.
  • vacationResponse* JSON object

    This JSON object contains the following vacationResponse fields/members:

    • subject  string
      • Specifies the subject of the vacation response email.
    • content string
      • Specifies the content of the vacation response email.
    • sendTo string
      • Specifies whether the vacation reply should be sent to all senders or only for emails from known contacts. 
      • Allowed values:
        • all
        • contacts
        • noncontacts
        • org
        • nonOrgAll
        • nonOrgContacts
        • nonOrgNonContacts
    • fromDate* string
      • Specifies the date from which the vacation response should be sent.
      • Format:  MM/DD/YYYY HH:MM:SS (e.g.: 12/11/2023 11:34:00).
    • toDate* string
      • Specifies the date to which the vacation response should be sent.
      • Format:  MM/DD/YYYY HH:MM:SS (e.g.: 20/11/2023 11:34:00).
    • forAllAccts  boolean
      • Specifies whether the vacation response applies to all accounts or not.
      • Possible values:
        • true - Applies to all accounts.
        • false - Does not apply to all accounts.
    • sendingInt* int
      • Specifies the sending interval of the vacation response email.
    • replyForAllMails string
      • Specifies whether vacation response emails should be sent to all mails or not.
      • Allowed values:
        • true - Send vacation reply to all mails.
        • false - Do not send vacation reply to all mails.
    • replyForToMails string
      • Specifies whether vacation reply should be sent to mails only if the sender's email address is in the "To" field.
      • Allowed values:
        • true - The vacation reply will only be sent to emails where the sender's email address appears in the "To" field.
        • false - The vacation reply will be sent to all incoming emails, regardless of whether the sender's email address is in the "To" field.
    • name string
      • Specifies a name for the vacation.
    • vacationId long
      • This parameter denotes the unique identifier for vacation response email.

 

* - Mandatory parameter

Response Codes

Refer here for the response codes and their meaning.

Sample Request (Using Admin Authentication)

Copiedcurl "https://mail.zoho.com/api/organization/12345678/accounts/2560636000000008002" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****"
-d '{
  "zuid": 11111111,
  "mode": "updateVacationReply",
  "vacationResponse": {
    "vacationId": 2560636000000149005,
    "subject": "Away on Vacation update!",
    "content": "Will not be available from 05-004-24 to 19-05-24 as I'm away on vacation. Contact me on my personal number in case of emergencies.",
    "fromDate": "05/04/2024 00:00:00",
    "toDate": "19/05/2024 00:00:00",
    "forAllAccts": "true",
    "sendingInt": "0",
    "sendTo": "all"
  }
}'

Sample Request (Using User Authentication)

Copiedcurl "https://mail.zoho.com/api/accounts/2560636000000008002" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****"
-d '{
  "mode": "updateVacationReply",
  "vacationResponse": {
    "vacationId": 2560636000000149005,
    "subject": "Away on Vacation update!",
    "content": "Will not be available from 13-01-18 to 19-01-18 as I'm away on vacation. Contact me on my personal number in case of emergencies.",
    "fromDate": "05/04/2024 00:00:00",
    "toDate": "19/05/2024 00:00:00",
    "forAllAccts": "true",
    "sendingInt": "0",
    "sendTo": "all"
  }
}'

Sample Response

Copied{
"status": {
"code": 200,
"description": "success"
}
}