v58

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-061,22096912.3 MB
codespaces

Get an organization secret

Gets an organization development environment secret without revealing its encrypted value.

OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

get/orgs/{org}/codespaces/secrets/{secret_name}

Path parameters

orgstring required

The organization name. The name is not case sensitive.

secret_namestring required

The name of the secret.

Response

Response

namestring required

The name of the secret

created_atstring date-time required

The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.

updated_atstring date-time required

The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.

visibility'all' | 'private' | 'selected' required

The type of repositories in the organization that the secret is visible to

selected_repositories_urlstring uri

The API URL at which the list of repositories this secret is visible to can be retrieved

Example response

{
  "name": "SECRET_NAME",
  "selected_repositories_url": "https://api.github.com/orgs/ORGANIZATION/codespaces/secrets/SECRET_NAME/repositories"
}