Create a gist
POST
/gistsCreates a gist owned by the authenticated caller.
Files are provided as an object keyed by filename. Entries without a
content value are dropped; at least one file with content is required.
When title is omitted it is derived from the first filename.
Request
Headers
| Name | Type | Scopes |
|---|---|---|
Authorizationrequired | string | gist:write |
Body parameters
GistCreateRequestrequiredapplication/json
| Field | Type | Description |
|---|---|---|
titleoptional | string | Optional; derived from the first filename when omitted. |
descriptionoptional | string | |
visibilityoptional | string: public | unlisted | private | |
filesrequired | map<string, GistCreateFileInput> | Files keyed by filename. At least one entry must have content. |
↳contentoptional | string | File body. Entries without content are dropped. |
Responses
| Status | Body | Description |
|---|---|---|
201 | Gist | The created gist. |
Headers:Location | ||
401 | Error | Missing or invalid credentials. |
403 | Error | The token lacks the required scope or permission. |
422 | Error | The request body failed validation. |