---
title: "Create group"
method: POST
path: "/api/projects/{projectId}/groups"
tags: ["Group"]
---

# Create group

`POST /api/projects/{projectId}/groups`

Create a new group within a project with specified permissions.

## Path parameters

- `projectId` string, uuid, required

## Request body

- object
  - `name` string, required — Name of the group
  - `description` string — Description of the group
  - `permissions` string[] — List of permissions to grant to the group
  - `filePermissions` object[], nullable — File-level permissions for the group
    - `id` string, nullable
    - `effect` 'allow' | 'deny', required
    - `actions` string[], nullable
    - `patterns` string, nullable

## Response `200`

The created group

- object — The created group
  - `id` string, uuid, required — Unique identifier of the group
  - `name` string, required — Name of the group
  - `description` string — Description of the group
  - `projectId` string, uuid, required — ID of the project this group belongs to
  - `permissions` string[], nullable, required — List of permissions granted to this group
  - `filePermissions` object[], nullable — File-level permissions for this group
    - `id` string, nullable — Unique identifier of the file permission
    - `effect` 'allow' | 'deny', required — Whether this permission allows or denies the actions
    - `actions` string[], nullable, required — List of actions this permission applies to
    - `patterns` string, nullable — Glob pattern to match file paths
  - `roleId` string, uuid — ID of the access profile managing this group
  - `role` object, nullable — Access profile that manages this group
    - `id` string, uuid, required — Unique identifier of the role
    - `name` string, required — Name of the role
    - `description` string — Description of the role

---

[API](https://skmtc.dev/gorules/apis/gorules-agent-api.md) · [All operations](https://skmtc.dev/gorules/apis/gorules-agent-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gorules/gorules-agent-api/revisions/52c0773fcd80/schema)
