Approves an access request for the given user.

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://bump.sh/demo/doc/gitlab/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
"Gitlab (Unofficial) MCP server": {
  "url": "https://bump.sh/demo/doc/gitlab/mcp"
}
Close
PUT /projects/{id}/access_requests/{user_id}/approve

This feature was introduced in GitLab 8.11.

Path parameters

application/json

Body

  • access_level integer(int32)

    A valid access level (defaults: 30, the Developer role)

    Default value is 30.

Responses

  • successful operation

    Hide response attributes Show response attributes object
    • id integer(int32)
    • username string
    • name string
    • state string
    • avatar_url string
    • avatar_path string
    • custom_attributes array[object]
      Hide custom_attributes attributes Show custom_attributes attributes object
      • key string
      • value string
    • web_url string
    • email string
    • requested_at string
PUT /projects/{id}/access_requests/{user_id}/approve
curl \
 --request PUT 'https://www.gitlab.com/api/v4/projects/gitlab-org/gitlab/access_requests/{user_id}/approve' \
 --header "Private-Token: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"access_level":30}'
Request examples
{
  "access_level": 30
}
Response examples (200)
{
  "id": 1,
  "username": "admin",
  "name": "Administrator",
  "state": "active",
  "avatar_url": "https://gravatar.com/avatar/1",
  "avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png",
  "custom_attributes": [
    {
      "key": "foo",
      "value": "bar"
    }
  ],
  "web_url": "https://gitlab.example.com/root",
  "email": "string",
  "requested_at": "string"
}
Response examples (200)
{"id" => 1, "username" => "raymond_smith", "name" => "Raymond Smith", "state" => "active", "created_at" => "2012-10-22T14:13:35Z", "access_level" => 20}