GitHub Enterprise Credentials API

Revoke compromised or leaked GitHub credentials.

Operations 1

POST /credentials/revoke Revoke a list of credentials #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/github-enterprise:github-enterprise-credentials-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

github-enterprise-credentials-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Github Enterprise Credentials API
  version: 1.1.4
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  x-github-plan: ghec
  description: 'Operations tagged credentials across 2 of this provider''s published API definitions: github-enterprise-ghec-openapi.json, github-enterprise-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.github.com
tags:
- name: Credentials
  description: Revoke compromised or leaked GitHub credentials.
paths:
  /credentials/revoke:
    post:
      summary: Revoke a list of credentials
      description: 'Submit a list of credentials to be revoked. This endpoint is intended to revoke credentials the caller does not own and may have found exposed on GitHub.com or elsewhere. It can also be used for credentials associated with an old user account that you no longer have access to. Credential owners will be notified of the revocation.


        This endpoint currently accepts the following credential types:

        - Personal access tokens (classic) (`ghp_`)

        - Fine-grained personal access tokens (`github_pat_`)

        - OAuth app access tokens (`gho_`)

        - User-to-server tokens from GitHub Apps (`ghu_`)

        - Refresh tokens from GitHub Apps (`ghr_`)


        Revoked credentials may impact users on GitHub Free, Pro, & Team and GitHub Enterprise Cloud, and GitHub Enterprise Cloud with Enterprise Managed Users.

        GitHub cannot reactivate any credentials that have been revoked; new credentials will need to be generated.


        To prevent abuse, this API is limited to only 60 unauthenticated requests per hour and a max of 1000 tokens per API request.


        > [!NOTE]

        > Any authenticated requests will return a 403.'
      tags:
      - Credentials
      operationId: credentials/revoke
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-cloud@latest/rest/credentials/revoke#revoke-a-list-of-credentials
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                credentials:
                  type: array
                  description: A list of credentials to be revoked, up to 1000 per request.
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1000
              required:
              - credentials
            examples:
              default:
                value:
                  credentials:
                  - REDACTED_GITHUB_TOKEN
                  - github_pat_0A1B2C3D4E5F6G7H8I9J0K_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456
                  - REDACTED_GITHUB_TOKEN
                  - REDACTED_GITHUB_TOKEN
                  - REDACTED_GITHUB_TOKEN
      responses:
        '202':
          $ref: '#/components/responses/accepted'
        '422':
          $ref: '#/components/responses/validation_failed_simple'
        '500':
          $ref: '#/components/responses/internal_error'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: credentials
        subcategory: revoke
    servers:
    - url: https://api.github.com
components:
  responses:
    validation_failed_simple:
      description: Validation failed, or the endpoint has been spammed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/validation-error-simple'
    internal_error:
      description: Internal Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
    accepted:
      description: Accepted
      content:
        application/json:
          schema:
            type: object
          examples:
            default:
              value: null
  schemas:
    basic-error:
      title: Basic Error
      description: Basic Error
      type: object
      properties:
        message:
          type: string
        documentation_url:
          type: string
        url:
          type: string
        status:
          type: string
    validation-error-simple:
      title: Validation Error Simple
      description: Validation Error Simple
      type: object
      required:
      - message
      - documentation_url
      properties:
        message:
          type: string
        documentation_url:
          type: string
        errors:
          type: array
          items:
            type: string
externalDocs:
  description: GitHub Enterprise Cloud REST API
  url: https://docs.github.com/enterprise-cloud@latest/rest/
x-refined-from:
- github-enterprise-ghec-openapi.json
- github-enterprise-openapi.yml