v68

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

Set selected repositories for a user secret

Select the repositories that will use a user's development environment secret.

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.

put/user/codespaces/secrets/{secret_name}/repositories

Path parameters

secret_namestring required

The name of the secret.

Request body

selected_repository_idsinteger[] required

An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the List selected repositories for a user secret, Add a selected repository to a user secret, and Remove a selected repository from a user secret endpoints.

Response

No Content when repositories were added to the selected list