Create a New Note

Purpose

This API is used to create a note.

OAuth Scope

Use the scope

ZohoMail.notes.ALL (or) ZohoMail.notes.CREATE

to generate the Authtoken.

ALL - Grants full access to notes.

CREATE - Grants access to create notes.

Request URL

Method: POST

Group Notes:

https://mail.zoho.com/api/notes/groups/{groupId}

or

Personal Notes:

https://mail.zoho.com/api/notes/me

Path Parameters

  • groupIdlong
    • Specifies the unique ID of the group.
    • This parameter can be retrieved from the Get all groups 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
    • Specifies the color of the note.
    • Possible values:
      • 0 - Blue
      • 1- Green
      • 2 -Yellow
      • 3 - Red
  • bookId long
    • Provide the unique ID of the book where you want to associate 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/84626808" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****"\
-d '{
 "content": "note desc ",
 "title": "note title ",
 "tagId": [
   3015133000000011000
 ]
 }'

Sample Request (Personal Notes)

Copiedcurl "https://mail.zoho.com/api/notes/me" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****"\
-d '{
 "content": "note desc ",
 "title": "note title ",
 "tagId": [
   3015133000000011000
 ]
 }'

Sample Response (Group Notes)

Copied{
  "status": {
    "code": 201,
    "description": "Created"
  },
  "data": {
    "entityId": "1711974988431110001",
    "URI": "https://mail.zoho.com/api/notes/groups/84626808/1711974988431110001"
  }
}

Sample Response ( Personal Notes)

Copied{
  "status": {
    "code": 201,
    "description": "Created"
  },
  "data": {
    "entityId": "1711974988431110001",
    "URI": "https://mail.zoho.com/api/notes/me/1711974988431110001"
  }
}

Sample Failure

Copied{
  "data": {
    "errorCode": "PATTERN_NOT_MATCHED",
    "moreInfo": "zoho inputstream Input does not match the given pattern"
  },
  "status": {
    "code": 400,
    "description": "Invalid Input"
  }
}