Forgejo user API

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

Operations 80

GET /user Get the authenticated user #
GET /user/actions/runners Get the user's runners #
POST /user/actions/runners Register a new user-level runner #
GET /user/actions/runners/jobs Search for user's action jobs according filter conditions #
GET /user/actions/runners/registration-token Get the user's runner registration token #
GET /user/actions/runners/{runner_id} Get a particular runner that belongs to the user #
DELETE /user/actions/runners/{runner_id} Delete a particular user-level runner #
PUT /user/actions/secrets/{secretname} Create or Update a secret value in a user scope #
DELETE /user/actions/secrets/{secretname} Delete a secret in a user scope #
GET /user/actions/variables Get the user-level list of variables which is created by current doer #
GET /user/actions/variables/{variablename} Get a user-level variable which is created by current doer #
PUT /user/actions/variables/{variablename} Update a user-level variable which is created by current doer #
POST /user/actions/variables/{variablename} Create a user-level variable #
DELETE /user/actions/variables/{variablename} Delete a user-level variable which is created by current doer #
POST /user/activitypub/follow Follow a remote activitypub account #
GET /user/applications/oauth2 List the authenticated user's oauth2 applications #
POST /user/applications/oauth2 Creates a new OAuth2 application #
GET /user/applications/oauth2/{id} Get an OAuth2 application #
DELETE /user/applications/oauth2/{id} Delete an OAuth2 application #
PATCH /user/applications/oauth2/{id} Update an OAuth2 application, this includes regenerating the client secret #
POST /user/avatar Update avatar of the current user #
DELETE /user/avatar Delete avatar of the current user. It will be replaced by a default one #
PUT /user/block/{username} Blocks a user from the doer #
GET /user/emails List all email addresses of the current user #
POST /user/emails Add an email addresses to the current user's account #
DELETE /user/emails Delete email addresses from the current user's account #
GET /user/followers List the authenticated user's followers #
GET /user/following List the users that the authenticated user is following #
GET /user/following/{username} Check whether a user is followed by the authenticated user #
PUT /user/following/{username} Follow a user #
DELETE /user/following/{username} Unfollow a user #
GET /user/gpg_key_token Get a Token to verify #
POST /user/gpg_key_verify Verify a GPG key #
GET /user/gpg_keys List the authenticated user's GPG keys #
POST /user/gpg_keys Add a GPG public key to current user's account #
GET /user/gpg_keys/{id} Get a GPG key #
DELETE /user/gpg_keys/{id} Remove a GPG public key from current user's account #
GET /user/hooks List the authenticated user's webhooks #
POST /user/hooks Create a hook #
GET /user/hooks/{id} Get a hook #
DELETE /user/hooks/{id} Delete a hook #
PATCH /user/hooks/{id} Update a hook #
GET /user/keys List the authenticated user's public keys #
POST /user/keys Create a public key #
GET /user/keys/{id} Get a public key #
DELETE /user/keys/{id} Delete a public key #
GET /user/list_blocked List the authenticated user's blocked users #
GET /user/quota Get quota information for the authenticated user #
GET /user/quota/artifacts List the artifacts affecting the authenticated user's quota #
GET /user/quota/attachments List the attachments affecting the authenticated user's quota #
GET /user/quota/check Check if the authenticated user is over quota for a given subject #
GET /user/quota/packages List the packages affecting the authenticated user's quota #
GET /user/repos List the repos that the authenticated user owns #
POST /user/repos Create a repository #
GET /user/settings Get current user's account settings #
PATCH /user/settings Update settings in current user's account #
GET /user/starred The repos that the authenticated user has starred #
GET /user/starred/{owner}/{repo} Whether the authenticated is starring the repo #
PUT /user/starred/{owner}/{repo} Star the given repo #
DELETE /user/starred/{owner}/{repo} Unstar the given repo #
GET /user/stopwatches Get list of all existing stopwatches #
GET /user/subscriptions List repositories watched by the authenticated user #
GET /user/teams List all the teams a user belongs to #
GET /user/times List the current user's tracked times #
PUT /user/unblock/{username} Unblocks a user from the doer #
GET /users/search Search for users #
GET /users/{username} Get a user #
GET /users/{username}/activities/feeds List a user's activity feeds #
GET /users/{username}/followers List the given user's followers #
GET /users/{username}/following List the users that the given user is following #
GET /users/{username}/following/{target} Check if one user is following another user #
GET /users/{username}/gpg_keys List the given user's GPG keys #
GET /users/{username}/heatmap Get a user's heatmap #
GET /users/{username}/keys List the given user's public keys #
GET /users/{username}/repos List the repos owned by the given user #
GET /users/{username}/starred The repos that the given user has starred #
GET /users/{username}/subscriptions List the repositories watched by a user #
GET /users/{username}/tokens List the specified user's access tokens #
POST /users/{username}/tokens Generate an access token for the specified user #
DELETE /users/{username}/tokens/{token} Delete an access token from the specified user's account #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/forgejo-user-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

