GitHub Ssh API

The Ssh API from GitHub — 6 operation(s) for ssh.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
Documentation
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/ https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/codes-of-conduct/codes-of-conduct
📖
Documentation
https://docs.github.com/en/rest/emojis
📖
Documentation
https://docs.github.com/en/rest/gitignore
📖
Documentation
https://docs.github.com/en/rest/apps/installations
📖
Documentation
https://docs.github.com/en/rest/enterprise-admin
📖
Documentation
https://docs.github.com/en/rest/activity/events
📖
Documentation
https://docs.github.com/en/rest/orgs
📖
Documentation
https://docs.github.com/en/rest/rate-limit
📖
Documentation
https://docs.github.com/en/enterprise-cloud@latest/rest/scim
📖
Documentation
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/teams
📖
Documentation
https://docs.github.com/en/rest/meta/meta
📖
Documentation
https://docs.github.com/en/rest/actions
📖
Documentation
https://docs.github.com/en/rest/branches
📖
Documentation
https://docs.github.com/en/rest/code-scanning
📖
Documentation
https://docs.github.com/en/rest/collaborators
📖
Documentation
https://docs.github.com/en/rest/dependabot
📖
Documentation
https://docs.github.com/en/rest/webhooks
📖
Documentation
https://docs.github.com/en/rest/pulls
📖
Documentation
https://docs.github.com/en/rest/git/tags
📖
Documentation
https://docs.github.com/en/rest/repos/autolinks
📖
Documentation
https://docs.github.com/en/rest/collaborators/invitations

Specifications

Other Resources

OpenAPI Specification

github-ssh-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.1.4
  title: GitHub Application About Ssh API
  description: 'Use the REST API to retrieve information about GitHub Apps and GitHub App

    installations.'
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  x-github-plan: ghes
  x-github-release: 3.9
