---
title: "Update a share"
method: PATCH
path: "/shares/{id}"
tags: ["Shares"]
---

# Update a share

`PATCH /shares/{id}`

Change the settings on an active share. Any changes made will affect all users that have access to the share. 

When updating invitees, pass the `recipients` body paramater with the full list of people who should be included on the share. If you resend the list without an existing recipient, they will be removed from the share.

**Setting the Share Permissions**

Only 5 different combinations of permissions are valid for the `accessMode` object:

- **Upload Only**: This allows share visitors to upload to a share but do nothing else to the contained files. To use this mode, set `upload` to **true** and all other permissions to **false**
- **Download Only**: This allows share visitors to download files from a share but do nothing else to the contained files. To use this mode, set `download` to **true** and all other permissions to **false**
- **Upload and Download**: This allows share visitors to upload new files to the share or download files within the share, but not make any other changes to the share contents. To use this mode, set `upload` and `download` to **true** and set both `modify` and `delete` to **false**
- **All but Delete**: This allows share visitors to make any changes to the contents of a share except deleting files. To use this mode, set `upload`, `download`, and `modify` to **true** and set `delete` to **false**
- **Full Access**: This allows share visitors to make any changes to the contents of a share. To use this mode, set all 4 permissions `upload`, `download`, `modify`, and `delete` to **true**

Any other combination of permissions provided as the `accessMode` will be rejected as a bad request.

**Notes:**

  - Authenticated user should be the owner of the specified share.

## Headers

- `ev-api-key` string, required
- `ev-access-token` string, required

## Request body

- object
  - `name` string — Name of the share.
  - `resources` string[] — Array of resources for this share. See details on [how to specify resources](#section/Identifying-Resources) above. **shared_folder** and **receive** shares must have only one `resource`, which is a directory that does not have a current share attached. **send** shares may have multiple `resource` parameters. **NOTE**: Sending this parameter will **REPLACE** the existing resources with the resources included in this request.
  - `accessMode` AccessMode — An object defining what a not-logged-in visitor can do with the share contents
    - `download` boolean — Whether share allows visitors to download
    - `upload` boolean — Whether share allows visitors to upload
    - `modify` boolean — Whether share allows visitors to rename or move contents.
    - `delete` boolean — Whether share allows visitors to delete contents
  - `embed` boolean — Whether the share can be embedded in another web page.
  - `recipients` object[] — People you want to invite to the share. **Note**: unless you also set the `subject` and `message` for the new share, invitation emails will not be sent to these recipients. **Note**: Recipients in this list will **REPLACE** the recipients already assigned to this share.
    - `type` string — What kind of email should be sent to this recipient. Valid choices are **direct** and **cc**
    - `email` string, email — Email address of person you are inviting to the share
  - `expiration` string, date-time — New expiration date and time for the share
  - `hasNotification` boolean — Whether delivery receipts should be sent for this share.
  - `isPublic` boolean — Whether people can visit the share without following a link from an invitation email
  - `messageBody` string — Message content to use for emails inviting recipients to the share. Ignored if you have not also provided `recipients` and a `subject`
  - `notificationEmails` string[] — List of email addresses to send delivery receipts to. Ignored if `hasNotification` is false.
  - `password` string — New password for the share. To leave the password unchanged, do not send this parameter.
  - `requireEmail` boolean — Whether visitors to the share will be required to enter their email in order to access the share.
  - `messageSubject` string — Subject to use on emails inviting recipients to the share. Ignored if you have not also provided `recipients` and a `message`
  - `fileDropCreateFolders` boolean — Whether uploads to a receive folder should be automatically placed into subfolders. See our [receive folder documentation](/docs/account/05-file-sharing/05-form-builder#advanced-form-settings)
  - `status` integer — New status for the share. You can set an active share to inactive by setting the status to **0**

## Response `200`

Successful operation

- ShareResponse — unresolved $ref

---

[API](https://skmtc.net/prismic/apis/exavault-api.md) · [All operations](https://skmtc.net/prismic/apis/exavault-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/prismic/exavault-api/revisions/a1bd874b5960/schema)
