API Documentation
Pricing Resources Contact us

Introduction

API Root Endpoint

https://vault.zoho.com/

Application Programming Interface(API) is a set of functions and procedures that help users to access the features or data of an application, service, or operating system directly from another application. An API acts as a messenger between the service requester and provider, enabling an application to interact with another.

Booking air tickets from a travel app is a simple example that’ll help us understand about APIs. The app gathers different details like ticket fare, seating location, luggages, and much more from multiple airlines by interacting with the airlines’ individual APIs, and displays everything a user would need in one place. This makes life easy for the travellers, helping them compare and plan their journey accordingly. APIs act as an intermediary here, making all of this possible.

Zoho Vault APIs allows users to add, delete, view, update Secrets, and perform other operations directly, without accessing Zoho Vault’s web interface. We provide REpresentational State Transfer Application Programming Interface (REST API), along with the Python package for Zoho Vault API to serve this purpose.

Why REST?

REST API’s architecture takes advantage of protocols that are already in place. It uses the HTTP for web APIs, which paves way for developers to use existing libraries while building their custom applications. It was developed by Dr. Roy Fielding in 2000, and adopted by developers across the globe for its ease of use and simplicity. Every resource is exposed as a URL, which can be obtained by accessing the API root endpoint.

How secure are your APIs?

Zoho Vault’s REST APIs leverage the industry-standard OAuth 2.0 protocol for authorization. They authorize applications to interact with them without actually giving away the password. Simply put, they provide delegated access to the service and authorize third-party applications to access the user accounts securely.

Supported operations

Zoho Vault APIs support a wide range of operations, as mentioned below. In future updates, you can expect support for other operations available in our web interface as well.

User management

Secrets management

Chamber management

Implementation guide

Accessing Zoho Vault’s API requires authentication. You can use either an existing account in Zoho Vault, or create a separate account for API.

There are two major methods for retrieving data from most web services: XML or JSON. However, for now, we only support the JSON method for retrieving data from Zoho Vault, as JSON has a comparatively standardized syntax, compared to XML.

Step 1 - Using OAuth:

Web Server applications can implement OAuth 2.0 Authorization by hitting Zoho’s OAuth endpoints to access Zoho’s APIs. A short-lived authorization code is generated by Zoho accounts and sent to the third-party application via the user-agent (usually a web browser). An authorization code can be exchanged for an access token at Zoho Accounts. Users can also pass an additional parameter offline_access = true to generate refresh_token, which can be used to generate an additional access_token. For more details, you can check out this link.

Step 2 - Accessing Zoho Vault with OAuth & identifying the type of user account:

From your application in which you require read access to Zoho Vault Secrets, call the GET_LOGIN API with the URI.

Zoho Vault uses two methods to derive and validate user’s passphrase based on user account. * Key derivation algorithm * Hashing Algorithm

Step 2 - Example

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{"operation":{"result":{"message":"","status":"success"},"name":"GET_LOGIN","details":{"PASSPHRASE":XxXXxxxxxXX/XXXxXxXXXXXXxXxxXXXxXX/xxXXxXXxXxxXxxx/xxXxXxX==","SALT":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","ITERATION":1000,"LOGIN":"PBKDF2_AES" OR "SHA256","LASTMODFIEDTIME":"xxxxxxxxxxxxx","USER":{"USERID":"xxxxxxxxxxxxx","USERNAME":"API_User","EMAIL":"API_User@domain.com"}}}} 


URI - https://vault.zoho.com/api/json/login?OPERATION_NAME=GET_LOGIN 

Code Snippet to derive Master Key:

 var masterKey = null;
 var passphrase = "user_passphrase"; if(LOGINTYPE == "PBKDF2_AES"){ 
 var masterKey = Vault.PBKDF2_key(passphrase, SALT, ITERATION); }else{ 
 var masterKey = Vault.hash(passphrase); 
 var passAuth = Vault.hash(passphrase+SALT); } 

Note

Depending on the time of account creation, the algorithm may vary as “PBKDF2_AES” or “SHA256”.

Step 3 - Fetching user’s data by calling the OPEN_VAULT API :

Next, call the OPEN_VAULT API to access the Secrets, under the user account with the URI found in the right. https://vault.zoho.com/api/json/login?OPERATION_NAME=OPEN_VAULT&passAuth= where is the value derived from the code snippet mentioned in Step 2. If you would like to retrieve only specific amount of Secrets, you can pass the parameter startIndex and limit along with the API URI. Additional parameters are required only if the hashing algorithm is SHA256.

Step 3 - Sample JSON response from the Zoho Vault server:

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{
 "operation":{ 
"result":{ "message":"", "status":"success" 
}, "name":"OPEN_VAULT", "details":{ 
"OFFLINE_ACCESS":"Enabled", "PLANID":8016,
 "POLICY_USAGE":"1", "SECRETTYPECOLUMNS":{ },
 "SECRETS":[ ], "ALLOW_SHARING_SECRETS":"Enabled", "SHARINGKEY":"xxxxxxxxxxxxxxxxxxxxx", "PRIVATEKEY":"xxxxxxxxxxxxxxxxxxxxxx", "PERSONAL_SECRETS":"Enabled", "USER":{ 
"USERID":"xxxxxxxxxxxxx", "USERNAME":"API_User", "EMAIL":"API_User@domain.com" 
}, 
"ALLOW_ADD_SECRETS":"Enabled" } 
} 
}

Here, "SECRETS":[ ], will contain the array of Secrets present under the account. 


URI - https://vault.zoho.com/api/json/login?OPERATION_NAME=OPEN_VAULT&passAuth=<passAuth>&startIndex = &limit=.


Step 4 - Org key derivation:

