---
title: "Create or Update Domain Group"
method: POST
path: "/v1/domains/{domainId}/domaingroup"
tags: ["Domains"]
---

# Create or Update Domain Group

`POST /v1/domains/{domainId}/domaingroup`

Use this API to create a new domain group or update an existing domain group.

## Path parameters

- `domainId` string, required

## Request body

- object
  - `removeExisting` boolean — Flag to remove all domains from an existing group. Passing False instructs the API to append the incoming URL list to the existing one.
  - `urls` string[] — A list of urls to be added to the group.

## Response `200`

OK

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too Many Requests For more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).
- `500` — Internal Server Error. **Possible reason**: Incorrect domain Id or if removeExisting flag is false and a url from the list is already there in the group

---

[API](https://skmtc.net/onetrust/apis/platform-access-management.md) · [All operations](https://skmtc.net/onetrust/apis/platform-access-management/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/onetrust/platform-access-management/revisions/21de3aa0b170/schema)
