# Shared Links

## Get Shared Links

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

#### Headers

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

{% tabs %}
{% tab title="200 Returns list of shared links " %}

```
{
  "result": [
              {"account": "admin",
                "expiry": 86400,
                "id": "94a4235b-c4ae-4ded-b31a-c7d0e29844b9",
                "password": "P@ssw0rd",
                "path": "/google/folder1"},
              {"account": "admin",
                "expiry": 0,
                "id": "a6f1cd25-bba2-453f-b9cd-d369c6ce5693",
                "password": "",
                "path": "/onedrive/accounts.pdf"}
             ]
 }
```

{% endtab %}
{% endtabs %}

## Add Shared Link

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

#### Headers

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

{% tabs %}
{% tab title="200 Returns newly created shared link object" %}

```
{
    "result": {
             "account": "admin",
             "expiry": 0,
             "id": "e2a460ed-af5b-4af4-bcf5-c07accab8dde",
             "password": "",
             "path": "/"
             }
}
```

{% endtab %}
{% endtabs %}

## Update Shared Link

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

#### Headers

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

#### Request Body

| Name     | Type   | Description                                                   |
| -------- | ------ | ------------------------------------------------------------- |
| id       | string | Shared link identifier, generated by the system               |
| expiry   | string | Expiration time for shared link (epoch time ie: '1606087502') |
| password | string | Password to protect shared link                               |
| path     | string | Path to file / folder that will be shared                     |

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

```
{}
```

{% endtab %}
{% endtabs %}

## Delete Shared Link

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

#### Path Parameters

| Name     | Type   | Description                     |
| -------- | ------ | ------------------------------- |
| link\_id | string | ID of shared link to be deleted |

#### Headers

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

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

```
{}
```

{% 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/managing-shared-links.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.
