Search + K

Command Palette

Search for a command to run...

Sign In

Add users to Codespaces access for an organization

Deprecated
POST /orgs/{org}/codespaces/access/selected_users
Copy endpoint
https://api.github.com

Codespaces for the specified users will be billed to the organization.

To use this endpoint, the access settings for the organization must be set to selected_members. For information on how to change this setting, see "Manage access control for organization codespaces."

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

Parameters

path Path Parameters

Name Type
org required

The organization name. The name is not case sensitive.

string

Request Body

application/json required
{ selected_usernames: string[]; }

Responses

204

Response when successfully modifying permissions.

unknown

Redirects

304

Not modified

unknown

Client Errors

400

Users are neither members nor collaborators of this organization.

unknown
404 application/json

Resource not found

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

Validation failed, or the endpoint has been spammed.

interface ValidationError {
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}
[]
;
}

Server Errors

500 application/json

Internal Error

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