Gitee Users API

The authenticated user, keys, followers, and following.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /user Get my own user profile · Get the authenticated user's profile #
Ask an LLM
“How do I see my own profile on Gitee?”
“What is my user ID and email on the platform?”
Tell an agent
Show my own user profile.
Get the user record for the account I'm signed in as.
GET /user/keys List my SSH public keys · List the authenticated user's SSH public keys #
Ask an LLM
“Which SSH public keys are registered on my account?”
“Can I see all the SSH keys I've added for Git access?”
Tell an agent
List the SSH public keys on my account.
Show every SSH key registered for my user.
POST /user/keys Add an SSH public key to my account · Add an SSH public key for the authenticated user #
Ask an LLM
“How do I add a new SSH public key so I can clone repositories over SSH?”
“Can I give a title when I add an SSH key?”
Tell an agent
Add SSH key {key} to my account.
Add SSH key {key} titled {title} to my user profile.

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/gitee:gitee-users-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

gitee-users-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Gitee Open API v5 (core subset) Users API
  description: A curated, representative subset of the Gitee (码云) Open API v5, the documented REST API of the China-based Git hosting and DevOps platform operated by OSChina / Shenzhen Oschina (开源中国).
  version: 5.4.92
  contact:
    name: Gitee
    url: https://gitee.com
servers:
- url: https://gitee.com/api/v5
  description: Gitee Open API v5 (production)
security:
- accessTokenQuery: []
- bearerAuth: []
- oauth2:
  - projects
tags:
- name: Users
  description: The authenticated user, keys, followers, and following.
paths:
  /user:
    get:
      operationId: getAuthenticatedUser
      tags:
      - Users
      summary: Get the authenticated user's profile
      responses:
        '200':
          description: The authenticated user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /user/keys:
    get:
      operationId: listUserKeys
      tags:
      - Users
      summary: List the authenticated user's SSH public keys
      responses:
        '200':
          description: A list of SSH public keys.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SshKey'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createUserKey
      tags:
      - Users
      summary: Add an SSH public key for the authenticated user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SshKeyInput'
      responses:
        '201':
          description: The created SSH public key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SshKey'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    Error:
      type: object
      properties:
        message:
          type: string
    SshKey:
      allOf:
      - $ref: '#/components/schemas/SshKeyInput'
      - type: object
        properties:
          id:
            type: integer
          created_at:
            type: string
            format: date-time
    User:
      type: object
      properties:
        id:
          type: integer
        login:
          type: string
        name:
          type: string
        html_url:
          type: string
        avatar_url:
          type: string
        type:
          type: string
    SshKeyInput:
      type: object
      required:
      - key
      properties:
        key:
          type: string
        title:
          type: string
  responses:
    Unauthorized:
      description: Missing or invalid access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    accessTokenQuery:
      type: apiKey
      in: query
      name: access_token
      description: Personal access token passed as the `access_token` query parameter. Present on the large majority of Gitee v5 operations.
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Personal access token passed as `Authorization: Bearer <token>`.'
    oauth2:
      type: oauth2
      description: Gitee OAuth2. Authorize at https://gitee.com/oauth/authorize and exchange for a token at https://gitee.com/oauth/token.
      flows:
        authorizationCode:
          authorizationUrl: https://gitee.com/oauth/authorize
          tokenUrl: https://gitee.com/oauth/token
          refreshUrl: https://gitee.com/oauth/token
          scopes:
            user_info: Read the user's profile.
            projects: Read and manage repositories.
            pull_requests: Read and manage pull requests.
            issues: Read and manage issues.
            notes: Read and manage comments.
            keys: Read and manage SSH keys.
            hook: Read and manage webhooks.
            groups: Read and manage organizations.
            gists: Read and manage gists.
            enterprises: Read and manage enterprises.
            emails: Read the user's email addresses.