Gitea user API

The user API from Gitea — 48 operation(s) for user.

Operations 76

GET /user Get the authenticated user #
GET /user/actions/jobs Get workflow jobs #
GET /user/actions/runners Get user-level runners #
POST /user/actions/runners/registration-token Get a user's actions runner registration token #
GET /user/actions/runners/{runner_id} Get a user-level runner #
DELETE /user/actions/runners/{runner_id} Delete a user-level runner #
PATCH /user/actions/runners/{runner_id} Update a user-level runner #
GET /user/actions/runs Get workflow runs #
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 #
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 #
DELETE /user/avatar Delete Avatar #
GET /user/blocks List users blocked by the authenticated user #
GET /user/blocks/{username} Check if a user is blocked by the authenticated user #
PUT /user/blocks/{username} Block a user #
DELETE /user/blocks/{username} Unblock a user #
GET /user/emails List the authenticated user's email addresses #
POST /user/emails Add email addresses #
DELETE /user/emails Delete email addresses #
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 Create a GPG key #
GET /user/gpg_keys/{id} Get a GPG key #
DELETE /user/gpg_keys/{id} Remove a GPG key #
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/repos List the repos that the authenticated user owns #
POST /user/repos Create a repository #
GET /user/settings Get user settings #
PATCH /user/settings Update user settings #
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 #
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 authenticated user's access tokens #
POST /users/{username}/tokens Create an access token #
DELETE /users/{username}/tokens/{token} delete an access token #

Documentation

Specifications

Code Examples

💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-repo-get-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-repo-update-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-issues-list-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-issue-create-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-pulls-list-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-pull-create-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-branches-list-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-commits-list-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-release-create-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-webhook-create-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-org-create-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-org-repos-list-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-user-get-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-user-repo-create-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-admin-user-create-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-notifications-list-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-packages-list-owner-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-repository-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-issue-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-pullrequest-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-release-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-hook-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-package-example.json

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-repository-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-issue-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-pullrequest-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-branch-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-commit-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-release-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-hook-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-organization-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-team-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-user-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-notificationthread-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-package-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-label-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-milestone-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-tag-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-comment-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-repository-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-issue-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-pullrequest-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-branch-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-commit-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-release-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-hook-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-organization-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-team-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-user-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-notificationthread-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-package-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-label-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-milestone-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-tag-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-comment-structure.json

Other Resources

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/gitea-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

gitea-user-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: This documentation describes the Gitea API.
  title: Gitea admin User API
  license:
    name: MIT
    url: http://opensource.org/licenses/MIT
  version: 1.27.0+dev-89-gf52b6f3315
