GitHub CLI Releases, Gists, and API/POST to a REST endpoint

Create resources through the REST API.

Section: API and GraphQL

POST to a REST endpoint

bash
bash
gh api repos/{owner}/{repo}/issues -f title="Bug report" -f body="Details..."
Explanation

Create resources through the REST API.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing API and GraphQL
Call a REST endpoint
Call a GitHub REST API endpoint.
OpenIn sheetbashsame section
Add custom headers
Call the API with explicit headers.
OpenIn sheetbashsame section
Send JSON from file
Send request payload from a file.
OpenIn sheetbashsame section
Run a GraphQL query inline
Call the GraphQL API with variables.
OpenIn sheetbashsame section
Send a PATCH request
Update resources with a non-GET method.
OpenIn sheetbashsame section
Slurp paginated JSON into an array
Combine paginated results into a single JSON array.
OpenIn sheetbashsame section