---
title: "Add users to Codespaces access for an organization"
method: POST
path: "/orgs/{org}/codespaces/access/selected_users"
tags: ["codespaces"]
deprecated: true
---

# Add users to Codespaces access for an organization

`POST /orgs/{org}/codespaces/access/selected_users`

> **Deprecated.**

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](https://docs.github.com/enterprise-cloud@latest/rest/codespaces/organizations#manage-access-control-for-organization-codespaces)."

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

## Path parameters

- `org` string, required

## Request body

- object
  - `selected_usernames` string[], required — The usernames of the organization members and outside collaborators whose codespaces should be billed to the organization.

## Response `204`

Response when successfully modifying permissions.

## Other responses

- `304` — Not modified
- `400` — Users are neither members nor collaborators of this organization.
- `404` — Resource not found
- `422` — Validation failed, or the endpoint has been spammed.
- `500` — Internal Error

---

[API](https://skmtc.net/github/apis/ghec.md) · [All operations](https://skmtc.net/github/apis/ghec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/ghec/revisions/8ae6d0c8716e/schema)
