Skip to content

GitHub: Create issue field for an organization

GitHub orgs.orgsCreateIssueField: arguments, response, policy and SDK examples.

← Orgs operations · Get started

Operation github.orgs_create_issue_field

Provider route: POST /orgs/{org}/issue-fields. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/github with npm, or alter-sdk-github with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { GitHubIntegration } from "@alter-ai/github";
async function execute(input: Parameters<GitHubIntegration["orgs"]["orgsCreateIssueField"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new GitHubIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.orgs.orgsCreateIssueField(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_github import GitHubIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = GitHubIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.orgs.orgs_create_issue_field(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.orgstringRequired within parent
bodyModelRequired within parentExpand Create issue field for an organization — request body — body

Referenced models: Create issue field for an organization — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Create issue field for an organization — response body

Referenced models: Create issue field for an organization — response body

Create issue field for an organization — response body
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternativeA custom attribute defined at the organization level for attaching structured data to issues.
$ (anyOf 1).created_atstringOptionalThe time the issue field was created.
Format: date-time
$ (anyOf 1).data_typestringRequired within parentThe data type of the issue field.
Known values: text, date, single_select, multi_select, number
$ (anyOf 1).descriptionJSONOptional
$ (anyOf 1).description (anyOf 1)stringAlternativeThe description of the issue field.
$ (anyOf 1).description (anyOf 2)nullAlternative
$ (anyOf 1).idJSONRequired within parent
$ (anyOf 1).id (anyOf 1)integerAlternativeThe unique identifier of the issue field.
$ (anyOf 1).id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (anyOf 1).namestringRequired within parentThe name of the issue field.
$ (anyOf 1).node_idstringRequired within parentThe node identifier of the issue field.
$ (anyOf 1).optionsJSONOptional
$ (anyOf 1).options (anyOf 1)arrayAlternativeAvailable options for single select and multi select fields.
$ (anyOf 1).options (anyOf 1)[]objectEach item
$ (anyOf 1).options (anyOf 1)[].colorJSONOptional
$ (anyOf 1).options (anyOf 1)[].color (anyOf 1)stringAlternativeThe color of the option.
Known values: gray, blue, green, yellow, orange, red, pink, purple
$ (anyOf 1).options (anyOf 1)[].color (anyOf 2)nullAlternative
$ (anyOf 1).options (anyOf 1)[].created_atstringOptionalThe time the option was created.
Format: date-time
$ (anyOf 1).options (anyOf 1)[].descriptionJSONOptional
$ (anyOf 1).options (anyOf 1)[].description (anyOf 1)stringAlternativeThe description of the option.
$ (anyOf 1).options (anyOf 1)[].description (anyOf 2)nullAlternative
$ (anyOf 1).options (anyOf 1)[].idJSONRequired within parent
$ (anyOf 1).options (anyOf 1)[].id (anyOf 1)integerAlternativeThe unique identifier of the option.
$ (anyOf 1).options (anyOf 1)[].id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (anyOf 1).options (anyOf 1)[].namestringRequired within parentThe name of the option.
$ (anyOf 1).options (anyOf 1)[].priorityJSONOptional
$ (anyOf 1).options (anyOf 1)[].priority (anyOf 1)JSONAlternative
$ (anyOf 1).options (anyOf 1)[].priority (anyOf 1) (anyOf 1)integerAlternativeThe priority of the option for ordering.
$ (anyOf 1).options (anyOf 1)[].priority (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (anyOf 1).options (anyOf 1)[].priority (anyOf 2)nullAlternative
$ (anyOf 1).options (anyOf 1)[].updated_atstringOptionalThe time the option was last updated.
Format: date-time
$ (anyOf 1).options (anyOf 2)nullAlternative
$ (anyOf 1).updated_atstringOptionalThe time the issue field was last updated.
Format: date-time
$ (anyOf 1).visibilitystringOptionalThe 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).
Known values: organization_members_only, all
$ (anyOf 2)nullAlternative
Create issue field for an organization — request body — body
FieldTypePresenceDescription and constraints
$objectRoot
data_typestringRequired within parentThe data type of the issue field.
One of: text, date, single_select, multi_select, number
descriptionJSONOptional
description (anyOf 1)stringAlternativeDescription of the issue field.
description (anyOf 2)nullAlternative
namestringRequired within parentName of the issue field.
optionsJSONOptional
options (anyOf 1)arrayAlternativeOptions for select fields. Required when data_type is 'single_select' or 'multi_select'.
options (anyOf 1)[]objectEach item
options (anyOf 1)[].colorstringRequired within parentColor for the option.
One of: gray, blue, green, yellow, orange, red, pink, purple
options (anyOf 1)[].descriptionJSONOptional
options (anyOf 1)[].description (anyOf 1)stringAlternativeDescription of the option.
options (anyOf 1)[].description (anyOf 2)nullAlternative
options (anyOf 1)[].namestringRequired within parentName of the option.
options (anyOf 1)[].priorityintegerRequired within parentPriority of the option for ordering.
options (anyOf 2)nullAlternative
visibilitystringOptionalThe 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`.
One of: organization_members_only, all

SDK function policy ID: github.orgs_create_issue_field. Catalog operation: orgs/create-issue-field. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"X-GitHub-Api-Version": "2026-03-10", "User-Agent": "Alter", "Accept": "application/vnd.github+json"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.