All Enterprise Secrets are encrypted in Zoho Vault using a key called ‘Org key’. Please use the javascript on your right to derive the org key from the Zoho Vault server’s JSON response.

Step 4 - Javascript code snippet to derive org key:

 var userOrgSharedKey = SHARINGKEY;
 var userPrivateKey = PRIVATEKEY;
 var orgKey = null;
 if((userPrivateKey !="null")&&(userOrgSharedKey!="null")){ 
 orgKey = Vault.RSA_decrypt(userOrgSharedKey, Vault.decrypt(userPrivateKey, masterkey)); } 

Note:

Null value will be returned for the variable userOrgSharedKey if the user’s sharing handshake process is not completed properly, i.e. the sharing status of the user in the Admin >> User management section should always be “Approved”.

Step 5 - Decrypting Secret data:

The JSON response from Step 3 includes the array of Secrets, which we have to decrypt. Sample Secret details from the JSON response are updated on your right.

Step 5 - Example

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
"SECRETS":[ { 
"SHARING":{ "DETAILS":[ 
{
 "SHAREDTO":"", "SHARINGLEVEL":3, "SHAREDBY":"" 
} ], 
"DIRECTION":"" }, 
"SECRETID":"2000000926001", "SECRETTYPEID":"2000000000015", "accesssctrlconfigured":"false", 
"CUSTOMCOLUMN":"eyJjdXN0b21jb2wiOlt7ImNvbG5hbWUiOiJhYSIsInZhbHVlIjoic1FHbThpMHh WVmZFbFE9PSIsInR5cGUiOiJ0ZXh0IiwiaWQiOiJjdXN0Q29sRGl2XzAifV19", 
"SECRETNAME":"000000_add secrets 1111", 


"PASSWORDMODIFIEDTIME":1465200931358, "LASTMODFIEDTIME":1465200950881, "displayaccctrlicon":false, "DESCRIPTION":"asdasdasd", "USERID":"2000000006001", "CREATIONTIME":1465200931358, "SECRETURL":"http://test.com", "ISSHARED":"YES", 
"SHARINGLEVEL":10,
 "AUTOLOGIN":false,
 "CLASSIFICATION":"E", "SECURENOTE":"swF1ey0xVVdxjZq4sZz2tY2167o=", "ISSHAREDTOUSERS":false, "POLICYID":"2000000000063", 
"SECRETDATA":"{\"username\":\"sAFlvi0xVVct18TZvKuF+nsitPBL\",\"file\":\"sQHq0C0xVVc=\ ",\"password\":\"sAEe4S0xVVeTEVoTapnz3w==\"}", 
"AUTOSUBMIT":1, "requeststatus":-1, "ISFAVOURITE":false, "TAGS":"test" 
}]

Here, the encrypted contents are CUSTOMCOLUMN, SECURENOTE & SECRETDATA. Please note the value for ISSHARED which defines, whether a particular Secret is encrypted with org key or using the master key. If the ISSHARED value is “YES”, data has to be decrypted using the Org Key, which is already received from step 4. If the value is “No”, the data has to be decrypted using user’s Master key, derived from step 2. To obtain the proper Secret data label, always refer the SECRETTYPEID against the array of SECRETTYPECOLUMNS.

To download or retrieve the attached file from a Secret using API

Each file attachment in Zoho Vault has a fileID as a reference to it. Supplying the fileID with the API call will help you retrieve the correct attachment. From the required SECRETID, under the SECRETDATA within the FILES column you will find the “fileID”.

Download or retrieve attached file

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
http://vault.zoho.com/api/json/secrets?OPERATION_NAME=GET_SECRET_FILES 
Sample FILE column info in secret JSON: 
"FILES": "[{"fileId":"1000000004049","name":"query(1).txt","column":"file","expirydate":"","size":113 8}]", 

HTTP methods

Zoho Vault API uses appropriate HTTP verbs for every action.

Method Description
GET Used for retrieving resources.
POST Used for creating resources and performing resource actions.
PUT Used for updating resources.
DELETE Used for deleting resources.

User management

Perform all your tasks related to user management.

Get users

GET /api/rest/json/v1/user

Create a new user group in your vault account.

OAUTH Scope

ZohoVault.user.READ

Arguments

Response Example

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{
    "operation": {
        "result": {
            "message": "",
            "status": "Success"
        },
        "Details": [
            {
                "role": "SuperAdmin",
                "unique-id": "743262",
                "enabled": 1,
                "email": "john@zylker.com",
                "user_auto_id": "1000000000414",
                "username": "John"
            },
            {
                "role": "SuperAdmin",
                "unique-id": "802762",
                "enabled": 1,
                "email": "john@zylker.com",
                "user_auto_id": "1000000000448",
                "username": "john"
            },
            {
                "role": "SuperAdmin",
                "unique-id": "802768",
                "enabled": 1,
                "email": " john@zylker.com",
                "user_auto_id": "1000000000450",
                "username": "n"
            }
        ],
        "name": "GET_USER"
    }
}

Get user details

GET /api/rest/json/v1/user/{zuid}

Get user details from Vault.

Response Example

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{"operation":{"result":{"message":"","status":"Success"},"Details":[{"role":"SuperAdmin","unique-id":"11078996","enabled":1,"email":"john@zylker.com","user_auto_id":"188000000193003","username":"John"}],"name":"GET_USER"}}

OAUTH Scope

ZohoVault.user.READ

Get all user groups

GET /api/rest/json/v1/usergroup

Get all user group details from Vault.

OAUTH Scope

ZohoVault.user.READ

Get user group details

GET /api/rest/json/v1/usergroup/{groupid}

Get details of a user group from Vault.

OAUTH Scope

