Skip to content
Primary navigation

Update group

admin.organization.groups.update(strgroup_id, GroupUpdateParams**kwargs) -> GroupUpdateResponse
POST/organization/groups/{group_id}

Updates a group’s information.

ParametersExpand Collapse
group_id: str
name: str

New display name for the group.

minLength1
maxLength255
ReturnsExpand Collapse
class GroupUpdateResponse: …

Response returned after updating a group.

id: str

Identifier for the group.

created_at: int

Unix timestamp (in seconds) when the group was created.

formatunixtime
is_scim_managed: bool

Whether the group is managed through SCIM and controlled by your identity provider.

name: str

Updated display name for the group.

Update group

import os
from openai import OpenAI

client = OpenAI(
    admin_api_key=os.environ.get("OPENAI_ADMIN_KEY"),  # This is the default and can be omitted
)
group = client.admin.organization.groups.update(
    group_id="group_id",
    name="x",
)
print(group.id)
{
    "id": "group_01J1F8ABCDXYZ",
    "name": "Escalations",
    "created_at": 1711471533,
    "is_scim_managed": false
}
Returns Examples
{
    "id": "group_01J1F8ABCDXYZ",
    "name": "Escalations",
    "created_at": 1711471533,
    "is_scim_managed": false
}