---
title: "Add a member to a group"
method: POST
path: "/v1/groups/{group_id}/members"
tags: ["Groups"]
---

# Add a member to a group

`POST /v1/groups/{group_id}/members`

## Request

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

Add one or more participants to a group in `members`, each with an optional role.

## Path parameters

- `group_id` string, uuid, required

## Headers

- `Idempotency-Key` string

## Request body

- union: Adds one participant to a group with `participant_id` and `role`, or adds several at once with `members`. Send one form or the other. An active member you add again keeps their role unless you send a new `role`.
  - object
    - `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.
    - `participant_id` string, uuid, required: The `id` (UUID) of one participant to add. `ext:` is not accepted. Use `members` to add several.
    - `role` 'MEMBER' | 'ADMIN': Role for the single participant: MEMBER or ADMIN. A new or returning member gets MEMBER when you omit it. An active member keeps their current role when you omit it.
  - object
    - `members` MemberInput[], required: Batch of members to add
      - `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.
    - `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 `200`

Member added

- GroupAddMemberResponse: Confirms that members were added to a group.
  - `message` string: Confirmation message

## 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`: Resource not found (code: group_not_found | group_member_not_found)
- `409`: Cannot demote the last ADMIN of the group (code: last_admin_cannot_be_removed)
- `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)
