---
title: "Set team permissions"
method: POST
path: "/api/v2/teams/setPermissions"
tags: ["Teams"]
---

# Set team permissions

`POST /api/v2/teams/setPermissions`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v2/teams/setPermissions`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

Replace the full set of permissions for a team. Accepts organization-level permissions (organizationPerms), repository-level permissions (repoPerms applied to repositoryIds or universally), and team self-management permissions (teamPerms). Any previously set permissions not included in the request are removed.

## Request body

- TeamsSetPermissionsRequest
  - `organizationId` string
  - `id` string, required
  - `organizationPerms` string[]
  - `repoPerms` string[]
  - `teamPerms` string[]
  - `repositoryIds` string[]
  - `tagIds` string[]
  - `universalRepoPermissions` boolean

## Response `200`

Successful response

- object
  - `ok` boolean

## Other responses

- `400`: Error Response
- `401`: Error Response
- `404`: Error Response

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api/revisions/126e9c80ba0d?raw)
