Skip to content

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.

API method documentation

owner
required
string

The account owner of the repository. The name is not case sensitive.

repo
required
string

The name of the repository without the .git extension. The name is not case sensitive.

Media type application/json
Actions OIDC subject customization for a repository

Actions OIDC subject customization for a repository

object
use_default
required

Whether to use the default template or not. If true, the include_claim_keys field is ignored.

boolean
include_claim_keys

Array of unique strings. Each claim key can only contain alphanumeric characters and underscores.

Array<string>
use_immutable_subject

Whether to opt in to the immutable OIDC subject claim format for this repository. When true, OIDC tokens will use a stable, repository-ID-based sub claim.

boolean
Examples
Example default
{
"use_default": false,
"include_claim_keys": [
"repo",
"context"
]
}

Empty response

Media type application/json
Empty Object

An object without any properties.

object
Examples
Example default
null

Bad Request

Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Validation failed, or the endpoint has been spammed.

Media type application/json
Validation Error Simple

Validation Error Simple

object
message
required
string
documentation_url
required
string
errors
Array<string>
Example generated
{
"message": "example",
"documentation_url": "example",
"errors": [
"example"
]
}