GitHub Keys API

The Keys API from GitHub — 18 operation(s) for keys.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
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-keys-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Github Keys API
  version: 1.1.4
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  description: 'Operations tagged Keys across 6 of this provider''s published API definitions: github-auth-api-openapi.yml, github-organizations-openapi.yml, github-repo-actions-api-openapi.yml, github-repo-dependabot-api-openapi.yml, github-repo-tags-api-openapi.yml, github-setup-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: '{protocol}://{hostname}/api/v3'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: api.github.com
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: https
- url: '{protocol}://{hostname}'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: api.github.com
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: https
tags:
- name: Keys
paths:
  /setup/api/settings/authorized-keys:
    get:
      summary: GitHub Get All Authorized Ssh Keys
      description: The GET endpoint at /setup/api/settings/authorized-keys in the GitHub Authorization API retrieves a complete list of all authorized SSH keys that have been configured for the system. This endpoint is typically used during setup or administrative operations to audit and review which SSH public keys have been granted access to the GitHub instance, allowing administrators to manage and verify authorized access points for secure shell connections.
      operationId: getAllAuthorizedSshKeys
      tags:
      - Keys
      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
    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:
      - Keys
      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:
      - Keys
      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
    servers:
    - url: '{protocol}://{hostname}/api/v3'
      variables:
        hostname:
          description: Self-hosted Enterprise Server hostname
          default: api.github.com
        protocol:
          description: Self-hosted Enterprise Server protocol
          default: https
  /orgs/{org}/actions/secrets/public-key:
    get:
      summary: GitHub Get an Organization Public Key
      description: 'Gets your public key, which you need to encrypt secrets. You need to

        encrypt a secret before you can create or update secrets.


        The authenticated user must have collaborator access to a repository to create, update, or read secrets.


        OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Keys
      operationId: getAnOrganizationPublicKey
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/secrets#get-an-organization-public-key
      parameters:
      - $ref: '#/components/parameters/org'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/actions-public-key'
              examples:
                default:
                  $ref: '#/components/examples/actions-public-key'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: secrets
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    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
  /orgs/{org}/dependabot/secrets/public-key:
    get:
      summary: GitHub Get an Organization Public Key
      description: 'Gets your public key, which you need to encrypt secrets. You need to

        encrypt a secret before you can create or update secrets.


        OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.'
      tags:
      - Keys
      operationId: getAnOrganizationPublicKey
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/dependabot/secrets#get-an-organization-public-key
      parameters:
      - $ref: '#/components/parameters/org'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dependabot-public-key'
              examples:
                default:
                  $ref: '#/components/examples/dependabot-public-key'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: dependabot
        subcategory: secrets
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    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
  /repos/{owner}/{repo}/actions/caches:
    delete:
      summary: GitHub Delete Github Actions Caches for Repository (using Cache Key)
      description: 'Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref.


        OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Keys
      operationId: deleteGithubActionsCachesForRepositoryUsingCacheKey
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/actions-cache-key-required'
      - $ref: '#/components/parameters/actions-cache-git-ref-full'
      - 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/actions-cache-list'
              examples:
                default:
                  $ref: '#/components/examples/actions-cache-list'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: cache
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    servers:
    - url: '{protocol}://{hostname}'
      variables:
        hostname:
          description: Self-hosted Enterprise Server hostname
          default: api.github.com
        protocol:
          description: Self-hosted Enterprise Server protocol
          default: https
  /repos/{owner}/{repo}/actions/secrets/public-key:
    get:
      summary: GitHub Get Repository Public Key
      description: 'Gets your public key, which you need to encrypt secrets. You need to

        encrypt a secret before you can create or update secrets.


        Anyone with read access to the repository can use this endpoint.


        If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Keys
      operationId: getRepositoryPublicKey
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/secrets#get-a-repository-public-key
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - 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/actions-public-key'
              examples:
                default:
                  $ref: '#/components/examples/actions-public-key'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: secrets
      x-api-evangelist-certified: '2025-07-16'
      x-api-naftiko-published: '2025-07-25'
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    servers:
    - url: '{protocol}://{hostname}'
      variables:
        hostname:
          description: Self-hosted Enterprise Server hostname
          default: api.github.com
        protocol:
          description: Self-hosted Enterprise Server protocol
          default: https
  /repos/{owner}/{repo}/dependabot/secrets/public-key:
    get:
      summary: GitHub Get Repository Public Key
      description: 'Gets your public key, which you need to encrypt secrets. You need to

        encrypt a secret before you can create or update secrets. Anyone with read access

        to the repository can use this endpoint.


        OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint if the repository is private.'
      tags:
      - Keys
      operationId: getRepositoryDependabotSecretsPublicKey
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/dependabot/secrets#get-a-repository-public-key
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - 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/dependabot-public-key'
              examples:
                default:
                  $ref: '#/components/examples/dependabot-public-key'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: dependabot
        subcategory: secrets
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    servers:
    - url: '{protocol}://{hostname}'
      variables:
        hostname:
          description: Self-hosted Enterprise Server hostname
          default: api.github.com
        protocol:
          description: Self-hosted Enterprise Server protocol
          default: https
  /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key:
    get:
      summary: GitHub Get an Environment Public Key
      description: 'Get the public key for an environment, which you need to encrypt environment

        secrets. You need to encrypt a secret before you can create or update secrets.


        Anyone with read access to the repository can use this endpoint.


        If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Keys
      operationId: getAnEnvironmentPublicKey
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/secrets#get-an-environment-public-key
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/environment-name'
      - 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/actions-public-key'
              examples:
                default:
                  $ref: '#/components/examples/actions-public-key'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: secrets
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    servers:
    - url: '{protocol}://{hostname}'
      variables:
        hostname:
          description: Self-hosted Enterprise Server hostname
          default: api.github.com
        protocol:
          description: Self-hosted Enterprise Server protocol
          default: https
  /repos/{owner}/{repo}/keys:
    get:
      summary: GitHub List Deploy Keys
      description: The List Deploy Keys operation retrieves all deploy keys configured for a specific GitHub repository. Deploy keys are SSH keys that grant read-only or read-write access to a single repository, commonly used for deployment automation and CI/CD pipelines. This GET endpoint requires the repository owner and name as path parameters and returns an array of deploy key objects, each containing details such as the key ID, title, public key content, verification status, creation date, and whether the key has read-only or write access. Authentication is required, and the authenticated user must have admin access to the repository to successfully retrieve the list of deploy keys.
      tags:
      - Keys
      operationId: listDeployKeys
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/deploy-keys/deploy-keys#list-deploy-keys
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $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/deploy-key'
              examples:
                default:
                  $ref: '#/components/examples/deploy-key-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: deploy-keys
        subcategory: deploy-keys
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create Deploy Key
      description: You can create a read-only deploy key.
      tags:
      - Keys
      operationId: createDeployKey
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/deploy-keys/deploy-keys#create-a-deploy-key
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - 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:
              type: object
              properties:
                title:
                  type: string
                  description: name for the key.
                key:
                  type: string
                  description: The contents of the key.
                read_only:
                  type: boolean
                  description: 'If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write.


                    Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.9/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/enterprise-server@3.9/articles/permission-levels-for-a-user-account-repository/)."'
              required:
              - key
            examples:
              default:
                value:
                  title: octocat@octomac
                  key: ssh-rsa AAA...
                  read_only: true
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deploy-key'
              examples:
                default:
                  $ref: '#/components/examples/deploy-key'
          headers:
            Location:
              example: https://api.github.com/repos/octocat/Hello-World/keys/1
              schema:
                type: string
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: deploy-keys
        subcategory: deploy-keys
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    servers:
    - url: '{protocol}://{hostname}'
      variables:
        hostname:
          description: Self-hosted Enterprise Server hostname
          default: api.github.com
        protocol:
          description: Self-hosted Enterprise Server protocol
          default: https
  /repos/{owner}/{repo}/keys/{key_id}:
    get:
      summary: GitHub Get Deploy Key
      description: The Get Deploy Key operation retrieves detailed information about a specific deploy key configured for a GitHub repository. By making a GET request to /repos/{owner}/{repo}/keys/{key_id}, authenticated users with appropriate permissions can access the deploy key's metadata including its unique identifier, title, the public SSH key string, creation timestamp, verification status, and whether it has read-only or read-write access to the repository. This endpoint is useful for auditing deploy keys, verifying their configuration, or retrieving key details before performing updates or deletions. The caller must have admin access to the repository to successfully retrieve deploy key information, and the key_id parameter must correspond to an existing deploy key within the specified repository.
      tags:
      - Keys
      operationId: getDeployKey
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/deploy-keys/deploy-keys#get-a-deploy-key
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $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/deploy-key'
              examples:
                default:
                  $ref: '#/components/examples/deploy-key'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: deploy-keys
        subcategory: deploy-keys
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete Deploy Key
      description: Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead.
      tags:
      - Keys
      operationId: deleteDeployKey
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/deploy-keys/deploy-keys#delete-a-deploy-key
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $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
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: deploy-keys
        subcategory: deploy-keys
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    servers:
    - url: '{protocol}://{hostname}'
      variables:
        hostname:
          description: Self-hosted Enterprise Server hostname
          default: api.github.com
        protocol:
          description: Self-hosted Enterprise Server protocol
          default: https
