Create a gist
POST {{baseUrl}}/gists
Allows you to add a new gist with one or more files.
Note: Don't name your files gistfile
with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally.
Request Body
{"files"=>"<object>", "description"=>"<string>", "public"=>false}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: Created
{"url":"https://api.github.com/gists/aa5a315d61ae9438b18d","forks_url":"https://api.github.com/gists/aa5a315d61ae9438b18d/forks","commits_url":"https://api.github.com/gists/aa5a315d61ae9438b18d/commits","id":"aa5a315d61ae9438b18d","node_id":"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk","git_pull_url":"https://gist.github.com/aa5a315d61ae9438b18d.git","git_push_url":"https://gist.github.com/aa5a315d61ae9438b18d.git","html_url":"https://gist.github.com/aa5a315d61ae9438b18d","created_at":"2010-04-14T02:15:15Z","updated_at":"2011-06-20T11:34:15Z","description":"Hello World Examples","comments":0,"comments_url":"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/"}