> 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 |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.getupdraft.com/api/rest-api/distribution-group-and-permission-group-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
