How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Forgejo user API

The user API from Forgejo — 54 operation(s) for user.

Forgejo user API is one of 10 APIs that Forgejo publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include User. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

This API exposes 80 operations across 54 paths, and defines 77 schemas. It is described by OpenAPI 2.0, at version 16.0.0-dev-465-4b83448b7d+gitea-1.22.0.

Requests are made against the base URL https://code.forgejo.org/api/v1.

80 operations 54 paths 77 schemas 12 DELETE47 GET3 PATCH12 POST6 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 2.0
API Version
16.0.0-dev-465-4b83448b7d+gitea-1.22.0
Base URL
https://code.forgejo.org/api/v1
Authentication
API Key, basic, API Key, API Key, API Key
Resource Areas
1

Authentication & Security 5

Forgejo user API declares 5 security schemes for authenticating requests. An API key is passed in the header as Authorization (AuthorizationHeaderToken). It defines a basic scheme (BasicAuth). An API key is passed in the header as Sudo (SudoHeader). An API key is passed in the query as sudo (SudoParam). An API key is passed in the header as X-FORGEJO-OTP (TOTPHeader). By default, every request must be authenticated.

  • AuthorizationHeaderToken — API tokens must be prepended with "token" followed by a space.
  • SudoHeader — Sudo API request as the user provided as the key. Admin privileges are required.
  • SudoParam — Sudo API request as the user provided as the key. Admin privileges are required.
  • TOTPHeader — Must be used in combination with BasicAuth if two-factor authentication is enabled.

Paths & Operations 80

Across 54 paths, the API surfaces 80 operations — 12 DELETE, 47 GET, 3 PATCH, 12 POST, 6 PUT. Each is listed below with its method, path, parameters, and response codes.

