> 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/managing-users.md).

# Users

## Get Users

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

This endpoint allows you to get configured users/credentials

#### Headers

| Name  | Type   | Description      |
| ----- | ------ | ---------------- |
| token | string | API Access Token |

{% tabs %}
{% tab title="200 Credentials successfully retrieved." %}

```javascript
{
  "credentials": [
    {
      "id": "905abg1a-f206-11e8-b591-0242bc140002", 
      "permissions_mode": "r", 
      "permissions_path": "/box/michael", 
      "public_key": null, 
      "username": "michael"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

## Create or Modify a User

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

This method is used to modify a user. Either the username or id can be supplied. If you wish to change the username, then the id must be specified.&#x20;

#### Headers

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

#### Request Body

| Name                                       | Type    | Description                                  |
| ------------------------------------------ | ------- | -------------------------------------------- |
| id                                         | string  | User identifier, generated by system         |
| username<mark style="color:red;">\*</mark> | string  | Username for user                            |
| password                                   | string  | Password for user                            |
| email\_address                             | string  | Email address for user                       |
| public\_key                                | string  | RSA public key                               |
| permissions\_path                          | string  | Root/home directory                          |
| permissions\_mode                          | string  | Permissions, ie: 'rw'                        |
| permissions\_delete\_allowed               | boolean | Allow user to delete files/folders           |
| allowed\_ips                               | string  | IP address to allow. ie: 8.8.8.8, 1.2.3.4/24 |
| allow\_sftp\_scp\_rsync                    | boolean | Allow access via SFTP/SCP/RSYNC              |
| allow\_ftp                                 | boolean | Allow access via traditional FTP             |
| allow\_upload\_portal                      | boolean | Allow upload via drop.couchdrop.io           |
| allow\_admin                               | boolean | Allow admin access to Couchdrop              |
| allow\_webportal                           | boolean | Allow access via Couchdrop web UI            |
| groups                                     | String  | An array of group ips for group memebership  |

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

```
```

{% endtab %}
{% endtabs %}

## Invite a user to Couchdrop

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

This method creates a new user and sends a invitiation email.&#x20;

#### Headers

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

#### Request Body

| Name           | Type   | Description                   |
| -------------- | ------ | ----------------------------- |
| email\_address | String | Email address of the new user |

## Trigger a password reset email

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

Trigger and send a password reset email to a user

#### Headers

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

## Delete A User

<mark style="color:red;">`DELETE`</mark> `https://api.couchdrop.io/manage/credentials/<username>/delete`

#### Path Parameters

| Name     | Type   | Description        |
| -------- | ------ | ------------------ |
| username | string | User to be deleted |

#### Headers

| Name  | Type   | Description      |
| ----- | ------ | ---------------- |
| token | string | API Access Token |

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

```
```

{% endtab %}
{% endtabs %}
