Gitea

Gitea API.

This documentation describes the Gitea API.

Developer tools#openapi#developer-tools

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

This documentation describes the Gitea API.

Endpoints 325

activitypub

  • GETReturns the Person actor for a user/activitypub/user/:username
  • POSTSend to the inbox/activitypub/user/:username/inbox

admin

  • GETList cron tasks/admin/cron?page=0&limit=0
  • POSTRun cron task/admin/cron/:task
  • GETList system's webhooks/admin/hooks?page=0&limit=0
  • POSTCreate a hook/admin/hooks
  • GETGet a hook/admin/hooks/:id
  • PATCHUpdate a hook/admin/hooks/:id
  • GETList all organizations/admin/orgs?page=0&limit=0
  • GETList unadopted repositories/admin/unadopted?page=0&limit=0&pattern=string
  • POSTAdopt unadopted files as a repository/admin/unadopted/:owner/:repo
  • DELETEDelete unadopted files/admin/unadopted/:owner/:repo
  • GETList all users/admin/users?page=0&limit=0
  • POSTCreate a user/admin/users
  • DELETEDelete a user/admin/users/:username
  • PATCHEdit an existing user/admin/users/:username
  • POSTAdd a public key on behalf of a user/admin/users/:username/keys
  • DELETEDelete a user's public key/admin/users/:username/keys/:id
  • POSTCreate an organization/admin/users/:username/orgs
  • POSTCreate a repository on behalf of a user/admin/users/:username/repos
  • DELETEDelete a hook/amdin/hooks/:id

miscellaneous

  • POSTRender a markdown document as HTML/markdown
  • POSTRender raw markdown as HTML/markdown/raw
  • GETReturns the nodeinfo of the Gitea application/nodeinfo
  • GETGet default signing-key.gpg/signing-key.gpg
  • GETReturns the version of the Gitea application/version

notification

  • GETList users's notification threads/notifications?all=true&status-types=string&subject-type=issue&since=2024-01-01T00:00:00Z&before=2024-01-01T00:00:00Z&page=0&limit=0
  • PUTMark notification threads as read, pinned or unread/notifications?last_read_at=2024-01-01T00:00:00Z&all=string&status-types=string&to-status=string
  • GETCheck if unread notifications exist/notifications/new
  • GETGet notification thread by ID/notifications/threads/:id
  • PATCHMark notification thread as read by ID/notifications/threads/:id?to-status=read
  • GETList users's notification threads on a specific repo/repos/:owner/:repo/notifications?all=true&status-types=string&subject-type=issue&since=2024-01-01T00:00:00Z&before=2024-01-01T00:00:00Z&page=0&limit=0
  • PUTMark notification threads as read, pinned or unread on a specific repo/repos/:owner/:repo/notifications?all=string&status-types=string&to-status=string&last_read_at=2024-01-01T00:00:00Z

