---
title: "Create group"
method: POST
path: "/rbac/groups"
tags: ["rbac"]
---

# Create group

`POST /rbac/groups`

## Request

- Base URL: `https://api.axiom.co/v2`
- URL: `https://api.axiom.co/v2/rbac/groups`
- Auth: OAuth 2
  - Authorization code: `https://accounts.google.com/o/oauth2/v2/auth`
  - Token URL: `https://www.googleapis.com/oauth2/v4/token` scopes: `rbac|create`
- TypeScript: <https://skmtc.dev/axiom/apis/axiom-public-api/docs/rbac/groups/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a group whose members get the group's roles. Requires an Enterprise plan or the RBAC add-on. The name must be unique, every role ID must exist, and you can't add yourself as a member.

## Request body

- Group: Defines a group of users for organizational purposes
  - `description` string: Detailed description of the group's purpose and scope
  - `isManaged` boolean: Whether the group is synced from your identity provider. You can't delete a managed group or change its members.
  - `members` string[]: List of user IDs that are assigned to this group
  - `name` string, required: Unique name identifier for the group
  - `roles` string[]: IDs of the roles assigned to the group. Use a custom role ID or a built-in role ID: `axiom-owner`, `axiom-admin`, `axiom-user`, `axiom-read-only`, or `axiom-none`.

## Response `200`

The created group.

- GroupWithID: Defines a group of users for organizational purposes
  - `description` string: Detailed description of the group's purpose and scope
  - `isManaged` boolean: Whether the group is synced from your identity provider. You can't delete a managed group or change its members.
  - `members` string[]: List of user IDs that are assigned to this group
  - `name` string, required: Unique name identifier for the group
  - `roles` string[]: IDs of the roles assigned to the group. Use a custom role ID or a built-in role ID: `axiom-owner`, `axiom-admin`, `axiom-user`, `axiom-read-only`, or `axiom-none`.
  - `id` string, required: Unique identifier for the group

## Other responses

- `400`: Bad request
- `403`: Forbidden

## Changes

- **2026-10-16** (v2) `fbc1b8430feb`: 2 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `403`

[Operation history](https://skmtc.dev/axiom/apis/axiom-public-api/changes/rbac/groups/post.md)

---

[API](https://skmtc.dev/axiom/apis/axiom-public-api.md) - [All operations](https://skmtc.dev/axiom/apis/axiom-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/axiom/apis/axiom-public-api/revisions/7e39a295e3ba?raw)
