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 129 APIs that GitHub publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 4 JSON Schema definitions.

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

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

Requests are made against 2 base URLs: https://api.github.com, {protocol}://{hostname}/api/v3.

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

Metadata

The identity and technical contract details declared by the specification.

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

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

View, modify your gists.

GET
/gists
List gists for the authenticated user
gists/list 3 params → 200304403
POST
/gists
Create a gist
gists/create body → 201422304404403
GET
/gists/public
List public gists
gists/list-public 3 params → 200422304403
GET
/gists/starred
List starred gists
gists/list-starred 3 params → 200401304403
GET
/gists/{gist_id}
Get a gist
gists/get 1 param → 200403404304
PATCH
/gists/{gist_id}
Update a gist
gists/update 1 param body → 200422404
DELETE
/gists/{gist_id}
Delete a gist
gists/delete 1 param → 204404304403
GET
/gists/{gist_id}/comments
List gist comments
gists/list-comments 3 params → 200304404403
POST
/gists/{gist_id}/comments
Create a gist comment
gists/create-comment 1 param body → 201304404403
GET
/gists/{gist_id}/comments/{comment_id}
Get a gist comment
gists/get-comment 2 params → 200304404403
PATCH
/gists/{gist_id}/comments/{comment_id}
Update a gist comment
gists/update-comment 2 params body → 200404
DELETE
/gists/{gist_id}/comments/{comment_id}
Delete a gist comment
gists/delete-comment 2 params → 204304404403
GET
/gists/{gist_id}/commits
List gist commits
gists/list-commits 3 params → 200404304403
GET
/gists/{gist_id}/forks
List gist forks
gists/list-forks 3 params → 200404304403
POST
/gists/{gist_id}/forks
Fork a gist
gists/fork 1 param → 201404422304403
GET
/gists/{gist_id}/star
Check if a gist is starred
gists/check-is-starred 1 param → 204404304403
PUT
/gists/{gist_id}/star
Star a gist
gists/star 1 param → 204404304403
DELETE
/gists/{gist_id}/star
Unstar a gist
gists/unstar 1 param → 204304404403
GET
/gists/{gist_id}/{sha}
Get a gist revision
gists/get-revision 2 params → 200422404403
GET
/users/{username}/gists
List gists for a user
gists/list-for-user 4 params → 200422

Schemas 21

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

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

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 Issues API
GitHub Licenses API
GitHub Markdown API
GitHub Meta API
GitHub Projects API
GitHub Repos API
GitHub Search API
GitHub User API
GitHub Deployments API
GitHub Releases API
GitHub Pages API
GitHub Git Database 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.