organization

  • POSTCreate a repository in an organization/org/:org/reposDeprecated.
  • GETGet list of organizations/orgs?page=0&limit=0
  • POSTCreate an organization/orgs
  • GETGet an organization/orgs/:org
  • DELETEDelete an organization/orgs/:org
  • PATCHEdit an organization/orgs/:org
  • GETList an organization's webhooks/orgs/:org/hooks?page=0&limit=0
  • POSTCreate a hook/orgs/:org/hooks
  • GETGet a hook/orgs/:org/hooks/:id
  • DELETEDelete a hook/orgs/:org/hooks/:id
  • PATCHUpdate a hook/orgs/:org/hooks/:id
  • GETList an organization's labels/orgs/:org/labels?page=0&limit=0
  • POSTCreate a label for an organization/orgs/:org/labels
  • GETGet a single label/orgs/:org/labels/:id
  • DELETEDelete a label/orgs/:org/labels/:id
  • PATCHUpdate a label/orgs/:org/labels/:id
  • GETList an organization's members/orgs/:org/members?page=0&limit=0
  • GETCheck if a user is a member of an organization/orgs/:org/members/:username
  • DELETERemove a member from an organization/orgs/:org/members/:username
  • GETList an organization's public members/orgs/:org/public_members?page=0&limit=0
  • GETCheck if a user is a public member of an organization/orgs/:org/public_members/:username
  • PUTPublicize a user's membership/orgs/:org/public_members/:username
  • DELETEConceal a user's membership/orgs/:org/public_members/:username
  • GETList an organization's repos/orgs/:org/repos?page=0&limit=0
  • POSTCreate a repository in an organization/orgs/:org/repos
  • GETList an organization's teams/orgs/:org/teams?page=0&limit=0
  • POSTCreate a team/orgs/:org/teams
  • GETSearch for teams within an organization/orgs/:org/teams/search?q=string&include_desc=true&page=0&limit=0
  • GETGet a team/teams/:id
  • DELETEDelete a team/teams/:id
  • PATCHEdit a team/teams/:id
  • GETList a team's members/teams/:id/members?page=0&limit=0
  • GETList a particular member of team/teams/:id/members/:username
  • PUTAdd a team member/teams/:id/members/:username
  • DELETERemove a team member/teams/:id/members/:username
  • GETList a team's repos/teams/:id/repos?page=0&limit=0
  • GETList a particular repo of team/teams/:id/repos/:org/:repo
  • PUTAdd a repository to a team/teams/:id/repos/:org/:repo
  • DELETERemove a repository from a team/teams/:id/repos/:org/:repoThis does not delete the repository, it only removes the repository from the team.
  • GETList the current user's organizations/user/orgs?page=0&limit=0
  • GETList a user's organizations/users/:username/orgs?page=0&limit=0
  • GETGet user permissions in organization/users/:username/orgs/:org/permissions

package

  • GETGets all packages of an owner/packages/:owner?page=0&limit=0&type=cargo&q=string
  • GETGets a package/packages/:owner/:type/:name/:version
  • DELETEDelete a package/packages/:owner/:type/:name/:version
  • GETGets all files of a package/packages/:owner/:type/:name/:version/files

