action exavault_add_notification { label: "Create a new notification" description: "Create a new notification for a [resource](#section/Identifying-Resources) in your account. Notifications can be sent via email or webhook;\n\n- To enable email, pass an array of email addresses to the `recipients` parameter of this call. \n- To enable webhooks, setup the webhook callback URL in your account settings via [PATCH /account](#operation/updateAccount). \n\n**Notes:**\n - Authenticated user should have [notifications permission](/docs/account/04-users/00-introduction#managing-user-roles-and-permissions)\n" provider: exavault method: POST path: "/notifications" encoding: json input: { type: "object" properties: { action: { type: "string" description: "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)" enum: ["upload", "download", "delete", "all"] } "ev-access-token": { type: "string" } "ev-api-key": { type: "string" } message: { type: "string" description: "Custom message to include in notification emails." } recipients: { type: "array" description: "Email addresses to send notification emails to. If not specified, sends to the current user's email address." items: { type: "string" format: "email" } } resource: { type: "string" description: "Resources for this notification. See details on [how to specify resources](#section/Identifying-Resources) above." } sendEmail: { type: "boolean" description: "Set to true if the user should be notified by email when the notification is triggered." } type: { type: "string" description: "What kind of notification you're making. Valid choices are:\n\n- **file** to monitor activity for a file resource\n- **folder** to monitor activity for a folder resource" enum: ["file", "folder"] } usernames: { type: "array" description: "Determines which users' actions should trigger the notification. \n\nRather than listing individual users, you can also use 3 special options:\n\n- **notice\\_user\\_all** for activity by any user or share recipient\n- **notice\\_user\\_all\\_users** for activity only by user accounts\n- **notice\\_user\\_all\\_recipient** for activity only by share recipients" items: { type: "string" } } } required: ["action", "ev-access-token", "ev-api-key", "resource", "sendEmail", "type", "usernames"] additionalProperties: false } output: { type: "object" description: "Response object for notifications." properties: { data: { type: "object" description: "Object containing notification properties." properties: { attributes: { type: "object" description: "Attributes for the notification including the path, recipients, and share data. " properties: { action: { type: "string" description: "Action that triggers notification." enum: ["upload", "download", "delete", "all"] } created: { type: "string" format: "date-time" description: "Timestamp of notifiction creation." } message: { type: "string" description: "Custom message that will be sent to the notification recipients." } modified: { type: "string" format: "date-time" description: "Timestamp of notification modification." } name: { type: "string" description: "Name of the item that the notification is set on." } path: { type: "string" description: "Path to the item that the notification is set on." } readableDescription: { type: "string" description: "Human readable description of the notification." } readableDescriptionWithoutPath: { type: "string" description: "Human readable description of the notification without item path." } recipients: { type: "array" description: "Notification recipients." items: { type: "object" properties: { created: { type: "string" format: "date-time" description: "Timestamp of adding notification recipient." } email: { type: "string" description: "Recipient email." } id: { type: "integer" format: "int32" description: "ID of the recipient." } modified: { type: "string" format: "date-time" description: "Timestamp of notification recipient modification." } notificationId: { type: "integer" description: "ID of the notification that the recipient belongs to." } } } } sendEmail: { type: "boolean" description: "Whether or not an email will send when the notification is triggered." enum: [true, false] } shareId: { type: "string" description: "ID of the share that the notification belogns to." } type: { type: "string" description: "Type of the resource the notification is attached to. " enum: ["file", "folder", "shared_folder", "send_receipt", "share_receipt", "file_drop"] } userId: { type: "string" description: "ID of the user that the notification belongs to." } usernames: { type: "array" description: "Detail on which users can trigger the notification." items: { type: "string" } } } } id: { type: "integer" format: "int32" } relationships: { type: "object" properties: { ownerUser: { type: "object" properties: { data: { type: "object" properties: { id: { type: "integer" } type: { type: "string" enum: ["user"] } } } } } resource: { type: "object" properties: { data: { type: "object" properties: { id: { type: "integer" format: "int64" } type: { type: "string" } } } } } share: { type: "object" properties: { data: { type: "object" properties: { id: { type: "integer" format: "int32" } type: { type: "string" } } } } } } } type: { type: "string" } } } included: { type: "array" items: { type: "object" } } responseStatus: { type: "integer" description: "Http status code of the response." } } } }