Policy GroupsCreate a policy group

Create a policy group

Creates a PolicyGroup within an existing Vault. A user can belong to several groups in the same Vault: policies are combined, and a deny from any group takes precedence. The code is unique within the Vault.

curl -X POST "https://policy-engine-rest.ezig.workers.dev/api/v1/policy-groups" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "vaultId": "example_string",
  "code": "traders",
  "name": "John Doe",
  "description": "example_string",
  "logoUri": "example_string",
  "color": "#0A84FF",
  "emoji": "🛡️"
}'
{
  "id": "cmr3f41z20001psp7phmyapw3",
  "vaultId": "example_string",
  "code": "traders",
  "name": "John Doe",
  "description": "example_string",
  "logoUri": "example_string",
  "color": "#0A84FF",
  "emoji": "👥",
  "createdAt": "2026-07-02T11:25:15.134000Z",
  "updatedAt": "2026-07-02T11:25:15.134000Z"
}
POST
/api/v1/policy-groups
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
codestring
Required

Letters, digits, _, and - only. Unique within the Vault

logoUristring

Link to the logo/icon

Format: uri • Max length: 2048
colorstring

HEX color

Pattern: ^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
emojistring

Emoji icon

Min length: 1 • Max length: 16
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.

Body

application/json
codestring
Required

Letters, digits, _, and - only. Unique within the Vault

Example:
traders
logoUristring

Link to the logo/icon

colorstring

HEX color

Example:
#0A84FF
emojistring

Emoji icon

Example:
🛡️

Responses