servers:
- url: '{protocol}://{hostname}/api/v3'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: HOSTNAME
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: http
tags:
- name: Ssh
paths:
  /setup/api/settings/authorized-keys:
    post:
      summary: GitHub Add an Authorized Ssh Key
      description: '**Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode).'
      operationId: addAnAuthorizedSshKey
      tags:
      - Ssh
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/management-console#add-an-authorized-ssh-key
      servers:
      - url: '{protocol}://{hostname}'
        variables:
          hostname:
            default: HOSTNAME
            description: Self-hosted Enterprise Server hostname
          protocol:
            default: http
            description: Self-hosted Enterprise Server protocol
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ssh-key'
              examples:
                default:
                  $ref: '#/components/examples/ssh-key-items'
        '401':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                authorized_key:
                  type: string
                  description: The public SSH key.
              required:
              - authorized_key
            examples:
              default:
                value:
                  authorized_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCssTL/Vtu/ODLTj0VtZoRAbvf7uiv5997GyDq0MoAZUjb5jmA5wYe2/wF6sFuhiZTnZoF1ZtCHunPp0hM/GHrn6VySBhNncx14YO8FPt1CIhEeRMSEjUK9cY3xAbS365oXY8vnUHJsS9+1tr/2bx/+4NJfcUt/Ezf1OR/0LStQXw==
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: management-console
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Remove an Authorized Ssh Key
      description: '**Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode).'
      operationId: removeAnAuthorizedSshKey
      tags:
      - Ssh
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/management-console#remove-an-authorized-ssh-key
      servers:
      - url: '{protocol}://{hostname}'
        variables:
          hostname:
            default: HOSTNAME
            description: Self-hosted Enterprise Server hostname
          protocol:
            default: http
            description: Self-hosted Enterprise Server protocol
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ssh-key'
              examples:
                default:
                  $ref: '#/components/examples/ssh-key-items'
        '401':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                authorized_key:
                  type: string
                  description: The public SSH key.
              required:
              - authorized_key
            examples:
              default:
                value:
                  authorized_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCssTL/Vtu/ODLTj0VtZoRAbvf7uiv5997GyDq0MoAZUjb5jmA5wYe2/wF6sFuhiZTnZoF1ZtCHunPp0hM/GHrn6VySBhNncx14YO8FPt1CIhEeRMSEjUK9cY3xAbS365oXY8vnUHJsS9+1tr/2bx/+4NJfcUt/Ezf1OR/0LStQXw==
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: management-console
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    get:
      summary: GitHub Get All Authorized Ssh Keys
      description: The GitHub Setup API endpoint `/setup/api/settings/authorized-keys` with the GET method retrieves a complete list of all authorized SSH keys that have been configured for the GitHub instance. This operation allows administrators to view all SSH public keys that are currently authorized for authentication purposes, providing visibility into which keys have access to the system. The endpoint returns information about each authorized key, which typically includes details such as the key fingerprint, key type, and associated metadata. This is particularly useful for security audits, access management, and ensuring that only approved SSH keys maintain access to the GitHub server.
      operationId: getAllAuthorizedSshKeys
      tags:
      - Ssh
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/management-console#get-all-authorized-ssh-keys
      servers:
      - url: '{protocol}://{hostname}'
        variables:
          hostname:
            default: HOSTNAME
            description: Self-hosted Enterprise Server hostname
          protocol:
            default: http
            description: Self-hosted Enterprise Server protocol
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ssh-key'
              examples:
                default:
                  $ref: '#/components/examples/ssh-key-items'
        '401':
          description: Unauthorized
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: management-console
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /user/keys:
    get:
      summary: GitHub List Public Ssh Keys for the Authenticated User
      description: 'Lists the public SSH keys for the authenticated user''s GitHub account.


        OAuth app tokens and personal access tokens (classic) need the `read:public_key` scope to use this endpoint.'
      tags:
      - Ssh
      operationId: listPublicSshKeysForTheAuthenticatedUser
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/users/keys#list-public-ssh-keys-for-the-authenticated-user
      parameters:
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/key'
              examples:
                default:
                  $ref: '#/components/examples/key-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
        '304':
          $ref: '#/components/responses/not_modified'
        '401':
          $ref: '#/components/responses/requires_authentication'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: users
        subcategory: keys
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create Public Ssh Key for the Authenticated User
      description: 'Adds a public SSH key to the authenticated user''s GitHub account.


        OAuth app tokens and personal access tokens (classic) need the `write:gpg_key` scope to use this endpoint.'
      operationId: createPublicSshKeyForTheAuthenticatedUser
      tags:
      - Ssh
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/users/keys#create-a-public-ssh-key-for-the-authenticated-user
      parameters:
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                title:
                  description: A descriptive name for the new key.
                  type: string
                  example: Personal MacBook Air
                key:
                  description: The public SSH key to add to your GitHub account.
                  type: string
                  pattern: '^ssh-(rsa|dss|ed25519) |^ecdsa-sha2-nistp(256|384|521) '
              required:
              - key
              type: object
            examples:
              default:
                value:
                  title: ssh-rsa AAAAB3NzaC1yc2EAAA
                  key: 2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/key'
              examples:
                default:
                  $ref: '#/components/examples/key'
        '304':
          $ref: '#/components/responses/not_modified'
        '401':
          $ref: '#/components/responses/requires_authentication'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: users
        subcategory: keys
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /user/keys/{key_id}:
    get:
      summary: GitHub Get Public Ssh Key for the Authenticated User
      description: 'View extended details for a single public SSH key.


        OAuth app tokens and personal access tokens (classic) need the `read:public_key` scope to use this endpoint.'
      tags:
      - Ssh
      operationId: getPublicSshKeyForTheAuthenticatedUser
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/users/keys#get-a-public-ssh-key-for-the-authenticated-user
      parameters:
      - $ref: '#/components/parameters/key-id'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/key'
              examples:
                default:
                  $ref: '#/components/examples/key'
        '304':
          $ref: '#/components/responses/not_modified'
        '401':
          $ref: '#/components/responses/requires_authentication'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: users
        subcategory: keys
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete Public Ssh Key for the Authenticated User
      description: 'Removes a public SSH key from the authenticated user''s GitHub account.


        OAuth app tokens and personal access tokens (classic) need the `admin:public_key` scope to use this endpoint.'
      tags:
      - Ssh
      operationId: deletePublicSshKeyForTheAuthenticatedUser
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/users/keys#delete-a-public-ssh-key-for-the-authenticated-user
      parameters:
      - $ref: '#/components/parameters/key-id'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '204':
          description: Response
        '304':
          $ref: '#/components/responses/not_modified'
        '401':
          $ref: '#/components/responses/requires_authentication'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: users
        subcategory: keys
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /user/ssh_signing_keys:
    get:
      summary: GitHub List Ssh Signing Keys for the Authenticated User
      description: 'Lists the SSH signing keys for the authenticated user''s GitHub account.


        OAuth app tokens and personal access tokens (classic) need the `read:ssh_signing_key` scope to use this endpoint.'
      tags:
      - Ssh
      operationId: listSshSigningKeysForTheAuthenticatedUser
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/users/ssh-signing-keys#list-ssh-signing-keys-for-the-authenticated-user
      parameters:
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ssh-signing-key'
              examples:
                default:
                  $ref: '#/components/examples/ssh-signing-key-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
        '304':
          $ref: '#/components/responses/not_modified'
        '401':
          $ref: '#/components/responses/requires_authentication'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        previews: []
        category: users
        subcategory: ssh-signing-keys
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create Ssh Signing Key for the Authenticated User
      description: 'Creates an SSH signing key for the authenticated user''s GitHub account.


        OAuth app tokens and personal access tokens (classic) need the `write:ssh_signing_key` scope to use this endpoint.'
      operationId: createSshSigningKeyForTheAuthenticatedUser
      tags:
      - Ssh
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/users/ssh-signing-keys#create-a-ssh-signing-key-for-the-authenticated-user
      parameters:
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                title:
                  description: A descriptive name for the new key.
                  type: string
                  example: Personal MacBook Air
                key:
                  description: The public SSH key to add to your GitHub account. For more information, see "[Checking for existing SSH keys](https://docs.github.com/enterprise-server@3.9/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys)."
                  type: string
                  pattern: '^ssh-(rsa|dss|ed25519) |^ecdsa-sha2-nistp(256|384|521) |^(sk-ssh-ed25519|sk-ecdsa-sha2-nistp256)@openssh.com '
              required:
              - key
              type: object
            examples:
              default:
                value:
                  key: 2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234
                  title: ssh-rsa AAAAB3NzaC1yc2EAAA
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ssh-signing-key'
              examples:
                default:
                  $ref: '#/components/examples/ssh-signing-key'
        '304':
          $ref: '#/components/responses/not_modified'
        '401':
          $ref: '#/components/responses/requires_authentication'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: users
        subcategory: ssh-signing-keys
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /user/ssh_signing_keys/{ssh_signing_key_id}:
    get:
      summary: GitHub Get an Ssh Signing Key for the Authenticated User
      description: 'Gets extended details for an SSH signing key.


        OAuth app tokens and personal access tokens (classic) need the `read:ssh_signing_key` scope to use this endpoint.'
      tags:
      - Ssh
      operationId: getAnSshSigningKeyForTheAuthenticatedUser
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/users/ssh-signing-keys#get-an-ssh-signing-key-for-the-authenticated-user
      parameters:
      - $ref: '#/components/parameters/ssh-signing-key-id'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ssh-signing-key'
              examples:
                default:
                  $ref: '#/components/examples/ssh-signing-key'
        '304':
          $ref: '#/components/responses/not_modified'
        '401':
          $ref: '#/components/responses/requires_authentication'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: users
        subcategory: ssh-signing-keys
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete an Ssh Signing Key for the Authenticated User
      description: 'Deletes an SSH signing key from the authenticated user''s GitHub account.


        OAuth app tokens and personal access tokens (classic) need the `admin:ssh_signing_key` scope to use this endpoint.'
      tags:
      - Ssh
      operationId: deleteAnSshSigningKeyForTheAuthenticatedUser
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/users/ssh-signing-keys#delete-an-ssh-signing-key-for-the-authenticated-user
      parameters:
      - $ref: '#/components/parameters/ssh-signing-key-id'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '204':
          description: Response
        '304':
          $ref: '#/components/responses/not_modified'
        '401':
          $ref: '#/components/responses/requires_authentication'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: users
        subcategory: ssh-signing-keys
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /users/{username}/ssh_signing_keys:
    get:
      summary: GitHub List Ssh Signing Keys for User
      description: The GitHub User API endpoint `/users/{username}/ssh_signing_keys` using the GET method retrieves a publicly available list of SSH signing keys for a specified GitHub user. This endpoint allows developers to programmatically access the SSH keys that a user has configured for signing commits and tags, which are used to verify the authenticity of contributions made by that user. The operation requires the username as a path parameter and returns an array of SSH signing key objects containing details such as the key identifier, the actual key content, and metadata about when the key was created. This is particularly useful for verification workflows, security audits, or applications that need to validate signed commits from specific users within the GitHub ecosystem.
      tags:
      - Ssh
      operationId: listSshSigningKeysForUser
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/users/ssh-signing-keys#list-ssh-signing-keys-for-a-user
      parameters:
      - $ref: '#/components/parameters/username'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ssh-signing-key'
              examples:
                default:
                  $ref: '#/components/examples/ssh-signing-key-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: users
        subcategory: ssh-signing-keys
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  examples:
    ssh-signing-key-items:
      value:
      - key: 2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234
        id: 2
        url: https://api.github.com/user/keys/2
        title: ssh-rsa AAAAB3NzaC1yc2EAAA
        created_at: '2020-06-11T21:31:57Z'
      - key: 2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJy931234
        id: 3
        url: https://api.github.com/user/keys/3
        title: ssh-rsa AAAAB3NzaC1yc2EAAB
        created_at: '2020-07-11T21:31:57Z'
    ssh-key-items:
      value:
      - key: ssh-rsa AAAAB3NzaC1yc2EAAAAB...
        pretty-print: ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64
      - key: ssh-rsa AAAAB3NzaC1yc2EAAAAB...
        pretty-print: ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64
      - key: ssh-rsa AAAAB3NzaC1yc2EAAAAB...
        pretty-print: ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64
    key:
      value:
        key: 2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234
        id: 2
        url: https://api.github.com/user/keys/2
        title: ssh-rsa AAAAB3NzaC1yc2EAAA
        created_at: '2020-06-11T21:31:57Z'
        verified: false
        read_only: false
    ssh-signing-key:
      value:
        key: 2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234
        id: 2
        url: https://api.github.com/user/keys/2
        title: ssh-rsa AAAAB3NzaC1yc2EAAA
        created_at: '2020-06-11T21:31:57Z'
    key-items:
      value:
      - key: 2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234
        id: 2
        url: https://api.github.com/user/keys/2
        title: ssh-rsa AAAAB3NzaC1yc2EAAA
        created_at: '2020-06-11T21:31:57Z'
        verified: false
        read_only: false
      - key: 2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJy931234
        id: 3
        url: https://api.github.com/user/keys/3
        title: ssh-rsa AAAAB3NzaC1yc2EAAB
        created_at: '2020-07-11T21:31:57Z'
        verified: false
        read_only: false
  responses:
    forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
    not_found:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
    requires_authentication:
      description: Requires authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
    not_modified:
      description: Not modified
    validation_failed:
      description: Validation failed, or the endpoint has been spammed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/validation-error'
  parameters:
    username:
      name: username
      description: The handle for the GitHub user account.
      in: path
      required: true
      schema:
        type: string
    ssh-signing-key-id:
      name: ssh_signing_key_id
      description: The unique identifier of the SSH signing key.
      in: path
      required: true
      schema:
        type: integer
    key-id:
      name: key_id
      description: The unique identifier of the key.
      in: path
      required: true
      schema:
        type: integer
    per-page:
      name: per_page
      description: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
      in: query
      schema:
        type: integer
        default: 30
    page:
      name: page
      description: The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
      in: query
      schema:
        type: integer
        default: 1
  headers:
    link:
      example: <https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"
      schema:
        type: string
  schemas:
    basic-error:
      title: Basic Error
      description: Basic Error
      type: object
      properties:
        message:
          type: string
          example: Example body text
        documentation_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        status:
          type: string
          example: open
    ssh-signing-key:
      title: SSH Signing Key
      description: A public SSH key used to sign Git commits
      type: object
      properties:
        key:
          type: string
          example: example_value
        id:
          type: integer
          example: 42
        title:
          type: string
          example: Example Title
        created_at:
          type: string
          format: date-time
          example: '2026-04-17T12:00:00Z'
      required:
      - key
      - id
      - title
      - created_at
    validation-error:
      title: Validation Error
      description: Validation Error
      type: object
      required:
      - message
      - documentation_url
      properties:
        message:
          type: string
          example: Example body text
        documentation_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        errors:
          type: array
          items:
            type: object
            required:
        

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