openapi: 3.0.3 info: title: Novu Environments Events API description: 'The Novu REST API drives open-source notification infrastructure that sends multi-channel messages - email, SMS, push, chat, and an in-app Inbox - from a single workflow trigger. A trigger event fans a notification out across the channels defined in a workflow. This document models the core resources - Events (Trigger), Subscribers, Topics, the in-app Inbox feed, Messages, Notifications (activity), Workflows, Integrations, Layouts, subscriber Preferences, Environments, and Translations. Novu is open source (MIT) and self-hostable, and also runs as Novu Cloud with US and EU regions. All requests authenticate with a secret API key sent as `Authorization: ApiKey `. Endpoints are grounded in Novu''s published API reference; request/response bodies are modeled at a representative level rather than field-complete.' version: '1.0' contact: name: Novu url: https://novu.co license: name: MIT url: https://github.com/novuhq/novu/blob/next/LICENSE servers: - url: https://api.novu.co/v1 description: Novu Cloud - US (default) - url: https://eu.api.novu.co/v1 description: Novu Cloud - EU security: - apiKeyAuth: [] tags: - name: Events description: Trigger, bulk trigger, broadcast, and cancel workflow executions. paths: /events/trigger: post: operationId: triggerEvent tags: - Events summary: Trigger event description: Triggers a notification workflow for one or more subscribers. A single event fans out across the channels defined in the named workflow. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TriggerEventRequest' responses: '201': description: The trigger was accepted. content: application/json: schema: $ref: '#/components/schemas/TriggerEventResponse' '401': $ref: '#/components/responses/Unauthorized' /events/trigger/bulk: post: operationId: bulkTriggerEvents tags: - Events summary: Bulk trigger event description: Triggers up to 100 events in a single request. Counts as 100 rate-limit tokens. requestBody: required: true content: application/json: schema: type: object properties: events: type: array items: $ref: '#/components/schemas/TriggerEventRequest' responses: '201': description: The bulk trigger was accepted. '401': $ref: '#/components/responses/Unauthorized' /events/broadcast: post: operationId: broadcastEvent tags: - Events summary: Broadcast event to all description: Triggers a workflow for all subscribers in the current environment. requestBody: required: true content: application/json: schema: type: object required: - name properties: name: type: string payload: type: object additionalProperties: true responses: '201': description: The broadcast was accepted. '401': $ref: '#/components/responses/Unauthorized' /events/trigger/{transactionId}: delete: operationId: cancelTriggeredEvent tags: - Events summary: Cancel triggered event description: Cancels a triggered event (for example, one still in a delay or digest step) by its transactionId. parameters: - name: transactionId in: path required: true schema: type: string responses: '200': description: Cancellation result. '401': $ref: '#/components/responses/Unauthorized' components: responses: Unauthorized: description: Missing or invalid API key. content: application/json: schema: $ref: '#/components/schemas/Error' schemas: TriggerEventRequest: type: object required: - name - to properties: name: type: string description: The workflow trigger identifier. to: description: Recipient(s) - a subscriberId, a subscriber object, an array, or a topic reference. oneOf: - type: string - type: object additionalProperties: true - type: array items: oneOf: - type: string - type: object additionalProperties: true payload: type: object additionalProperties: true description: Variables interpolated into the workflow's channel steps. overrides: type: object additionalProperties: true transactionId: type: string Error: type: object properties: statusCode: type: integer message: type: string error: type: string TriggerEventResponse: type: object properties: data: type: object properties: acknowledged: type: boolean status: type: string transactionId: type: string securitySchemes: apiKeyAuth: type: apiKey in: header name: Authorization description: 'Novu secret API key from the Dashboard API Keys page, sent as `Authorization: ApiKey `.'