Create a Collection

Purpose

This API is used to add/create a new collection.

OAuth Scope

Use the scope

ZohoMail.links.ALL (or) ZohoMail.links.CREATE

to generate the Authtoken.

ALL - Grants full access to links.

CREATE - Grants access to create links.

Request URL

Method: POST

Group bookmarks :

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

or

Personal bookmarks:

https://mail.zoho.com/api/links/me/collections

Path Parameters

Request Body (JSON Object)

  • collectionName* string
    • Provide a name for the collection being created.

 

* - Mandatory parameter

Response Codes

Refer here for the response codes and their meaning.

Sample Request - For Group

Copiedcurl "https://mail.zoho.com/api/links/groups/123456789/collections" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****"\
-d '{
"collectionName":"categoryName1"
}'

Sample Request - For Personal

Copiedcurl "https://mail.zoho.com/api/links/me/collections" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****"\
-d '{
"collectionName":"categoryName1"
}'

Sample Success Response

Copied{
  "status": {
    "code": 200,
    "description": "success"
  },
  "data": {
    "collectionId": "3764869000000013001",
    "collectionName": "categoryName1"
  }
}

Sample Failure Response

Copied{
  "status": {
    "code": 500,
    "description": "Internal Error"
  },
  "data": {
    "moreInfo": "Category Already Exists."
  }
}