{"meta":{"title":"Puntos de conexión de api REST para Acciones de GitHub OIDC","intro":"Utiliza la API REST para interactuar con los JWT de las reclamaciones de sujeto OIDC en GitHub Actions.","product":"REST API","breadcrumbs":[{"href":"/es/enterprise-server@3.22/rest","title":"REST API"},{"href":"/es/enterprise-server@3.22/rest/actions","title":"Acciones"},{"href":"/es/enterprise-server@3.22/rest/actions/oidc","title":"OIDC"}],"documentType":"article"},"body":"# Puntos de conexión de api REST para Acciones de GitHub OIDC\n\nUtiliza la API REST para interactuar con los JWT de las reclamaciones de sujeto OIDC en GitHub Actions.\n\n## Acerca de GitHub Actions OIDC\n\nPuedes usar la API de REST para consultar y administrar una plantilla de personalización para una notificación de asunto de OpenID Connect (OIDC). Para más información, consulta [OpenID Connect](/es/enterprise-server@3.22/actions/concepts/security/openid-connect).\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## Get the customization template for an OIDC subject claim for an organization\n\n```\nGET /orgs/{org}/actions/oidc/customization/sub\n```\n\nGets the customization template for an OpenID Connect (OIDC) subject claim.\nOAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **200** - A JSON serialized template for OIDC subject claim customization\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/api/v3/orgs/ORG/actions/oidc/customization/sub\n```\n\n**Response schema (Status: 200):**\n\n* `include_claim_keys`: required, array of string\n\n## Set the customization template for an OIDC subject claim for an organization\n\n```\nPUT /orgs/{org}/actions/oidc/customization/sub\n```\n\nCreates or updates the customization template for an OpenID Connect (OIDC) subject claim.\nOAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n#### Body parameters\n\n* **`include_claim_keys`** (array of strings)\n  Array of unique strings. Each claim key can only contain alphanumeric characters and underscores.\n\n### HTTP response status codes\n\n* **201** - Empty response\n\n* **403** - Forbidden\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PUT \\\n  http(s)://HOSTNAME/api/v3/orgs/ORG/actions/oidc/customization/sub \\\n  -d '{\n  \"include_claim_keys\": [\n    \"repo\",\n    \"context\"\n  ]\n}'\n```\n\n**Response schema (Status: 201):**\n\n## Get the customization template for an OIDC subject claim for a repository\n\n```\nGET /repos/{owner}/{repo}/actions/oidc/customization/sub\n```\n\nGets the customization template for an OpenID Connect (OIDC) subject claim.\nOAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **200** - Status response\n\n* **400** - Bad Request\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/actions/oidc/customization/sub\n```\n\n**Response schema (Status: 200):**\n\n* `use_default`: required, boolean\n* `include_claim_keys`: array of string\n\n## Set the customization template for an OIDC subject claim for a repository\n\n```\nPUT /repos/{owner}/{repo}/actions/oidc/customization/sub\n```\n\nSets the customization template and opt-in or opt-out flag for an OpenID Connect (OIDC) subject claim for a repository.\nOAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n#### Body parameters\n\n* **`use_default`** (boolean) (required)\n  Whether to use the default template or not. If true, the include\\_claim\\_keys field is ignored.\n\n* **`include_claim_keys`** (array of strings)\n  Array of unique strings. Each claim key can only contain alphanumeric characters and underscores.\n\n### HTTP response status codes\n\n* **201** - Empty response\n\n* **400** - Bad Request\n\n* **404** - Resource not found\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PUT \\\n  http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/actions/oidc/customization/sub \\\n  -d '{\n  \"use_default\": false,\n  \"include_claim_keys\": [\n    \"repo\",\n    \"context\"\n  ]\n}'\n```\n\n**Response schema (Status: 201):**"}