Sample - GitHub REST API
POST/orgs/{org}/issue-fields

Create issue field for an organization

Creates a new issue field for an organization.

You can find out more about issue fields in Managing issue fields in an organization.

To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter · 5 body fields
orgstringrequired
The organization name. The name is not case sensitive.
namestringrequired
Name of the issue field.
descriptionstringoptional
Description of the issue field.
data_typestringrequired
The data type of the issue field.
Allowed:textdatesingle_selectmulti_selectnumber
visibilitystringoptional
The visibility of the issue field. Can be `organization_members_only` (visible only within the organization) or `all` (visible to all users who can see issues). Only used when the visibility settings feature is enabled. Defaults to `organization_members_only`.
Allowed:organization_members_onlyall
optionsarray<object>optional
Options for select fields. Required when data_type is 'single_select' or 'multi_select'.

3 status codes
200Response
idintegerrequired
The unique identifier of the issue field.
node_idstringrequired
The node identifier of the issue field.
namestringrequired
The name of the issue field.
descriptionstringoptional
The description of the issue field.
data_typestringrequired
The data type of the issue field.
Allowed:textdatesingle_selectmulti_selectnumber
visibilitystringoptional
The visibility of the issue field. Can be `organization_members_only` (visible only within the organization) or `all` (visible to all users who can see issues).
Allowed:organization_members_onlyall
optionsarray<object>optional
Available options for single select and multi select fields.
created_atstringoptional
The time the issue field was created.
updated_atstringoptional
The time the issue field was last updated.
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Validation failed, or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<string>optional

Error handling

A 404 is returned: Resource not found. A 422 is returned: Validation failed, or the endpoint has been spammed.