Skip to content
Primary navigation

Update group

client.admin.organization.groups.update(stringgroupID, GroupUpdateParams { name } body, RequestOptionsoptions?): GroupUpdateResponse { id, created_at, is_scim_managed, name }
POST/organization/groups/{group_id}

Updates a group’s information.

ParametersExpand Collapse
groupID: string
body: GroupUpdateParams { name }
name: string

New display name for the group.

minLength1
maxLength255
ReturnsExpand Collapse
GroupUpdateResponse { id, created_at, is_scim_managed, name }

Response returned after updating a group.

id: string

Identifier for the group.

created_at: number

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

formatunixtime
is_scim_managed: boolean

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

name: string

Updated display name for the group.

Update group

import OpenAI from 'openai';

const client = new OpenAI({
  adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted
});

const group = await client.admin.organization.groups.update('group_id', { name: 'x' });

console.log(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
}