# Policy

## GET /policies

> List policies

```json
{"openapi":"3.1.0","info":{"title":"revault-api","version":"1.56.0"},"servers":[{"url":"/v1/rest"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"PolicyResponse":{"type":"object","properties":{"id":{"type":"string","description":"Internal unique identifier"},"legacyId":{"type":"number","description":"Legacy internal unique identifier (for retro-compatibility)"},"name":{"type":"string","description":"Policy name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Policy description"},"currency":{"anyOf":[{"type":"string","minLength":1,"maxLength":40,"pattern":"^\\w+$","description":"Will be deprecated soon, use network instead. Currency"},{"type":"null"}]},"network":{"anyOf":[{"type":"string","minLength":1,"maxLength":40,"pattern":"^\\w+$","description":"Network (Same as currency for now)"},{"type":"null"}]},"isPrivate":{"type":"boolean","description":"Whether the policy is private"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/GovRuleResponse"},"description":"List of governance rules"},"whitelists":{"type":"array","items":{"$ref":"#/components/schemas/WhitelistResponse"},"description":"Related whitelists"},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Internal unique identifier"},"legacyId":{"type":"number","description":"Legacy internal unique identifier (for retro-compatibility)"},"legacyViewAll":{"type":"boolean","description":"If true, user can read all resources on the workspace"},"workspaceName":{"type":"string","description":"User's workspace name"},"name":{"type":"string","description":"User name"},"deviceUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User's device ID (for non-API users)"},"deviceType":{"type":"string","enum":["PSD","SOFT_PSD","API"],"description":"User's device type"},"role":{"type":"string","enum":["ADMIN","OPERATOR","READ_ONLY_API_KEY"],"description":"User role"},"pubKey":{"type":"string","description":"User public key"},"status":{"type":"string","enum":["ACTIVE","INACTIVE"],"description":"User status"},"isSuspended":{"type":"boolean","description":"Whether the user is suspended"},"createdAt":{"description":"Creation timestamp","type":"string"},"updatedAt":{"description":"Last modification timestamp","type":"string"}},"required":["id","legacyId","legacyViewAll","workspaceName","name","deviceUserId","deviceType","role","pubKey","status","isSuspended","createdAt","updatedAt"],"additionalProperties":false},"description":"Referenced users"},"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Internal unique identifier"},"legacyId":{"type":"number","description":"Legacy internal unique identifier (for retro-compatibility)"},"name":{"type":"string","description":"Group name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Group description"},"status":{"type":"string","enum":["ACTIVE","INACTIVE"],"description":"Group status"},"createdAt":{"description":"Creation timestamp","type":"string"},"updatedAt":{"description":"Last modification timestamp","type":"string"},"memberIds":{"type":"array","items":{"type":"string"},"description":"List of member user IDs"}},"required":["id","legacyId","name","description","status","createdAt","updatedAt","memberIds"],"additionalProperties":false},"description":"Referenced groups"},"createdAt":{"description":"Creation timestamp","type":"string"},"updatedAt":{"description":"Last modification timestamp","type":"string"}},"required":["id","legacyId","name","description","currency","network","isPrivate","rules","whitelists","users","groups","createdAt","updatedAt"],"additionalProperties":false,"description":"Account policy"},"GovRuleResponse":{"type":"object","properties":{"reviewSteps":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"quorum":{"type":"number","minimum":0,"description":"Number of required approvals for the step"},"userIds":{"type":"array","items":{"type":"string","minLength":1},"description":"User ids in the step"}},"required":["quorum","userIds"],"additionalProperties":false,"description":"Review step with users"},{"type":"object","properties":{"quorum":{"type":"number","minimum":0,"description":"Number of required approvals for the step"},"groupId":{"type":"string","minLength":1,"description":"Group id in the step"}},"required":["quorum","groupId"],"additionalProperties":false,"description":"Review step with group"}]},"description":"Review steps"},"threshold":{"type":"object","properties":{"min":{"anyOf":[{"type":"string","minLength":1,"pattern":"^([1-9]\\d*|0)$"},{"type":"null"}],"description":"Minimum transaction amount"},"max":{"anyOf":[{"type":"string","minLength":1,"pattern":"^([1-9]\\d*|0)$"},{"type":"null"}],"description":"Maximum transaction amount"}},"required":["min","max"],"additionalProperties":false,"description":"Threshold for the transaction value"},"whitelistIds":{"type":"array","items":{"type":"string","minLength":1},"description":"IDs of whitelists for the recipient address"},"operationType":{"type":"string","enum":["SEND","DEPLOY_CONTRACT","EXECUTE_CONTRACT","ACTIVATE_TOKEN","RECEIVE","STAKE","SIGN_MESSAGE","SIGN_DIGESTS"],"description":"Allowed action"}},"required":["reviewSteps","operationType"],"additionalProperties":false,"description":"Governance rule"},"WhitelistResponse":{"type":"object","properties":{"id":{"type":"string","description":"Internal unique identifier"},"legacyId":{"type":"number","description":"Legacy internal unique identifier (for retro-compatibility)"},"name":{"type":"string","description":"Whitelist name"},"type":{"type":"string","enum":["TRANSACTION","SMART_CONTRACT"],"description":"Whitelist usage type"},"status":{"type":"string","enum":["ACTIVE","INACTIVE"],"description":"Whitelist status"},"addresses":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Address name"},"currency":{"type":"string","minLength":1,"maxLength":40,"pattern":"^\\w+$","description":"Address currency"},"address":{"type":"string","minLength":1,"maxLength":200,"description":"Address value"},"destinationTags":{"description":"List of destination tags (applicable for Ripple currency)","type":"array","items":{"type":"string","minLength":1,"pattern":"^\\w+$"}}},"required":["name","currency","address"],"additionalProperties":false}},"createdAt":{"description":"Creation timestamp","type":"string"},"updatedAt":{"description":"Last modification timestamp","type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Whitelist description"}},"required":["id","legacyId","name","type","status","addresses","createdAt","updatedAt","description"],"additionalProperties":false,"description":"Whitelist"},"error.BAD_REQUEST":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Invalid input data error (400)","description":"The error information"},"error.UNAUTHORIZED":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Authorization not provided error (401)","description":"The error information"},"error.FORBIDDEN":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Insufficient access error (403)","description":"The error information"},"error.NOT_FOUND":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Not found error (404)","description":"The error information"},"error.INTERNAL_SERVER_ERROR":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Internal server error error (500)","description":"The error information"}}},"paths":{"/policies":{"get":{"operationId":"policies-list","summary":"List policies","tags":["policy"],"parameters":[{"in":"query","name":"page","schema":{"default":1,"description":"Which page to fetch","type":"integer","minimum":1,"maximum":9007199254740991}},{"in":"query","name":"pageSize","schema":{"default":30,"description":"Page size to use","type":"integer","minimum":1,"maximum":30}},{"in":"query","name":"name","schema":{"type":"string","description":"Search by matching name"}},{"in":"query","name":"isPrivate","schema":{"default":false,"type":"boolean","description":"Search private policies"}},{"in":"query","name":"currency","schema":{"type":"string","minLength":1,"maxLength":40,"pattern":"^\\w+$","description":"Search by currency"}},{"in":"query","name":"currencyLess","schema":{"type":"boolean","description":"When true and 'currency' is not provided, only policies without a currency are returned. When true and 'currency' is provided, policies with that currency or without any currency are returned."}},{"in":"query","name":"sortBy","schema":{"default":"createdAt","description":"Sort by attribute","type":"string","enum":["name","createdAt","updatedAt"]}},{"in":"query","name":"sortOrder","schema":{"default":"asc","description":"Sort order","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"number","description":"Current page"},"next":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Next page or null if there is none"},"prev":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Previous page or null if there is none"},"pageSize":{"type":"number","description":"Max count of items per page"},"total":{"type":"number","description":"Total count of items"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PolicyResponse"},"description":"Array of results"}},"required":["page","next","prev","pageSize","total","results"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## GET /policies/{id}

> Get a single policy

```json
{"openapi":"3.1.0","info":{"title":"revault-api","version":"1.56.0"},"servers":[{"url":"/v1/rest"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"PolicyResponse":{"type":"object","properties":{"id":{"type":"string","description":"Internal unique identifier"},"legacyId":{"type":"number","description":"Legacy internal unique identifier (for retro-compatibility)"},"name":{"type":"string","description":"Policy name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Policy description"},"currency":{"anyOf":[{"type":"string","minLength":1,"maxLength":40,"pattern":"^\\w+$","description":"Will be deprecated soon, use network instead. Currency"},{"type":"null"}]},"network":{"anyOf":[{"type":"string","minLength":1,"maxLength":40,"pattern":"^\\w+$","description":"Network (Same as currency for now)"},{"type":"null"}]},"isPrivate":{"type":"boolean","description":"Whether the policy is private"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/GovRuleResponse"},"description":"List of governance rules"},"whitelists":{"type":"array","items":{"$ref":"#/components/schemas/WhitelistResponse"},"description":"Related whitelists"},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Internal unique identifier"},"legacyId":{"type":"number","description":"Legacy internal unique identifier (for retro-compatibility)"},"legacyViewAll":{"type":"boolean","description":"If true, user can read all resources on the workspace"},"workspaceName":{"type":"string","description":"User's workspace name"},"name":{"type":"string","description":"User name"},"deviceUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User's device ID (for non-API users)"},"deviceType":{"type":"string","enum":["PSD","SOFT_PSD","API"],"description":"User's device type"},"role":{"type":"string","enum":["ADMIN","OPERATOR","READ_ONLY_API_KEY"],"description":"User role"},"pubKey":{"type":"string","description":"User public key"},"status":{"type":"string","enum":["ACTIVE","INACTIVE"],"description":"User status"},"isSuspended":{"type":"boolean","description":"Whether the user is suspended"},"createdAt":{"description":"Creation timestamp","type":"string"},"updatedAt":{"description":"Last modification timestamp","type":"string"}},"required":["id","legacyId","legacyViewAll","workspaceName","name","deviceUserId","deviceType","role","pubKey","status","isSuspended","createdAt","updatedAt"],"additionalProperties":false},"description":"Referenced users"},"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Internal unique identifier"},"legacyId":{"type":"number","description":"Legacy internal unique identifier (for retro-compatibility)"},"name":{"type":"string","description":"Group name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Group description"},"status":{"type":"string","enum":["ACTIVE","INACTIVE"],"description":"Group status"},"createdAt":{"description":"Creation timestamp","type":"string"},"updatedAt":{"description":"Last modification timestamp","type":"string"},"memberIds":{"type":"array","items":{"type":"string"},"description":"List of member user IDs"}},"required":["id","legacyId","name","description","status","createdAt","updatedAt","memberIds"],"additionalProperties":false},"description":"Referenced groups"},"createdAt":{"description":"Creation timestamp","type":"string"},"updatedAt":{"description":"Last modification timestamp","type":"string"}},"required":["id","legacyId","name","description","currency","network","isPrivate","rules","whitelists","users","groups","createdAt","updatedAt"],"additionalProperties":false,"description":"Account policy"},"GovRuleResponse":{"type":"object","properties":{"reviewSteps":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"quorum":{"type":"number","minimum":0,"description":"Number of required approvals for the step"},"userIds":{"type":"array","items":{"type":"string","minLength":1},"description":"User ids in the step"}},"required":["quorum","userIds"],"additionalProperties":false,"description":"Review step with users"},{"type":"object","properties":{"quorum":{"type":"number","minimum":0,"description":"Number of required approvals for the step"},"groupId":{"type":"string","minLength":1,"description":"Group id in the step"}},"required":["quorum","groupId"],"additionalProperties":false,"description":"Review step with group"}]},"description":"Review steps"},"threshold":{"type":"object","properties":{"min":{"anyOf":[{"type":"string","minLength":1,"pattern":"^([1-9]\\d*|0)$"},{"type":"null"}],"description":"Minimum transaction amount"},"max":{"anyOf":[{"type":"string","minLength":1,"pattern":"^([1-9]\\d*|0)$"},{"type":"null"}],"description":"Maximum transaction amount"}},"required":["min","max"],"additionalProperties":false,"description":"Threshold for the transaction value"},"whitelistIds":{"type":"array","items":{"type":"string","minLength":1},"description":"IDs of whitelists for the recipient address"},"operationType":{"type":"string","enum":["SEND","DEPLOY_CONTRACT","EXECUTE_CONTRACT","ACTIVATE_TOKEN","RECEIVE","STAKE","SIGN_MESSAGE","SIGN_DIGESTS"],"description":"Allowed action"}},"required":["reviewSteps","operationType"],"additionalProperties":false,"description":"Governance rule"},"WhitelistResponse":{"type":"object","properties":{"id":{"type":"string","description":"Internal unique identifier"},"legacyId":{"type":"number","description":"Legacy internal unique identifier (for retro-compatibility)"},"name":{"type":"string","description":"Whitelist name"},"type":{"type":"string","enum":["TRANSACTION","SMART_CONTRACT"],"description":"Whitelist usage type"},"status":{"type":"string","enum":["ACTIVE","INACTIVE"],"description":"Whitelist status"},"addresses":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"Address name"},"currency":{"type":"string","minLength":1,"maxLength":40,"pattern":"^\\w+$","description":"Address currency"},"address":{"type":"string","minLength":1,"maxLength":200,"description":"Address value"},"destinationTags":{"description":"List of destination tags (applicable for Ripple currency)","type":"array","items":{"type":"string","minLength":1,"pattern":"^\\w+$"}}},"required":["name","currency","address"],"additionalProperties":false}},"createdAt":{"description":"Creation timestamp","type":"string"},"updatedAt":{"description":"Last modification timestamp","type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Whitelist description"}},"required":["id","legacyId","name","type","status","addresses","createdAt","updatedAt","description"],"additionalProperties":false,"description":"Whitelist"},"error.BAD_REQUEST":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Invalid input data error (400)","description":"The error information"},"error.UNAUTHORIZED":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Authorization not provided error (401)","description":"The error information"},"error.FORBIDDEN":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Insufficient access error (403)","description":"The error information"},"error.NOT_FOUND":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Not found error (404)","description":"The error information"},"error.INTERNAL_SERVER_ERROR":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Internal server error error (500)","description":"The error information"}}},"paths":{"/policies/{id}":{"get":{"operationId":"policies-findById","summary":"Get a single policy","tags":["policy"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Id of the target policy"},"required":true,"description":"Id of the target policy"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyResponse"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.enterprise.ledger.com/api-documentation-v2/reference/policy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
