Gitea user API

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

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

OpenAPI Specification

gitea-user-api-openapi.yml Raw ↑
swagger: '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
basePath: /api/v1
schemes:
- https
- http
consumes:
- application/json
produces:
- application/json
security:
- BasicAuth: []
- Token: []
- AccessToken: []
- AuthorizationHeaderToken: []
- SudoParam: []
- SudoHeader: []
- TOTPHeader: []
tags:
- name: user
paths:
  /user:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: Get the authenticated user
      operationId: userGetCurrent
      responses:
        '200':
          $ref: '#/responses/User'
  /user/actions/jobs:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: Get workflow jobs
      operationId: getUserWorkflowJobs
      parameters:
      - type: string
        description: workflow status (pending, queued, in_progress, failure, success, skipped)
        name: status
        in: query
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/WorkflowJobsList'
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
  /user/actions/runners:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: Get user-level runners
      operationId: getUserRunners
      parameters:
      - type: boolean
        description: filter by disabled status (true or false)
        name: disabled
        in: query
      responses:
        '200':
          $ref: '#/responses/RunnerList'
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
  /user/actions/runners/registration-token:
    post:
      produces:
      - application/json
      tags:
      - user
      summary: Get a user's actions runner registration token
      operationId: userCreateRunnerRegistrationToken
      responses:
        '200':
          $ref: '#/responses/RegistrationToken'
  /user/actions/runners/{runner_id}:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: Get a user-level runner
      operationId: getUserRunner
      parameters:
      - type: string
        description: id of the runner
        name: runner_id
        in: path
        required: true
      responses:
        '200':
          $ref: '#/responses/Runner'
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
    delete:
      produces:
      - application/json
      tags:
      - user
      summary: Delete a user-level runner
      operationId: deleteUserRunner
      parameters:
      - type: string
        description: id of the runner
        name: runner_id
        in: path
        required: true
      responses:
        '204':
          description: runner has been deleted
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
    patch:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - user
      summary: Update a user-level runner
      operationId: updateUserRunner
      parameters:
      - type: string
        description: id of the runner
        name: runner_id
        in: path
        required: true
      - name: body
        in: body
        schema:
          $ref: '#/definitions/EditActionRunnerOption'
      responses:
        '200':
          $ref: '#/responses/Runner'
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
        '422':
          $ref: '#/responses/validationError'
  /user/actions/runs:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: Get workflow runs
      operationId: getUserWorkflowRuns
      parameters:
      - type: string
        description: workflow event name
        name: event
        in: query
      - type: string
        description: workflow branch
        name: branch
        in: query
      - type: string
        description: workflow status (pending, queued, in_progress, failure, success, skipped)
        name: status
        in: query
      - type: string
        description: triggered by user
        name: actor
        in: query
      - type: string
        description: triggering sha of the workflow run
        name: head_sha
        in: query
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/WorkflowRunsList'
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
  /user/actions/secrets/{secretname}:
    put:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - user
      summary: Create or Update a secret value in a user scope
      operationId: updateUserSecret
      parameters:
      - type: string
        description: name of the secret
        name: secretname
        in: path
        required: true
      - name: body
        in: body
        schema:
          $ref: '#/definitions/CreateOrUpdateSecretOption'
      responses:
        '201':
          description: response when creating a secret
        '204':
          description: response when updating a secret
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
    delete:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - user
      summary: Delete a secret in a user scope
      operationId: deleteUserSecret
      parameters:
      - type: string
        description: name of the secret
        name: secretname
        in: path
        required: true
      responses:
        '204':
          description: delete one secret of the user
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
  /user/actions/variables:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: Get the user-level list of variables which is created by current doer
      operationId: getUserVariablesList
      parameters:
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/VariableList'
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
  /user/actions/variables/{variablename}:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: Get a user-level variable which is created by current doer
      operationId: getUserVariable
      parameters:
      - type: string
        description: name of the variable
        name: variablename
        in: path
        required: true
      responses:
        '200':
          $ref: '#/responses/ActionVariable'
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
    put:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - user
      summary: Update a user-level variable which is created by current doer
      operationId: updateUserVariable
      parameters:
      - type: string
        description: name of the variable
        name: variablename
        in: path
        required: true
      - name: body
        in: body
        schema:
          $ref: '#/definitions/UpdateVariableOption'
      responses:
        '201':
          description: response when updating a variable
        '204':
          description: response when updating a variable
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
    post:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - user
      summary: Create a user-level variable
      operationId: createUserVariable
      parameters:
      - type: string
        description: name of the variable
        name: variablename
        in: path
        required: true
      - name: body
        in: body
        schema:
          $ref: '#/definitions/CreateVariableOption'
      responses:
        '201':
          description: successfully created the user-level variable
        '400':
          $ref: '#/responses/error'
        '409':
          description: variable name already exists.
    delete:
      produces:
      - application/json
      tags:
      - user
      summary: Delete a user-level variable which is created by current doer
      operationId: deleteUserVariable
      parameters:
      - type: string
        description: name of the variable
        name: variablename
        in: path
        required: true
      responses:
        '201':
          description: response when deleting a variable
        '204':
          description: response when deleting a variable
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
  /user/applications/oauth2:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: List the authenticated user's oauth2 applications
      operationId: userGetOauth2Application
      parameters:
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/OAuth2ApplicationList'
    post:
      produces:
      - application/json
      tags:
      - user
      summary: creates a new OAuth2 application
      operationId: userCreateOAuth2Application
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/CreateOAuth2ApplicationOptions'
      responses:
        '201':
          $ref: '#/responses/OAuth2Application'
        '400':
          $ref: '#/responses/error'
  /user/applications/oauth2/{id}:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: get an OAuth2 Application
      operationId: userGetOAuth2Application
      parameters:
      - type: integer
        format: int64
        description: Application ID to be found
        name: id
        in: path
        required: true
      responses:
        '200':
          $ref: '#/responses/OAuth2Application'
        '404':
          $ref: '#/responses/notFound'
    delete:
      produces:
      - application/json
      tags:
      - user
      summary: delete an OAuth2 Application
      operationId: userDeleteOAuth2Application
      parameters:
      - type: integer
        format: int64
        description: token to be deleted
        name: id
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '404':
          $ref: '#/responses/notFound'
    patch:
      produces:
      - application/json
      tags:
      - user
      summary: update an OAuth2 Application, this includes regenerating the client secret
      operationId: userUpdateOAuth2Application
      parameters:
      - type: integer
        format: int64
        description: application to be updated
        name: id
        in: path
        required: true
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/CreateOAuth2ApplicationOptions'
      responses:
        '200':
          $ref: '#/responses/OAuth2Application'
        '404':
          $ref: '#/responses/notFound'
  /user/avatar:
    post:
      produces:
      - application/json
      tags:
      - user
      summary: Update Avatar
      operationId: userUpdateAvatar
      parameters:
      - name: body
        in: body
        schema:
          $ref: '#/definitions/UpdateUserAvatarOption'
      responses:
        '204':
          $ref: '#/responses/empty'
    delete:
      produces:
      - application/json
      tags:
      - user
      summary: Delete Avatar
      operationId: userDeleteAvatar
      responses:
        '204':
          $ref: '#/responses/empty'
  /user/blocks:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: List users blocked by the authenticated user
      operationId: userListBlocks
      parameters:
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/UserList'
  /user/blocks/{username}:
    get:
      tags:
      - user
      summary: Check if a user is blocked by the authenticated user
      operationId: userCheckUserBlock
      parameters:
      - type: string
        description: username of the user to check
        name: username
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '404':
          $ref: '#/responses/notFound'
    put:
      tags:
      - user
      summary: Block a user
      operationId: userBlockUser
      parameters:
      - type: string
        description: username of the user to block
        name: username
        in: path
        required: true
      - type: string
        description: optional note for the block
        name: note
        in: query
      responses:
        '204':
          $ref: '#/responses/empty'
        '404':
          $ref: '#/responses/notFound'
        '422':
          $ref: '#/responses/validationError'
    delete:
      tags:
      - user
      summary: Unblock a user
      operationId: userUnblockUser
      parameters:
      - type: string
        description: username of the user to unblock
        name: username
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '404':
          $ref: '#/responses/notFound'
        '422':
          $ref: '#/responses/validationError'
  /user/emails:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: List the authenticated user's email addresses
      operationId: userListEmails
      responses:
        '200':
          $ref: '#/responses/EmailList'
    post:
      produces:
      - application/json
      tags:
      - user
      summary: Add email addresses
      operationId: userAddEmail
      parameters:
      - name: body
        in: body
        schema:
          $ref: '#/definitions/CreateEmailOption'
      responses:
        '201':
          $ref: '#/responses/EmailList'
        '422':
          $ref: '#/responses/validationError'
    delete:
      produces:
      - application/json
      tags:
      - user
      summary: Delete email addresses
      operationId: userDeleteEmail
      parameters:
      - name: body
        in: body
        schema:
          $ref: '#/definitions/DeleteEmailOption'
      responses:
        '204':
          $ref: '#/responses/empty'
        '404':
          $ref: '#/responses/notFound'
  /user/followers:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: List the authenticated user's followers
      operationId: userCurrentListFollowers
      parameters:
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/UserList'
  /user/following:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: List the users that the authenticated user is following
      operationId: userCurrentListFollowing
      parameters:
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/UserList'
  /user/following/{username}:
    get:
      tags:
      - user
      summary: Check whether a user is followed by the authenticated user
      operationId: userCurrentCheckFollowing
      parameters:
      - type: string
        description: username of the user to check for authenticated followers
        name: username
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '404':
          $ref: '#/responses/notFound'
    put:
      tags:
      - user
      summary: Follow a user
      operationId: userCurrentPutFollow
      parameters:
      - type: string
        description: username of the user to follow
        name: username
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '403':
          $ref: '#/responses/forbidden'
        '404':
          $ref: '#/responses/notFound'
    delete:
      tags:
      - user
      summary: Unfollow a user
      operationId: userCurrentDeleteFollow
      parameters:
      - type: string
        description: username of the user to unfollow
        name: username
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '404':
          $ref: '#/responses/notFound'
  /user/gpg_key_token:
    get:
      produces:
      - text/plain
      tags:
      - user
      summary: Get a Token to verify
      operationId: getVerificationToken
      responses:
        '200':
          $ref: '#/responses/string'
        '404':
          $ref: '#/responses/notFound'
  /user/gpg_key_verify:
    post:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - user
      summary: Verify a GPG key
      operationId: userVerifyGPGKey
      responses:
        '201':
          $ref: '#/responses/GPGKey'
        '404':
          $ref: '#/responses/notFound'
        '422':
          $ref: '#/responses/validationError'
  /user/gpg_keys:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: List the authenticated user's GPG keys
      operationId: userCurrentListGPGKeys
      parameters:
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/GPGKeyList'
    post:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - user
      summary: Create a GPG key
      operationId: userCurrentPostGPGKey
      parameters:
      - name: Form
        in: body
        schema:
          $ref: '#/definitions/CreateGPGKeyOption'
      responses:
        '201':
          $ref: '#/responses/GPGKey'
        '404':
          $ref: '#/responses/notFound'
        '422':
          $ref: '#/responses/validationError'
  /user/gpg_keys/{id}:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: Get a GPG key
      operationId: userCurrentGetGPGKey
      parameters:
      - type: integer
        format: int64
        description: id of key to get
        name: id
        in: path
        required: true
      responses:
        '200':
          $ref: '#/responses/GPGKey'
        '404':
          $ref: '#/responses/notFound'
    delete:
      produces:
      - application/json
      tags:
      - user
      summary: Remove a GPG key
      operationId: userCurrentDeleteGPGKey
      parameters:
      - type: integer
        format: int64
        description: id of key to delete
        name: id
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '403':
          $ref: '#/responses/forbidden'
        '404':
          $ref: '#/responses/notFound'
  /user/hooks:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: List the authenticated user's webhooks
      operationId: userListHooks
      parameters:
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/HookList'
    post:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - user
      summary: Create a hook
      operationId: userCreateHook
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/CreateHookOption'
      responses:
        '201':
          $ref: '#/responses/Hook'
  /user/hooks/{id}:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: Get a hook
      operationId: userGetHook
      parameters:
      - type: integer
        format: int64
        description: id of the hook to get
        name: id
        in: path
        required: true
      responses:
        '200':
          $ref: '#/responses/Hook'
    delete:
      produces:
      - application/json
      tags:
      - user
      summary: Delete a hook
      operationId: userDeleteHook
      parameters:
      - type: integer
        format: int64
        description: id of the hook to delete
        name: id
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
    patch:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - user
      summary: Update a hook
      operationId: userEditHook
      parameters:
      - type: integer
        format: int64
        description: id of the hook to update
        name: id
        in: path
        required: true
      - name: body
        in: body
        schema:
          $ref: '#/definitions/EditHookOption'
      responses:
        '200':
          $ref: '#/responses/Hook'
  /user/keys:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: List the authenticated user's public keys
      operationId: userCurrentListKeys
      parameters:
      - type: string
        description: fingerprint of the key
        name: fingerprint
        in: query
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/PublicKeyList'
    post:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - user
      summary: Create a public key
      operationId: userCurrentPostKey
      parameters:
      - name: body
        in: body
        schema:
          $ref: '#/definitions/CreateKeyOption'
      responses:
        '201':
          $ref: '#/responses/PublicKey'
        '422':
          $ref: '#/responses/validationError'
  /user/keys/{id}:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: Get a public key
      operationId: userCurrentGetKey
      parameters:
      - type: integer
        format: int64
        description: id of key to get
        name: id
        in: path
        required: true
      responses:
        '200':
          $ref: '#/responses/PublicKey'
        '404':
          $ref: '#/responses/notFound'
    delete:
      produces:
      - application/json
      tags:
      - user
      summary: Delete a public key
      operationId: userCurrentDeleteKey
      parameters:
      - type: integer
        format: int64
        description: id of key to delete
        name: id
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '403':
          $ref: '#/responses/forbidden'
        '404':
          $ref: '#/responses/notFound'
  /user/repos:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: List the repos that the authenticated user owns
      operationId: userCurrentListRepos
      parameters:
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/RepositoryList'
    post:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - user
      summary: Create a repository
      operationId: createCurrentUserRepo
      parameters:
      - name: body
        in: body
        schema:
          $ref: '#/definitions/CreateRepoOption'
      responses:
        '201':
          $ref: '#/responses/Repository'
        '400':
          $ref: '#/responses/error'
        '409':
          description: The repository with the same name already exists.
        '422':
          $ref: '#/responses/validationError'
  /user/settings:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: Get user settings
      operationId: getUserSettings
      responses:
        '200':
          $ref: '#/responses/UserSettings'
    patch:
      produces:
      - application/json
      tags:
      - user
      summary: Update user settings
      operationId: updateUserSettings
      parameters:
      - name: body
        in: body
        schema:
          $ref: '#/definitions/UserSettingsOptions'
      responses:
        '200':
          $ref: '#/responses/UserSettings'
  /user/starred:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: The repos that the authenticated user has starred
      operationId: userCurrentListStarred
      parameters:
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/RepositoryList'
        '403':
          $ref: '#/responses/forbidden'
  /user/starred/{owner}/{repo}:
    get:
      tags:
      - user
      summary: Whether the authenticated is starring the repo
      operationId: userCurrentCheckStarring
      parameters:
      - type: string
        description: owner of the repo
        name: owner
        in: path
        required: true
      - type: string
        description: name of the repo
        name: repo
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '403':
          $ref: '#/responses/forbidden'
        '404':
          $ref: '#/responses/notFound'
    put:
      tags:
      - user
      summary: Star the given repo
      operationId: userCurrentPutStar
      parameters:
      - type: string
        description: owner of the repo to star
        name: owner
        in: path
        required: true
      - type: string
        description: name of the repo to star
        name: repo
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '403':
          $ref: '#/responses/forbidden'
        '404':
          $ref: '#/responses/notFound'
    delete:
      tags:
      - user
      summary: Unstar the given repo
      operationId: userCurrentDeleteStar
      parameters:
      - type: string
        description: owner of the repo to unstar
        name: owner
        in: path
        required: true
      - type: string
        description: name of the repo to unstar
        name: repo
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '403':
          $ref: '#/responses/forbidden'
        '404':
          $ref: '#/responses/notFound'
  /user/stopwatches:
    get:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - user
      summary: Get list of all existing stopwatches
      operationId: userGetStopWatches
      parameters:
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/StopWatchList'
  /user/subscriptions:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: List repositories watched by the authenticated user
      operationId: userCurrentListSubscriptions
      parameters:
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/RepositoryList'
  /user/teams:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: List all the teams a user belongs to
      operationId: userListTeams
      parameters:
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/TeamList'
  /user/times:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: List the current user's tracked times
      operationId: userCurrentTrackedTimes
      parameters:
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      - type: string
        format: date-time
        description: Only show times updated after the given time. This is a timestamp in RFC 3339 format
        name: since
        in: query
      - 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
      responses:
        '200':
          $ref: '#/responses/TrackedTimeList'
  /users/search:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: Search for users
      operationId: userSearch
      parameters:
      - type: string
        description: keyword
        name: q
        in: query
      - type: integer
        format: int64
        description: ID of the user to search for
        name: uid
        in: query
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          description: SearchResults of a successful search
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/definitions/User'
              ok:
                type: boolean
  /users/{username}:
    get:
      produces:
      - application/json
      tags:
      - user
      summary: Get a user
      operationId: userGet
      parameters:
      - type: string
        description: username of the user whose data is to be listed
        name: username
        in: path
        required: true
      responses:
        '200':
          $ref: '#/responses/User'
        '404':
          $ref: '#/responses/notFound'
  /users/{username}/activities/feeds:
    get:
      produces:
      - application/json
      tags:
 

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