Skip to content
Primary navigation

Create group

admin.organization.groups.create(**kwargs) -> Group { id, created_at, group_type, 2 more }
POST/organization/groups

Creates a new group in the organization.

ParametersExpand Collapse
name: String

Human readable name for the group.

minLength1
maxLength255
ReturnsExpand Collapse
class Group { id, created_at, group_type, 2 more }

Details about an organization group.

id: String

Identifier for the group.

created_at: Integer

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

formatunixtime
group_type: String

The type of the group.

is_scim_managed: bool

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

name: String

Display name of the group.

Create group

require "openai"

openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")

group = openai.admin.organization.groups.create(name: "x")

puts(group)
{
    "object": "group",
    "id": "group_01J1F8ABCDXYZ",
    "name": "Support Team",
    "created_at": 1711471533,
    "is_scim_managed": false
}
Returns Examples
{
    "object": "group",
    "id": "group_01J1F8ABCDXYZ",
    "name": "Support Team",
    "created_at": 1711471533,
    "is_scim_managed": false
}