Skip to content

Update a project member

PUT
/api/v4/projects/{id}/members/{user_id}

Updates a specified member of a project.

id
required
string

The project ID

user_id
required
integer

The user ID of the new member

Media type application/json
object
access_level
required

A valid access level

integer
nullable
expires_at

Date string in the format YEAR-MONTH-DAY

string format: date-time
nullable
member_role_id

The ID of the Member Role to be updated

integer
nullable
Example generated
{
"access_level": 1,
"expires_at": "2026-04-15T12:00:00Z",
"member_role_id": 1
}

OK

Media type application/json
object
id
integer format: int64
username
string
public_email
string
name
string
state
string
locked
boolean
avatar_url
string
avatar_path
string
custom_attributes
Array<object>
object
key
string
value
string
web_url
string
access_level
string
created_at
string
created_by
object
id
integer format: int64
username
string
public_email
string
name
string
state
string
locked
boolean
avatar_url
string
avatar_path
string
custom_attributes
Array<object>
object
key
string
value
string
web_url
string
expires_at
string
group_saml_identity
object
provider
string
extern_uid
string
saml_provider_id
string
group_scim_identity
object
extern_uid
string
group_id
string
active
string
email
string
is_using_seat
string
override
string
membership_state
string
member_role
object
id
integer format: int64
group_id
integer format: int64
name
string
description
string
base_access_level
integer
apply_security_scan_profiles
boolean
admin_merge_request
boolean
archive_project
boolean
admin_ai_catalog_item_consumer
boolean
destroy_package
boolean
remove_project
boolean
remove_group
boolean
manage_security_policy_link
boolean
admin_ai_catalog_item
boolean
admin_compliance_framework
boolean
admin_cicd_variables
boolean
manage_deploy_tokens
boolean
manage_group_access_tokens
boolean
admin_group_member
boolean
admin_integrations
boolean
manage_merge_request_settings
boolean
manage_project_access_tokens
boolean
admin_protected_branch
boolean
admin_protected_environments
boolean
admin_push_rules
boolean
admin_runners
boolean
admin_security_attributes
boolean
admin_terraform_state
boolean
admin_vulnerability
boolean
admin_web_hook
boolean
read_agent_artifacts
boolean
read_compliance_dashboard
boolean
read_security_scan_profiles
boolean
read_virtual_registry
boolean
update_sec_ai_workflow_settings
boolean
read_admin_cicd
boolean
read_crm_contact
boolean
read_dependency
boolean
read_admin_groups
boolean
read_admin_projects
boolean
read_code
boolean
read_runners
boolean
read_security_attribute
boolean
read_admin_subscription
boolean
read_admin_monitoring
boolean
read_admin_users
boolean
read_vulnerability
boolean
Example
{
"id": 1,
"username": "admin",
"public_email": "john@example.com",
"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",
"created_by": {
"id": 1,
"username": "admin",
"public_email": "john@example.com",
"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"
},
"member_role": {
"id": 2,
"group_id": 2,
"name": "Custom guest",
"description": "Guest user who can also read_code",
"base_access_level": 40,
"apply_security_scan_profiles": false,
"admin_merge_request": false,
"archive_project": false,
"admin_ai_catalog_item_consumer": false,
"destroy_package": false,
"remove_project": false,
"remove_group": false,
"manage_security_policy_link": false,
"admin_ai_catalog_item": false,
"admin_compliance_framework": false,
"admin_cicd_variables": false,
"manage_deploy_tokens": false,
"manage_group_access_tokens": false,
"admin_group_member": false,
"admin_integrations": false,
"manage_merge_request_settings": false,
"manage_project_access_tokens": false,
"admin_protected_branch": false,
"admin_protected_environments": false,
"admin_push_rules": false,
"admin_runners": false,
"admin_security_attributes": false,
"admin_terraform_state": false,
"admin_vulnerability": false,
"admin_web_hook": false,
"read_agent_artifacts": false,
"read_compliance_dashboard": false,
"read_security_scan_profiles": false,
"read_virtual_registry": false,
"update_sec_ai_workflow_settings": false,
"read_admin_cicd": false,
"read_crm_contact": false,
"read_dependency": false,
"read_admin_groups": false,
"read_admin_projects": false,
"read_code": false,
"read_runners": false,
"read_security_attribute": false,
"read_admin_subscription": false,
"read_admin_monitoring": false,
"read_admin_users": false,
"read_vulnerability": false
}
}

Bad Request

Not Found