Use this API to interact with user accounts on GitLab. These endpoints can help manage your account, manage accounts for other users, moderate user accounts, perform follower actions, and interact with email addresses for user accounts.
Retrieve current user details
GET /api/v4/user
Retrieves details about your user account.
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
401 | Unauthorized | — |
403 | Forbidden | — |
List all activity for a user
GET /api/v4/user/activities
Lists the last activity date of users, sorted from oldest to newest. By default, lists users active in the last six months. Use from to change the start date. Only users with public profiles are listed, unless you are an administrator or auditor.
Parameters
| Name | Type | Description |
|---|---|---|
fromQuery | String (date- | Date string in the format YEAR-,2016-.Default: 2024-Example: 2024- |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
List all email addresses for a user
GET /api/v4/user/emails
Lists all email addresses for the currently authenticated user.
Parameters
| Name | Type | Description |
|---|---|---|
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
Add an email address
POST /api/v4/user/emails
Adds an email address for the currently authenticated user. If the email address is already in use, returns a validation error with the message has already been taken.
Request body (application/json)
| Property | Type | Description |
|---|---|---|
emailRequired | String | Email address to add to the account |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
Retrieve details on an email address
GET /api/v4/user/emails/{email_id}
Retrieves details on a specified email address for the currently authenticated user.
Parameters
| Name | Type | Description |
|---|---|---|
email_Path, | Integer | ID of the email |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Delete an email address
DELETE /api/v4/user/emails/{email_id}
Deletes the specified email address. You cannot delete a primary email address. Any future emails sent to the deleted email address are sent to the primary email address instead.
Parameters
| Name | Type | Description |
|---|---|---|
email_Path, | Integer | ID of the email |
Responses
| Code | Description | Schema |
|---|---|---|
204 | No Content | — |
400 | Bad Request | — |
404 | Not Found | — |
Retrieve your user preferences
GET /api/v4/user/preferences
Retrieves your user preferences.
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
401 | Unauthorized | — |
403 | Forbidden | — |
Update your user preferences
PUT /api/v4/user/preferences
Updates your user preferences.
Request body (application/json)
| Property | Type | Description |
|---|---|---|
emoji_ | String | Default skin tone for emoji that have skin tone variants.default,light,medium_,medium,medium_,dark.view_,show_,pass_,policy_,emoji_,mobile_,mobile_,mobile_,mobile_,mobile_ must be providedAllowed values: default,light,medium_,medium,medium_,dark |
mobile_ | Array of strings | Weekdays with working hours,["monday",.view_,show_,pass_,policy_,emoji_,mobile_,mobile_,mobile_,mobile_,mobile_ must be provided |
mobile_ | Boolean | If true,true requires a start time,view_,show_,pass_,policy_,emoji_,mobile_,mobile_,mobile_,mobile_,mobile_ must be provided |
mobile_ | Integer | End of the working hours as minutes after midnight.view_,show_,pass_,policy_,emoji_,mobile_,mobile_,mobile_,mobile_,mobile_ must be providedMaximum: 1439Minimum: 0 |
mobile_ | Integer | Start of the working hours as minutes after midnight,540 for 09:view_,show_,pass_,policy_,emoji_,mobile_,mobile_,mobile_,mobile_,mobile_ must be providedMaximum: 1439Minimum: 0 |
mobile_ | String | IANA time zone the working hours are defined in,Europe/.view_,show_,pass_,policy_,emoji_,mobile_,mobile_,mobile_,mobile_,mobile_ must be providedMaximum length: 64 |
pass_ | Boolean | If true,view_,show_,pass_,policy_,emoji_,mobile_,mobile_,mobile_,mobile_,mobile_ must be provided |
policy_ | Boolean | If true,view_,show_,pass_,policy_,emoji_,mobile_,mobile_,mobile_,mobile_,mobile_ must be provided |
show_ | Boolean | If true,view_,show_,pass_,policy_,emoji_,mobile_,mobile_,mobile_,mobile_,mobile_ must be provided |
view_ | Boolean | If true,view_,show_,pass_,policy_,emoji_,mobile_,mobile_,mobile_,mobile_,mobile_ must be provided |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
Create a runner owned by currently authenticated user
POST /api/v4/user/runners
Creates a runner linked to the current user. The user is listed as the owner for audit purposes, but runner availability is based on runner_type. The token value is included in the response, but cannot be retrieved later. For instance_type, requires an administrator. For group_type, requires an administrator, the Owner role for the group, or a custom role with the admin_runners permission. For project_type, requires an administrator, at least the Maintainer role for the project, or a custom role with the admin_runners permission. For group_type and project_type, users who are not administrators can create the runner only when runner registration is allowed for the group or project. Requires a token with the create_runner or api scope.
Request body (application/json)
| Property | Type | Description |
|---|---|---|
access_ | String | Access level of the runner Allowed values: not_,ref_ |
description | String | Description of the runner |
group_Required | Integer | ID of the group to create the runner in.runner_ is group_Example: 1 |
locked | Boolean | Specifies if the runner should be locked for the current project Default: false |
maintenance_ | String | Free- |
maximum_ | Integer | Maximum time, |
paused | Boolean | If true, |
project_Required | Integer | ID of the project to create the runner in.runner_ is project_Example: 1 |
run_ | Boolean | Specifies if the runner should handle untagged jobs Default: true |
runner_Required | String | Scope of the runner Allowed values: instance_,group_,project_Minimum length: 1 |
tag_ | Array of strings | Comma- |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
403 | Forbidden | — |
Retrieve your user status
GET /api/v4/user/status
Retrieves your user status.
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
401 | Unauthorized | — |
403 | Forbidden | — |
Set a user status
PUT /api/v4/user/status
Sets the status of the currently authenticated user. Any parameters that are not passed are nullified. This operation is similar but distinct from the Update a user status operation.
Request body (application/json)
| Property | Type | Description |
|---|---|---|
availability | String | Availability of the user.busy and not_ |
clear_ | String | Time after which the status is cleared automatically Allowed values: 30_,3_,8_,1_,3_,7_,30_ |
emoji | String | Name of the emoji to use as a status.speech_ is used. |
message | String | Message to set as a status. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
Update a user status
PATCH /api/v4/user/status
Sets the status of the currently authenticated user. Any parameters that are not passed are ignored. To clear a field, pass null explicitly. This operation is similar but distinct from the Set a user status operation.
Request body (application/json)
| Property | Type | Description |
|---|---|---|
availability | String | Availability of the user.busy and not_ |
clear_ | String | Time after which the status is cleared automatically Allowed values: 30_,3_,8_,1_,3_,7_,30_ |
emoji | String | Name of the emoji to use as a status.speech_ is used. |
message | String | Message to set as a status. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
Retrieve Support PIN
GET /api/v4/user/support_pin
Retrieves a Support PIN for the currently authenticated user. GitLab Support may ask for this PIN to validate your identity. This feature was introduced in GitLab 17.8.
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
Create a Support PIN
POST /api/v4/user/support_pin
Creates a Support PIN for your user account. The PIN expires seven days after creation. GitLab Support may ask for this PIN to validate your identity. This feature was introduced in GitLab 17.8.
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
Update a user’s credit_card_validation (deprecated)
PUT /api/v4/user/{user_id}/credit_card_validation
Deprecated in 17.7
Parameters
| Name | Type | Description |
|---|---|---|
user_Path, | String | ID or username of the user |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
credit_Required | Integer | Month the credit card expires |
credit_Required | Integer | Year the credit card expires |
credit_Required | String | Name of the credit card holder |
credit_Required | String | Last 4 digits of the credit card number |
credit_Required | String | Name of the credit card network |
credit_Required | String (date- | Time when the user’s credit card was validated |
stripe_ | String | Stripe credit card fingerprint |
stripe_ | String | ID of the Stripe payment method |
stripe_ | String | ID of the Stripe setup intent |
zuora_ | String | ID of the Zuora payment method |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Return the user specific counts
GET /api/v4/user_counts
Returns counts for the current user: open issues and active merge requests assigned to the user, merge requests the user is requested to review, and pending to-do items.
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
401 | Unauthorized | — |
List all users
GET /api/v4/users
Lists all users on the instance. This endpoint supports keyset pagination. By default, offset pagination is limited to 50,000 results. Use keyset pagination to retrieve more. Only administrators and auditors can use the created_after, created_before, two_factor, and without_projects parameters. For other users, these parameters are ignored.
Parameters
| Name | Type | Description |
|---|---|---|
usernameQuery | String | Return a single user with the specified username. |
extern_Query | String | Return a single user with the specified external authentication provider UID.provider.extern_,provider must be provided |
public_Query | String | Return a single user with the specified public email |
providerQuery | String | Name of the external authentication provider.scim provider is available in Premium and Ultimate only.extern_,provider must be provided |
searchQuery | String | Search for users by name, |
activeQuery | Boolean | If true,false has no effectDefault: false |
humansQuery | Boolean | If true,Default: false |
externalQuery | Boolean | If true,false has no effectDefault: false |
blockedQuery | Boolean | If true,false has no effectDefault: false |
created_Query | String (date- | Return users created on or after the specified time |
created_Query | String (date- | Return users created on or before the specified time |
without_Query | Boolean | If true,Default: false |
without_Query | Boolean | If true,Default: false |
adminsQuery | Boolean | If true,Default: false |
two_Query | String | Filter users by two-enabled and disabled. |
exclude_Query | Boolean | If true,Default: false |
exclude_Query | Boolean | If true,Default: false |
exclude_Query | Boolean | If true,Default: false |
exclude_Query | Boolean | If true,Default: false |
order_Query | String | Sort results by the specified field.idAllowed values: id,name,username,created_,updated_ |
sortQuery | String | Sort results in ascending or descending order.descAllowed values: asc,desc |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
with_Query | Boolean | If true,Default: false |
custom_Query | Object | Filter by custom attributes that match all of the specified key and value pairs. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
Create a user
POST /api/v4/users
Creates a user. If private_profile is not set, it defaults to the instance setting for new user profiles. If bio is not set, it defaults to an empty string. Administrators only.
Request body (multipart/form-data)
| Property | Type | Description |
|---|---|---|
admin | Boolean | Flag indicating the user is an administrator.false for new users |
avatar | String (binary) | Avatar image for user |
bio | String | The biography of the user |
can_ | Boolean | Flag indicating the user can create top- |
color_ | Integer | The color scheme for the file viewer |
commit_ | String | The commit email, |
discord | String | The Discord user ID |
emailRequired | String | Email address of the user |
extern_ | String | The external authentication provider UID.extern_,provider must be provided |
external | Boolean | Flag indicating the user is an external user. |
force_ | Boolean | Flag indicating a random password will be set.reset_.password.password,reset_,force_ must be provided |
github | String | The Git |
linkedin | String | The Linked |
location | String | The location of the user |
nameRequired | String | The name of the user |
note | String | Admin note for this user |
organization | String | The organization of the user. |
password | String | The password of the new user.force_ or reset_ is true,password.password,reset_,force_ must be provided |
policy_ | Boolean | Flag indicating that advanced editor is enabled |
private_ | Boolean | Flag indicating the user has a private profile. |
projects_ | Integer | The number of projects a user can create |
pronouns | String | The pronouns of the user |
provider | String | Name of the external authentication provider.extern_,provider must be provided |
public_ | String | The public email of the user. |
reset_ | Boolean | Flag indicating the user will be sent a password reset token.force_.password.password,reset_,force_ must be provided |
skip_ | Boolean | Flag indicating the account is confirmed.false |
theme_ | Integer | The Git |
twitter | String | The Twitter username |
usernameRequired | String | The username of the user |
view_ | Boolean | If true, |
website_ | String | The website of the user |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
Retrieve a user
GET /api/v4/users/{id}
Retrieves a specified user. Requires authentication. Administrators and auditors see more attributes in the response.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
with_Query | Boolean | If true,Default: false |
custom_Query | Object | Filter by custom attributes that match all of the specified key and value pairs. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Update a user
PUT /api/v4/users/{id}
Updates the details of a specified user. If an administrator updates the password of another user, that user must change it when they next sign in. Administrators only. If email is a confirmed secondary email address of the user, it becomes the primary email address at once. Any other address is stored as unconfirmed and becomes the primary email address only after the user confirms it, unless skip_reconfirmation is true.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
Request body (multipart/form-data)
| Property | Type | Description |
|---|---|---|
admin | Boolean | Flag indicating the user is an administrator.false for new users |
avatar | String (binary) | Avatar image for user |
bio | String | The biography of the user |
can_ | Boolean | Flag indicating the user can create top- |
color_ | Integer | The color scheme for the file viewer |
commit_ | String | The commit email, |
discord | String | The Discord user ID |
email | String | Primary email address of the user |
extern_ | String | The external authentication provider UID.extern_,provider must be provided |
external | Boolean | Flag indicating the user is an external user. |
github | String | The Git |
linkedin | String | The Linked |
location | String | The location of the user |
name | String | The name of the user |
note | String | Admin note for this user |
organization | String | The organization of the user. |
password | String | The password of the user |
policy_ | Boolean | Flag indicating that advanced editor is enabled |
private_ | Boolean | Flag indicating the user has a private profile. |
projects_ | Integer | The number of projects a user can create |
pronouns | String | The pronouns of the user |
provider | String | Name of the external authentication provider.extern_,provider must be provided |
public_ | String | The public email of the user. |
skip_ | Boolean | Flag indicating the account skips the confirmation by email.false |
theme_ | Integer | The Git |
twitter | String | The Twitter username |
username | String | The username of the user |
view_ | Boolean | If true, |
website_ | String | The website of the user |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Delete a user
DELETE /api/v4/users/{id}
Deletes a user. Administrators only.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
hard_Query | Boolean | If true, |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Reactivate a user
POST /api/v4/users/{id}/activate
Reactivates a specified user account that was previously deactivated. Administrators only.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | — |
400 | Bad Request | — |
404 | Not Found | — |
Approve access to a user
POST /api/v4/users/{id}/approve
Approves access to a specified user account that is pending approval. If the user is not pending approval, returns the message The user you are trying to approve is not pending approval. Administrators only.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | — |
400 | Bad Request | — |
404 | Not Found | — |
Retrieve association counts for a user
GET /api/v4/users/{id}/associations_count
Retrieves the number of groups, projects, issues, and merge requests associated with a specified user. Administrators can query any user. Other users can query only themselves.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Ban a user
POST /api/v4/users/{id}/ban
Bans a specified user account. Administrators only.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | — |
400 | Bad Request | — |
404 | Not Found | — |
Block access to a user
POST /api/v4/users/{id}/block
Blocks a specified user account. A user cannot be blocked if they are blocked through LDAP, are an internal user, or are the user making the request. Administrators only.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | — |
400 | Bad Request | — |
404 | Not Found | — |
Deactivate a user
POST /api/v4/users/{id}/deactivate
Deactivates a specified user account. A user cannot be deactivated if they are blocked by an administrator or by LDAP synchronization, are banned or pending approval, are not dormant, or are an internal user. Administrators only.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | — |
400 | Bad Request | — |
404 | Not Found | — |
Disable two-factor authentication for a user
PATCH /api/v4/users/{id}/disable_two_factor
Disables two-factor authentication for a specified user account. Two-factor authentication cannot be disabled for administrators, including your own account. Administrators only.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
List all email addresses for a user
GET /api/v4/users/{id}/emails
Lists all email addresses for a specified user account. Administrators only.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Add an email address for a user
POST /api/v4/users/{id}/emails
Adds an email address for a specified user account. Administrators only.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
emailRequired | String | Email address to add to the user account |
skip_ | Boolean | If true,false |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Delete an email address for a user
DELETE /api/v4/users/{id}/emails/{email_id}
Deletes a specified email address for a user account. You cannot delete a primary email address. Administrators only.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
email_Path, | Integer | ID of the email |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Follow a user
POST /api/v4/users/{id}/follow
Follows a specified user account.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
List all accounts that follow a user
GET /api/v4/users/{id}/followers
Lists all user accounts that follow a specified user.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
List all accounts followed by a user
GET /api/v4/users/{id}/following
Lists all user accounts being followed by a specified user.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Delete authentication identity from a user
DELETE /api/v4/users/{id}/identities/{provider}
Deletes a user authentication identity using the provider name associated with that identity. Administrators only.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
providerPath, | String | Name of the external authentication provider |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Reject access to a user
POST /api/v4/users/{id}/reject
Rejects access to a specified user account that is pending approval. If the user is not pending approval, returns the message User does not have a pending request. Administrators only.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | — |
400 | Bad Request | — |
404 | Not Found | — |
Retrieve a Support PIN for a user
GET /api/v4/users/{id}/support_pin
Retrieves a Support PIN for a specified user. GitLab Support may ask for this PIN to validate your identity. Administrators only. This feature was introduced in GitLab 17.8.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Revoke a Support PIN for a user
POST /api/v4/users/{id}/support_pin/revoke
Revokes a Support PIN for a specified user before its natural expiration. This immediately expires and removes the PIN. Administrators only. This feature was introduced in GitLab 17.11.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
Responses
| Code | Description | Schema |
|---|---|---|
204 | No Content | — |
400 | Bad Request | — |
404 | Not Found | — |
Unban a user
POST /api/v4/users/{id}/unban
Unbans a specified user account that was previously banned. Administrators only.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | — |
400 | Bad Request | — |
404 | Not Found | — |
Unblock access to a user
POST /api/v4/users/{id}/unblock
Unblocks a specified user account that was previously blocked. Administrators only.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | — |
400 | Bad Request | — |
404 | Not Found | — |
Unfollow a user
POST /api/v4/users/{id}/unfollow
Unfollows a specified user account.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | ID of the user |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
List all project and group memberships for a user
GET /api/v4/users/{user_id}/memberships
Lists all project and group memberships for a specified user. Only direct memberships are returned. Inherited memberships, for example in subgroups, are not included. Administrators only.
Parameters
| Name | Type | Description |
|---|---|---|
user_Path, | Integer | ID of the user |
typeQuery | String | Filter memberships by type Allowed values: Project,Namespace |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Retrieve the status of a user
GET /api/v4/users/{user_id}/status
Retrieves the status of a user. You can access this endpoint without authentication.
Parameters
| Name | Type | Description |
|---|---|---|
user_Path, | String | ID or username of the user |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesCiRunnerRegistrationDetails
| Property | Type | Description |
|---|---|---|
id | Integer (int64) | Example:1 |
token | String | Example:glrt- |
token_ | String (date- | Example:2025- |
APIEntitiesCustomAttribute
| Property | Type | Description |
|---|---|---|
key | String | Example:foo |
value | String | Example:bar |
APIEntitiesEmail
| Property | Type | Description |
|---|---|---|
confirmed_ | String (date- | Example:2015- |
email | String | Example:user@example. |
id | Integer (int64) | Example:1 |
APIEntitiesIdentity
| Property | Type | Description |
|---|---|---|
extern_ | String | ID of the user at the identity provider |
provider | String | Name of the identity provider,google_ or group_ |
APIEntitiesMembership
| Property | Type | Description |
|---|---|---|
access_ | String | Access level of the user.0 (no access),5 (minimal access),10 (guest),15 (planner),20 (reporter),25 (security manager),30 (developer),40 (maintainer),50 (owner) |
source_ | String | — |
source_ | String | — |
source_ | String | — |
APIEntitiesUser
| Property | Type | Description |
|---|---|---|
avatar_ | String | Example:/ |
avatar_ | String | URL of the user’s avatar Example: https: |
bio | String | Biography of the user |
bot | Boolean | — |
created_ | String (date- | Creation date and time of the user account in ISO 8601 format |
custom_ | Array of APIEntities | — |
discord | String | Discord user ID of the user |
followers | String | — |
following | String | — |
github | String | Git |
id | Integer (int64) | ID of the user Example: 1 |
is_ | String | — |
job_ | String | Job title of the user |
linkedin | String | Linked |
local_ | String | — |
location | String | Location of the user |
locked | Boolean | If true, |
name | String | Name of the user.**** if the current user cannot read the bot’s project or groupExample: Administrator |
organization | String | Organization of the user |
pronouns | String | Pronouns of the user |
public_ | String | Public email address of the user Example: john@example. |
state | String | State of the user account.active,blocked,ldap_,blocked_,banned,deactivatedExample: active |
twitter | String | Twitter username of the user |
username | String | Username of the user Example: admin |
web_ | String | URL of the user’s profile Example: https: |
website_ | String | Website of the user |
work_ | String | — |
APIEntitiesUserActivity
| Property | Type | Description |
|---|---|---|
last_ | String (date) | Deprecated.last_ insteadExample: 2015- |
last_ | String (date) | Date of the last activity of the user. Example: 2015- |
username | String | Example:johndoe |
APIEntitiesUserAssociationsCount
| Property | Type | Description |
|---|---|---|
groups_ | Integer | Example:1 |
issues_ | Integer | Example:1 |
merge_ | Integer | Example:1 |
projects_ | Integer | Example:1 |
APIEntitiesUserBasic
| Property | Type | Description |
|---|---|---|
avatar_ | String | Example:/ |
avatar_ | String | URL of the user’s avatar Example: https: |
custom_ | Array of APIEntities | — |
id | Integer (int64) | ID of the user Example: 1 |
locked | Boolean | If true, |
name | String | Name of the user.**** if the current user cannot read the bot’s project or groupExample: Administrator |
public_ | String | Public email address of the user Example: john@example. |
state | String | State of the user account.active,blocked,ldap_,blocked_,banned,deactivatedExample: active |
username | String | Username of the user Example: admin |
web_ | String | URL of the user’s profile Example: https: |
APIEntitiesUserCounts
| Property | Type | Description |
|---|---|---|
assigned_ | Integer | Number of open issues assigned to the current user Example: 10 |
assigned_ | Integer | Number of active merge requests assigned to the current user Example: 10 |
merge_ | Integer | Deprecated.assigned_ insteadExample: 10 |
review_ | Integer | Number of open merge requests the current user is requested to review Example: 10 |
todos | Integer | Number of pending to- Example: 10 |
APIEntitiesUserCreditCardValidations
| Property | Type | Description |
|---|---|---|
credit_ | String (date- | Example:2025- |
user_ | Integer (int64) | Example:1 |
APIEntitiesUserPreferences
| Property | Type | Description |
|---|---|---|
emoji_ | Integer | Example:0 |
id | Integer (int64) | Example:1 |
mobile_ | Array of strings | Example:["monday", |
mobile_ | Boolean | Example:true |
mobile_ | Integer | Example:1020 |
mobile_ | Integer | Example:540 |
mobile_ | String | Example:Europe/ |
pass_ | Boolean | — |
policy_ | Boolean | — |
show_ | Boolean | — |
user_ | Integer (int64) | Example:1 |
view_ | Boolean | — |
APIEntitiesUserProfile
| Property | Type | Description |
|---|---|---|
avatar_ | String | Example:/ |
avatar_ | String | URL of the user’s avatar Example: https: |
bio | String | Biography of the user |
bio_ | String | Example:My <em>bio</ |
bot | Boolean | — |
created_ | String (date- | Creation date and time of the user account in ISO 8601 format |
custom_ | Array of APIEntities | — |
discord | String | Discord user ID of the user |
followers | String | — |
following | String | — |
github | String | Git |
id | Integer (int64) | ID of the user Example: 1 |
is_ | String | — |
job_ | String | Job title of the user |
linkedin | String | Linked |
local_ | String | — |
location | String | Location of the user |
locked | Boolean | If true, |
name | String | Name of the user.**** if the current user cannot read the bot’s project or groupExample: Administrator |
organization | String | Organization of the user |
pronouns | String | Pronouns of the user |
public_ | String | Public email address of the user Example: john@example. |
state | String | State of the user account.active,blocked,ldap_,blocked_,banned,deactivatedExample: active |
twitter | String | Twitter username of the user |
username | String | Username of the user Example: admin |
web_ | String | URL of the user’s profile Example: https: |
website_ | String | Website of the user |
work_ | String | — |
APIEntitiesUserPublic
| Property | Type | Description |
|---|---|---|
avatar_ | String | Example:/ |
avatar_ | String | URL of the user’s avatar Example: https: |
bio | String | Biography of the user |
bot | Boolean | — |
can_ | Boolean | If true,Example: true |
can_ | Boolean | If true,Example: true |
color_ | Integer | Color scheme ID of the user Example: 1 |
commit_ | String | — |
confirmed_ | String (date- | Confirmation date and time of the user in ISO 8601 format Example: 2015- |
created_ | String (date- | Creation date and time of the user account in ISO 8601 format |
current_ | String (date- | Current sign- Example: 2015- |
custom_ | Array of APIEntities | — |
discord | String | Discord user ID of the user |
email | String | Email address of the user Example: john@example. |
external | Boolean | If true, |
followers | String | — |
following | String | — |
github | String | Git |
id | Integer (int64) | ID of the user Example: 1 |
identities | Array of APIEntities | Identities associated with the user.group_ provider also has saml_ |
is_ | String | — |
job_ | String | Job title of the user |
last_ | String (date- | Last activity date of the user Example: 2015- |
last_ | String (date- | Last sign- Example: 2015- |
linkedin | String | Linked |
local_ | String | — |
location | String | Location of the user |
locked | Boolean | If true, |
name | String | Name of the user.**** if the current user cannot read the bot’s project or groupExample: Administrator |
organization | String | Organization of the user |
preferred_ | String | Example:en |
private_ | Boolean | If true,Example: false |
projects_ | Integer | Project limit of the user Example: 10 |
pronouns | String | Pronouns of the user |
public_ | String | Public email address of the user Example: john@example. |
state | String | State of the user account.active,blocked,ldap_,blocked_,banned,deactivatedExample: active |
theme_ | Integer | Theme ID of the user Example: 2 |
twitter | String | Twitter username of the user |
two_ | Boolean | If true,Example: true |
username | String | Username of the user Example: admin |
web_ | String | URL of the user’s profile Example: https: |
website_ | String | Website of the user |
work_ | String | — |
APIEntitiesUserStatus
| Property | Type | Description |
|---|---|---|
availability | String | Example:busy |
clear_ | String (date- | Example:2026- |
emoji | String | Example:coffee |
message | String | Example:I crave coffee |
message_ | String | Example:<p dir="auto">I crave coffee</ |
APIEntitiesUserSupportPin
| Property | Type | Description |
|---|---|---|
expires_ | String (date- | The expiration time of the PIN |
pin | String | The security PIN |
APIEntitiesUserWithAdmin
| Property | Type | Description |
|---|---|---|
avatar_ | String | Example:/ |
avatar_ | String | URL of the user’s avatar Example: https: |
bio | String | Biography of the user |
bot | Boolean | — |
can_ | Boolean | If true,Example: true |
can_ | Boolean | If true,Example: true |
color_ | Integer | Color scheme ID of the user Example: 1 |
commit_ | String | — |
confirmed_ | String (date- | Confirmation date and time of the user in ISO 8601 format Example: 2015- |
created_ | String (date- | Creation date and time of the user account in ISO 8601 format |
created_ | APIEntities | User who created the account,null if the user registered the account themselves |
current_ | String (date- | Current sign- Example: 2015- |
custom_ | Array of APIEntities | — |
discord | String | Discord user ID of the user |
email | String | Email address of the user Example: john@example. |
external | Boolean | If true, |
followers | String | — |
following | String | — |
github | String | Git |
id | Integer (int64) | ID of the user Example: 1 |
identities | Array of APIEntities | Identities associated with the user.group_ provider also has saml_ |
is_ | String | — |
is_ | String | — |
job_ | String | Job title of the user |
last_ | String (date- | Last activity date of the user Example: 2015- |
last_ | String (date- | Last sign- Example: 2015- |
linkedin | String | Linked |
local_ | String | — |
location | String | Location of the user |
locked | Boolean | If true, |
name | String | Name of the user.**** if the current user cannot read the bot’s project or groupExample: Administrator |
namespace_ | String | — |
note | String | — |
organization | String | Organization of the user |
preferred_ | String | Example:en |
private_ | Boolean | If true,Example: false |
projects_ | Integer | Project limit of the user Example: 10 |
pronouns | String | Pronouns of the user |
provisioned_ | Integer | ID of the project that provisioned the user. |
public_ | String | Public email address of the user Example: john@example. |
state | String | State of the user account.active,blocked,ldap_,blocked_,banned,deactivatedExample: active |
theme_ | Integer | Theme ID of the user Example: 2 |
twitter | String | Twitter username of the user |
two_ | Boolean | If true,Example: true |
username | String | Username of the user Example: admin |
web_ | String | URL of the user’s profile Example: https: |
website_ | String | Website of the user |
work_ | String | — |