# 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 %}


---

# Agent Instructions: 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:

```
GET https://developers.couchdrop.io/administration/groups.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
