> ## 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.

# Unshare Entry

> Remove sharing access from a user

## Overview

Removes a user's access to a shared file or folder.

## Path Parameters

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

## Request Body

<ParamField body="userId" type="integer" required>
  ID of the user to remove access from
</ParamField>

## Response

<ResponseField name="users" type="array">
  Updated list of users who still have access
</ResponseField>

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

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE https://app.drime.cloud/api/v1/file-entries/123456/unshare \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "userId": 12345
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.drime.cloud/api/v1/file-entries/123456/unshare', {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      userId: 12345
    })
  });

  const { users } = await response.json();
  console.log('Remaining shared users:', users);
  ```

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

  response = requests.delete(
      'https://app.drime.cloud/api/v1/file-entries/123456/unshare',
      headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
      json={'userId': 12345}
  )

  users = response.json()['users']
  print(f'Remaining shared users: {users}')
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "status": "success",
    "users": []
  }
  ```
</ResponseExample>
