> For the complete documentation index, see [llms.txt](https://docs.getupdraft.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getupdraft.com/api/rest-api/distribution-group-and-permission-group-api.md).

# Distribution group and Permission group API

## Create a new Distribution group

<mark style="color:green;">`POST`</mark> `https://app.getupdraft.com/api/group-testers/`

&#x20;This endpoint allows you create new Distribution group.

#### Body data/JSON

| Name  | Type   | Description                 |
| ----- | ------ | --------------------------- |
| app   | int    | ID of App project           |
| title | string | Name for distribution group |

#### Headers

| Name          | Type   | Description                                                                 |
| ------------- | ------ | --------------------------------------------------------------------------- |
| Authorization | String | Authentication token, note: might require adding "Token" to the value field |

#### Responce

```json
{
    "id": group_id,
    "testers_count": 0,
    "testers": [],
    "title": "group_name",
    "app": project_id
}
```

## Add testers to a Distribution group

<mark style="color:green;">`POST`</mark> `https://app.getupdraft.com/api/testers/`&#x20;

This endpoint allows you add new testers to a Distribution group.

#### Body data/JSON

| Name   | Type        | Description           |
| ------ | ----------- | --------------------- |
| email  | string      | Email of tester       |
| app    | null        | Should be set as null |
| groups | list of int | List of group IDs     |

#### Headers

| Name          | Type   | Description                                                                 |
| ------------- | ------ | --------------------------------------------------------------------------- |
| Authorization | string | Authentication token, note: might require adding "Token" to the value field |

#### Responce

```json
{
    "id": tester_id,
    "email": "tester email",
    "app": null,
    "groups": [
        group_id
    ]
}
```

## Create a new Permission group

<mark style="color:green;">`POST`</mark> `https://app.getupdraft.com/api/groupsinorgs/`&#x20;

&#x20;This endpoint allows you create new Permission group.

#### Body data/JSON

| Name         | Type   | Description                   |
| ------------ | ------ | ----------------------------- |
| title        | string | Title of new Permission group |
| organization | int    | ID of organisation            |

#### Headers

| Name          | Type   | Description                                                                 |
| ------------- | ------ | --------------------------------------------------------------------------- |
| Authorization | string | Authentication token, note: might require adding "Token" to the value field |

#### Responce

```json
{
    "id": group_id,
    "title": "group_title",
    "organization": organisation_id,
    "members": 0,
    "projects": []
}
```

## Add user to a Permission group

<mark style="color:green;">`POST`</mark> `https://app.getupdraft.com/api/useringrouporg/`&#x20;

This endpoint allows you add new users to a Permission group.

#### Body data/JSON

| Name   | Type        | Description       |
| ------ | ----------- | ----------------- |
| user   | int         | User ID           |
| groups | list of int | List of group IDs |

#### Headers

|               |        |                                                                             |
| ------------- | ------ | --------------------------------------------------------------------------- |
| Authorization | string | Authentication token, note: might require adding "Token" to the value field |