forgejo-user-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: This documentation describes the Forgejo API.
  title: Forgejo activitypub User API
  license:
    name: This file is distributed under the MIT license for the purpose of interoperability
    url: http://opensource.org/licenses/MIT
  version: 16.0.0-dev-465-4b83448b7d+gitea-1.22.0
servers:
- url: /api/v1
security:
- BasicAuth: []
- AuthorizationHeaderToken: []
- SudoParam: []
- SudoHeader: []
- TOTPHeader: []
tags:
- name: user
paths:
  /user:
    get:
      tags:
      - user
      summary: Get the authenticated user
      operationId: userGetCurrent
      responses:
        '200':
          $ref: '#/components/responses/User'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
  /user/actions/runners:
    get:
      tags:
      - user
      summary: Get the user's runners
      operationId: getUserRunners
      parameters:
      - description: whether to include all visible runners (true) or only those that are directly owned by the user (false)
        name: visible
        in: query
        schema:
          type: boolean
      - description: page number of results to return (1-based)
        name: page
        in: query
        schema:
          type: integer
      - description: page size of results
        name: limit
        in: query
        schema:
          type: integer
      responses:
        '200':
          $ref: '#/components/responses/ActionRunnerList'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
    post:
      tags:
      - user
      summary: Register a new user-level runner
      operationId: registerUserRunner
      responses:
        '201':
          $ref: '#/components/responses/RegisterRunnerResponse'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterRunnerOptions'
  /user/actions/runners/jobs:
    get:
      tags:
      - user
      summary: Search for user's action jobs according filter conditions
      operationId: userSearchRunJobs
      parameters:
      - description: a comma separated list of run job labels to search for
        name: labels
        in: query
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/RunJobList'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
  /user/actions/runners/registration-token:
    get:
      description: 'This operation has been deprecated in Forgejo 15. Use the web UI or [`/user/actions/runners`](#/user/registerUserRunner) instead.

        '
      tags:
      - user
      summary: Get the user's runner registration token
      operationId: userGetRunnerRegistrationToken
      deprecated: true
      responses:
        '200':
          $ref: '#/components/responses/RegistrationToken'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
  /user/actions/runners/{runner_id}:
    get:
      tags:
      - user
      summary: Get a particular runner that belongs to the user
      operationId: getUserRunner
      parameters:
      - description: ID of the runner
        name: runner_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/ActionRunner'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
    delete:
      tags:
      - user
      summary: Delete a particular user-level runner
      operationId: deleteUserRunner
      parameters:
      - description: ID of the runner
        name: runner_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: runner has been deleted
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
  /user/actions/secrets/{secretname}:
    put:
      tags:
      - user
      summary: Create or Update a secret value in a user scope
      operationId: updateUserSecret
      parameters:
      - description: name of the secret
        name: secretname
        in: path
        required: true
        schema:
          type: string
      responses:
        '201':
          description: response when creating a secret
        '204':
          description: response when updating a secret
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrUpdateSecretOption'
    delete:
      tags:
      - user
      summary: Delete a secret in a user scope
      operationId: deleteUserSecret
      parameters:
      - description: name of the secret
        name: secretname
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: delete one secret of the user
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
  /user/actions/variables:
    get:
      tags:
      - user
      summary: Get the user-level list of variables which is created by current doer
      operationId: getUserVariablesList
      parameters:
      - description: page number of results to return (1-based)
        name: page
        in: query
        schema:
          type: integer
      - description: page size of results
        name: limit
        in: query
        schema:
          type: integer
      responses:
        '200':
          $ref: '#/components/responses/VariableList'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
  /user/actions/variables/{variablename}:
    get:
      tags:
      - user
      summary: Get a user-level variable which is created by current doer
      operationId: getUserVariable
      parameters:
      - description: name of the variable
        name: variablename
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/ActionVariable'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
    put:
      tags:
      - user
      summary: Update a user-level variable which is created by current doer
      operationId: updateUserVariable
      parameters:
      - description: name of the variable
        name: variablename
        in: path
        required: true
        schema:
          type: string
      responses:
        '201':
          description: response when updating a variable
        '204':
          description: response when updating a variable
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateVariableOption'
    post:
      tags:
      - user
      summary: Create a user-level variable
      operationId: createUserVariable
      parameters:
      - description: name of the variable
        name: variablename
        in: path
        required: true
        schema:
          type: string
      responses:
        '201':
          description: response when creating a variable
        '204':
          description: response when creating a variable
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVariableOption'
    delete:
      tags:
      - user
      summary: Delete a user-level variable which is created by current doer
      operationId: deleteUserVariable
      parameters:
      - description: name of the variable
        name: variablename
        in: path
        required: true
        schema:
          type: string
      responses:
        '201':
          description: response when deleting a variable
        '204':
          description: response when deleting a variable
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
  /user/activitypub/follow:
    post:
      tags:
      - user
      summary: Follow a remote activitypub account
      operationId: userCurrentActivityPubFollow
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APRemoteFollowOption'
          text/plain:
            schema:
              $ref: '#/components/schemas/APRemoteFollowOption'
  /user/applications/oauth2:
    get:
      tags:
      - user
      summary: List the authenticated user's oauth2 applications
      operationId: userGetOAuth2Applications
      parameters:
      - description: page number of results to return (1-based)
        name: page
        in: query
        schema:
          type: integer
      - description: page size of results
        name: limit
        in: query
        schema:
          type: integer
      responses:
        '200':
          $ref: '#/components/responses/OAuth2ApplicationList'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
    post:
      tags:
      - user
      summary: Creates a new OAuth2 application
      operationId: userCreateOAuth2Application
      responses:
        '201':
          $ref: '#/components/responses/OAuth2Application'
        '400':
          $ref: '#/components/responses/error'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOAuth2ApplicationOptions'
          text/plain:
            schema:
              $ref: '#/components/schemas/CreateOAuth2ApplicationOptions'
        required: true
  /user/applications/oauth2/{id}:
    get:
      tags:
      - user
      summary: Get an OAuth2 application
      operationId: userGetOAuth2Application
      parameters:
      - description: Application ID to be found
        name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/OAuth2Application'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
    delete:
      tags:
      - user
      summary: Delete an OAuth2 application
      operationId: userDeleteOAuth2Application
      parameters:
      - description: token to be deleted
        name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
    patch:
      tags:
      - user
      summary: Update an OAuth2 application, this includes regenerating the client secret
      operationId: userUpdateOAuth2Application
      parameters:
      - description: application to be updated
        name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/OAuth2Application'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOAuth2ApplicationOptions'
          text/plain:
            schema:
              $ref: '#/components/schemas/CreateOAuth2ApplicationOptions'
        required: true
  /user/avatar:
    post:
      tags:
      - user
      summary: Update avatar of the current user
      operationId: userUpdateAvatar
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserAvatarOption'
          text/plain:
            schema:
              $ref: '#/components/schemas/UpdateUserAvatarOption'
    delete:
      tags:
      - user
      summary: Delete avatar of the current user. It will be replaced by a default one
      operationId: userDeleteAvatar
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
  /user/block/{username}:
    put:
      tags:
      - user
      summary: Blocks a user from the doer
      operationId: userBlockUser
      parameters:
      - description: username of the user
        name: username
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '422':
          $ref: '#/components/responses/validationError'
  /user/emails:
    get:
      tags:
      - user
      summary: List all email addresses of the current user
      operationId: userListEmails
      responses:
        '200':
          $ref: '#/components/responses/EmailList'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
    post:
      tags:
      - user
      summary: Add an email addresses to the current user's account
      operationId: userAddEmail
      responses:
        '201':
          $ref: '#/components/responses/EmailList'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '422':
          $ref: '#/components/responses/validationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEmailOption'
          text/plain:
            schema:
              $ref: '#/components/schemas/CreateEmailOption'
    delete:
      tags:
      - user
      summary: Delete email addresses from the current user's account
      operationId: userDeleteEmail
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteEmailOption'
          text/plain:
            schema:
              $ref: '#/components/schemas/DeleteEmailOption'
  /user/followers:
    get:
      tags:
      - user
      summary: List the authenticated user's followers
      operationId: userCurrentListFollowers
      parameters:
      - description: page number of results to return (1-based)
        name: page
        in: query
        schema:
          type: integer
      - description: page size of results
        name: limit
        in: query
        schema:
          type: integer
      responses:
        '200':
          $ref: '#/components/responses/UserList'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
  /user/following:
    get:
      tags:
      - user
      summary: List the users that the authenticated user is following
      operationId: userCurrentListFollowing
      parameters:
      - description: page number of results to return (1-based)
        name: page
        in: query
        schema:
          type: integer
      - description: page size of results
        name: limit
        in: query
        schema:
          type: integer
      responses:
        '200':
          $ref: '#/components/responses/UserList'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
  /user/following/{username}:
    get:
      tags:
      - user
      summary: Check whether a user is followed by the authenticated user
      operationId: userCurrentCheckFollowing
      parameters:
      - description: username of followed user
        name: username
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
    put:
      tags:
      - user
      summary: Follow a user
      operationId: userCurrentPutFollow
      parameters:
      - description: username of user to follow
        name: username
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
    delete:
      tags:
      - user
      summary: Unfollow a user
      operationId: userCurrentDeleteFollow
      parameters:
      - description: username of user to unfollow
        name: username
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
  /user/gpg_key_token:
    get:
      tags:
      - user
      summary: Get a Token to verify
      operationId: getVerificationToken
      responses:
        '200':
          $ref: '#/components/responses/string'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
  /user/gpg_key_verify:
    post:
      tags:
      - user
      summary: Verify a GPG key
      operationId: userVerifyGPGKey
      responses:
        '201':
          $ref: '#/components/responses/GPGKey'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '422':
          $ref: '#/components/responses/validationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerifyGPGKeyOption'
  /user/gpg_keys:
    get:
      tags:
      - user
      summary: List the authenticated user's GPG keys
      operationId: userCurrentListGPGKeys
      parameters:
      - description: page number of results to return (1-based)
        name: page
        in: query
        schema:
          type: integer
      - description: page size of results
        name: limit
        in: query
        schema:
          type: integer
      responses:
        '200':
          $ref: '#/components/responses/GPGKeyList'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
    post:
      tags:
      - user
      summary: Add a GPG public key to current user's account
      operationId: userCurrentPostGPGKey
      responses:
        '201':
          $ref: '#/components/responses/GPGKey'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '422':
          $ref: '#/components/responses/validationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateGPGKeyOption'
  /user/gpg_keys/{id}:
    get:
      tags:
      - user
      summary: Get a GPG key
      operationId: userCurrentGetGPGKey
      parameters:
      - description: id of key to get
        name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/GPGKey'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
    delete:
      tags:
      - user
      summary: Remove a GPG public key from current user's account
      operationId: userCurrentDeleteGPGKey
      parameters:
      - description: id of key to delete
        name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
  /user/hooks:
    get:
      tags:
      - user
      summary: List the authenticated user's webhooks
      operationId: userListHooks
      parameters:
      - description: page number of results to return (1-based)
        name: page
        in: query
        schema:
          type: integer
      - description: page size of results
        name: limit
        in: query
        schema:
          type: integer
      responses:
        '200':
          $ref: '#/components/responses/HookListWithoutPagination'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
    post:
      tags:
      - user
      summary: Create a hook
      operationId: userCreateHook
      responses:
        '201':
          $ref: '#/components/responses/Hook'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateHookOption'
        required: true
  /user/hooks/{id}:
    get:
      tags:
      - user
      summary: Get a hook
      operationId: userGetHook
      parameters:
      - description: id of the hook to get
        name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/Hook'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
    delete:
      tags:
      - user
      summary: Delete a hook
      operationId: userDeleteHook
      parameters:
      - description: id of the hook to delete
        name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
    patch:
      tags:
      - user
      summary: Update a hook
      operationId: userEditHook
      parameters:
      - description: id of the hook to update
        name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/Hook'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditHookOption'
  /user/keys:
    get:
      tags:
      - user
      summary: List the authenticated user's public keys
      operationId: userCurrentListKeys
      parameters:
      - description: fingerprint of the key
        name: fingerprint
        in: query
        schema:
          type: string
      - description: page number of results to return (1-based)
        name: page
        in: query
        schema:
          type: integer
      - description: page size of results
        name: limit
        in: query
        schema:
          type: integer
      responses:
        '200':
          $ref: '#/components/responses/PublicKeyList'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
    post:
      tags:
      - user
      summary: Create a public key
      operationId: userCurrentPostKey
      responses:
        '201':
          $ref: '#/components/responses/PublicKey'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '422':
          $ref: '#/components/responses/validationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKeyOption'
  /user/keys/{id}:
    get:
      tags:
      - user
      summary: Get a public key
      operationId: userCurrentGetKey
      parameters:
      - description: id of key to get
        name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/PublicKey'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
    delete:
      tags:
      - user
      summary: Delete a public key
      operationId: userCurrentDeleteKey
      parameters:
      - description: id of key to delete
        name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
  /user/list_blocked:
    get:
      tags:
      - user
      summary: List the authenticated user's blocked users
      operationId: userListBlockedUsers
      parameters:
      - description: page number of results to return (1-based)
        name: page
        in: query
        schema:
          type: integer
      - description: page size of results
        name: limit
        in: query
        schema:
          type: integer
      responses:
        '200':
          $ref: '#/components/responses/BlockedUserList'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
  /user/quota:
    get:
      tags:
      - user
      summary: Get quota information for the authenticated user
      operationId: userGetQuota
      responses:
        '200':
          $ref: '#/components/responses/QuotaInfo'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
  /user/quota/artifacts:
    get:
      tags:
      - user
      summary: List the artifacts affecting the authenticated user's quota
      operationId: userListQuotaArtifacts
      parameters:
      - description: page number of results to return (1-based)
        name: page
        in: query
        schema:
          type: integer
      - description: page size of results
        name: limit
        in: query
        schema:
          type: integer
      responses:
        '200':
          $ref: '#/components/responses/QuotaUsedArtifactList'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
  /user/quota/attachments:
    get:
      tags:
      - user
      summary: List the attachments affecting the authenticated user's quota
      operationId: userListQuotaAttachments
      parameters:
      - description: page number of results to return (1-based)
        name: page
        in: query
        schema:
          type: integer
      - description: page size of results
        name: limit
        in: query
        schema:
          type: integer
      responses:
        '200':
          $ref: '#/components/responses/QuotaUsedAttachmentList'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
  /user/quota/check:
    get:
      tags:
      - user
      summary: Check if the authenticated user is over quota for a given subject
      operationId: userCheckQuota
      parameters:
      - description: subject of the quota
        name: subject
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Returns true if the action is accepted.
          content:
            application/json:
              schema:
                type: boolean
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '422':
          $ref: '#/components/responses/validationError'
  /user/quota/packages:
    get:
      tags:
      - user
      summary: List the packages affecting the authenticated

# --- truncated at 32 KB (126 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/forgejo/refs/heads/main/openapi/forgejo-user-api-openapi.yml