Add or update team repository permissions (Legacy)
Deprecated /teams/{team_id}/repos/{owner}/{repo} [!WARNING] Endpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new "Add or update team repository permissions" endpoint.
To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a 422 Unprocessable Entity status if you attempt to add a repository to a team that is not owned by the organization.
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 method."
Parameters
path Path Parameters
| Name | Type |
|---|---|
team_id
required
The unique identifier of the team. | number |
owner
required
The account owner of the repository. The name is not case sensitive. | string |
repo
required
The name of the repository without the | string |
Request Body
Responses
Response
Client Errors
Forbidden
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
Validation failed, or the endpoint has been spammed.
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}[];
}