# Events and notifications (IRPCEvents)

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEvents/

Reads and sets the user's notification switch, checks whether a user can receive
notifications, and sends requests and custom notifications to users.

- **gRPC service:** `MFiles.IRPCEvents`
- **Book and level:** [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md), standard
- **Methods:** 7
- **Proto file:** [`mfiles/IRPCEvents.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/IRPCEvents.proto)

<a id="overview"></a>

## Overview

Everything here ends in an e-mail notification, so it works only when notifications are enabled
on the server and in the vault. Several methods are used mainly by M-Files clients.

- **The caller's own on/off switch** for notifications:
  [GetNotificationConfiguration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEvents/GetNotificationConfiguration/index.md),
  [SetNotificationConfiguration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEvents/SetNotificationConfiguration/index.md).
- **Check that a user can receive notifications**:
  [TestMessageToUser](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEvents/TestMessageToUser/index.md).
- **Send an e-mail** with your own subject and body:
  [SendCustomNotification](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEvents/SendCustomNotification/index.md).
- **Send a request** to users:
  [CreateEventFreeRequest](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEvents/CreateEventFreeRequest/index.md),
  [CreateEventCheckInRequest](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEvents/CreateEventCheckInRequest/index.md).

Which events notify whom is defined by notification rules: see
[IRPCNotificationRules](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCNotificationRules/index.md). All methods need a vault session.
Users and groups are identified by their IDs in the vault.

<a id="methods"></a>

## Methods

| Method | Summary | Facts |
|---|---|---|
| [CreateEventAssignRequest](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEvents/CreateEventAssignRequest/index.md) | Not available: fails with "Not implemented.". | `write` `session` `returns metadata structure version` |
| [CreateEventCheckInRequest](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEvents/CreateEventCheckInRequest/index.md) | Asks the user who has an object checked out to check it in. Used by M-Files clients; applications rarely call it. | `write` `session` `returns metadata structure version` |
| [CreateEventFreeRequest](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEvents/CreateEventFreeRequest/index.md) | Sends a request with a free-text message to users and groups. Used by M-Files clients; applications rarely call it. | `write` `session` `returns metadata structure version` |
| [GetNotificationConfiguration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEvents/GetNotificationConfiguration/index.md) | Tells whether the caller has notifications turned on. | `read` `session` `idempotent` `returns metadata structure version` |
| [SendCustomNotification](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEvents/SendCustomNotification/index.md) | Sends an e-mail with the given subject and body to users, groups and e-mail addresses. | `write` `session` `returns metadata structure version` |
| [SetNotificationConfiguration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEvents/SetNotificationConfiguration/index.md) | Turns notifications on or off for the caller. | `write` `session` `idempotent` `returns metadata structure version` |
| [TestMessageToUser](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCEvents/TestMessageToUser/index.md) | Checks whether a user can receive notifications, and fails with the reason when not. | `write` `session` `returns metadata structure version` |
