REST API endpoints for GitHub Actions OIDC

Use the REST API to interact with JWTs for OIDC subject claims in GitHub Actions.

About GitHub Actions OIDC

You can use the REST API to query and manage a customization template for an OpenID Connect (OIDC) subject claim. For more information, see OpenID Connect.

Note

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.

List OIDC custom property inclusions for an enterprise

GET /enterprises/{enterprise}/actions/oidc/customization/properties/repo

Lists the repository custom properties that are included in the OIDC token for repository actions in an enterprise.
OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.
Note

The "Enterprise administration" fine-grained permission is not available to callers. To use this API, you must use an OAuth app token or a personal access token (classic).

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/enterprises/ENTERPRISE/actions/oidc/customization/properties/repo

Response schema (Status: 200):

Array of Actions OIDC Custom Property Inclusion:

Create an OIDC custom property inclusion for an enterprise

POST /enterprises/{enterprise}/actions/oidc/customization/properties/repo

Adds a repository custom property to be included in the OIDC token for repository actions in an enterprise.
OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.
Note

The "Enterprise administration" fine-grained permission is not available to callers. To use this API, you must use an OAuth app token or a personal access token (classic).

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X POST \
  https://api.github.com/enterprises/ENTERPRISE/actions/oidc/customization/properties/repo \
  -d '{
  "custom_property_name": "environment"
}'

Response schema (Status: 201):

Delete an OIDC custom property inclusion for an enterprise

DELETE /enterprises/{enterprise}/actions/oidc/customization/properties/repo/{custom_property_name}

Removes a repository custom property from being included in the OIDC token for repository actions in an enterprise.
OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.
Note

The "Enterprise administration" fine-grained permission is not available to callers. To use this API, you must use an OAuth app token or a personal access token (classic).

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X DELETE \
  https://api.github.com/enterprises/ENTERPRISE/actions/oidc/customization/properties/repo/CUSTOM_PROPERTY_NAME

Response schema (Status: 204):

List OIDC custom property inclusions for an organization

GET /orgs/{org}/actions/oidc/customization/properties/repo

Lists the repository custom properties that are included in the OIDC token for repository actions in an organization.
OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/orgs/ORG/actions/oidc/customization/properties/repo

Response schema (Status: 200):

Same response schema as List OIDC custom property inclusions for an enterprise.

Create an OIDC custom property inclusion for an organization

POST /orgs/{org}/actions/oidc/customization/properties/repo

Adds a repository custom property to be included in the OIDC token for repository actions in an organization.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X POST \
  https://api.github.com/orgs/ORG/actions/oidc/customization/properties/repo \
  -d '{
  "custom_property_name": "environment"
}'

Response schema (Status: 201):

Same response schema as Create an OIDC custom property inclusion for an enterprise.

Delete an OIDC custom property inclusion for an organization

DELETE /orgs/{org}/actions/oidc/customization/properties/repo/{custom_property_name}

Removes a repository custom property from being included in the OIDC token for repository actions in an organization.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X DELETE \
  https://api.github.com/orgs/ORG/actions/oidc/customization/properties/repo/CUSTOM_PROPERTY_NAME

Response schema (Status: 204):

Get the customization template for an OIDC subject claim for an organization

GET /orgs/{org}/actions/oidc/customization/sub

Gets the customization template for an OpenID Connect (OIDC) subject claim.
OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/orgs/ORG/actions/oidc/customization/sub

Response schema (Status: 200):

Set the customization template for an OIDC subject claim for an organization

PUT /orgs/{org}/actions/oidc/customization/sub

Creates or updates the customization template for an OpenID Connect (OIDC) subject claim.
OAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X PUT \
  https://api.github.com/orgs/ORG/actions/oidc/customization/sub \
  -d '{
  "include_claim_keys": [
    "repo",
    "context"
  ]
}'

Response schema (Status: 201):

Get the customization template for an OIDC subject claim for a repository

GET /repos/{owner}/{repo}/actions/oidc/customization/sub

Gets the customization template for an OpenID Connect (OIDC) subject claim.
OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/actions/oidc/customization/sub

Response schema (Status: 200):

Set the customization template for an OIDC subject claim for a repository

PUT /repos/{owner}/{repo}/actions/oidc/customization/sub

Sets the customization template and opt-in or opt-out flag for an OpenID Connect (OIDC) subject claim for a repository.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X PUT \
  https://api.github.com/repos/OWNER/REPO/actions/oidc/customization/sub \
  -d '{
  "use_default": false,
  "include_claim_keys": [
    "repo",
    "context"
  ]
}'

Response schema (Status: 201):