ZohoVault.user.READ

Response Example

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{
    "operation": {
        "result": {
            "message": "",
            "status": "Success"
        },
        "Details": {
            "groupmembers": [
                {
                    "username": "john",
                    "user_auto_id": "1000000000448",
                    "email": "john@zylker.com"
                },
                {
                    "username": " john@zylker.com",
                    "user_auto_id": "1000000000450",
                    "email": " john@zylker.com"
                }
            ],
            "groupname": "via API name update",
            "description": "some description",
            "username": "John"
        },
        "name": "GET_USER_GROUP_DETAILS"
    }
}

Add new user group

POST /api/rest/json/v1/usergroup

Create a new user group in your vault account.

OAUTH Scope

ZohoVault.user.CREATE

Request Example

$ curl https://vault.zoho.com/api/rest/json/v1/usergroup \
    -H "Content-Type: application/json;charset=UTF-8" \
    -H "Authorization: Zoho-authtoken <YourValidAuthtoken>" \
    -d '{
"groupName" : "",
"description" : "",
"groupMembers" : [userid array]
}'

Response Examples

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{
    "operation": {
        "result": {
            "message": "User group added successfully",
            "status": "Success"
        },
        "name": "ADD_USER_GROUP"
    }

Update user group

PUT /api/rest/json/v1/usergroup/{groupid}

Update the user group details.

OAUTH Scope

ZohoVault.user.UPDATE

Request Example

$ curl https://vault.zoho.com/api/rest/json/v1/usergroup/{groupid} \
    -H "Content-Type: application/json;charset=UTF-8" \
    -H "Authorization: Zoho-authtoken <YourValidAuthtoken>" \
    -d 'INPUT_DATA= {
"groupName" : "Name for group",
"description" : "description",
"groupMembers" : [userid array]
}'

Response Example

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{
    "operation": {
        "result": {
            "message": "User group updated successfully",
            "status": "Success"
        },
        "name": "EDIT_USER_GROUP"
    }
}

Secret management

Manage all Secrets in your Vault.

Create a new Secret

POST /api/rest/json/v1/secrets

Create a new Secret in Vault.

OAUTH Scope

ZohoVault.secrets.CREATE

Response Example

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{  
 "secretdata":{  
  "password":"QAEMRCPqgln0Fh6W/LI=",
  "file":"2gKN1MWdgVk=",
  "username":"QAHvqSPqglkxJKnDgq4="
 },
 "secretname":"Secret Name",
 "isshared":"NO",
 "classification":"E",
 "securenotes":"QQHI6yPqglk=",
 "tags":"tags",
 "description":"description about secret",
 "policyid":"1000000000041",
"chamberid":"1000000023041"
 "secreturl":"https://tumbler.com",
"secrettypeid":"1000000004293",
"customcolumnnew":"eyJjdXN0b21jb2wiOltdfQ=="
}

Update Secrets

PUT /api/rest/json/v1/secrets/{secretid}

Update existing Secrets in Vault.

OAUTH Scope

ZohoVault.secrets.UPDATE

Request Example

$ curl https://vault.zoho.com/api/rest/json/v1/secrets/{secretid} \
    -H "Content-Type: application/json;charset=UTF-8" \
    -H "Authorization: Zoho-authtoken <YourValidAuthtoken>" \
    -d 'INPUT_DATA
{  
 "secertdata":{  
  "password":"QAEMRCPqgln0Fh6W/LI=",
  "file":"2gKN1MWdgVk=",
  "username":"QAHvqSPqglkxJKnDgq4="
 },
 "secretname":"Secret Name",
 "classification":"E",
 "securenote":"QQHI6yPqglk=",
 "tags":"tags",
 "description":"description about secret",
 "passwordmodified":false,
 "policyid":"1000000000041",
 "secreturl":"https://tumbler.com",
 "secreters":["https://tumbler.com"],
"secrettypeid":"1000000004293"
}'

Get Secrets

GET /api/rest/json/v1/secrets

View existing Secrets in Vault.

Arguments

OAUTH Scope

ZohoVault.secrets.READ

