> For the complete documentation index, see [llms.txt](https://developers.couchdrop.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.couchdrop.io/administration/groups.md).

# Groups

## Get all groups

<mark style="color:blue;">`GET`</mark> `https://api.couchdrop.io/manage/groups`

Get all user groups in an organisation

#### Headers

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| token<mark style="color:red;">\*</mark> | String | API Token   |

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

```json
{
    "groups":[
        {
            "id":"group_id", 
            "groupname": "name":,
            "allowed_ips":"192.168.1.1, 10.1.1.1/32",
            "allow_sftp_scp_rsync":false,
            "allow_upload_portal": false,
            "allow_ftp": false,
            "allow_admin": true,
            "allow_webportal": true,
            "allow_ftps": true,
            "allow_inboxes": true,
            "allow_shared_links": false,
            "allow_workflows": false
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Get an individual group by ID

<mark style="color:blue;">`GET`</mark> `https://api.couchdrop.io/manage/group/<group_id>`

#### Headers

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| token<mark style="color:red;">\*</mark> | String | API Token   |

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

```javascript
{
    "group": {
        ...
    }
}
```

{% endtab %}
{% endtabs %}

## Create an group

<mark style="color:orange;">`PUT`</mark> `https://api.couchdrop.io/manage/groups`

Create a new group

#### Headers

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| token<mark style="color:red;">\*</mark> | String | API Token   |

#### Request Body

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| groupname | String | Group Name  |

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

```javascript
{
    "group_id":"new_group_id"
}
```

{% endtab %}
{% endtabs %}

## Update an existing group

<mark style="color:green;">`POST`</mark> `https://api.couchdrop.io/manage/groups`

#### Headers

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| token<mark style="color:red;">\*</mark> | String | API Token   |

#### Request Body

| Name                                 | Type   | Description                       |
| ------------------------------------ | ------ | --------------------------------- |
| id<mark style="color:red;">\*</mark> | String | Group ID                          |
| groupname                            | String | Group name                        |
| allowed\_ips                         | String | Allowed IP addresses              |
| allow\_sftp\_scp\_rsync              | String | Allow SFTP based access           |
| allow\_upload\_portal                | String | Allow access to the upload portal |
| allow\_ftp                           | String | Allow FTP based access            |
| allow\_admin                         | String | Allow admin access                |
| allow\_webportal                     | String | Allow access to the web portal    |
| allow\_inboxes                       | String | Allow access to inboxs            |
| allow\_shared\_links                 | String | Allow access to shared links      |
| allow\_workflows                     | String | Allow access to workflows         |

## Delete a group by ID

<mark style="color:red;">`DELETE`</mark> `https://api.couchdrop.io/manage/groups/<group_id>`

#### Headers

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| token<mark style="color:red;">\*</mark> | String | API Token   |

## Get all group members

<mark style="color:blue;">`GET`</mark> `https://api.couchdrop.io/manage/groups/<group_id>/users`

#### Headers

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| token<mark style="color:red;">\*</mark> | String | API Token   |

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

```javascript
{
    "users": []
}
```

{% endtab %}
{% endtabs %}
