v56

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

List secrets for the authenticated user

Lists all development environment secrets available for a user's codespaces without revealing their encrypted values.

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

Query parameters

per_pageinteger

The number of results per page (max 100). For more information, see "Using pagination in the REST API."

pageinteger

The page number of the results to fetch. For more information, see "Using pagination in the REST API."

Response

Response

total_countinteger required

Example response

{
  "secrets": [
    {
      "name": "SECRET_NAME",
      "selected_repositories_url": "https://api.github.com/user/secrets/SECRET_NAME/repositories"
    }
  ]
}