User Object
The User object represents a user account in Gitea.The unique identifier of the user
The username of the user (also available as
username)Identifier provided by external authenticator (if configured)
The ID of the user’s authentication source
The user’s full name
The user’s email address
URL to the user’s avatar
URL to the user’s Gitea profile page
User’s preferred language
Whether the user is an administrator
Timestamp of the user’s last login
Timestamp when the user account was created
Whether the user is restricted
Whether the user account is active
Whether the user is prohibited from logging in
The user’s location
The user’s website URL
The user’s description/bio
User visibility level:
public, limited, or privateNumber of users following this user
Number of users this user is following
Number of repositories starred by this user
Search Users
GET /users/search
Search for users by keyword
Query Parameters
Search keyword
ID of the user to search for
Page number of results to return (1-based)
Page size of results
Example Request
Response
Get a User
GET /users/{username}
Get information about a specific user
Path Parameters
The username of the user to retrieve
Example Request
Response
Get Authenticated User
GET /user
Get information about the currently authenticated user
Example Request
Response
Returns a User object for the authenticated user.User Heatmap
GET /users/{username}/heatmap
Get a user’s contribution heatmap data
Path Parameters
The username of the user
Example Request
Response
Returns an array of contribution data points with timestamps and contribution counts.Followers & Following
List Followers
Get a user’s followers
List Following
Get users a user is following
Follow User
Follow a user
Unfollow User
Unfollow a user
List Followers
GET /users/{username}/followers
List all users following the specified user
Path Parameters
The username of the user
Query Parameters
Page number of results to return (1-based)
Page size of results
Example Request
List Following
GET /users/{username}/following
List all users that the specified user is following
Path Parameters
The username of the user
Query Parameters
Page number of results to return (1-based)
Page size of results
Example Request
Check Following Status
GET /users/{username}/following/{target}
Check if one user is following another
Path Parameters
The username of the following user
The username of the followed user
Example Request
204 No Content if following, 404 Not Found otherwise.
Follow User
PUT /user/following/{username}
Follow a user (requires authentication)
Path Parameters
The username of the user to follow
Example Request
Unfollow User
DELETE /user/following/{username}
Unfollow a user (requires authentication)
Path Parameters
The username of the user to unfollow
Example Request
Authenticated User Endpoints
List My Followers
GET /user/followers
List all users following the authenticated user
List My Following
GET /user/following
List all users that the authenticated user is following
Check My Following
GET /user/following/{username}
Check if the authenticated user is following a specific user
SSH Keys
List Keys
Get a user’s SSH keys
Get Key
Get a specific SSH key
Add Key
Add a new SSH key
Delete Key
Remove an SSH key
List SSH Keys
GET /users/{username}/keys
List all public SSH keys for a user
Path Parameters
The username of the user
Query Parameters
Filter by SSH key fingerprint
Page number of results to return (1-based)
Page size of results
Example Request
List My SSH Keys
GET /user/keys
List all SSH keys for the authenticated user
Get SSH Key
GET /user/keys/{id}
Get details about a specific SSH key
Path Parameters
The ID of the SSH key
Example Request
Add SSH Key
POST /user/keys
Add a new SSH key for the authenticated user
Request Body
The title/name for this SSH key
The SSH public key content
Example Request
Delete SSH Key
DELETE /user/keys/{id}
Delete an SSH key
Path Parameters
The ID of the SSH key to delete
Example Request
Activity Feeds
GET /users/{username}/activities/feeds
List a user’s activity feeds
Path Parameters
The username of the user
Query Parameters
If true, only show actions performed by the user
The date of the activities to be found (format: YYYY-MM-DD)
Page number of results to return (1-based)
Page size of results
Example Request
Related Endpoints
For more user-related endpoints, see:- Organizations API - List user’s organizations
- Teams API - List user’s teams
- Repositories API - List user’s repositories