issue

  • GETSearch for issues across the repositories that the user has access to/repos/issues/search?state=string&labels=string&milestones=string&q=string&priority_repo_id=0&type=string&since=2024-01-01T00:00:00Z&before=2024-01-01T00:00:00Z&assigned=true&created=true&mentioned=true&review_requested=true&reviewed=true&owner=string&team=string&page=0&limit=0
  • GETList a repository's issues/repos/:owner/:repo/issues?state=closed&labels=string&q=string&type=issues&milestones=string&since=2024-01-01T00:00:00Z&before=2024-01-01T00:00:00Z&created_by=string&assigned_by=string&mentioned_by=string&page=0&limit=0
  • POSTCreate an issue. If using deadline only the date will be taken into account, and time of day ignored./repos/:owner/:repo/issues
  • GETList all comments in a repository/repos/:owner/:repo/issues/comments?since=2024-01-01T00:00:00Z&before=2024-01-01T00:00:00Z&page=0&limit=0
  • GETGet a comment/repos/:owner/:repo/issues/comments/:id
  • DELETEDelete a comment/repos/:owner/:repo/issues/comments/:id
  • PATCHEdit a comment/repos/:owner/:repo/issues/comments/:id
  • GETList comment's attachments/repos/:owner/:repo/issues/comments/:id/assets
  • POSTCreate a comment attachment/repos/:owner/:repo/issues/comments/:id/assets?name=string
  • GETGet a comment attachment/repos/:owner/:repo/issues/comments/:id/assets/:attachment_id
  • DELETEDelete a comment attachment/repos/:owner/:repo/issues/comments/:id/assets/:attachment_id
  • PATCHEdit a comment attachment/repos/:owner/:repo/issues/comments/:id/assets/:attachment_id
  • GETGet a list of reactions from a comment of an issue/repos/:owner/:repo/issues/comments/:id/reactions
  • POSTAdd a reaction to a comment of an issue/repos/:owner/:repo/issues/comments/:id/reactions
  • DELETERemove a reaction from a comment of an issue/repos/:owner/:repo/issues/comments/:id/reactions
  • GETGet an issue/repos/:owner/:repo/issues/:index
  • DELETEDelete an issue/repos/:owner/:repo/issues/:index
  • PATCHEdit an issue. If using deadline only the date will be taken into account, and time of day ignored./repos/:owner/:repo/issues/:index
  • GETList issue's attachments/repos/:owner/:repo/issues/:index/assets
  • POSTCreate an issue attachment/repos/:owner/:repo/issues/:index/assets?name=string
  • GETGet an issue attachment/repos/:owner/:repo/issues/:index/assets/:attachment_id
  • DELETEDelete an issue attachment/repos/:owner/:repo/issues/:index/assets/:attachment_id
  • PATCHEdit an issue attachment/repos/:owner/:repo/issues/:index/assets/:attachment_id
  • GETList all comments on an issue/repos/:owner/:repo/issues/:index/comments?since=2024-01-01T00:00:00Z&before=2024-01-01T00:00:00Z
  • POSTAdd a comment to an issue/repos/:owner/:repo/issues/:index/comments
  • DELETEDelete a comment/repos/:owner/:repo/issues/:index/comments/:idDeprecated.
  • PATCHEdit a comment/repos/:owner/:repo/issues/:index/comments/:idDeprecated.
  • POSTSet an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored./repos/:owner/:repo/issues/:index/deadline
  • GETGet an issue's labels/repos/:owner/:repo/issues/:index/labels
  • PUTReplace an issue's labels/repos/:owner/:repo/issues/:index/labels
  • POSTAdd a label to an issue/repos/:owner/:repo/issues/:index/labels
  • DELETERemove all labels from an issue/repos/:owner/:repo/issues/:index/labels
  • DELETERemove a label from an issue/repos/:owner/:repo/issues/:index/labels/:id
  • GETGet a list reactions of an issue/repos/:owner/:repo/issues/:index/reactions?page=0&limit=0
  • POSTAdd a reaction to an issue/repos/:owner/:repo/issues/:index/reactions
  • DELETERemove a reaction from an issue/repos/:owner/:repo/issues/:index/reactions
  • DELETEDelete an issue's existing stopwatch./repos/:owner/:repo/issues/:index/stopwatch/delete
  • POSTStart stopwatch on an issue./repos/:owner/:repo/issues/:index/stopwatch/start
  • POSTStop an issue's existing stopwatch./repos/:owner/:repo/issues/:index/stopwatch/stop
  • GETGet users who subscribed on an issue./repos/:owner/:repo/issues/:index/subscriptions?page=0&limit=0
  • GETCheck if user is subscribed to an issue/repos/:owner/:repo/issues/:index/subscriptions/check
  • PUTSubscribe user to issue/repos/:owner/:repo/issues/:index/subscriptions/:user
  • DELETEUnsubscribe user from issue/repos/:owner/:repo/issues/:index/subscriptions/:user
  • GETList all comments and events on an issue/repos/:owner/:repo/issues/:index/timeline?since=2024-01-01T00:00:00Z&page=0&limit=0&before=2024-01-01T00:00:00Z
  • GETList an issue's tracked times/repos/:owner/:repo/issues/:index/times?user=string&since=2024-01-01T00:00:00Z&before=2024-01-01T00:00:00Z&page=0&limit=0
  • POSTAdd tracked time to a issue/repos/:owner/:repo/issues/:index/times
  • DELETEReset a tracked time of an issue/repos/:owner/:repo/issues/:index/times
  • DELETEDelete specific tracked time/repos/:owner/:repo/issues/:index/times/:id
  • GETGet all of a repository's labels/repos/:owner/:repo/labels?page=0&limit=0
  • POSTCreate a label/repos/:owner/:repo/labels
  • GETGet a single label/repos/:owner/:repo/labels/:id
  • DELETEDelete a label/repos/:owner/:repo/labels/:id
  • PATCHUpdate a label/repos/:owner/:repo/labels/:id
  • GETGet all of a repository's opened milestones/repos/:owner/:repo/milestones?state=string&name=string&page=0&limit=0
  • POSTCreate a milestone/repos/:owner/:repo/milestones
  • GETGet a milestone/repos/:owner/:repo/milestones/:id
  • DELETEDelete a milestone/repos/:owner/:repo/milestones/:id
  • PATCHUpdate a milestone/repos/:owner/:repo/milestones/:id

