---
title: "Create a new notification"
method: POST
path: "/notifications"
tags: ["Notifications"]
---

# Create a new notification

`POST /notifications`

Create a new notification for a [resource](#section/Identifying-Resources) in your account. Notifications can be sent via email or webhook;

- To enable email, pass an array of email addresses to the `recipients` parameter of this call. 
- To enable webhooks, setup the webhook callback URL in your account settings via [PATCH /account](#operation/updateAccount). 

**Notes:**
  - Authenticated user should have [notifications permission](/docs/account/04-users/00-introduction#managing-user-roles-and-permissions)

## Headers

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

## Request body

- object
  - `type` 'file' | 'folder', required — What kind of notification you're making. Valid choices are: - **file** to monitor activity for a file resource - **folder** to monitor activity for a folder resource
  - `resource` string, required — Resources for this notification. See details on [how to specify resources](#section/Identifying-Resources) above.
  - `action` 'upload' | 'download' | 'delete' | 'all', required — Type of action be notified about. Notifications will only be fired for the given type of action. Valid choices are **upload**, **download**, **delete** or **all** (upload/download/delete)
  - `usernames` string[], required — Determines which users' actions should trigger the notification. Rather than listing individual users, you can also use 3 special options: - **notice\_user\_all** for activity by any user or share recipient - **notice\_user\_all\_users** for activity only by user accounts - **notice\_user\_all\_recipient** for activity only by share recipients
  - `sendEmail` boolean, required — Set to true if the user should be notified by email when the notification is triggered.
  - `recipients` string[] — Email addresses to send notification emails to. If not specified, sends to the current user's email address.
  - `message` string — Custom message to include in notification emails.

## Response `201`

Successful Operation

- NotificationResponse — 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)
