Policy GroupsAdd a user to a group

Add a user to a group

Creates a PolicyGroupMembership. A User model isn't required for membership: userId can be any string (also used for services).

curl -X POST "https://policy-engine-rest.ezig.workers.dev/api/v1/policy-groups/example_string/members" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "userId": "user-1"
}'
{
  "id": "cmr3f41z20001psp7phmyapw3",
  "groupId": "example_string",
  "userId": "user-1",
  "createdAt": "2026-07-02T11:25:15.134000Z"
}
POST
/api/v1/policy-groups/{id}/members
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)

path
idstring
Required

Group id (cuid)

Content-Typestring
Required

The media type of the request body

Options: application/json
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

idstring
Required

Group id (cuid)

Body

application/json
userIdstring
Required
Example:
user-1

Responses