Policy GroupsИзменить группу политик (admin)

Изменить группу политик (admin)

Частичное обновление: name, description, UI-метаданные (logoUri/color/emoji; null — очистить). code и vaultId неизменяемы — на code ссылаются селекторы actorRole.groupCodes.

curl -X PATCH "https://policy-engine-rest.ezig.workers.dev/api/v1/policy-groups/example_string" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "name": "John Doe",
  "description": "example_string",
  "logoUri": "example_string",
  "color": "example_string",
  "emoji": "example_string"
}'
{
  "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.134Z",
  "updatedAt": "2026-07-02T11:25:15.134Z"
}
PATCH
/api/v1/policy-groups/{id}
PATCH
Base URLstring

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

Bearer Token
Bearer Tokenstring
Required

better-auth session token. Мобилка/сервисы. Веб использует cookie.

better-auth session token. Мобилка/сервисы. Веб использует cookie.
API Key (cookie: better-auth.session_token)
Content-Typestring
Required

The media type of the request body

Options: application/json
namestring
Min length: 1
logoUristring

null — убрать логотип

colorstring

null — убрать цвет

emojistring

null — убрать emoji

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. better-auth session token. Мобилка/сервисы. Веб использует cookie.

path
parameterstring
Required

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

Path Parameters

Body

application/json
logoUristring

null — убрать логотип

colorstring

null — убрать цвет

emojistring

null — убрать emoji

Responses

idstring
Required

cuid

vaultIdstring
Required
codestring
Required
namestring
Required
descriptionstring
Required
logoUristring
Required
colorstring
Required
emojistring
Required
createdAtstring
Required
updatedAtstring
Required