---
title: "Replace Visibility Groups for a specific Content Item"
method: PATCH
path: "/api/v2/content/{contentId}/relationships/visibility-groups"
tags: ["Content"]
---

# Replace Visibility Groups for a specific Content Item

`PATCH /api/v2/content/{contentId}/relationships/visibility-groups`

This endpoint replaces all content's visibility groups. On a successful replacement, it returns a `201 Created` response. If the patch is set with an empty list, the content will not be shared in any groups.<br><br>**Note:** When visibility groups are set for content, the groups must either be (a) all of privacy level `Administrative` or (b) all of a non- `Administrative` privacy level. Non- `Administrative` privacy levels include `Open`, `Closed` and `Private`. Content in `Administrative` groups is only visible to users in the `Administrative` groups. If the content has one or more `Administrative` visibility groups set, and you send the body with an empty list of groups, the content will be visible to any users in the organization. A group's privacy level can be retrieved from the [Get a Specific Group]() endpoint.<h3>Required Scope</h3>`content:write`

## Path parameters

- `contentId` string, required

## Request body

- RelationshipsVisibilitygroupsBody
  - `data` Apiv2contentcontentIdrelationshipsvisibilitygroupsData[]
    - `id` string, required — ID of the visibility group that will replace any existing visibility groups for the content.
    - `type` string, required — Type of object that will be added as a relationship. Can only be `groups`.

## Response `201`

Success

---

[API](https://skmtc.net/degreed/apis/degreed-api-web.md) · [All operations](https://skmtc.net/degreed/apis/degreed-api-web/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/degreed/degreed-api-web/revisions/4a22b709515c/schema)
