---
title: "Add a user to a group"
method: POST
path: "/apps/{id}/groups/{key}/members"
tags: ["Apps"]
---

# Add a user to a group

`POST /apps/{id}/groups/{key}/members`

## Request

- Base URL: `https://api.hypamoon.com/api/v1`
- URL: `https://api.hypamoon.com/api/v1/apps/{id}/groups/{key}/members`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://app.hypamoon.com/oauth/authorize`, token URL `https://api.hypamoon.com/oauth/token`, scopes: `sites:write`)

Puts a user of the app in the group. The app sees the group (and its role and entitlement) within seconds. Adding someone who is already in it changes nothing (added false).

## Path parameters

- `id` string, uuid, required
- `key` string, required

## Request body

- object
  - `user_id` string, uuid, required: The id of a user of the app, from list_app_users.

## Response `200`

In the group.

- object
  - `key` string, required
  - `user_id` string, uuid, required
  - `added` boolean, required: false: they were already in the group.

## Other responses

- `400`: Bad Request: invalid_json.
- `401`: Unauthorized: unauthorized, missing_api_key, invalid_api_key, api_key_revoked, project_deleted.
- `403`: Forbidden: project_not_enabled, key_mode_mismatch, missing_scope, verification_required.
- `404`: Not Found: not_found.
- `409`: Conflict: conflict.
- `422`: Unprocessable Content: validation_failed.
- `429`: Too Many Requests: rate_limited.
- `500`: Internal Server Error: internal_error.
- `503`: Service Unavailable: service_unavailable.

---

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