Edit a Note
Purpose
This API is used to edit a note.
OAuth Scope
Use the scope
ZohoMail.notes.ALL (or) ZohoMail.notes.UPDATE
to generate the Authtoken.
ALL - Grants full access to notes.
UPDATE - Grants access to update notes.
Request URL
Method: PUT
Group Notes:
https://mail.zoho.com/api/notes/groups/{groupId}/{noteId}
or
Personal Notes:
https://mail.zoho.com/api/notes/me/{noteId}
Path Parameters
- groupId* long
- Specify the unique ID of the group.
- This parameter can be retrieved from the Get all groups API.
- noteId* long
- Specify the unique ID of the note to be updated.
- This parameter can be retrieved from the Get all notes API.
Request Body ( JSON Object)
- title string
- Provide a title to the note being created.
- content* string
- Provide the content of the note.
- This parameter cannot be empty.
- color int
- Specify the colour of the note.
- Possible values:
- 0 - Blue
- 1- Green
- 2 -Yellow
- 3 - Red
- bookId long
- Provide the unique ID of the book to which you want to add the note.
- This parameter can be retrieved from the Get all books API.
- tagId JSON array of long
- This parameter needs to be passed as an array of single or multiple IDs of tags to be attached to the created note.
- tagId is a unique identifier assigned to a tag.
- This parameter can be retrieved from the Get all labels API.
* - Mandatory parameter
Response Codes
Refer here for the response codes and their meaning.
Sample Request - Group Notes
Copiedcurl "https://mail.zoho.com/api/notes/groups/12345678/1234577777" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****"\
-d '{
"content": "note desc edit ",
"title": "note title edit ",
"colorHex": "#8A66D0",
"bookId": 3015133000000012000
}'
Sample Request - Personal Notes
Copiedcurl "https://mail.zoho.com/api/notes/me/1234577777" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****"\
-d '{
"content": "note desc edit ",
"title": "note title edit ",
"colorHex": "#8A66D0",
"bookId": 3015133000000012000
}'
Sample Success Response
Copied{
"status": {
"code": 200,
"description": "success"
}
}
Sample Failure Response
Copied{
"data": {
"errorCode": "PATTERN_NOT_MATCHED",
"moreInfo": "zoho inputstream Input does not match the given pattern"
},
"status": {
"code": 400,
"description": "Invalid Input"
}
}