---
title: "Add member to group by groupId"
method: POST
path: "/wiki/rest/api/group/userByGroupId"
tags: ["Group"]
---

# Add member to group by groupId

`POST /wiki/rest/api/group/userByGroupId`

Adds a user as a member in a group represented by its groupId

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
User must be a site admin.

## Query parameters

- `groupId` string, required

## Request body

- AccountId
  - `accountId` string, required

## Response `201`

Returned if the group was created successfully.

## Other responses

- `400` — Returned if the groupId or accountId are missing or invalid.
- `401` — Returned if the calling user is not logged in to Confluence.
- `403` — Returned if the user is not a site admin.
- `404` — If no user group by the give name exists.

---

[API](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api.md) · [All operations](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/the-confluence-cloud-rest-api/revisions/70088490f406/schema)
