Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Theme

Create group

Group admin().organization().groups().create(params, requestOptions = RequestOptions.none())
POST
/organization/groups

Creates a new group in the organization.

Create group

package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.admin.organization.groups.Group;
import com.openai.models.admin.organization.groups.GroupCreateParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.fromEnv();

        GroupCreateParams params = GroupCreateParams.builder()
            .name("x")
            .build();
        Group group = client.admin().organization().groups().create(params);
    }
}
Response example
{
    "object": "group",
    "id": "group_01J1F8ABCDXYZ",
    "name": "Support Team",
    "created_at": 1711471533,
    "group_type": "group",
    "is_scim_managed": false
}
Parameters
GroupCreateParams params
String name

Human readable name for the group.

minLength1
maxLength255
Returns
class Group:

Details about an organization group.

String id

Identifier for the group.

long createdAt

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

formatunixtime
GroupType groupType

The type of the group.

boolean isScimManaged

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

String name

Display name of the group.

Returns Examples
Response example
{
    "object": "group",
    "id": "group_01J1F8ABCDXYZ",
    "name": "Support Team",
    "created_at": 1711471533,
    "group_type": "group",
    "is_scim_managed": false
}