Mark a User Unavailable
Purpose
To mark oneself(user) unavailable during a particular time period.
Endpoints
- POST /settings/users_unavailability
Request Details
Request URL
{api-domain}/crm/{version}/settings/users_unavailability
Header
Authorization: Zoho-oauthtoken <access_token>
Scope
scope=ZohoCRM.settings.users_unavailability.ALL
(or)
scope=ZohoCRM.settings.users_unavailability.WRITE
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/users_unavailability"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d "@input.json"
-X POSTInput JSON Keys
- commentsstring, optionalThe comment you want other users to see while you are unavailable. 
- fromstring, mandatoryThe date and time in the ISO8601 format that you will be unavailable from. 
- tostring, mandatoryThe date and time in the ISO8601 format that you will be unavailable to. 
Sample Input
Copied{
    "users_unavailability": [
        {
            "comments": "Unavailable",
            "from": "2021-02-18T19:00:00+05:30",
            "to": "2021-02-18T20:00:00+05:30"
        }
    ]
} Possible Errors
- MANDATORY_NOT_FOUNDHTTP 400One or more required fields is not specified in the input. 
 Resolution: The "details" key specifies the API name of the mandatory field you have not included in the input body. Include all the mandatory keys in the input.
- INVALID_DATAHTTP 400You have specified an incorrect ID in the "user" object, or you have specified an incorrect time in either the "to" or "from" fields. 
 Resolution: Specify the correct ID and the right time in the ISO8601 format. Ensure that the unavailability time period starts before the time it ends.
Sample Response
Copied{
    "users_unavailability": [
        {
            "code": "SUCCESS",
            "details": {
                "id": "554023000002221001"
            },
            "message": "Unavailability created successfully.",
            "status": "success"
        }
    ]
}