> For the complete documentation index, see [llms.txt](https://docs.venuzle.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.venuzle.com/manager-api/internal-endpoints/partner/groups.md). Agents can also search and read this documentation through its [MCP server](https://docs.venuzle.com/~gitbook/mcp).

# Groups

Endpoints to work with groups.

## Get groups

<mark style="color:blue;">`GET`</mark> `/api/internal/v1/partners/:partner_id/groups`

Get the groups of a partner.\
\
The action must be performed by an authenticated user with permission `groups.read` and partner access.

#### Path Parameters

| Name        | Type    | Description            |
| ----------- | ------- | ---------------------- |
| partner\_id | integer | The id of the partner. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Create group

<mark style="color:green;">`POST`</mark> `/api/internal/v1/partners/:partner_id/groups`

Create a new group.\
\
The action must be performed by an authenticated user with permission `groups.create` and partner access.

#### Path Parameters

| Name        | Type    | Description            |
| ----------- | ------- | ---------------------- |
| partner\_id | integer | The id of the partner. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Get group

<mark style="color:blue;">`GET`</mark> `/api/internal/v1/partners/:partner_id/groups/:group_id`

Get a group by its id.\
\
The request must be performed by an authenticated user with permission `groups.read` and partner.access.

#### Path Parameters

| Name        | Type    | Description            |
| ----------- | ------- | ---------------------- |
| group\_id   | integer | The id of the group.   |
| partner\_id | integer | The id of the partner. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Update group

<mark style="color:orange;">`PUT`</mark> `/api/internal/v1/partners/:partner_id/groups/:group_id`

Update a group by its id. \
\
The action must be performed by an authenticated user with permission `groups.update` and partner access.

#### Path Parameters

| Name        | Type    | Description            |
| ----------- | ------- | ---------------------- |
| group\_id   | integer | The id of the group.   |
| partner\_id | integer | The id of the partner. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Delete group

<mark style="color:red;">`DELETE`</mark> `/api/internal/v1/partners/:partner_id/groups/:group_id`

Delete a group by its id.\
\
The action must be executed by an authenticated user with permission `groups.delete` and partner access.

#### Path Parameters

| Name        | Type    | Description            |
| ----------- | ------- | ---------------------- |
| group\_id   | integer | The id of the group.   |
| partner\_id | integer | The id of the partner. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Get group customers

<mark style="color:blue;">`GET`</mark> `/api/internal/v1/partners/:partner_id/groups/:group_id/customers`

Get the customers of a group.\
\
The action must be performed by an authenticated user with permission `groups.read` and partner access.

#### Path Parameters

| Name        | Type    | Description            |
| ----------- | ------- | ---------------------- |
| group\_id   | integer | The id of the group.   |
| partner\_id | integer | The id of the partner. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Add a customer to a group

<mark style="color:green;">`POST`</mark> `/api/internal/v1/partners/:partner_id/groups/:group_id/customers`

Add a new customer to the group.\
\
The action must be performed by an authenticated user with permission `groups.update` and partner access.

#### Path Parameters

| Name        | Type    | Description            |
| ----------- | ------- | ---------------------- |
| group\_id   | integer | The id of the group.   |
| partner\_id | integer | The id of the partner. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Remove a customer from a group

<mark style="color:red;">`DELETE`</mark> `/api/internal/v1/partners/:partner_id/groups/:group_id/customers/:customer_id`

#### Path Parameters

| Name         | Type    | Description                             |
| ------------ | ------- | --------------------------------------- |
| customer\_id | integer | The id of the customer that is removed. |
| group\_id    | integer | The id of the group.                    |
| partner\_id  | integer | The id of the partner.                  |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}
