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

# Create a group

`POST /v1/groups`

## Request

- Base URL: `https://api.scrip.dev`
- URL: `https://api.scrip.dev/v1/groups`
- Auth: HTTP bearer

Create a participant group with initial members. At least one `ADMIN` member is required.

## Headers

- `Idempotency-Key` string

## Request body

- CreateGroupRequest: Creates a group, optionally with its first members.
  - `members` MemberInput[], required: Initial members (at least one ADMIN required)
    - `participant_id` string, uuid, required: The participant's `id`, a UUID. `ext:` is not accepted here.
    - `role` 'MEMBER' | 'ADMIN': Role to assign: MEMBER or ADMIN. A participant joining the group gets MEMBER when you omit it.
  - `name` string, required: Display name for the group (1-255 chars)
  - `on_behalf_of_participant_id` string, uuid: The participant who asked for this change. Scrip stores it with the membership record; the API does not return it.

## Response `201`

Group created with ledger entity

- GroupResponse: A group of participants that share balances and rewards.
  - `created_at` string, date-time: When this group was created
  - `deleted_at` string, date-time: When the group was archived (present only if archived)
  - `id` string, uuid: Unique identifier for this group
  - `name` string: The name people see for the group.
  - `status` 'ACTIVE' | 'ARCHIVED': The group's lifecycle state.
  - `updated_at` string, date-time: When this group was last updated

## Other responses

- `400`: Validation failed (code: validation_error | invalid_json)
- `401`: The API key is missing or not valid. See [Authentication](https://docs.scrip.dev/authentication).
- `403`: The caller is not allowed to do this.
- `404`: A participant in members was not found (code: participant_not_found)
- `429`: Too many requests. Wait the number of seconds in the `Retry-After` header, then retry. See [Limits and durations](https://docs.scrip.dev/limits#rate-limits).
- `500`: Something failed on Scrip's side. Retry the request, and quote `request_id` if it keeps failing. [Errors](https://docs.scrip.dev/errors) lists every code, and the [API introduction](https://docs.scrip.dev/api-reference/introduction) describes the error format.

---

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