Issue types can now be managed using the REST API, expanding the ability to automate and incorporate them in your workflows. Check out our documentation on issue types for more details. You can also review the examples below to get started.
Managing issue types for the organization
You can create, update, delete, and list issue types for an organization.
Creating a new issue type:
curl --request POST \
--url https://api.github.com/orgs/{org}/issue-types \
--header 'authorization: token <YOUR-TOKEN>' \
--header 'content-type: application/json' \
--data '{
"name": "Initiative",
"description": "A large body of work that spans a quarter.",
"color": "orange",
"is_enabled": true
}'
Adding an issue type to an issue
You can specify the issue type when creating a new issue, or update it on an existing issue.
Creating a new issue:
curl --request POST \
--url https://api.github.com/repos/{org}/{repo}/issues \
--header 'authorization: ' \
--header 'content-type: application/json' \
--data '{
"title": "Error when refreshing the settings page",
"type": "Bug"
}'
Updating an issue:
curl --request PATCH \
--url https://api.github.com/repos/{org}/{repo}/issues/{issue_number} \
--header 'authorization: ' \
--header 'content-type: application/json' \
--data '{
"type": "bug"
}'
Searching for issues by issue type
You can search for issues by issue type at the repository or organization level.
Searching within a repository:
curl --request GET \
--url 'https://api.github.com/repos/{org}/{repo}/issues?type=bug' \
--header 'authorization: '
Join the discussion within GitHub Community.
See how to use GitHub for project planning with GitHub Issues, check out what’s on the roadmap, and learn more in the documentation.