user 80
GET
/user
Get the authenticated user
userGetCurrent → 200401403
GET
/user/actions/runners
Get the user's runners
getUserRunners 3 params → 200400401404
POST
/user/actions/runners
Register a new user-level runner
registerUserRunner 1 param → 201400401404
GET
/user/actions/runners/jobs
Search for user's action jobs according filter conditions
userSearchRunJobs 1 param → 200401403
GET
/user/actions/runners/registration-tokendeprecated
Get the user's runner registration token
userGetRunnerRegistrationToken → 200401403
GET
/user/actions/runners/{runner_id}
Get a particular runner that belongs to the user
getUserRunner 1 param → 200400401404
DELETE
/user/actions/runners/{runner_id}
Delete a particular user-level runner
deleteUserRunner 1 param → 204400401404
PUT
/user/actions/secrets/{secretname}
Create or Update a secret value in a user scope
updateUserSecret 2 params → 201204400401403404
DELETE
/user/actions/secrets/{secretname}
Delete a secret in a user scope
deleteUserSecret 1 param → 204400401403404
GET
/user/actions/variables
Get the user-level list of variables which is created by current doer
getUserVariablesList 2 params → 200400401403404
GET
/user/actions/variables/{variablename}
Get a user-level variable which is created by current doer
getUserVariable 1 param → 200400401403404
PUT
/user/actions/variables/{variablename}
Update a user-level variable which is created by current doer
updateUserVariable 2 params → 201204400401403404
POST
/user/actions/variables/{variablename}
Create a user-level variable
createUserVariable 2 params → 201204400401403404
DELETE
/user/actions/variables/{variablename}
Delete a user-level variable which is created by current doer
deleteUserVariable 1 param → 201204400401403404
POST
/user/activitypub/follow
Follow a remote activitypub account
userCurrentActivityPubFollow 1 param → 204401403404
GET
/user/applications/oauth2
List the authenticated user's oauth2 applications
userGetOAuth2Applications 2 params → 200401403
POST
/user/applications/oauth2
Creates a new OAuth2 application
userCreateOAuth2Application 1 param → 201400401403
GET
/user/applications/oauth2/{id}
Get an OAuth2 application
userGetOAuth2Application 1 param → 200401403404
DELETE
/user/applications/oauth2/{id}
Delete an OAuth2 application
userDeleteOAuth2Application 1 param → 204401403404
PATCH
/user/applications/oauth2/{id}
Update an OAuth2 application, this includes regenerating the client secret
userUpdateOAuth2Application 2 params → 200401403404
POST
/user/avatar
Update avatar of the current user
userUpdateAvatar 1 param → 204401403
DELETE
/user/avatar
Delete avatar of the current user. It will be replaced by a default one
userDeleteAvatar → 204401403
PUT
/user/block/{username}
Blocks a user from the doer
userBlockUser 1 param → 204401403404422
GET
/user/emails
List all email addresses of the current user
userListEmails → 200401403
POST
/user/emails
Add an email addresses to the current user's account
userAddEmail 1 param → 201401403422
DELETE
/user/emails
Delete email addresses from the current user's account
userDeleteEmail 1 param → 204401403404
GET
/user/followers
List the authenticated user's followers
userCurrentListFollowers 2 params → 200401403
GET
/user/following
List the users that the authenticated user is following
userCurrentListFollowing 2 params → 200401403
GET
/user/following/{username}
Check whether a user is followed by the authenticated user
userCurrentCheckFollowing 1 param → 204401403404
PUT
/user/following/{username}
Follow a user
userCurrentPutFollow 1 param → 204401403404
DELETE
/user/following/{username}
Unfollow a user
userCurrentDeleteFollow 1 param → 204401403404
GET
/user/gpg_key_token
Get a Token to verify
getVerificationToken → 200401403404
POST
/user/gpg_key_verify
Verify a GPG key
userVerifyGPGKey 1 param → 201401403404422
GET
/user/gpg_keys
List the authenticated user's GPG keys
userCurrentListGPGKeys 2 params → 200401403
POST
/user/gpg_keys
Add a GPG public key to current user's account
userCurrentPostGPGKey 1 param → 201401403404422
GET
/user/gpg_keys/{id}
Get a GPG key
userCurrentGetGPGKey 1 param → 200401403404
DELETE
/user/gpg_keys/{id}
Remove a GPG public key from current user's account
userCurrentDeleteGPGKey 1 param → 204401403404
GET
/user/hooks
List the authenticated user's webhooks
userListHooks 2 params → 200401403
POST
/user/hooks
Create a hook
userCreateHook 1 param → 201401403
GET
/user/hooks/{id}
Get a hook
userGetHook 1 param → 200401403
DELETE
/user/hooks/{id}
Delete a hook
userDeleteHook 1 param → 204401403
PATCH
/user/hooks/{id}
Update a hook
userEditHook 2 params → 200401403
GET
/user/keys
List the authenticated user's public keys
userCurrentListKeys 3 params → 200401403
POST
/user/keys
Create a public key
userCurrentPostKey 1 param → 201401403422
GET
/user/keys/{id}
Get a public key
userCurrentGetKey 1 param → 200401403404
DELETE
/user/keys/{id}
Delete a public key
userCurrentDeleteKey 1 param → 204401403404
GET
/user/list_blocked
List the authenticated user's blocked users
userListBlockedUsers 2 params → 200401403
GET
/user/quota
Get quota information for the authenticated user
userGetQuota → 200401403
GET
/user/quota/artifacts
List the artifacts affecting the authenticated user's quota
userListQuotaArtifacts 2 params → 200401403
GET
/user/quota/attachments
List the attachments affecting the authenticated user's quota
userListQuotaAttachments 2 params → 200401403
GET
/user/quota/check
Check if the authenticated user is over quota for a given subject
userCheckQuota 1 param → 200401403422
GET
/user/quota/packages
List the packages affecting the authenticated user's quota
userListQuotaPackages 2 params → 200401403
GET
/user/repos
List the repos that the authenticated user owns
userCurrentListRepos 3 params → 200401403422
POST
/user/repos
Create a repository
createCurrentUserRepo 1 param → 201400401403409413422
GET
/user/settings
Get current user's account settings
getUserSettings → 200401403
PATCH
/user/settings
Update settings in current user's account
updateUserSettings 1 param → 200401403
GET
/user/starred
The repos that the authenticated user has starred
userCurrentListStarred 2 params → 200401403
GET
/user/starred/{owner}/{repo}
Whether the authenticated is starring the repo
userCurrentCheckStarring 2 params → 204401403404
PUT
/user/starred/{owner}/{repo}
Star the given repo
userCurrentPutStar 2 params → 204401403404
DELETE
/user/starred/{owner}/{repo}
Unstar the given repo
userCurrentDeleteStar 2 params → 204401403404
GET
/user/stopwatches
Get list of all existing stopwatches
userGetStopWatches 2 params → 200401403
GET
/user/subscriptions
List repositories watched by the authenticated user
userCurrentListSubscriptions 2 params → 200401403
GET
/user/teams
List all the teams a user belongs to
userListTeams 2 params → 200401403
GET
/user/times
List the current user's tracked times
userCurrentTrackedTimes 4 params → 200401403
PUT
/user/unblock/{username}
Unblocks a user from the doer
userUnblockUser 1 param → 204401403404422
GET
/users/search
Search for users
userSearch 5 params → 200
GET
/users/{username}
Get a user
userGet 1 param → 200404
GET
/users/{username}/activities/feeds
List a user's activity feeds
userListActivityFeeds 5 params → 200404
GET
/users/{username}/followers
List the given user's followers
userListFollowers 3 params → 200404
GET
/users/{username}/following
List the users that the given user is following
userListFollowing 3 params → 200404
GET
/users/{username}/following/{target}
Check if one user is following another user
userCheckFollowing 2 params → 204404
GET
/users/{username}/gpg_keys
List the given user's GPG keys
userListGPGKeys 3 params → 200404
GET
/users/{username}/heatmap
Get a user's heatmap
userGetHeatmapData 1 param → 200404
GET
/users/{username}/keys
List the given user's public keys
userListKeys 4 params → 200404
GET
/users/{username}/repos
List the repos owned by the given user
userListRepos 3 params → 200404
GET
/users/{username}/starred
The repos that the given user has starred
userListStarred 3 params → 200404
GET
/users/{username}/subscriptions
List the repositories watched by a user
userListSubscriptions 3 params → 200404
GET
/users/{username}/tokens
List the specified user's access tokens
userGetTokens 3 params → 200403404
POST
/users/{username}/tokens
Generate an access token for the specified user
userCreateToken 2 params → 201400403404
DELETE
/users/{username}/tokens/{token}
Delete an access token from the specified user's account
userDeleteAccessToken 2 params → 204403404422

