POST
/gists/{gist_id}/forksFork a gist
Creates a fork of a gist for the authenticated user. Supply the gist identifier to select the gist to fork; the response contains the created fork.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
gist_idstringrequired
The unique identifier of the gist to fork.
201Returns the created fork as a gist object, including its identifier, URLs, files, and creation timestamp.
urlstringrequired
forks_urlstringrequired
commits_urlstringrequired
idstringrequired
node_idstringrequired
git_pull_urlstringrequired
git_push_urlstringrequired
html_urlstringrequired
filesobjectrequired
publicbooleanrequired
created_atstringrequired
updated_atstringrequired
descriptionstringrequired
commentsintegerrequired
comments_enabledbooleanoptional
userobjectrequired
A GitHub user.
comments_urlstringrequired
ownerobjectoptional
A GitHub user.
truncatedbooleanoptional
forksarrayoptional
historyarrayoptional
304Returned when the gist has not changed since the last request.
403Returned when the authenticated user is not permitted to fork the gist.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Returned when no gist exists with the given `gist_id`.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Returned when validation fails or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional
Error handling
A 403 is returned when the authenticated user is not permitted to fork the gist. A 404 is returned when the gist_id path parameter does not identify an existing gist. A 422 is returned when validation fails or the endpoint has been spammed.