---
title: "Assign project role to group"
method: POST
path: "/projects/{project_id}/groups/{group_id}/roles"
tags: ["Project group role assignments"]
---

# Assign project role to group

`POST /projects/{project_id}/groups/{group_id}/roles`

Assigns a project role to a group within a project.

## Path parameters

- `project_id` string, required
- `group_id` string, required

## Request body

- PublicAssignOrganizationGroupRoleBody — Request payload for assigning a role to a group or user.
  - `role_id` string, required — Identifier of the role to assign.

## Response `200`

Project role assigned to the group successfully.

- GroupRoleAssignment — Role assignment linking a group to a role.
  - `object` 'group.role', required — Always `group.role`.
  - `group` Group, required — Summary information about a group returned in role assignment responses.
    - `object` 'group', required — Always `group`.
    - `id` string, required — Identifier for the group.
    - `name` string, required — Display name of the group.
    - `created_at` integer, required — Unix timestamp (in seconds) when the group was created.
    - `scim_managed` boolean, required — Whether the group is managed through SCIM.
  - `role` Role, required — Details about a role that can be assigned through the public Roles API.
    - `object` 'role', required — Always `role`.
    - `id` string, required — Identifier for the role.
    - `name` string, required — Unique name for the role.
    - `description` string, nullable, required — Optional description of the role.
    - `permissions` string[], required — Permissions granted by the role.
    - `resource_type` string, required — Resource type the role is bound to (for example `api.organization` or `api.project`).
    - `predefined_role` boolean, required — Whether the role is predefined and managed by OpenAI.

---

[API](https://skmtc.net/openai/apis/openai-api.md) · [All operations](https://skmtc.net/openai/apis/openai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openai/openai-api/revisions/dcd35773a322/schema)
