---
title: "Set the access control of a class"
method: PUT
path: "/api/v1/account/organizations/{id}/classes/{subject}/access"
tags: ["Access"]
---

# Set the access control of a class

`PUT /api/v1/account/organizations/{id}/classes/{subject}/access`

## Request

- Base URL: `https://pcp.example.com`
- URL: `https://pcp.example.com/api/v1/account/organizations/{id}/classes/{subject}/access`
- Auth: HTTP bearer

## Path parameters

- `id` string, uuid, required
- `subject` string, required

## Request body

- AccessRequest: AccessRequest schema
  - `assignments` object[]
    - `group_ids` string[], required
    - `role` string, required
  - `confirm_widen` boolean

## Response `200`

OK

- AccessResponse: AccessResponse schema
  - `can_execute` string[]
  - `can_own` string[]
  - `can_read` string[]
  - `can_write` string[]

## Other responses

- `400`: Bad Request _(validation or deserialization error)_
- `401`: Missing, invalid or expired credentials
- `403`: The caller may not do this
- `500`: Internal Server Error _(panics)_
- `default`

---

[API](https://skmtc.dev/plakar/apis/plakar-control-plane-api-v1.md) - [All operations](https://skmtc.dev/plakar/apis/plakar-control-plane-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/plakar/apis/plakar-control-plane-api-v1/revisions/2ac049494a01?raw)
