{"meta":{"title":"Puntos de conexión de la API REST para campos de problema","intro":"Use la API REST para crear y administrar campos de problema para una organización.","product":"REST API","breadcrumbs":[{"href":"/es/rest","title":"REST API"},{"href":"/es/rest/orgs","title":"Las organizaciones"},{"href":"/es/rest/orgs/issue-fields","title":"Campos de problema"}],"documentType":"article"},"body":"# Puntos de conexión de la API REST para campos de problema\n\nUse la API REST para crear y administrar campos de problema para una organización.\n\n\n> [!NOTE]\n> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2026-03-10`. Curl examples below omit these standard headers for brevity.\n\n\n## List issue fields for an organization\n\n```\nGET /orgs/{org}/issue-fields\n```\n\nLists all issue fields for an organization. OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - OK\n\n\n- **404** - Resource not found\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/issue-fields\n```\n\n**Response schema (Status: 200):**\n\nArray of `Issue Field`:\n  * `id`: required, integer\n  * `node_id`: required, string\n  * `name`: required, string\n  * `description`: string or null\n  * `data_type`: required, string, enum: `text`, `date`, `single_select`, `number`\n  * `visibility`: string, enum: `organization_members_only`, `all`\n  * `options`: array of objects or null:\n    * `id`: required, integer\n    * `name`: required, string\n    * `description`: string or null\n    * `color`: string or null, enum: `gray`, `blue`, `green`, `yellow`, `orange`, `red`, `pink`, `purple`, `null`\n    * `priority`: integer or null\n    * `created_at`: string, format: date-time\n    * `updated_at`: string, format: date-time\n  * `created_at`: string, format: date-time\n  * `updated_at`: string, format: date-time\n\n\n\n\n\n## Create issue field for an organization\n\n```\nPOST /orgs/{org}/issue-fields\n```\n\nCreates a new issue field for an organization.\nYou can find out more about issue fields in Managing issue fields in an organization.\nTo use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and\npersonal access tokens (classic) need the admin:org scope to use this endpoint.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n\n\n\n#### Body parameters\n\n- **`name`** (string) (required)\n  Name of the issue field.\n\n- **`description`** (string or null)\n  Description of the issue field.\n\n- **`data_type`** (string) (required)\n  The data type of the issue field.\n  Can be one of: `text`, `date`, `single_select`, `number`\n\n- **`visibility`** (string)\n  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.\n  Can be one of: `organization_members_only`, `all`\n\n- **`options`** (array of objects or null)\n  Options for single select fields. Required when data_type is 'single_select'.\n  - **`name`** (string) (required)\n    Name of the option.\n  - **`description`** (string or null)\n    Description of the option.\n  - **`color`** (string) (required)\n    Color for the option.\n    Can be one of: `gray`, `blue`, `green`, `yellow`, `orange`, `red`, `pink`, `purple`\n  - **`priority`** (integer) (required)\n    Priority of the option for ordering.\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - OK\n\n\n- **404** - Resource not found\n\n\n- **422** - Validation failed, or the endpoint has been spammed.\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/orgs/ORG/issue-fields \\\n  -d '{\n  \"name\": \"Priority\",\n  \"description\": \"Level of importance for the issue\",\n  \"data_type\": \"single_select\",\n  \"options\": [\n    {\n      \"name\": \"High\",\n      \"description\": \"High priority\",\n      \"color\": \"red\"\n    },\n    {\n      \"name\": \"Medium\",\n      \"description\": \"Medium priority\",\n      \"color\": \"yellow\"\n    },\n    {\n      \"name\": \"Low\",\n      \"description\": \"Low priority\",\n      \"color\": \"green\"\n    }\n  ]\n}'\n```\n\n**Response schema (Status: 200):**\n\n* `id`: required, integer\n* `node_id`: required, string\n* `name`: required, string\n* `description`: string or null\n* `data_type`: required, string, enum: `text`, `date`, `single_select`, `number`\n* `visibility`: string, enum: `organization_members_only`, `all`\n* `options`: array of objects or null:\n  * `id`: required, integer\n  * `name`: required, string\n  * `description`: string or null\n  * `color`: string or null, enum: `gray`, `blue`, `green`, `yellow`, `orange`, `red`, `pink`, `purple`, `null`\n  * `priority`: integer or null\n  * `created_at`: string, format: date-time\n  * `updated_at`: string, format: date-time\n* `created_at`: string, format: date-time\n* `updated_at`: string, format: date-time\n\n\n\n\n\n## Update issue field for an organization\n\n```\nPATCH /orgs/{org}/issue-fields/{issue_field_id}\n```\n\nUpdates an issue field for an organization.\nYou can find out more about issue fields in Managing issue fields in an organization.\nTo use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and\npersonal access tokens (classic) need the admin:org scope to use this endpoint.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n- **`issue_field_id`** (integer) (required)\n  The unique identifier of the issue field.\n\n\n\n\n#### Body parameters\n\n- **`name`** (string)\n  Name of the issue field.\n\n- **`description`** (string or null)\n  Description of the issue field.\n\n- **`visibility`** (string)\n  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.\n  Can be one of: `organization_members_only`, `all`\n\n- **`options`** (array of objects)\n  Options for single select fields. Only applicable when updating single_select fields. When provided, this array replaces the entire existing set of options rather than adding to or updating individual options. To retain or update an existing option, include it in the array with its id. Options sent without an id are treated as new options and may cause existing options to be deleted and recreated.\n  - **`id`** (integer)\n    The id of an existing option to retain or update. Omit this when creating a new option.\n  - **`name`** (string) (required)\n    Name of the option.\n  - **`description`** (string or null)\n    Description of the option.\n  - **`color`** (string) (required)\n    Color for the option.\n    Can be one of: `gray`, `blue`, `green`, `yellow`, `orange`, `red`, `pink`, `purple`\n  - **`priority`** (integer) (required)\n    Priority of the option for ordering.\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - OK\n\n\n- **404** - Resource not found\n\n\n- **422** - Validation failed, or the endpoint has been spammed.\n\n\n\n\n### Code examples\n\n\n\n#### Update name and description\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PATCH \\\n  https://api.github.com/orgs/ORG/issue-fields/ISSUE_FIELD_ID \\\n  -d '{\n  \"name\": \"Priority\",\n  \"description\": \"Level of importance for the issue\"\n}'\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Create issue field for an organization](#create-issue-field-for-an-organization).\n\n\n\n\n\n## Delete issue field for an organization\n\n```\nDELETE /orgs/{org}/issue-fields/{issue_field_id}\n```\n\nDeletes an issue field for an organization.\nYou can find out more about issue fields in Managing issue fields in an organization.\nTo use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and\npersonal access tokens (classic) need the admin:org scope to use this endpoint.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n- **`issue_field_id`** (integer) (required)\n  The unique identifier of the issue field.\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **204** - A header with no content is returned.\n\n\n- **404** - Resource not found\n\n\n- **422** - Validation failed, or the endpoint has been spammed.\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/orgs/ORG/issue-fields/ISSUE_FIELD_ID\n```\n\n**Response schema (Status: 204):**"}