Forgejo admin API is one of 10 APIs that Forgejo publishes on the APIs.io network, described by a machine-readable OpenAPI specification.
Tagged areas include Admin. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.
This API exposes
51 operations
across 34 paths,
and defines 52 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.
51 operations34 paths52 schemas11 DELETE22 GET3 PATCH13 POST2 PUT
Metadata
The identity and technical contract details declared by the specification.
Forgejo admin 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 51
Across 34 paths, the API surfaces 51 operations — 11 DELETE, 22 GET, 3 PATCH, 13 POST, 2 PUT. Each is listed below with its method, path, parameters, and response codes.
admin 51
GET
/admin/actions/runners
Get all runners, no matter whether they are global runners or scoped to an organization, user, or repository
Get a runner registration token for registering global runners
adminGetRegistrationToken→ 200
GET
/admin/unadopted
List unadopted repositories
adminUnadoptedList3 params→ 200403
POST
/admin/unadopted/{owner}/{repo}
Adopt unadopted files as a repository
adminAdoptRepository2 params→ 204403404
DELETE
/admin/unadopted/{owner}/{repo}
Delete unadopted files
adminDeleteUnadoptedRepository2 params→ 204403
GET
/admin/users
Search users according filter conditions
adminSearchUsers6 params→ 200403
POST
/admin/users
Create a user account
adminCreateUser1 param→ 201400403422
DELETE
/admin/users/{username}
Delete user account
adminDeleteUser2 params→ 204403404422
PATCH
/admin/users/{username}
Edit an existing user
adminEditUser2 params→ 200400403422
GET
/admin/users/{username}/emails
List all email addresses for a user
adminListUserEmails1 param→ 200403404
DELETE
/admin/users/{username}/emails
Delete email addresses from a user's account
adminDeleteUserEmails2 params→ 204403422
POST
/admin/users/{username}/keys
Add an SSH public key to user's account
adminCreatePublicKey2 params→ 201403422
DELETE
/admin/users/{username}/keys/{id}
Remove a public key from user's account
adminDeleteUserPublicKey2 params→ 204403404
POST
/admin/users/{username}/orgs
Create an organization
adminCreateOrg2 params→ 201403422
GET
/admin/users/{username}/quota
Get the user's quota info
adminGetUserQuota1 param→ 200400403404422
POST
/admin/users/{username}/quota/groups
Set the user's quota groups to a given list.
adminSetUserQuotaGroups2 params→ 204400403404422
POST
/admin/users/{username}/rename
Rename a user
adminRenameUser2 params→ 204403422
POST
/admin/users/{username}/repos
Create a repository on behalf of a user
adminCreateRepo2 params→ 201400403404409422
GET
/admin/users/{username}/tokens
List the specified user's access tokens
adminListUserAccessTokens3 params→ 200403404
POST
/admin/users/{username}/tokens
Create an access token for the specified user
adminCreateUserAccessToken2 params→ 201400403404
DELETE
/admin/users/{username}/tokens/{token}
Delete an access token for the specified user
adminDeleteUserAccessToken2 params→ 204403404422
Schemas 52
The contract defines 52 schemas that model the data the API accepts and returns. The most detailed are Repository (66 properties), User (23 properties), EditUserOption (20 properties), Organization (12 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
ExternalWiki
object
ExternalWiki represents setting for external wiki
1 property
Cron
object
Cron represents a Cron task
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
CreateHookOption
object
CreateHookOption options when create a hook
6 properties2 required
CreateHookOptionConfig
object
CreateHookOptionConfig has all config options in it required are "contenttype" and "url" Required
CreateKeyOption
object
CreateKeyOption options when creating a key
3 properties2 required
Repository
object
Repository represents a repository
66 properties
User
object
User represents a user
23 properties
APINotFound
object
3 properties
ActionRunner
object
ActionRunner represents a runner
10 properties
Email
object
Email an email address belonging to a user
5 properties
CreateUserOption
object
CreateUserOption create user options
11 properties2 required
RepoTargetOption
object
2 properties2 required
RegisterRunnerOptions
object
3 properties1 required
RenameUserOption
object
RenameUserOption options when renaming a user
1 property1 required
QuotaUsedSize
object
QuotaUsedSize represents the size-based quota usage of a user
3 properties
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
Organization
object
Organization represents an organization
12 properties
QuotaRuleInfo
object
QuotaRuleInfo contains information about a quota rule
3 properties
CreateQuotaGroupOptions
object
CreateQutaGroupOptions represents the options for creating a quota group
2 properties
RepositoryMeta
object
RepositoryMeta basic repository information
4 properties
SetUserQuotaGroupsOptions
object
SetUserQuotaGroupsOptions represents the quota groups of a user
1 property1 required
QuotaGroupList
array
QuotaGroupList represents a list of quota groups
CreateRepoOption
object
CreateRepoOption options when creating repository
12 properties1 required
QuotaUsed
object
QuotaUsed represents the quota usage of a user
1 property
CreateQuotaRuleOptions
object
CreateQuotaRuleOptions represents the options for creating a quota rule
3 properties
EditUserOption
object
EditUserOption edit user options
20 properties
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
CreateAccessTokenOption
object
CreateAccessTokenOption options when create access token
3 properties1 required
Permission
object
Permission represents a set of permissions
3 properties
APIForbiddenError
object
2 properties
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
CreateOrgOption
object
CreateOrgOption options for creating an organization
8 properties1 required
RegisterRunnerResponse
object
3 properties
EditQuotaRuleOptions
object
EditQuotaRuleOptions represents the options for editing a quota rule
2 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
ExternalTracker
object
ExternalTracker represents settings for external tracker
4 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
AccessToken
object
7 properties
Specification
The full machine-readable OpenAPI contract behind this narrative.
Every API here is available over the API and to AI agents over MCP. APIs is not yet its own endpoint on the v1 API. Reach this content through network search and the tag graph, or the MCP server below.
Installs https://mcp.apievangelist.com/mcp in Claude, Cursor, VS Code and the rest — one button, every client.
MCP tools for apis
4 tools reach this content
search_api_evangelistSearch every content type across the network at once.
find_relatedThe shared-tag relevance graph — what else covers this.
get_tagEverything one tag labels, across all content types.
guide_topicPRO — a curated bundle for a topic: area, guidance, rules, papers, stories, services.
A second provider on the same verified email joins the account you already have.
Your account
ⓘWhere this information came from
This is an independent, third-party profile of Forgejo admin 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.