# Group

`PATCH /workspaces/:workspace/projects/:project_name/groups/:group_id`

Update project group permissions

**Required Scopes:** `WORKSPACE`

## URL Parameters

```typescript
interface URLParameters {
  /** The human-readable ID of the workspace */
  workspace: string; // Example: "my-company"
  /** The human-readable ID of the project */
  project_name: string; // Example: "my-project"
  /** The ID of the group */
  group_id: number; // Example: 123
}
```

## Body Parameters

```typescript
interface BodyParameters {
  /** User permission set configuration */
  permission_set: PermissionSetIdRequest;
}
```

## Response Body

```typescript
interface ResponseBody {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The ID of the group */
  id: number;
  /** The name of the group */
  name?: string;
  /** User permission set configuration */
  permission_set: PermissionSetView;
}
```

## Type Definitions

```typescript
interface PermissionSetIdRequest {
  /** The ID of the permission set */
  id: number;
}

interface PermissionSetView {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The name of the permission set */
  name: string;
  /** The description of the permission set */
  description?: string;
  /** The repository access level */
  repository_access_level: "DENIED" | "READ_ONLY" | "READ_WRITE" | "MANAGE";
  /** The pipeline access level */
  pipeline_access_level: "DENIED" | "READ_ONLY" | "RUN_ONLY" | "READ_WRITE";
  /** The sandbox access level */
  sandbox_access_level: "DENIED" | "READ_ONLY" | "RUN_ONLY" | "READ_WRITE";
  /** The project team access level */
  project_team_access_level: "READ_ONLY" | "MANAGE";
  /** The environment access level */
  environment_access_level: "DENIED" | "MANAGE" | "USE_ONLY";
  /** The package access level */
  package_access_level: "DENIED" | "READ_ONLY" | "READ_WRITE" | "MANAGE";
  /** The routing access level */
  routing_access_level: "DENIED" | "READ_ONLY" | "MANAGE";
  /** The target access level */
  target_access_level: "DENIED" | "READ_ONLY" | "USE_ONLY" | "MANAGE";
  /** The ID of the permission set */
  id: number;
  /** The type of the permission set */
  type?: "DEVELOPER" | "READ_ONLY" | "CUSTOM" | "PROJECT_MANAGER";
}

```

## Request Example

```bash
curl -X PATCH "https://api.buddy.works/workspaces/:workspace/projects/:project_name/groups/:group_id" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "permission_set": {
    "id": 2
  }
}'
```

## Response Example

**Status:** `200 OK`

```json
{
  "url": "https://api.buddy.works/workspaces/my-company/projects/my-project/groups/4",
  "html_url": "https://app.buddy.works/my-company/-/groups/4",
  "id": 4,
  "name": "Frontend Team",
  "permission_set": {
    "url": "https://api.buddy.works/workspaces/my-company/permissions/1",
    "html_url": "https://app.buddy.works/my-company/-/permissions/edit/1",
    "name": "Developer",
    "repository_access_level": "READ_WRITE",
    "pipeline_access_level": "READ_WRITE",
    "sandbox_access_level": "READ_WRITE",
    "project_team_access_level": "READ_ONLY",
    "environment_access_level": "MANAGE",
    "package_access_level": "MANAGE",
    "id": 1,
    "type": "DEVELOPER"
  }
}
```

---
Original source: https://buddy.works/docs/api/platform/projects/manage-access/update/group