Operation CategoriesGrant access to a category

Grant access to a category

A single grant form (as with addresses and visibility): a user|group subject + canView/canAssign/canEdit permission flags in ONE record. Calling again for the same (category, subject) pair updates the permissions and reactivates a revoked grant. The role subject has been removed; "all members" is set through the category's scope.

curl -X POST "https://policy-engine-rest.ezig.workers.dev/api/v1/vaults/demo_vault/operation-categories/example_string/grants" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "subjectType": "user",
  "subjectUserId": "example_string",
  "subjectGroupId": "example_string",
  "canView": true,
  "canAssign": true,
  "canEdit": true
}'
{
  "id": "cmr3f41z20001psp7phmyapw3",
  "vaultId": "example_string",
  "categoryId": "example_string",
  "subjectType": "user",
  "subjectUserId": "example_string",
  "subjectGroupId": "example_string",
  "canView": true,
  "canAssign": true,
  "canEdit": true,
  "grantorId": "example_string",
  "status": "example_string",
  "createdAt": "2026-07-02T11:25:15.134000Z"
}
POST
/api/v1/vaults/{code}/operation-categories/{id}/grants
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Session token. Mobile/services. The web uses a cookie.

Session token. Mobile/services. The web uses a cookie.
API Key (cookie: session_token)
session_tokenstring
Required

API key (sent in cookie)

Content-Typestring
Required

The media type of the request body

Options: application/json
subjectTypestring
Required

To whom: a member or a user group. The "role" subject has been removed; "all members" is set through the category's own *Scope

Options: user, group
canViewboolean

View tagging values

canAssignboolean

Assign the category to an operation

canEditboolean

Edit values (+ view sensitive fields). Implies canView

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Session token. Mobile/services. The web uses a cookie.

path
parameterstring
Required

API Key for authentication. Provide your API key in the cookie.

Path Parameters

codestring
Required

Unique Vault code (slug)

Example:
demo_vault

Body

application/json
subjectTypestring
Required

To whom: a member or a user group. The "role" subject has been removed; "all members" is set through the category's own *Scope

Allowed values:usergroup
canViewboolean

View tagging values

canAssignboolean

Assign the category to an operation

canEditboolean

Edit values (+ view sensitive fields). Implies canView

Responses