Schemas 77

The contract defines 77 schemas that model the data the API accepts and returns. The most detailed are Repository (66 properties), Issue (25 properties), User (23 properties), GPGKey (13 properties). Each schema is shown below with its type and property counts.

Team
object
Team represents a team in an organization
9 properties
APIUnauthorizedError
object
2 properties
APIValidationError
object
2 properties
DeleteEmailOption
object
DeleteEmailOption options when deleting email addresses
1 property
Issue
object
Issue represents an issue in a repository
25 properties
Milestone
object
Milestone milestone is a collection of issues on one repository
10 properties
TimeStamp
integer
TimeStamp defines a timestamp
ExternalWiki
object
ExternalWiki represents setting for external wiki
1 property
QuotaUsedPackage
object
QuotaUsedPackage represents a package counting towards a user's quota
5 properties
QuotaUsedSizeGit
object
QuotaUsedSizeGit represents the size-based git (lfs) quota usage of a user
1 property
InternalTracker
object
InternalTracker represents settings for internal tracker
3 properties
QuotaUsedSizeAssetsPackages
object
QuotaUsedSizeAssetsPackages represents the size-based package quota usage of a user
1 property
CreateOrUpdateSecretOption
object
1 property 1 required
CreateHookOption
object
CreateHookOption options when create a hook
6 properties 2 required
CreateHookOptionConfig
object
CreateHookOptionConfig has all config options in it required are "contenttype" and "url" Required
GPGKey
object
GPGKey a user GPG key to sign commit and tag in repository
13 properties
CreateKeyOption
object
CreateKeyOption options when creating a key
3 properties 2 required
PullRequestMeta
object
PullRequestMeta PR info if an issue is a PR
4 properties
Repository
object
Repository represents a repository
66 properties
User
object
User represents a user
23 properties
StopWatch
object
StopWatch represent a running stopwatch
7 properties
QuotaUsedPackageList
array
QuotaUsedPackageList represents a list of packages counting towards a user's quota
Activity
object
13 properties
QuotaUsedArtifactList
array
QuotaUsedArtifactList represents a list of artifacts counting towards a user's quota
APINotFound
object
3 properties
ActionRunner
object
ActionRunner represents a runner
10 properties
QuotaUsedAttachment
object
QuotaUsedAttachment represents an attachment counting towards a user's quota
4 properties
Email
object
Email an email address belonging to a user
5 properties
GPGKeyEmail
object
GPGKeyEmail an email attached to a GPGKey
2 properties
RepoTargetOption
object
2 properties 2 required
RegisterRunnerOptions
object
3 properties 1 required
CreateVariableOption
object
1 property 1 required
UserSettingsOptions
object
UserSettingsOptions represents options to change user settings
12 properties
QuotaUsedSize
object
QuotaUsedSize represents the size-based quota usage of a user
3 properties
QuotaUsedArtifact
object
QuotaUsedArtifact represents an artifact counting towards a user's quota
3 properties
APRemoteFollowOption
object
1 property
Hook
object
Hook a hook is a web hook when one repository changed
12 properties
QuotaGroup
object
QuotaGroup represents a quota group
2 properties
EditHookOption
object
EditHookOption options when modify one hook
5 properties
RegistrationToken
object
RegistrationToken is a string used to register a runner with a server
1 property
UserHeatmapData
object
UserHeatmapData represents the data needed to create a heatmap
2 properties
Organization
object
Organization represents an organization
12 properties
VerifyGPGKeyOption
object
VerifyGPGKeyOption options verifies user GPG key
2 properties 1 required
QuotaRuleInfo
object
QuotaRuleInfo contains information about a quota rule
3 properties
QuotaUsedAttachmentList
array
QuotaUsedAttachmentList represents a list of attachment counting towards a user's quota
CreateEmailOption
object
CreateEmailOption options when creating email addresses
1 property
RepositoryMeta
object
RepositoryMeta basic repository information
4 properties
Attachment
object
Attachment a generic attachment
8 properties
CreateGPGKeyOption
object
CreateGPGKeyOption options create user GPG key
2 properties 1 required
UserSettings
object
UserSettings represents user settings
12 properties
QuotaGroupList
array
QuotaGroupList represents a list of quota groups
CreateRepoOption
object
CreateRepoOption options when creating repository
12 properties 1 required
QuotaUsed
object
QuotaUsed represents the quota usage of a user
1 property
RepoTransfer
object
RepoTransfer represents a pending repo transfer
3 properties
QuotaUsedSizeAssetsAttachments
object
QuotaUsedSizeAssetsAttachments represents the size-based attachment quota usage of a user
2 properties
StateType
string
StateType issue state type
OAuth2Application
object
7 properties
BlockedUser
object
2 properties
CreateAccessTokenOption
object
CreateAccessTokenOption options when create access token
3 properties 1 required
Permission
object
Permission represents a set of permissions
3 properties
APIForbiddenError
object
2 properties
UpdateUserAvatarOption
object
UpdateUserAvatarUserOption options when updating the user avatar
1 property
ActionRunJob
object
ActionRunJob represents a job of a run
11 properties
PublicKey
object
PublicKey publickey is a user key to push code to repository
11 properties
TrackedTime
object
TrackedTime worked time for an issue / pr
7 properties
ActionVariable
object
ActionVariable return value of the query API
4 properties
CreateOAuth2ApplicationOptions
object
CreateOAuth2ApplicationOptions holds options to create an oauth2 application
3 properties
RegisterRunnerResponse
object
3 properties
QuotaUsedSizeAssets
object
QuotaUsedSizeAssets represents the size-based asset usage of a user
3 properties
QuotaInfo
object
QuotaInfo represents information about a user's quota
2 properties
Label
object
Label a label to an issue or a pr
7 properties
ExternalTracker
object
ExternalTracker represents settings for external tracker
4 properties
Comment
object
Comment represents a comment on a commit or issue
11 properties
QuotaUsedSizeRepos
object
QuotaUsedSizeRepos represents the size-based repository quota usage of a user
2 properties
APIError
object
APIError is an api error with a message
2 properties
UpdateVariableOption
object
2 properties 1 required
AccessToken
object
7 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

forgejo-user-api-openapi.yml Raw ↑

Other APIs Forgejo publishes across the network.

Forgejo activitypub API
Forgejo admin API
Forgejo issue API
Forgejo miscellaneous API
Forgejo notification API
Forgejo organization API
Forgejo package API
Forgejo repository API
Forgejo settings API
Where this information came from

This is an independent, third-party profile of Forgejo user API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.