> ## Documentation Index
> Fetch the complete documentation index at: https://docs.drime.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Shareable Link

> Update shareable link settings

## Overview

Updates the settings of an existing shareable link.

## Path Parameters

<ParamField path="entryId" type="integer" required>
  ID or hash of the file entry
</ParamField>

## Request Body

<ParamField body="password" type="string">
  New password (or remove by setting to null)
</ParamField>

<ParamField body="expiresAt" type="string">
  New expiration date (ISO 8601 format)
</ParamField>

<ParamField body="allowEdit" type="boolean">
  Allow editing via the link
</ParamField>

<ParamField body="allowDownload" type="boolean">
  Allow downloading via the link
</ParamField>

## Response

<ResponseField name="link" type="object">
  The updated shareable link object
</ResponseField>

<ResponseField name="status" type="string">
  Request status (`success`)
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT https://app.drime.cloud/api/v1/file-entries/123456/shareable-link \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "password": "newpassword",
      "allowDownload": true
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.drime.cloud/api/v1/file-entries/123456/shareable-link', {
    method: 'PUT',
    headers: {
      'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      allowDownload: true,
      allowEdit: false
    })
  });

  const { link } = await response.json();
  console.log('Link updated');
  ```

  ```python Python theme={null}
  import requests

  response = requests.put(
      'https://app.drime.cloud/api/v1/file-entries/123456/shareable-link',
      headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
      json={
          'allowDownload': True,
          'allowEdit': False
      }
  )

  print('Link updated')
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "status": "success",
    "link": {
      "id": 789,
      "hash": "3h8N1nxZq7WtyRmXDIosFupSl9MCrD",
      "user_id": 15843,
      "entry_id": 123456,
      "allow_edit": false,
      "allow_download": true
    }
  }
  ```
</ResponseExample>
