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

# <access-service>/api/v1/users/me/notifications/email

## URL structure&#x20;

```text theme={null}
https://access-service.xy-company.com/api/v1/users/me/notifications/email
```

## Supported methods and overview&#x20;

* `GET` - retrieves information about the [notification preferences](/3.5/user/managing-your-account.md#modifying-your-email-notification-preferences) of a [Covata user](/3.5/api/authentication-and-authorisation.md) (whose [access token is submitted in the request](/3.5/api/access-service-api-v1-users-me-notifications-email.md#access-service-api-v1-users-me-notifications-email-supported-roles) to this endpoint).
* `PUT` - modifies the notification preferences for a Covata user (whose access token is submitted in the request to this endpoint).

> [!NOTE]
>
> The `GET` method takes no parameters.

## Detailed description&#x20;

This API endpoint serves a number of purposes:

* Retrieves information about the notification preferences of a Covata user (whose access token is submitted in the request to this endpoint). These notifications relate to the frequency with which this Covata user receives email notifications about items which have been shared with them.
* Modifies the notification preferences of a Covata user (whose access token is submitted in the request to this endpoint). \

  **Note:** These settings can also be modified through the [My Account](/3.5/user/managing-your-account.md#modifying-your-email-notification-preferences) feature of [SafeShare for Web](/3.5/user.md).

## Supported roles&#x20;

This API endpoint supports requests utilising Covata user accounts with the following [roles](/3.5/admin-org/administering-users-within-an-organisation.md#an-organisation-users-roles) (as described in the [Organisation Administrator's Guide](/3.5/admin-org.md)) and conditions:

* [Originator](/3.5/admin-org/administering-users-within-an-organisation.md#originator-role)
* [Collaborator](/3.5/admin-org/administering-users-within-an-organisation.md#collaborator-role)
* [Ad hoc](/3.5/admin-org/administering-users-within-an-organisation.md#adhoc-role)

The Covata Platform's resources available to a Covata user meeting the criteria above is determined by the access token submitted in the [header](/3.5/api/access-service-api-v1-users-me-notifications-email.md#access-service-api-v1-users-me-notifications-email-required-headers) of requests to this endpoint.

## Required headers&#x20;

The appropriate access token as the `Bearer` token:

* `Authorisation: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0NjcwMTY2NjYsInVzZXJfbmFtZSI6ImFsZXgub...`

The following header is required if the body of the request has a JSON object:

* `Content-Type: application/json`

## Required PUT-request parameters&#x20;

The following parameters must be sent in the **body** of the PUT request, each as individual members of a **JSON object**:

* **code** - Specify the enumeration (enum) value:

  * `ITEM` - Sets the Covata user (whose [access token is submitted in the request](/3.5/api/access-service-api-v1-users-me-notifications-email.md#access-service-api-v1-users-me-notifications-email-supported-roles) to this endpoint) to receive email notifications (entitled '*New items have been shared with you*') each time an item is shared with them. These email notifications contain links to the items (which had been shared with this user since their previous such notification), that opens the items in SafeShare for Web. Bear in mind that multiple items may appear as a 'digest' in a single email notification based on the [Item shared noticication frequency in minutues](/3.5/admin-platform/configuring-platform-administration-properties.md#notifications-properties) property configured by a [SafeShare administrator](/3.5/admin-platform/administering-platform-administrator-users.md#platform-administrator-role) (described in the SafeShare Administrator's Guide).
  * `DAILY` - Sets this Covata user to receive a '*New items have been shared with you*' email notification once a day, containing a digest of all items which had been shared with them since their previous such notification.
  * `WEEKLY` - Sets this user to receive a '*New items have been shared with you*' email notification once a week, containing a digest of all items which had been shared with them since their previous such notification.
  * `NONE` - Sets this user to receive no '*New items have been shared with you*' email notifications.

  **Example (request):**

  ```json theme={null}
  {
    "code": "DAILY"
  }
  ```

## Returns&#x20;

If the request succeeded, then an HTTP response status `200 OK` is returned.

For successful requests only, a JSON-formatted response containing the following members is also returned:

* **notificationPreferences** - An array containing information about each available notification preference in the response to this endpoint. Each element of this array contains information about one of these notification preferences, represented as an object containing the following members.

  * **name** - The name of the notification preference as it is exposed through the user interface of SafeShare applications.
  * **code** - The value of the notification preference as it is hard-coded in the Covata Platform. Each of these are equivalent to the [enum value specified in the request](/3.5/api/access-service-api-v1-users-me-notifications-email.md#access-service-api-v1-users-me-notifications-email-required-put-request-parameters) to this endpoint.
  * **selected** - A boolean value representing whether (`true`) or not (`false`) the notification preference is currently set for the Covata user (whose [access token is submitted in the request](/3.5/api/access-service-api-v1-users-me-notifications-email.md#access-service-api-v1-users-me-notifications-email-supported-roles) to this endpoint). From `PUT` requests to this endpoint, this value should be `true` for the notification preference specified in the request to this endpoint (and `false` for the others).

  **Example (response):**

  ```json theme={null}
  {
      "notificationPreferences": [{
          "name": "Per Item",
          "code": "ITEM",
          "selected": true
      }, {
          "name": "Daily",
          "code": "DAILY",
          "selected": false
      }, {
          "name": "Weekly",
          "code": "WEEKLY",
          "selected": false
      }, {
          "name": "None",
          "code": "NONE",
          "selected": false
      }]
  }
  ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.