---
title: "Create an Exclusion Group"
method: POST
path: "/groups"
tags: ["Groups"]
---

# Create an Exclusion Group

`POST /groups`

Create a new Exclusion Group in a provided project

## Request body

- Group
  - `archived` boolean — Whether the group is archived
  - `created` string, date-time — The time when the Exclusion Group was initially created
  - `description` string — The description for an Exclusion Group
  - `entities` GroupEntity[] — Array of Group Entities in the Exclusion Group
    - `id` integer, required — The unique identifier for the Group Entity
    - `kind` 'Campaign' | 'Experiment', required — The kind of the Group Entity
    - `weight` integer, required — The weight of the Group Entity. The weight is a value between 0 and 10000. An entity with weight 5000 will receive 50% of this group's traffic
  - `id` integer — The unique identifier for the Exclusion Group
  - `last_modified` string, date-time — The last time the Exclusion Group was modified
  - `name` string, required — Name of the Exclusion Group
  - `project_id` integer, required — The Project the Exclusion Group is in

## Response `201`

Return the created Exclusion Group

- Group
  - `archived` boolean — Whether the group is archived
  - `created` string, date-time — The time when the Exclusion Group was initially created
  - `description` string — The description for an Exclusion Group
  - `entities` GroupEntity[] — Array of Group Entities in the Exclusion Group
    - `id` integer, required — The unique identifier for the Group Entity
    - `kind` 'Campaign' | 'Experiment', required — The kind of the Group Entity
    - `weight` integer, required — The weight of the Group Entity. The weight is a value between 0 and 10000. An entity with weight 5000 will receive 50% of this group's traffic
  - `id` integer — The unique identifier for the Exclusion Group
  - `last_modified` string, date-time — The last time the Exclusion Group was modified
  - `name` string, required — Name of the Exclusion Group
  - `project_id` integer, required — The Project the Exclusion Group is in

## Other responses

- `400` — Invalid request body content
- `401` — Invalid credentials
- `403` — You do not have permission to create an Exclusion Group under the specified Project
- `default` — Unexpected error

---

[API](https://skmtc.dev/optimizely/apis/optimizely-api.md) · [All operations](https://skmtc.dev/optimizely/apis/optimizely-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/optimizely/optimizely-api/revisions/5151fe6a2297/schema)