servers:
- url: /api/v1
security:
- BasicAuth: []
- Token: []
- AccessToken: []
- 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'
  /user/actions/jobs:
    get:
      tags:
      - user
      summary: Get workflow jobs
      operationId: getUserWorkflowJobs
      parameters:
      - description: workflow status (pending, queued, in_progress, failure, success, skipped)
        name: status
        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/WorkflowJobsList'
        '400':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/notFound'
  /user/actions/runners:
    get:
      tags:
      - user
      summary: Get user-level runners
      operationId: getUserRunners
      parameters:
      - description: filter by disabled status (true or false)
        name: disabled
        in: query
        schema:
          type: boolean
      responses:
        '200':
          $ref: '#/components/responses/RunnerList'
        '400':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/notFound'
  /user/actions/runners/registration-token:
    post:
      tags:
      - user
      summary: Get a user's actions runner registration token
      operationId: userCreateRunnerRegistrationToken
      responses:
        '200':
          $ref: '#/components/responses/RegistrationToken'
  /user/actions/runners/{runner_id}:
    get:
      tags:
      - user
      summary: Get a user-level runner
      operationId: getUserRunner
      parameters:
      - description: id of the runner
        name: runner_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/Runner'
        '400':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/notFound'
    delete:
      tags:
      - user
      summary: Delete a 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'
        '404':
          $ref: '#/components/responses/notFound'
    patch:
      tags:
      - user
      summary: Update a user-level runner
      operationId: updateUserRunner
      parameters:
      - description: id of the runner
        name: runner_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/Runner'
        '400':
          $ref: '#/components/responses/error'
        '404':
          $ref: '#/components/responses/notFound'
        '422':
          $ref: '#/components/responses/validationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditActionRunnerOption'
  /user/actions/runs:
    get:
      tags:
      - user
      summary: Get workflow runs
      operationId: getUserWorkflowRuns
      parameters:
      - description: workflow event name
        name: event
        in: query
        schema:
          type: string
      - description: workflow branch
        name: branch
        in: query
        schema:
          type: string
      - description: workflow status (pending, queued, in_progress, failure, success, skipped)
        name: status
        in: query
        schema:
          type: string
      - description: triggered by user
        name: actor
        in: query
        schema:
          type: string
      - description: triggering sha of the workflow run
        name: head_sha
        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/WorkflowRunsList'
        '400':
          $ref: '#/components/responses/error'
        '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'
        '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'
        '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'
        '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'
        '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'
        '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: successfully created the user-level variable
        '400':
          $ref: '#/components/responses/error'
        '409':
          description: variable name already exists.
      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'
        '404':
          $ref: '#/components/responses/notFound'
  /user/applications/oauth2:
    get:
      tags:
      - user
      summary: List the authenticated user's oauth2 applications
      operationId: userGetOauth2Application
      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'
    post:
      tags:
      - user
      summary: creates a new OAuth2 application
      operationId: userCreateOAuth2Application
      responses:
        '201':
          $ref: '#/components/responses/OAuth2Application'
        '400':
          $ref: '#/components/responses/error'
      requestBody:
        content:
          application/json:
            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'
        '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'
        '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'
        '404':
          $ref: '#/components/responses/notFound'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOAuth2ApplicationOptions'
        required: true
  /user/avatar:
    post:
      tags:
      - user
      summary: Update Avatar
      operationId: userUpdateAvatar
      responses:
        '204':
          $ref: '#/components/responses/empty'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserAvatarOption'
    delete:
      tags:
      - user
      summary: Delete Avatar
      operationId: userDeleteAvatar
      responses:
        '204':
          $ref: '#/components/responses/empty'
  /user/blocks:
    get:
      tags:
      - user
      summary: List users blocked by the authenticated user
      operationId: userListBlocks
      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'
  /user/blocks/{username}:
    get:
      tags:
      - user
      summary: Check if a user is blocked by the authenticated user
      operationId: userCheckUserBlock
      parameters:
      - description: username of the user to check
        name: username
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '404':
          $ref: '#/components/responses/notFound'
    put:
      tags:
      - user
      summary: Block a user
      operationId: userBlockUser
      parameters:
      - description: username of the user to block
        name: username
        in: path
        required: true
        schema:
          type: string
      - description: optional note for the block
        name: note
        in: query
        schema:
          type: string
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '404':
          $ref: '#/components/responses/notFound'
        '422':
          $ref: '#/components/responses/validationError'
    delete:
      tags:
      - user
      summary: Unblock a user
      operationId: userUnblockUser
      parameters:
      - description: username of the user to unblock
        name: username
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '404':
          $ref: '#/components/responses/notFound'
        '422':
          $ref: '#/components/responses/validationError'
  /user/emails:
    get:
      tags:
      - user
      summary: List the authenticated user's email addresses
      operationId: userListEmails
      responses:
        '200':
          $ref: '#/components/responses/EmailList'
    post:
      tags:
      - user
      summary: Add email addresses
      operationId: userAddEmail
      responses:
        '201':
          $ref: '#/components/responses/EmailList'
        '422':
          $ref: '#/components/responses/validationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEmailOption'
    delete:
      tags:
      - user
      summary: Delete email addresses
      operationId: userDeleteEmail
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '404':
          $ref: '#/components/responses/notFound'
      requestBody:
        content:
          application/json:
            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'
  /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'
  /user/following/{username}:
    get:
      tags:
      - user
      summary: Check whether a user is followed by the authenticated user
      operationId: userCurrentCheckFollowing
      parameters:
      - description: username of the user to check for authenticated followers
        name: username
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '404':
          $ref: '#/components/responses/notFound'
    put:
      tags:
      - user
      summary: Follow a user
      operationId: userCurrentPutFollow
      parameters:
      - description: username of the user to follow
        name: username
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
    delete:
      tags:
      - user
      summary: Unfollow a user
      operationId: userCurrentDeleteFollow
      parameters:
      - description: username of the user to unfollow
        name: username
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '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'
        '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'
        '404':
          $ref: '#/components/responses/notFound'
        '422':
          $ref: '#/components/responses/validationError'
  /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'
    post:
      tags:
      - user
      summary: Create a GPG key
      operationId: userCurrentPostGPGKey
      responses:
        '201':
          $ref: '#/components/responses/GPGKey'
        '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'
        '404':
          $ref: '#/components/responses/notFound'
    delete:
      tags:
      - user
      summary: Remove a GPG key
      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'
        '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/HookList'
    post:
      tags:
      - user
      summary: Create a hook
      operationId: userCreateHook
      responses:
        '201':
          $ref: '#/components/responses/Hook'
      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'
    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'
    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'
      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'
    post:
      tags:
      - user
      summary: Create a public key
      operationId: userCurrentPostKey
      responses:
        '201':
          $ref: '#/components/responses/PublicKey'
        '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'
        '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'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
  /user/repos:
    get:
      tags:
      - user
      summary: List the repos that the authenticated user owns
      operationId: userCurrentListRepos
      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/RepositoryList'
    post:
      tags:
      - user
      summary: Create a repository
      operationId: createCurrentUserRepo
      responses:
        '201':
          $ref: '#/components/responses/Repository'
        '400':
          $ref: '#/components/responses/error'
        '409':
          description: The repository with the same name already exists.
        '422':
          $ref: '#/components/responses/validationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRepoOption'
  /user/settings:
    get:
      tags:
      - user
      summary: Get user settings
      operationId: getUserSettings
      responses:
        '200':
          $ref: '#/components/responses/UserSettings'
    patch:
      tags:
      - user
      summary: Update user settings
      operationId: updateUserSettings
      responses:
        '200':
          $ref: '#/components/responses/UserSettings'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserSettingsOptions'
  /user/starred:
    get:
      tags:
      - user
      summary: The repos that the authenticated user has starred
      operationId: userCurrentListStarred
      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/RepositoryList'
        '403':
          $ref: '#/components/responses/forbidden'
  /user/starred/{owner}/{repo}:
    get:
      tags:
      - user
      summary: Whether the authenticated is starring the repo
      operationId: userCurrentCheckStarring
      parameters:
      - description: owner of the repo
        name: owner
        in: path
        required: true
        schema:
          type: string
      - description: name of the repo
        name: repo
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
    put:
      tags:
      - user
      summary: Star the given repo
      operationId: userCurrentPutStar
      parameters:
      - description: owner of the repo to star
        name: owner
        in: path
        required: true
        schema:
          type: string
      - description: name of the repo to star
        name: repo
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
    delete:
      tags:
      - user
      summary: Unstar the given repo
      operationId: userCurrentDeleteStar
      parameters:
      - description: owner of the repo to unstar
        name: owner
        in: path
        required: true
        schema:
          type: string
      - description: name of the repo to unstar
        name: repo
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          $ref: '#/components/responses/empty'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
  /user/stopwatches:
    get:
      tags:
      - user
      summary: Get list of all existing stopwatches
      operationId: userGetStopWatches
      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/StopWatchList'
  /user/subscriptions:
    get:
      tags:
      - user
      summary: List repositories watched by the authenticated user
      operationId: userCurrentListSubscriptions
      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/RepositoryList'
  /user/teams:
    get:
      tags:
      - user
      summary: List all the teams a user belongs to
      operationId: userListTeams
      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/TeamList'
  /user/times:
    get:
      tags:
      - user
      summary: List the current user's tracked times
      operationId: userCurrentTrackedTimes
      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
      - description: Only show times updated after the given time. This is a timestamp in RFC 3339 format
        name: since
        in: query
        schema:
          type: string
          format: date-time
      - description: Only show times updated before the given time. This is a timestamp in RFC 3339 format
        name: before
        in: query
        schema:
          type: string
          format: date-time
      responses:
        '200':
          $ref: '#/components/responses/TrackedTimeList'
  /users/search:
    get:
      tags:
      - user
      summary: Search for users
      operationId: userSearch
      parameters:
      - description: keyword
        name: q
        in: query
        schema:
          type: string
      - description: ID of the user to search for
        name: uid
        in: query
        schema:
          type: integer
          format: int64
      - 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':
          description: SearchResults of a successful search
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/User'
                  ok:
                   

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