GitLab API

GitlabTool

Actions1095

Members → postApiV4ProjectsIdMembers

AI-generated

Summary

Add a member to a GitLab project by specifying the project ID and providing the member details in the request body.

Inputs

  • id (required) — The project ID identifying the GitLab project to which the member will be added.
  • postApiV4ProjectsIdMembers (required) — The request body containing the details of the member to be added to the project, as defined by the GitLab API schema for adding project members.
  • baseUrl — The base URL of the GitLab instance; defaults to https://gitlab.com unless overridden.
  • skipAuthentication — Boolean to skip authentication; defaults to false.

Output shape

a single JSON object representing the newly added project member as returned from the GitLab API

The response contains the full member object confirming the addition. The project ID and member details must be provided; the baseUrl can be changed if using a self-managed GitLab instance.

Examples

Example 1: Add a member to a GitLab project

Set 'id' to the project ID and 'postApiV4ProjectsIdMembers' with the user ID and access level in the request body.

Links

Discussion