Search + K

Command Palette

Search for a command to run...

Sign In

Add a selected repository to a user secret

PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}
Copy endpoint
https://api.github.com

Adds a repository to the selected repositories for 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.

Parameters

path Path Parameters

Name Type
secret_name required

The name of the secret.

string
repository_id required
number

Responses

204

No Content when repository was added to the selected list

unknown

Client Errors

401 application/json

Requires authentication

interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
403 application/json

Forbidden

interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
404 application/json

Resource not found

interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}

Server Errors

500 application/json

Internal Error

interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}