Use this API to retrieve and upload avatars for users, groups, and projects.
Return avatar url for a user
GET /api/v4/avatar
Parameters
| Name | Type | Description |
|---|---|---|
emailQuery, | String | Public email address of the user |
sizeQuery | Integer | Single pixel dimension for Gravatar images |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
Download a group avatar
GET /api/v4/groups/{id}/avatar
Downloads a group avatar image.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID of the group |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | String (binary) (application/) |
400 | Bad Request | — |
404 | Not Found | — |
Download a project avatar
GET /api/v4/projects/{id}/avatar
Downloads a project avatar. You can access this endpoint without authentication if the project is publicly accessible. This feature was introduced in GitLab 16.9.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | String (binary) (application/) |
400 | Bad Request | — |
404 | Not Found | — |
Upload an avatar
PUT /api/v4/user/avatar
Uploads an avatar for the currently authenticated user. This feature was introduced in GitLab 17.0.
Request body (multipart/form-data)
| Property | Type | Description |
|---|---|---|
avatarRequired | String (binary) | The avatar file (generated by Multipart middleware) |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesAvatar
| Property | Type | Description |
|---|---|---|
avatar_ | String | — |