# Add or update team project permissions

From **GitHub v3 REST API**.

`PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}`

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}`.

## Parameters

### `org`

- Location: path
- Required: true
- Type: `string`

### `team_slug`

- Location: path
- Required: true
- Type: `string`

team_slug parameter

### `project_id`

- Location: path
- Required: true
- Type: `integer`

## Request body

- Required: false
### `application/json`

- Type: `object`
- Nullable: true

```json
{"nullable":true,"properties":{"permission":{"description":"The permission to grant to the team for this project. Can be one of:  \n\\* `read` - team members can read, but not write to or administer this project.  \n\\* `write` - team members can read and write, but not administer this project.  \n\\* `admin` - team members can read, write and administer this project.  \nDefault: 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/enterprise-server@3.0/rest/overview/resources-in-the-rest-api#http-verbs).\"","enum":["read","write","admin"],"type":"string"}},"type":"object"}
```

## Responses

### `204`

Response

### `403`

Forbidden if the project is not owned by the organization

### `application/json`

- Type: `object`

```json
{
  "documentation_url": "https://docs.github.com/enterprise-server@3.0/rest/reference/teams#add-or-update-team-project-permissions",
  "message": "Must have admin rights to Repository."
}
```

```json
{"properties":{"documentation_url":{"type":"string"},"message":{"type":"string"}},"type":"object"}
```

## Request examples

### cURL

```shell
curl --request PUT \
  --url {protocol}://{hostname}/api/v3/orgs/{org}/teams/{team_slug}/projects/{project_id} \
  --header 'content-type: application/json' \
  --data '{
  "permission": "string"
}'
```
