---
title: "Add Groups as Members on Repository"
method: POST
path: "/v1/repositories/{repositoryId}/groups/add"
tags: ["Repositories"]
---

# Add Groups as Members on Repository

`POST /v1/repositories/{repositoryId}/groups/add`

## Request

- Base URL: `https://api.lucid.co`
- URL: `https://api.lucid.co/v1/repositories/{repositoryId}/groups/add`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://lucid.app/oauth2/authorize`
    - Token URL: `https://api.lucid.co/oauth2/token` scopes: `repository`
- TypeScript: <https://skmtc.dev/lucid/apis/lucid-rest-api/docs/v1/repositories/:repositoryId/groups/add/post.ts> (a function with typed inputs; its response is checked against the schema)

Add Groups to a repository. Users in the Group will have repository member access to the specified repository.

## Path parameters

- `repositoryId` string, required: Unique identifier for a repository folder, prefixed with `repo_`

## Request body

- RepositoryGroupsRequest
  - `groups` integer[], required: Array of group IDs.

## Response `204`

No Content. Groups have been successfully added.

## Other responses

- `400`: Bad Request. Occurs when groups are added to an UNRESTRICTED repository, or invalid group IDs are provided.
- `403`: Forbidden. Occurs when the user does not have permission to modify the repository.

---

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