PUT - Enable User

Purpose

The API is used to enable a user.

OAuth Scope

Use the scope

For admin authentication:

ZohoMail.organization.accounts.ALL (or) 

ZohoMail.organization.accounts.UPDATE

For 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

For admin authentication:

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

For user authentication:

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

Path Parameters

  • zoid* long
    • This parameter is the unique Zoho Organization Identifier for the organization. 
    • This value can be retrieved using the GET organization details API.
    • This parameter is mandatory only for admin authentication.
  • accountId* long

Request Body (JSON Object)

  • zuid* long
    • This parameter is 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 only for admin authentication.
  • mode* string
    • This parameter represents the type of operation that is to be performed.
    • Provide the value as enableUser.

 

* - 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/1234567890/accounts/111111111000" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Zoho-oauthtoken *****" \
-d '{ 
"mode":"enableUser",
"unblockIncoming":"true",
"zuid":"11111111"
}'

Sample Request (Using User Authentication)

Copiedcurl "https://mail.zoho.com/api/organization/1234567890/accounts/111111111000" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Zoho-oauthtoken *****" \
-d '{ 
"mode":"enableUser",
"unblockIncoming":"true"
}'

Sample Response

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