components:
  examples:
    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
    actions-public-key:
      value:
        key_id: 012345678912345678
        key: 2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234
    dependabot-public-key:
      value:
        key_id: 012345678912345678
        key: 2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234
    actions-cache-list:
      value:
        total_count: 1
        actions_caches:
        - id: 505
          ref: refs/heads/main
          key: Linux-node-958aff96db2d75d67787d1e634ae70b659de937b
          version: 73885106f58cc52a7df9ec4d4a5622a5614813162cb516c759a30af6bf56e6f0
          last_accessed_at: '2019-01-24T22:45:36.000Z'
          created_at: '2019-01-24T22:45:36.000Z'
          size_in_bytes: 1024
    deploy-key-items:
      value:
      - id: 1
        key: ssh-rsa AAA...
        url: https://api.github.com/repos/octocat/Hello-World/keys/1
        title: octocat@octomac
        verified: true
        created_at: '2014-12-10T15:53:42Z'
        read_only: true
        added_by: octocat
        last_used: '2022-01-10T15:53:42Z'
    deploy-key:
      value:
        id: 1
        key: ssh-rsa AAA...
        url: https://api.github.com/repos/octocat/Hello-World/keys/1
        title: octocat@octomac
        verified: true
        created_at: '2014-12-10T15:53:42Z'
        read_only: true
        added_by: octocat
        last_used: '2022-01-10T15:53:42Z'
  schemas:
    ssh-key:
      type: object
      properties:
        key:
          type: string
          example: example_value
        pretty-print:
          type: string
          example: example_value
    actions-public-key:
      title: ActionsPublicKey
      description: The public key used for setting Actions Secrets.
      type: object
      properties:
        key_id:
          description: The identifier for the key.
          type: string
          example: '1234567'
        key:
          description: The Base64 encoded public key.
          type: string
          example: hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs=
        id:
          type: integer
          example: 2
        url:
          type: string
          example: https://api.github.com/user/keys/2
        title:
          type: string
          example: ssh-rsa AAAAB3NzaC1yc2EAAA
        created_at:
          type: string
          example: '2011-01-26T19:01:12Z'
      required:
      - key_id
      - key
    dependabot-public-key:
      title: DependabotPublicKey
      description: The public key used for setting Dependabot

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