repository

  • POSTMigrate a remote git repository/repos/migrate
  • GETSearch for repositories/repos/search?q=string&topic=true&includeDesc=true&uid=0&priority_owner_id=0&team_id=0&starredBy=0&private=true&is_private=true&template=true&archived=true&mode=string&exclusive=true&sort=string&order=string&page=0&limit=0
  • GETGet a repository/repos/:owner/:repo
  • DELETEDelete a repository/repos/:owner/:repo
  • PATCHEdit a repository's properties. Only fields that are set will be changed./repos/:owner/:repo
  • GETGet an archive of a repository/repos/:owner/:repo/archive/:archive
  • GETReturn all users that have write access and can be assigned to issues/repos/:owner/:repo/assignees
  • GETList branch protections for a repository/repos/:owner/:repo/branch_protections
  • POSTCreate a branch protections for a repository/repos/:owner/:repo/branch_protections
  • GETGet a specific branch protection for the repository/repos/:owner/:repo/branch_protections/:name
  • DELETEDelete a specific branch protection for the repository/repos/:owner/:repo/branch_protections/:name
  • PATCHEdit a branch protections for a repository. Only fields that are set will be changed/repos/:owner/:repo/branch_protections/:name
  • GETList a repository's branches/repos/:owner/:repo/branches?page=0&limit=0
  • POSTCreate a branch/repos/:owner/:repo/branches
  • GETRetrieve a specific branch from a repository, including its effective branch protection/repos/:owner/:repo/branches/:branch
  • DELETEDelete a specific branch from a repository/repos/:owner/:repo/branches/:branch
  • GETList a repository's collaborators/repos/:owner/:repo/collaborators?page=0&limit=0
  • GETCheck if a user is a collaborator of a repository/repos/:owner/:repo/collaborators/:collaborator
  • PUTAdd a collaborator to a repository/repos/:owner/:repo/collaborators/:collaborator
  • DELETEDelete a collaborator from a repository/repos/:owner/:repo/collaborators/:collaborator
  • GETGet repository permissions for a user/repos/:owner/:repo/collaborators/:collaborator/permission
  • GETGet a list of all commits from a repository/repos/:owner/:repo/commits?sha=string&path=string&stat=true&page=0&limit=0
  • GETGet a commit's combined status, by branch/tag/commit reference/repos/:owner/:repo/commits/:ref/status?page=0&limit=0
  • GETGet a commit's statuses, by branch/tag/commit reference/repos/:owner/:repo/commits/:ref/statuses?sort=oldest&state=pending&page=0&limit=0
  • GETGets the metadata of all the entries of the root dir/repos/:owner/:repo/contents?ref=string
  • GETGets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir/repos/:owner/:repo/contents/:filepath?ref=string
  • PUTUpdate a file in a repository/repos/:owner/:repo/contents/:filepath
  • POSTCreate a file in a repository/repos/:owner/:repo/contents/:filepath
  • DELETEDelete a file in a repository/repos/:owner/:repo/contents/:filepath
  • POSTApply diff patch to repository/repos/:owner/:repo/diffpatch
  • GETGet the EditorConfig definitions of a file in a repository/repos/:owner/:repo/editorconfig/:filepath?ref=string
  • GETList a repository's forks/repos/:owner/:repo/forks?page=0&limit=0
  • POSTFork a repository/repos/:owner/:repo/forks
  • GETGets the blob of a repository./repos/:owner/:repo/git/blobs/:sha
  • GETGet a single commit from a repository/repos/:owner/:repo/git/commits/:sha
  • GETGet a commit's diff or patch/repos/:owner/:repo/git/commits/:sha.:diffType
  • GETGet a note corresponding to a single commit from a repository/repos/:owner/:repo/git/notes/:sha
  • GETGet specified ref or filtered repository's refs/repos/:owner/:repo/git/refs
  • GETGet specified ref or filtered repository's refs/repos/:owner/:repo/git/refs/:ref
  • GETGets the tag object of an annotated tag (not lightweight tags)/repos/:owner/:repo/git/tags/:sha
  • GETGets the tree of a repository./repos/:owner/:repo/git/trees/:sha?recursive=true&page=0&per_page=0
  • GETList the hooks in a repository/repos/:owner/:repo/hooks?page=0&limit=0
  • POSTCreate a hook/repos/:owner/:repo/hooks
  • GETList the Git hooks in a repository/repos/:owner/:repo/hooks/git
  • GETGet a Git hook/repos/:owner/:repo/hooks/git/:id
  • DELETEDelete a Git hook in a repository/repos/:owner/:repo/hooks/git/:id
  • PATCHEdit a Git hook in a repository/repos/:owner/:repo/hooks/git/:id
  • GETGet a hook/repos/:owner/:repo/hooks/:id
  • DELETEDelete a hook in a repository/repos/:owner/:repo/hooks/:id
  • PATCHEdit a hook in a repository/repos/:owner/:repo/hooks/:id
  • POSTTest a push webhook/repos/:owner/:repo/hooks/:id/tests?ref=string
  • GETGet available issue templates for a repository/repos/:owner/:repo/issue_templates
  • GETList a repository's keys/repos/:owner/:repo/keys?key_id=0&fingerprint=string&page=0&limit=0
  • POSTAdd a key to a repository/repos/:owner/:repo/keys
  • GETGet a repository's key by id/repos/:owner/:repo/keys/:id
  • DELETEDelete a key from a repository/repos/:owner/:repo/keys/:id
  • GETGet languages and number of bytes of code written/repos/:owner/:repo/languages
  • GETGet a file or it's LFS object from a repository/repos/:owner/:repo/media/:filepath?ref=string
  • POSTSync a mirrored repository/repos/:owner/:repo/mirror-sync
  • GETList a repo's pull requests/repos/:owner/:repo/pulls?state=closed&sort=oldest&milestone=0&labels=0&page=0&limit=0
  • POSTCreate a pull request/repos/:owner/:repo/pulls
  • GETGet a pull request/repos/:owner/:repo/pulls/:index
  • PATCHUpdate a pull request. If using deadline only the date will be taken into account, and time of day ignored./repos/:owner/:repo/pulls/:index
  • GETGet a pull request diff or patch/repos/:owner/:repo/pulls/:index.:diffType?binary=true
  • GETGet commits for a pull request/repos/:owner/:repo/pulls/:index/commits?page=0&limit=0
  • GETGet changed files for a pull request/repos/:owner/:repo/pulls/:index/files?skip-to=string&whitespace=ignore-all&page=0&limit=0
  • GETCheck if a pull request has been merged/repos/:owner/:repo/pulls/:index/merge
  • POSTMerge a pull request/repos/:owner/:repo/pulls/:index/merge
  • DELETECancel the scheduled auto merge for the given pull request/repos/:owner/:repo/pulls/:index/merge
  • POSTcreate review requests for a pull request/repos/:owner/:repo/pulls/:index/requested_reviewers
  • DELETEcancel review requests for a pull request/repos/:owner/:repo/pulls/:index/requested_reviewers
  • GETList all reviews for a pull request/repos/:owner/:repo/pulls/:index/reviews?page=0&limit=0
  • POSTCreate a review to an pull request/repos/:owner/:repo/pulls/:index/reviews
  • GETGet a specific review for a pull request/repos/:owner/:repo/pulls/:index/reviews/:id
  • POSTSubmit a pending review to an pull request/repos/:owner/:repo/pulls/:index/reviews/:id
  • DELETEDelete a specific review from a pull request/repos/:owner/:repo/pulls/:index/reviews/:id
  • GETGet a specific review for a pull request/repos/:owner/:repo/pulls/:index/reviews/:id/comments
  • POSTDismiss a review for a pull request/repos/:owner/:repo/pulls/:index/reviews/:id/dismissals
  • POSTCancel to dismiss a review for a pull request/repos/:owner/:repo/pulls/:index/reviews/:id/undismissals
  • POSTMerge PR's baseBranch into headBranch/repos/:owner/:repo/pulls/:index/update?style=merge
  • GETGet all push mirrors of the repository/repos/:owner/:repo/push_mirrors?page=0&limit=0
  • POSTadd a push mirror to the repository/repos/:owner/:repo/push_mirrors
  • POSTSync all push mirrored repository/repos/:owner/:repo/push_mirrors-sync
  • GETGet push mirror of the repository by remoteName/repos/:owner/:repo/push_mirrors/:name
  • DELETEdeletes a push mirror from a repository by remoteName/repos/:owner/:repo/push_mirrors/:name
  • GETGet a file from a repository/repos/:owner/:repo/raw/:filepath?ref=string
  • GETList a repo's releases/repos/:owner/:repo/releases?draft=true&pre-release=true&per_page=0&page=0&limit=0
  • POSTCreate a release/repos/:owner/:repo/releases
  • GETGets the most recent non-prerelease, non-draft release of a repository, sorted by created_at/repos/:owner/:repo/releases/latest
  • GETGet a release by tag name/repos/:owner/:repo/releases/tags/:tag
  • DELETEDelete a release by tag name/repos/:owner/:repo/releases/tags/:tag
  • GETGet a release/repos/:owner/:repo/releases/:id
  • DELETEDelete a release/repos/:owner/:repo/releases/:id
  • PATCHUpdate a release/repos/:owner/:repo/releases/:id
  • GETList release's attachments/repos/:owner/:repo/releases/:id/assets
  • POSTCreate a release attachment/repos/:owner/:repo/releases/:id/assets?name=string
  • GETGet a release attachment/repos/:owner/:repo/releases/:id/assets/:attachment_id
  • DELETEDelete a release attachment/repos/:owner/:repo/releases/:id/assets/:attachment_id
  • PATCHEdit a release attachment/repos/:owner/:repo/releases/:id/assets/:attachment_id
  • GETReturn all users that can be requested to review in this repo/repos/:owner/:repo/reviewers
  • GETGet signing-key.gpg for given repository/repos/:owner/:repo/signing-key.gpg
  • GETList a repo's stargazers/repos/:owner/:repo/stargazers?page=0&limit=0
  • GETGet a commit's statuses/repos/:owner/:repo/statuses/:sha?sort=oldest&state=pending&page=0&limit=0
  • POSTCreate a commit status/repos/:owner/:repo/statuses/:sha
  • GETList a repo's watchers/repos/:owner/:repo/subscribers?page=0&limit=0
  • GETCheck if the current user is watching a repo/repos/:owner/:repo/subscription
  • PUTWatch a repo/repos/:owner/:repo/subscription
  • DELETEUnwatch a repo/repos/:owner/:repo/subscription
  • GETList a repository's tags/repos/:owner/:repo/tags?page=0&limit=0
  • POSTCreate a new git tag in a repository/repos/:owner/:repo/tags
  • GETGet the tag of a repository by tag name/repos/:owner/:repo/tags/:tag
  • DELETEDelete a repository's tag by name/repos/:owner/:repo/tags/:tag
  • GETList a repository's teams/repos/:owner/:repo/teams
  • GETCheck if a team is assigned to a repository/repos/:owner/:repo/teams/:team
  • PUTAdd a team to a repository/repos/:owner/:repo/teams/:team
  • DELETEDelete a team from a repository/repos/:owner/:repo/teams/:team
  • GETList a repo's tracked times/repos/:owner/:repo/times?user=string&since=2024-01-01T00:00:00Z&before=2024-01-01T00:00:00Z&page=0&limit=0
  • GETList a user's tracked times in a repo/repos/:owner/:repo/times/:userDeprecated.
  • GETGet list of topics that a repository has/repos/:owner/:repo/topics?page=0&limit=0
  • PUTReplace list of topics for a repository/repos/:owner/:repo/topics
  • PUTAdd a topic to a repository/repos/:owner/:repo/topics/:topic
  • DELETEDelete a topic from a repository/repos/:owner/:repo/topics/:topic
  • POSTTransfer a repo ownership/repos/:owner/:repo/transfer
  • POSTAccept a repo transfer/repos/:owner/:repo/transfer/accept
  • POSTReject a repo transfer/repos/:owner/:repo/transfer/reject
  • POSTCreate a wiki page/repos/:owner/:repo/wiki/new
  • GETGet a wiki page/repos/:owner/:repo/wiki/page/:pageName
  • DELETEDelete a wiki page/repos/:owner/:repo/wiki/page/:pageName
  • PATCHEdit a wiki page/repos/:owner/:repo/wiki/page/:pageName
  • GETGet all wiki pages/repos/:owner/:repo/wiki/pages?page=0&limit=0
  • GETGet revisions of a wiki page/repos/:owner/:repo/wiki/revisions/:pageName?page=0
  • POSTCreate a repository using a template/repos/:template_owner/:template_repo/generate
  • GETGet a repository by id/repositories/:id
  • GETsearch topics via keyword/topics/search?q=string&page=0&limit=0
  • POSTCreate a repository/user/repos

