---
title: "Assign organization role to group"
method: POST
path: "/organization/groups/{group_id}/roles"
tags: ["Group organization role assignments"]
---

# Assign organization role to group

`POST /organization/groups/{group_id}/roles`

## Request

- Base URL: `https://api.openai.com/v1`
- URL: `https://api.openai.com/v1/organization/groups/{group_id}/roles`
- Auth: HTTP bearer

Assigns an organization role to a group within the organization.

## Path parameters

- `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`

Organization 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.

## Other responses

- `400`: The request parameters are invalid or the requested operation cannot be performed.
- `403`: The caller does not have permission to perform this operation.
- `404`: The endpoint is unavailable or a requested resource was not found in this organization or project.
- `429`: The request was rejected because a rate limit was exceeded.

## Changes

- **2026-10-06** `487892d3954e`: 4 info
  - added the optional property `error/anyOf[#/components/schemas/Error]/misalignment/review_target` to the response with the `403` status
  - added the optional property `error/misalignment/review_target` to the response with the `400` status
  - added the optional property `error/misalignment/review_target` to the response with the `404` status
  - added the optional property `error/misalignment/review_target` to the response with the `429` status
- **2026-10-05** `7f654af7f94f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omnistack-sh/apis/openai-api/changes/organization/groups/:group_id/roles/post.md)

---

[API](https://skmtc.dev/omnistack-sh/apis/openai-api.md) - [All operations](https://skmtc.dev/omnistack-sh/apis/openai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/omnistack-sh/apis/openai-api/revisions/0a26f104d35f?raw)
