---
title: "Add a member to a project"
method: POST
path: "/api/v4/projects/{id}/invitations"
tags: ["invitations"]
---

# Add a member to a project

`POST /api/v4/projects/{id}/invitations`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/projects/{id}/invitations`
- Auth: none declared

Adds a member to a project. You can specify a user ID or invite a user by email.

## Path parameters

- `id` string, required

## Request body

- PostApiV4ProjectsIdInvitations: Add a member to a project
  - `access_level` 10 | 15 | 20 | 25 | 30 | 40 | 50 | 5, required: A valid access level (defaults: `30`, developer access level)
  - `email` string[]: The email address to invite, or multiple emails separated by comma
  - `user_id` string[]: The user ID of the new member or multiple IDs separated by commas.
  - `expires_at` string, date-time: Date string in the format YEAR-MONTH-DAY
  - `invite_source` string: Source that triggered the member creation process
  - `member_role_id` integer: The ID of a member role for the invited user

## Response `201`

Add a member to a project

- APIEntitiesInvitation: API_Entities_Invitation model
  - `access_level` string, required
  - `created_at` string, required
  - `expires_at` string, required
  - `invite_email` string, required
  - `invite_token` string, required
  - `user_name` string
  - `created_by_name` string, required

---

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