Skip to main content

Add or update team project permissions

Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`.

PUT/orgs/{org}/teams/{team_slug}/projects/{project_id}
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Path Parameters
org string
required
team_slug string
required

team_slug parameter

project_id integer
required
Body Params
optional
application/jsonobject
permission string
optional

The permission to grant to the team for this project. Can be one of: \* `read` - team members can read, but not write to or administer this project. \* `write` - team members can read and write, but not administer this project. \* `admin` - team members can read, write and administer this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/[email protected]/rest/overview/resources-in-the-rest-api#http-verbs)."

Responses

Response

application/json object

Forbidden if the project is not owned by the organization

documentation_url string
optional
message string
optional