settings

  • GETGet instance's global settings for api/settings/api
  • GETGet instance's global settings for Attachment/settings/attachment
  • GETGet instance's global settings for repositories/settings/repository
  • GETGet instance's global settings for ui/settings/ui

user

  • GETGet the authenticated user/user
  • GETList the authenticated user's oauth2 applications/user/applications/oauth2?page=0&limit=0
  • POSTcreates a new OAuth2 application/user/applications/oauth2
  • GETget an OAuth2 Application/user/applications/oauth2/:id
  • DELETEdelete an OAuth2 Application/user/applications/oauth2/:id
  • PATCHupdate an OAuth2 Application, this includes regenerating the client secret/user/applications/oauth2/:id
  • GETList the authenticated user's email addresses/user/emails
  • POSTAdd email addresses/user/emails
  • DELETEDelete email addresses/user/emails
  • GETList the authenticated user's followers/user/followers?page=0&limit=0
  • GETList the users that the authenticated user is following/user/following?page=0&limit=0
  • GETCheck whether a user is followed by the authenticated user/user/following/:username
  • PUTFollow a user/user/following/:username
  • DELETEUnfollow a user/user/following/:username
  • GETGet a Token to verify/user/gpg_key_token
  • POSTVerify a GPG key/user/gpg_key_verify
  • GETList the authenticated user's GPG keys/user/gpg_keys?page=0&limit=0
  • POSTCreate a GPG key/user/gpg_keys
  • GETGet a GPG key/user/gpg_keys/:id
  • DELETERemove a GPG key/user/gpg_keys/:id
  • GETList the authenticated user's public keys/user/keys?fingerprint=string&page=0&limit=0
  • POSTCreate a public key/user/keys
  • GETGet a public key/user/keys/:id
  • DELETEDelete a public key/user/keys/:id

