v68

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,21696712.3 MB
codespaces

Get a secret for the authenticated user

Gets a development environment secret available to a user's codespaces without revealing its encrypted value.

The authenticated user must have Codespaces access to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the codespace or codespace:secrets scope to use this endpoint.

get/user/codespaces/secrets/{secret_name}

Path parameters

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 last updated, 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 required

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/user/secrets/SECRET_NAME/repositories"
}