PUT - Change Outgoing Status

Purpose

The API is used to change the outgoing status of a user from enabled to disabled or vice-versa.

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 value can be retrieved using the Get organization details API.
  • accountId* long
    • This parameter is used to identify the account of the user whose outgoing status is updated.
    • This parameter can be retrieved from the Get User Account Details API.

Request Body (JSON Object)

  • zuid* long
    • This parameter denotes the unique identifier for each user in an organization. 
    • This value can be retrieved using the Get all org user details API.
    • This parameter is mandatory for admin authentication only.
  • mode* string
    • This parameter represents the type of operation that is to be performed.
    • Provide the value as updateOutgoingStatus.
  • outgoingBlocked* boolean
    • This parameter specifies whether to enable or disable the outgoing for the account.  
    • Allowed values:
      • true - Blocking the outgoing for the user account.
      • false - Unblocking the outgoing for the user account.

* - 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": "1112233333",
   "mode": "updateOutgoingStatus",
   "outgoingBlocked": "true"
}'

Sample Request

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 '{
   "mode": "updateOutgoingStatus",
   "outgoingBlocked": "true"
}'

Sample Response

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