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

# Create group

`POST /api/groups`

## Request

- Base URL: `https://dregs.com`
- URL: `https://dregs.com/api/groups`
- Auth: HTTP bearer

Create a group, or merge attributes into it if one with the same type and id already exists. attributes is required; send an empty object when there are none. The type defaults to organization.

## Request body

- V1CreateGroupRequest: Create a group, or merge attributes into the existing group with the same type and id. attributes is required; send an empty object when there are none.
  - `type` string: The group's type, such as organization or team. Defaults to organization.
  - `id` string, required: The group's ID in your system.
  - `attributes` object, required: Attributes merged into the group. Required; send an empty object when there are none.

## Response `201`

Group created

## Other responses

- `400`: Invalid request
- `401`: Authentication required

---

[API](https://skmtc.dev/dregs/apis/dregs-api.md) · [All operations](https://skmtc.dev/dregs/apis/dregs-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dregs/apis/dregs-api/revisions/ea71f8c1eed4?raw)
