Make Or Remove Favorite
Purpose
Using this API, you can either make the document as favorite or remove the document from favorites.
Quick Reference
| Property | Value |
|---|---|
| Method | POST |
| Request URL | https://{zohoapis_domain}/writer/api/v1/documents/{document_id}/meta |
| Scopes | ZohoWriter.documentEditor.ALL |
| Rate Limit | See Writer API throttle limits |
Parameters
Path Parameters
| Parameter | Data Type | Mandatory/Optional | Description |
|---|---|---|---|
| document_id | String | Mandatory | Specify the unique id for the Writer document. |
Body Parameters
| Parameter | Data Type | Mandatory/Optional | Description |
|---|---|---|---|
| operations | JSONObject | Mandatory | Pass a boolean value (either true or false) through 'favourite' key inside the JSONObject. 1. If you would like to make the document as favourite, pass the value as 'true'. 2. If you would like to remove the document from favourites, pass the value as 'false'. |
Notes
- Note: You can also mark or unmark the document as favorite using this deluge task.
- For possible errors, refer to error codes.
Sample Request
Copiedcurl -X POST \
https://www.zohoapis.com/writer/api/v1/documents/h36bc2a6c50b2754a405880c1d1679a5f5be9/meta \
-H 'Authorization: Zoho-oauthtoken xxx.yyy.zzz' \
-H 'cache-control: no-cache' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-F 'operations={"favourite": true}'Sample Response
Copied{
"result": "success",
"modified_by": {
"email_id": "zylker@yahoo.co.in",
"profile_photo": "https://contacts.zoho.com/file?t=user&ID=1308724&fs=thumb",
"user_id": "1308724",
"display_name": "Zylker"
},
"is_favourite": true,
"message": "The document has been added to your favourites."
}