How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

GitHub Gists API

The GitHub Gists API lets you programmatically manage gistslightweight code snippets and notesover HTTP. You can create gists (public or secret/unlisted), read individual gists, list public gists, your own, a users, and those youve starred, fetch raw file contents, view version history and commits, update gists by adding/renaming/removing files or changing descriptions, and delete them. It also supports forking, starring/un-starring and checking star status, plus full CRUD for gist comments.

GitHub Gists API is one of 384 APIs that GitHub publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Artifacts, Code, and Gists. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

This API exposes 20 operations across 11 paths, and defines 11 schemas. It is described by OpenAPI 3.0.3, at version 1.1.4.

Requests are made against a single base URL, {protocol}://{hostname}/api/v3.

20 operations 11 paths 11 schemas 3 DELETE11 GET2 PATCH3 POST1 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.3
API Version
1.1.4
Base URL
https://api.github.com/
Authentication
HTTP Bearer
Contact
License
Terms of Service
Resource Areas
1

Authentication & Security 1

GitHub Gists API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (bearerHttpAuthentication).

  • bearerHttpAuthentication — Bearer Token

Paths & Operations 20

Across 11 paths, the API surfaces 20 operations — 3 DELETE, 11 GET, 2 PATCH, 3 POST, 1 PUT. Each is listed below with its method, path, parameters, and response codes.

Gists 20
GET
/gists/public
GitHub List Public Gists
listPublicGists 3 params → 200304403422
GET
/gists/starred
GitHub List Starred Gists
listStarredGists 3 params → 200304401403
GET
/gists/{gist_id}
GitHub Getgist
getgist 1 param → 200304403404
PATCH
/gists/{gist_id}
GitHub Updategist
updategist 1 param body → 200404422
DELETE
/gists/{gist_id}
GitHub Deletegist
deletegist 1 param → 204304403404
GET
/gists/{gist_id}/comments
GitHub List Gist Comments
listGistComments 3 params → 200304403404
POST
/gists/{gist_id}/comments
GitHub Creategist Comment
creategistComment 1 param body → 201304403404
GET
/gists/{gist_id}/comments/{comment_id}
GitHub Getgist Comment
getgistComment 2 params → 200304403404
PATCH
/gists/{gist_id}/comments/{comment_id}
GitHub Updategist Comment
updategistComment 2 params body → 200404
DELETE
/gists/{gist_id}/comments/{comment_id}
GitHub Deletegist Comment
deletegistComment 2 params → 204304403404
GET
/gists/{gist_id}/commits
GitHub List Gist Commits
listGistCommits 3 params → 200304403404
GET
/gists/{gist_id}/forks
GitHub List Gist Forks
listGistForks 3 params → 200304403404
POST
/gists/{gist_id}/forks
GitHub Forkgist
forkgist 1 param → 201304403404422
GET
/gists/{gist_id}/star
GitHub Check Ifgist is Starred
checkIfgistIsStarred 1 param → 204304403404
PUT
/gists/{gist_id}/star
GitHub Stargist
stargist 1 param → 204304403404
DELETE
/gists/{gist_id}/star
GitHub Unstargist
unstargist 1 param → 204304403404
GET
/gists/{gist_id}/{sha}
GitHub Getgist Revision
getgistRevision 2 params → 200403404422
GET
/gists
GitHub List Gists for the Authenticated User
gists/list 3 params → 200304403
POST
/gists
GitHub Create a Gist
gists/create body → 201304403404422
GET
/users/{username}/gists
GitHub List Gists for a User
gists/list-for-user 4 params → 200422

Schemas 11

The contract defines 11 schemas that model the data the API accepts and returns. The most detailed are public-user (39 properties), nullable-simple-user (21 properties), simple-user (21 properties), gist-simple (21 properties). Each schema is shown below with its type and property counts.

nullable-simple-user
object
A GitHub user.
21 properties 18 required
gist-history
object
Gist History
5 properties
gist-commit
object
Gist Commit
5 properties 5 required
public-user
object
Public User
39 properties 31 required
basic-error
object
Basic Error
4 properties
validation-error
object
Validation Error
3 properties 2 required
simple-user
object
A GitHub user.
21 properties 18 required
gist-simple
object
Gist Simple
21 properties
gist-comment
object
A comment made to a gist.
8 properties 8 required
author-association
string
How the author is associated with the repository.
base-gist
object
Base Gist
20 properties 16 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

github-gists-api-openapi.yml Raw ↑

Other APIs GitHub publishes across the network.

GitHub Events API
GitHub Feeds API
GitHub Issues API
GitHub Licenses API
GitHub Markdown API
GitHub Meta API
GitHub Notifications API
GitHub Octocat API
GitHub Projects API
GitHub Repos API
GitHub Search API
GitHub User API
Where this information came from

This is an independent, third-party profile of GitHub Gists API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.