Showing 300 of 325 endpoints. Fork the collection to see all of them.

API details

Authentication
An API key in the access_token query parameter
An API key in the Authorization header
HTTP Basic authentication (username and password)
An API key in the Sudo header
An API key in the sudo query parameter
An API key in the X-GITEA-OTP header
An API key in the token query parameter
Operations
325 operations on 203 pathsGET 166POST 65DELETE 55PATCH 24PUT 15
4 marked deprecated
Main resources
repository 135issue 58user 50organization 42admin 19notification 7miscellaneous 5package 4settings 4activitypub 2
Response formats
application/json text/plain
Description format
OpenAPI 3.0.0, API version 1.20.0+dev-93-g6886706f5
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the Gitea API. in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Gitea API. collection, without the publisher's secrets.
  3. Add your credentialsThis API uses an API key in the access_token query parameter. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Returns the Person actor for a user” (GET /activitypub/user/:username), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Gitea API.?

This documentation describes the Gitea API. It is listed under Developer tools and has 325 endpoints.

Who publishes the Gitea API.?

It is listed from Gitea's public API description (an OpenAPI document), not published by Gitea on Swastik Codes. Anyone who controls gitea.io can claim the profile by adding a DNS TXT record.

How do I authenticate with the Gitea API.?

It accepts 7 methods: an API key in the access_token query parameter; an API key in the Authorization header; HTTP Basic authentication (username and password); an API key in the Sudo header; an API key in the sudo query parameter; an API key in the X-GITEA-OTP header; an API key in the token query parameter.

How many endpoints does the Gitea API. have?

325 operations on 203 paths (166 GET, 65 POST, 55 DELETE, 24 PATCH, 15 PUT). The largest groups are repository, issue, user, organization.

Is forking the Gitea API. free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.