Response Example

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{
"operation": 
{
"result": 
{
"message": "",
"status": "Success"
}
,
"Details": [

{
"changepassword": false,
"issharedtousers": false,
"notes": "bQEPkfCpgVnSO2CSRHPVTEvqpnGv3GKonaH+wyAjGImu",
"isshared": "YES",
"accesssctrlconfigured": "false",
"accounttype": "2000000000015",
"secretid": "2000000015007",
"classification": "E",
"userid": "2000000000384",
"secretData": "{"password":"bAH0OPCpgVmpgls=","file":"","username":"bAEhrPCpgVkePKIrQA=="}",
"autologon": false,
"displayaccctrlicon": false,
"isfavourites": false,
"secreturl": "http://URL",
"policyid": "null",
"autosubmit": true,
"onetimeacess": false,
"sharinglevel": 10,
"requeststatus": -1,
"secretname": "ZohoVaultTestSecret 08"
}
,

{
"changepassword": false,
"issharedtousers": false,
"notes": "",
"isshared": "YES",
"accesssctrlconfigured": "false",
"accounttype": "2000000000015",
"secretid": "2000000015009",
"classification": "E",
"userid": "2000000000384",
"secretData": "{"password":"cQHB6fCpgVntzpjb4j4NWXyK","file":"","username":"cQGwCvCpgVkSAggiUw=="}",
"autologon": false,
"displayaccctrlicon": false,
"isfavourites": false,
"secreturl": "http://autologonurl.com",
"policyid": "null",
"autosubmit": true,
"onetimeacess": false,
"sharinglevel": 10,
"requeststatus": -1,
"secretname": "File attachment"
}
,

{
"changepassword": false,
"issharedtousers": false,
"notes": "fwGfiPCpgVlIa2mR5McwmOxzJ6lQZtIBbVo7/U/K/GH6AnHf0qcRySpCwQRaVzXgFfV+9SHY1VHeRFFf+eQHzX+P4hoSI94NqGpZbSppk9FYd2SStIAOUwsvgdEDzdA5nmoyeLr5ebxkI7Hq7xonL3iRQBzArl6cTHEOoQwjNN9vTpNbZj1IeG0X3Da2fzUQ8PmrTpMnBZF1iAbGh0i8WcjVCCz6ohRPTYON8kZ3w1lwWW4y50zYoJfYPX4rPyKWi9v3fdccVJ+vG7+/76vzZGeMrKkVaxIVRDmRfjmsj6/A1cR1ytBSEcIBp8GUnkqW9UnwX/iKWQ3psVf7f1iRBA1wHNjYdWM6in2FTcvB1CuQ4KFb1fiugvoq6PtMJosNqrYTuifYnzJEh1MCE0zCokohdnfVCoBYuTAnCyNEcI/lK37dncLAOJt7+9/Wk0lV32yC8VvDWAjdVOLYFr/HYNOftceVh/NnrmbReyJek54Y9DR5JZz1GDkeTi6eYfUB1HOcLPoHi+eH5pG9ggWgO2fsLBrXZgV+ZjVsOcP5YL+efWE75vyxDpLTM8SgeKHULB81uSRZy/RpvCI2HG3CAdzkhJ32y7neyAEBVtbrb640fzValUcT00DbmUqEWV1reWSJUG8bIDbVQAigZDbil8jpr+c/8bb3E2h7zt3CSxTVdsTxWT7ephvOvlrj7E7+Gc4YjIXyCkQwAntN3DRxHxI=",
"isshared": "YES",
"accesssctrlconfigured": "false",
"accounttype": "2000000000015",
"secretid": "2000000015011",
"classification": "E",
"userid": "2000000000384",
"secretData": "{"password":"fwG+QfCpgVn2p6UhIr+fCfU=","file":"","username":"fwHRmPCpgVlJN7qHRlCqJcmuiRaF"}",
"autologon": false,
"displayaccctrlicon": false,
"isfavourites": false,
"secreturl": "http://accounts.csez.zohocorpin.com",
"policyid": "null",
"autosubmit": true,
"onetimeacess": false,
"sharinglevel": 10,
"requeststatus": -1,
"secretname": "Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
,

{
"changepassword": false,
"issharedtousers": false,
"notes": "",
"isshared": "YES",
"accesssctrlconfigured": "false",
"accounttype": "2000000000015",
"secretid": "2000000015013",
"classification": "E",
"userid": "2000000000384",
"secretData": "{"password":"iAGdn/CpgVniZpq4LcRsXiaG","file":"","username":"iAFQjfCpgVlsEPlhaw=="}",
"autologon": false,
"displayaccctrlicon": false,
"isfavourites": false,
"secreturl": "http://accounts.zoho.com",
"policyid": "null",
"autosubmit": true,
"onetimeacess": false,
"sharinglevel": 10,
"requeststatus": -1,
"secretname": "One"
}
,

{
"changepassword": false,
"issharedtousers": false,
"notes": "",
"isshared": "YES",
"accesssctrlconfigured": "false",
"customcolumn": "eyJjdXN0b21jb2wiOlt7ImNvbG5hbWUiOiJOL0EiLCJ2YWx1ZSI6Imp3RmlXUENwZ1ZsWkZteDJtSXJ5bXdlcXg1NzBkUT09IiwidHlwZSI6InRleHQifSx7ImNvbG5hbWUiOiJOL0EiLCJ2YWx1ZSI6Imp3R3BQL0NwZ1ZsbXZnPT0iLCJ0eXBlIjoidGV4dCJ9XX0=",
"accounttype": "2000000000015",
"secretid": "2000000015015",
"classification": "E",
"userid": "2000000000384",
"secretData": "{"password":"kQGUrvCpgVkBvjzqZRcwJw==","file":"","username":"kQEBJfCpgVkNENMIVNd1YunXPDgs"}",
"autologon": false,
"displayaccctrlicon": false,
"isfavourites": false,
"secreturl": "http://facebook.com/login.php",
"policyid": "null",
"autosubmit": true,
"onetimeacess": false,
"sharinglevel": 10,
"requeststatus": -1,
"secretname": "vault-test-lap"
}

Get Secrets with ID

GET /api/rest/json/v1/secrets/{secretid}

View existing Secrets in Vault with Secret ID.

OAUTH Scope

ZohoVault.secrets.READ

Response Example

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{
"operation": 
{
"result": 
{
"message": "",
"status": "Success"
}
,

"Details": [

{
"issharedtousers": true,
"notes": "GwDxdmqqgVk=",
"isshared": "YES",
"accesssctrlconfigured": "false",
"accounttype": "2000000000015",
"secretid": "2000000015041",
"classification": "E",
"userid": "2000000000392",
"secretData": "{"password":"GwCXgmqqgVlCp4dXAaEA2UTB","file":"GwDJ+GqqgVk=","username":"GwB+wGqqgVlzuHuG+g=="}",
"autologon": false,
"tags": "",
"isfavourites": false,
"secreturl": "http://accounts.zoho.com",
"autosubmit": true,
"sharinglevel": 30,
"secretname": "One"
}

],

"name": "GET_SECRET"
}

}

Sharing Secrets with a user

PUT /api/rest/json/v1/sharing/secret/bulkshare/{userid}

Share Secrets with a user in Vault.

OAUTH Scope

ZohoVault.secrets.UPDATE

Request Example

$ curl https://vault.zoho.com/api/rest/json/v1/sharing/secret/bulkshare/{userid} \
    -H "Content-Type: application/json;charset=UTF-8" \
    -H "Authorization: Zoho-authtoken <YourValidAuthtoken>" \
    -d 'INPUT_DATA=
{
"logonsecrets" : JSONArray,
"viewsecrets" : JSONArray,
"modifysecrets" : JSONArray,
"managesecrets" : JSONArray
}
secrets - array of Secret Objects (need to be sent if secret is not encrypted with org key)
[{"changepassword":false,"issharedtousers":false,"notes":"0gN23IMvGls=","isshared":"YES","accesssctrlconfigured":"false","customcolumn":"eyJjdXN0b21jb2wiOlt7ImNvbG5hbWUiOiJmaWxlIiwidmFsdWUiOiIwZ1Bnem9NdkdsdnA2Njl1NjM3c3NyWHAvR0hTU2o4dUNDWT0iLCJ0eXBlIjoiZmlsZSIsImlkIjoiY3VzdENvbERpdl8wIn1dfQ==","accounttype":"151000000000015","secretid":"151000000221027","description":"","classification":"E","userid":"151000000009003","secretData":"{\"password\":\"sAMIMIMvGlt843HDe43yAAuFdA==\",\"file\":\"0QM0ooMvGlv2kp2I\",\"username\":\"0QMtbIMvGlumrb6FJyrV\"}","autologon":false,"displayaccctrlicon":false,"isfavourites":false,"secreturl":"","policyid":"151000000000051","autosubmit":true,"onetimeacess":false,"sharinglevel":10,"files":"[{\"expirydate\":\"\",\"size\":4937,\"name\":\"check.html\",\"column\":\"file\",\"fileId\":\"151000000221029\"},{\"expirydate\":\"\",\"size\":66677,\"name\":\"TBTAM00628340000002462.pdf\",\"column\":\"customattrivalue_0\",\"fileId\":\"151000000221030\"}]","requeststatus":-1,"secretname":"!!!file"}]

Response Example

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{
    "operation": {
        "result": {
            "message": "Secret shared with the user.",
            "status": "Success"
        },
        "Details": {
            "secretArray": [
                {
                    "notes": "0gN23IMvGls=",
                    "accesssctrlconfigured": "false",
                    "accounttype": "151000000000015",
                    "description": "",
                    "userid": "151000000009003",
                    "secretData": "{\"password\":\"sAMIMIMvGlt843HDe43yAAuFdA==\",\"file\":\"0QM0ooMvGlv2kp2I\",\"username\":\"0QMtbIMvGlumrb6FJyrV\"}",
                    "displayaccctrlicon": false,
                    "isfavourites": false,
                    "secreturl": "",
                    "policyid": "151000000000051",
                    "autosubmit": true,
                    "onetimeacess": false,
                    "sharinglevel": 10,
                    "sharingtype": "SHARED_BY_ME",
                    "lastmodifiedtime": 1528442421725,
                    "changepassword": false,
                    "issharedtousers": true,
                    "isshared": "YES",
                    "customcolumn": "eyJjdXN0b21jb2wiOlt7ImNvbG5hbWUiOiJmaWxlIiwidmFsdWUiOiIwZ1Bnem9NdkdsdnA2Njl1NjM3c3NyWHAvR0hTU2o4dUNDWT0iLCJ0eXBlIjoiZmlsZSIsImlkIjoiY3VzdENvbERpdl8wIn1dfQ==",
                    "secretid": "151000000221027",
                    "passwordmodifiedtime": 1528441499471,
                    "classification": "E",
                    "autologon": false,
                    "tags": "",
                    "POLICYID": "151000000000051",
                    "files": "[{\"expirydate\":\"\",\"size\":4937,\"name\":\"check.html\",\"column\":\"file\",\"fileId\":\"151000000221029\"},{\"expirydate\":\"\",\"size\":66677,\"name\":\"TBTAM00628340000002462.pdf\",\"column\":\"customattrivalue_0\",\"fileId\":\"151000000221030\"}]",
                    "creationtime": 1528441499471,
                    "secretname": "!!!file"
                }
            ]
        },
        "name": "SHARE_SECRETS_TO_USER"
    }
}

Bulk share Secrets with users

PUT /api/rest/json/v1/sharing/secret/users/bulkshare

Share Secrets with Users in bulk.

OAUTH Scope

ZohoVault.secrets.READ

Request Example

$ curl https://vault.zoho.com/api/rest/json/v1/sharing/secret/users/bulkshare \
    -H "Content-Type: application/json;charset=UTF-8" \
    -H "Authorization: Zoho-authtoken <YourValidAuthtoken>" \
    -d 'INPUT_DATA= {
   "secretids":[

   ],
   "INPUT_DATA":{
      "viewusers":[

      ],
      "logonusers":[

      ],
      "modifyusers":[

      ],
      "manageusers":[

      ]
   }
}'

Bulk share Secrets to user groups

PUT /api/rest/json/v1/sharing/secret/usergroup/bulkshare

Share Secrets with user groups in bulk.

OAUTH Scope

ZohoVault.secrets.READ

Request Example

$ curl https://vault.zoho.com/api/rest/json/v1/sharing/secret/usergroup/bulkshare \
    -H "Content-Type: application/json;charset=UTF-8" \
    -H "Authorization: Zoho-authtoken <YourValidAuthtoken>" \
    -d 'INPUT_DATA= {
   "secretids":[

   ],
   "INPUT_DATA":{
      "viewusers":[

      ],
      "logonusers":[

      ],
      "modifyusers":[

      ],
      "manageusers":[

      ]
   }
}'

Sharing Secret with outsider

POST /api/rest/json/v1/sharing/secret/outsider/{secretid}

Share Secrets from Vault with outsiders.

OAUTH Scope

ZohoVault.secrets.CREATE

Request Example

$ curl https://vault.zoho.com/api/rest/json/v1/sharing/secret/outsider/{secretid} \
    -H "Content-Type: application/json;charset=UTF-8" \
    -H "Authorization: Zoho-authtoken <YourValidAuthtoken>" \
    -d 'INPUT_DATA= "keyAuth":"QQGhdYYsPVodnktuy5HgKvmAbvxEt6lpOVpB6ouPxQiLYrPiNY
r4oZhw+BLEamYSF7ZSUG/394qb3BTcfhjN+gDgoPeoUx00FWohdpBTzkpefAZ
/Up+mDVdtIBbMFDRDz3jslF8bZ9uNowQz4eKsuNiyT96O4Y1irE9t+WZePKsf2
iBviGgFvC7A4MjJ8rCLajBz1VGtBCCVlOVA67CWObv7HBKvF2V0UQdD9rXTlD8  vdTJn3KclzKOfYZFARRAIl5FgR4i7bARdvPqw150X+G0JfVefZX4T7Lr++K5RMJ 3ChFwOV/VtzbQmHfx3J/PJ08PLUDtLp/VJVNfwXJB5sb/famNrDCENC3T0g/WZ0 kkqDvsvlK3qFi62+BG8Wsq3vR56suU/bf4Kb85HLs/jgmrz881NCPdnd1mq2JUSPc   deS+0WXrbkyQSlfrkLGRHY1kX5xsP9H5rU/yExG2rMqrqMmB2N1dXuBoiwctseXJ    BaVJ+CMHqF8gvQm/VFlW03cg51P+lZz2E8NhMbx5mqRSD/24Gwa/LslrbJepEhZc
        ea0i6QkVIdGeeuYOuCLN0RCEF5+SJfTyR51UNbxN2cKbAq",
        "salt":"03d32b3815372059a736e3650ddba4ef",
        "iteration":"1000",
        "email":"john@zylker.com",
        "message":"secret sharing",
        "file":"[{'name':'Screen Shot 2017-12-22 at 4.28.48 PM.png','column':'file',
        'size':90731,'secretID':'1000000003009','data':'U2FsdGVkX1+RteXmvh
        c4QGRIqpiulnSgu5Ed9FGU2aS8nTT0BuibwBpTRgt1KhBSnethPJiQt6AbaYbleIONK+    9SK96q4ATmD4TCUvI4Q8xvvJJGs7PcrV8m21PlJYvJJmPcFFbsqyWo4y1QxgAjH6jJFLk   0yw0MNYFgRjr18qQHMB9RxJA9oVD6sGRmpeOIHsHLK6KUP4rJPE+ZneXhnrluWiiPkdwJRKEOez2    85aCjVee5uklq4FxlAXBByn/acM82WiSs8CkLtHs3ym2f66HV8eJgrcbI26TQUub3MvkJ0Fp/Vjcu   sH4I+1tIMxHO9nUOkFnWIa5b10NkcTSnzYi58ofdsoKYB4LenxLFGs9FWbub7IJ2K7iVRlqW2oV+UKL 6QcRsnDxUBZEh4MgO/xTSQqGKF1hfxV7F2xKIH/89bHSzeGSjd4gX8sEI9sNZPHpLncfMoDHxfo78Yy
        cZ0hKMbUaYagQh7uqHQuSknNWTtoIJP0erJLpZYO3GQiOGaMu18YrEJblTAeckRUvqg6zWNe7f3Tpo7 J2dcNMbwGAprKoiJ2M7gDY97lBgDKCa+bvIkIVOJxQ5lmNgmiSG28/m1njIYCaZFmb8Y9LovezC7sK  XA5edKjY9S4IZfzitluT61/fBDr/iqbE7Tz/C0jfYnpAWMffIIkv73AXC29GZgQZWqL9WUbAOiaOfb  HLXWxyBcAF/OynGxQ3c5aELBP+sleqKrbjhOyULd3eRL4cwu8wCQB59KdKq7P8IJHVwaC2V8xyyVm0t SEUFgpal5nEX+6dY0v8sYXaDrYvAu2Uz6/CcqNbgdw5XrxaHhE+kDjVe8asUFEyS4qZsT4nqeqlI9vRt    iSD7gVb5jwGoqD6ap7SGklwh9vKD8Fl/v+JqzzJIj+oUxc4KjnDA+JWG3hfryyzQaCZfKV9YDRouIPxAFC  QKLkKAHsg1Eu3CplolmQWjVFYidYhl12hm5C46hggNEOLrIlFHvcbxhzHBR22iQH2H4vdPZV8JKxD77qq   41ymQxUzQDCmSJ75d4SEvt0IXw+dQuGGT1PV4HZVXwmM0MqKnVXoRVWAO9nlmYfS3qfa2QxExbY5lfpERMq SngfTsZkqOJyM5Y4UzitXopLqx16TFk8ot12cVn6WRdkP+EK5W7/Y+StS4omqF3ICFnMOX4/ZATY78wQcHxy    6Yqyo3/3xeEaTUHpzYI8n7o3l3x2rxhmmRd8B32u3sBf2KzGR7z0SywO+dR99Gvc5EBqiuLl73mYsxBMr/K0qw
        BVmu+1UIw/fFOZMN1XuoqWN6v2E2xL8iiDWYaAdLvRq+Z6r0fQnXvWWPLE6+8b'}]"'

Response Example

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{
        "operation":{
        "result":{
        "message":"",
        "status":"Success"
        },
        "Details":{
        "notes":"UAPZNXcsPVo=",
        "accesssctrlconfigured":"false",
        "accounttype":"1000000000015",
        "description":"",
        "userid":"1000000002001",
        "secretData":"{"password":"HAOLrXcsPVpx2HJVzPeZ","file":"TQNsJHcsPVohtTlq","username":"HAPXQ3csPVrEfEYd3g=="}",
        "displayaccctrlicon":false,
        "isfavourites":false,
        "secreturl":"",
        "policyid":"1000000000041",
        "autosubmit":true,
        "onetimeacess":true,
        "sharinglevel":10,
        "sharingtype":"SHARED_BY_ME",
        "lastmodifiedtime":1513958519916,
        "changepassword":false,
        "issharedtousers":true,
        "isshared":"YES",
        "customcolumn":"eyJjdXN0b21jb2wiOltdfQ==",
        "secretid":"1000000003009",
        "passwordmodifiedtime":1513957537802,
        "classification":"E",
        "autologon":false,
        "tags":"",
        "POLICYID":"1000000000041",
        "files":"[{"expirydate":"","size":90731,"name":"Screen Shot 2017-12-22 at 4.28.48 PM.png","column":"file","fileId":"1000000003028"}]",
        "creationtime":1513957537802,
        "secretname":"sample"
        },
        "name":"OUTSIDER_SHARING"
        }
}

Secrets shared to a particular user

GET /api/rest/json/v1/sharing/secret/sharedsecrets/{email}

Get the list of Secrets shared to a specific user by email.

Arguments

ZohoVault.secrets.READ

Get user sharing details for Secret

GET /api/rest/json/v1/sharing/secret/user/{secretid}

Get all the user sharing details for the Secret.

OAUTH Scope

ZohoVault.secrets.READ

Response Example

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{
"operation": 
{
"result": 
{
"message": "",
"status": "Success"
}
,

"Details": 
{
"viewusers": [],
"logonusers": [],
"modifyusers": [],
"notshared": [

{
"unique-id": "3322",
"enabled": 1,
"email": "john@zylker.com",
"user_auto_id": "2000000000390",
"username": "Johnny"
}
,


{
"unique-id": "404",
"enabled": 1,
"email": " john@zylker.com",
"user_auto_id": "2000000000394",
"username": "John"
}
,


{
"unique-id": "702",
"enabled": 1,
"email": " john@zylker.com",
"user_auto_id": "2000000000396",
"username": "John"
}

],

"ownerid": "2000000000392",
"secretname": "One",
"manageusers": [

{
"unique-id": "204",
"enabled": 1,
"email": "john@zylker.com",
"user_auto_id": "2000000000384",
"username": "John"
}

],

"secret_auto_id": "2000000015041"
}
,

"name": "GET_SECRET_USER_SHARING"
}

}

Update user sharing details for Secret

PUT /api/rest/json/v1/sharing/secret/user/{secretid}

Update the user sharing details for the Secret.

OAUTH Scope

ZohoVault.secrets.UPDATE

Request Example

$ curl https://vault.zoho.com/api/rest/json/v1/sharing/secret/user/{secretid} \
    -H "Content-Type: application/json;charset=UTF-8" \
    -H "Authorization: Zoho-authtoken <YourValidAuthtoken>" \
    -d 'INPUT_DATA= INPUT_DATA- JSONObject
{
"logonusers" : JSONArray,
"viewusers" : JSONArray,
"modifyusers" : JSONArray,
"manageusers" : JSONArray
}'

User group sharing details for a Secret

GET /api/rest/json/v1/sharing/secret/usergroup/(secretid)

Get the user group sharing details for Secret.

OAUTH Scope

ZohoVault.secrets.READ

Response Example

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{
"operation": 
{
"result": 
{
"message": "",
"status": "Success"
}
,

"Details": 
{
"viewusers": [],
"logonusers": [],
"modifyusers": [],
"notshared": [

{
"usergroup_auto_id": "2000000018005",
"usergroupname": "Admins"
}

],

"ownerid": "2000000000392",
"secretname": "One",
"manageusers": [],
"secret_auto_id": "2000000015041"
}
,

"name": "GET_SECRET_USERGROUP_SHARING"
}

}

Update user group sharing details for a Secret

PUT /api/rest/json/v1/sharing/secret/usergroup/{secretid}

Update the user group sharing details for Secrets.

OAUTH Scope

ZohoVault.secrets.UPDATE

Request Example

$ curl https://vault.zoho.com/api/rest/json/v1/sharing/secret/usergroup/{secretid} \
    -H "Content-Type: application/json;charset=UTF-8" \
    -H "Authorization: Zoho-authtoken <YourValidAuthtoken>" \
    -d 'INPUT_DATA= INPUT_DATA- JSONObject
{
"logonusers" : JSONArray,
"viewusers" : JSONArray,
"modifyusers" : JSONArray,
"manageusers" : JSONArray
}'

Delete a Secret

DELETE /api/rest/json/v1/secrets/{secretid}

Delete a Secret from Vault

OAUTH Scope

ZohoVault.secrets.DELETE

Response Example

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{
"operation": 
{
"result": 
{
"message": "",
"status": "Success"
}
,

"Details": [
 "2000000015019"
],

"name": "DELETE_SECRET"
}
}

Chamber management

Manage all Secrets in your Vault.

Create a Chamber

POST /api/rest/json/v1/chambers

Create a new Chamber in Vault.

OAUTH Scope

ZohoVault.secrets.CREATE

Request Example

$ curl https://vault.zoho.com/api/rest/json/v1/chambers \
    -H "Content-Type: application/json;charset=UTF-8" \
    -H "Authorization: Zoho-authtoken <YourValidAuthtoken>" \
    -d 'INPUT_DATA
{"chambername":"chamber1", "chamberdesc" : "description for chamber", "chambersecrets" : [secretids in json array]}'

Update Chambers

PUT /api/rest/json/v1/chambers/{chamberid}

Update existing Chambers in Vault.

OAUTH Scope

ZohoVault.secrets.UPDATE

View details of Chambers

GET /api/rest/json/v1/chambers/{chamberid}

View all details of your Chamber from Vault.

Arguments

OAUTH Scope

ZohoVault.secrets.READ

Search Chambers

GET /api/rest/json/v1/chambers

Search all your Chambers in Vault.

Arguments

OAUTH Scope

ZohoVault.secrets.READ

User sharing details for Chamber

GET /api/rest/json/v1/sharing/chamber/user/{chamberid}

Get all the user sharing details for Chambers.

OAUTH Scope

ZohoVault.secrets.READ

Response Example

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{
"operation": 
{
"result": 
{
"message": "",
"status": "Success"
}
,

"Details": 
{
"viewusers": [],
"chambername": "chamber1",
"logonusers": [],
"modifyusers": [],
"notshared": [

{
"email": "john@zylker.com",
"user_auto_id": "2000000000390",
"username": "Bharath"
}
,


{
"email": "john@zylker.com",
"user_auto_id": "2000000000392",
"username": "John"
}
,


{
"email": " john@zylker.com",
"user_auto_id": "2000000000394",
"username": "John"
}
,


{
"email": " john@zylker.com",
"user_auto_id": "2000000000396",
"username": "John"
}
,


{
"email": "john@zylker.com",
"user_auto_id": "2000000000384",
"username": "John"
}

],

"chamber_auto_id": "2000000009001",
"ownerid": "2000000000384",
"manageusers": [],
}
,

"name": "GET_CHAMBER_USER_SHARING"
}

}

Update user sharing details for Chambers

PUT /api/rest/json/v1/sharing/chamber/user/{chamberid}

Update the user sharing details for Chambers.

OAUTH Scope

ZohoVault.secrets.UPDATE

Request Example

$ curl https://vault.zoho.com/api/rest/json/v1/sharing/chamber/user/{chamberid} \
    -H "Content-Type: application/json;charset=UTF-8" \
    -H "Authorization: Zoho-authtoken <YourValidAuthtoken>" \
    -d 'INPUT_DATA= INPUT_DATA- JSONObject
{
"logonusers" : JSONArray,
"viewusers" : JSONArray,
"modifyusers" : JSONArray,
"manageusers" : JSONArray
}'

User group sharing details for Chambers

GET /api/rest/json/v1/sharing/chamber/usergroup/{chamberid}

Get all the user group sharing details for Chambers.

OAUTH Scope

ZohoVault.secrets.READ

Response Example

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{
"operation": 
{
"result": 
{
"message": "",
"status": "Success"
}
,

"Details": 
{
"viewusers": [],
"chambername": "chamber1",
"logonusers": [],
"modifyusers": [],
"notshared": [],
"chamber_auto_id": "2000000009001",
"ownerid": "2000000000384",
"manageusers": [],
}
,

"name": "GET_CHAMBER_USERGROUP_SHARING"
}

}

Update user group sharing details for Chambers

PUT /api/rest/json/v1/sharing/chamber/usergroup/{chamberid}

Update the user group sharing details for all Chambers.

OAUTH Scope

ZohoVault.secrets.UPDATE

Request Example

$ curl https://vault.zoho.com/api/rest/json/v1/sharing/chamber/usergroup/{chamberid} \
    -H "Content-Type: application/json;charset=UTF-8" \
    -H "Authorization: Zoho-authtoken <YourValidAuthtoken>" \
    -d 'INPUT_DATA= INPUT_DATA- JSONObject
{
"logonusers" : JSONArray,
"viewusers" : JSONArray,
"modifyusers" : JSONArray,
"manageusers" : JSONArray
}

Delete Chamber

DELETE /api/rest/json/v1/chambers/{chamberid}

Deleting a Chamber.

OAUTH Scope

ZohoVault.secrets.DELETE

Updating file data

PUT /api/rest/json/v1/secrets/sharing/updatefile/(secretid)

For updating file data encrypted with Org key.

OAUTH Scope

ZohoVault.secrets.UPDATE

Request Example

$ curl https://vault.zoho.com/api/rest/json/v1/secrets/sharing/updatefile/(secretid) \
    -H "Content-Type: application/json;charset=UTF-8" \
    -H "Authorization: Zoho-authtoken <YourValidAuthtoken>" \
    -d 'INPUT_DATA= FILEDATA - Array of file data
[{"name":"check.html","fileId":"151000000221029","column":"file","size":4937,"data":"vpayQmcac+fq7RUn1socW2V/1Bb26pZOtxNgIxSzQ8MmpexJIXGK9aepIGz/e6xXNWhyWPAnkZNHYI3uqDkVqDjNnJB5sSGHijASnJXLT1CVF6Flv12CEleGsdgyl3v5/nKv5DbYMg76JXghBguuMOK8YlYmHVkBpIYE/3xylwug3DcfE2xW9rGmJKrOx+1EOjluYK5aIFisT0TVUlXUXEF6ycQSTRHS2JRbrVJ0pgCL84BUygudWO8M7OX3y4YBkJAmbQDK3I+LmZ4I/SZgOc12AA=="}]'

Response Example

HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{
    "operation": {
        "result": {
            "message": "",
            "status": "Success"
        },
        "name": "UPDATE_FILE_FOR_SHARING"
    }
}