Skip to main content

Add or update team project permissions (Legacy)

Deprecated

**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/[email protected]/rest/reference/teams#add-or-update-team-project-permissions) endpoint. 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.

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

Request

Path Parameters
team_id integer
required
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
application/json Basic Error object

Resource not found

documentation_url string
optional
message string
optional
status string
optional
url string
optional
application/json Validation Error object

Validation failed

documentation_url string
required
errors array[object]
optional
items object
code string
required
field string
optional
index integer
optional
message string
optional
resource string
optional
value
optional
message string
required