The createGroup mutation creates a group in an organization and makes the caller its owner.
Before You Begin
🔗 Use the GraphQL Playground to execute the queries in this guide.
➡️ New to GraphQL? Learn how to navigate the Playground with our Playground Basics Guide.
Prerequisites
- Authentication: Use a Service Account token (Personal Access Tokens are deprecated).
- Permissions: The caller's organization role must include the
create_grouppermission. - Organization UUID: Identify the organization the group will belong to.
Step 1: Find Your Organization UUID
- Check on our Get resource IDs page for how to retrieve resource identifiers.
Step 2: Create the Group
The createGroup mutation creates an empty group in the organization. The caller becomes an owner of the new group.
mutation {
createGroup(
input: {
organizationUuid: "organization-uuid-here"
name: "Marketing Team"
description: "Marketing staff"
}
) {
success
group {
id
uuid
name
description
createdAt
}
}
}
Arguments
organizationUuid(ID!, required): the UUID of the organization.name(String!, required): the group name. Up to 50 characters, unique within the organization.description(String, optional): up to 140 characters.clientMutationId(String, optional): a Relay client id. When you send it, the payload echoes it.
Sample response
{
"data": {
"createGroup": {
"success": true,
"group": {
"id": "123",
"uuid": "group-uuid-here",
"name": "Marketing Team",
"description": "Marketing staff",
"createdAt": "2026-11-30T12:00:00Z"
}
}
}
}
Step 3: Add Users to the Group
Add organization members to the new group with Add Organization Users to a Group, using the uuid returned above.
Key Notes
- Permission: when the caller's role lacks
create_group, the error isPermission deniedwithextensions.codeset toPERMISSION_DENIED. - Unknown organization: an unknown UUID returns
Organization not found with UUID: ...withextensions.codeset toRESOURCE_NOT_FOUND. - Invalid group data: a duplicate name in the organization, a blank name, a name over 50 characters or a description over 140 characters returns the validation messages (for example
Name has already been taken) withextensions.codeset toRECORD_INVALID. - These failures are GraphQL errors with
createGroup: null.success: falseis not a response. A failed call creates no group.

