Novu · Schema
MessageResponseDto
JSON Schema for Novu MessageResponseDto.
NotificationsMessagingIn AppEmailSMSPushChatWorkflowsOpen SourceSubscribersTopicsInboxWorkflow OrchestrationMulti ChannelDigestMCPFrameworkReact
Properties
| Name | Type | Description |
|---|---|---|
| _id | string | Unique identifier for the message |
| _templateId | stringnull | Template ID associated with the message |
| _environmentId | string | Environment ID where the message is sent |
| _messageTemplateId | stringnull | Message template ID |
| _organizationId | string | Organization ID associated with the message |
| _notificationId | string | Notification ID associated with the message |
| _subscriberId | string | Subscriber ID associated with the message |
| subscriber | object | Subscriber details, if available |
| template | object | Workflow template associated with the message |
| templateIdentifier | string | Identifier for the message template |
| createdAt | string | Creation date of the message |
| deliveredAt | array | Array of delivery dates for the message, if the message has multiple delivery dates, for example after being snoozed |
| lastSeenDate | string | Last seen date of the message, if available |
| lastReadDate | string | Last read date of the message, if available |
| content | object | Content of the message, can be an email block or a string |
| transactionId | string | Transaction ID associated with the message |
| subject | string | Subject of the message, if applicable |
| channel | string | Channel type through which the message is sent |
| read | boolean | Indicates if the message has been read |
| seen | boolean | Indicates if the message has been seen |
| snoozedUntil | string | Date when the message will be unsnoozed |
| string | Email address associated with the message, if applicable | |
| phone | string | Phone number associated with the message, if applicable |
| directWebhookUrl | string | Direct webhook URL for the message, if applicable |
| providerId | string | Provider ID associated with the message, if applicable |
| deviceTokens | array | Device tokens associated with the message, if applicable |
| title | string | Title of the message, if applicable |
| cta | object | Call to action associated with the message |
| _feedId | stringnull | Feed ID associated with the message, if applicable |
| status | string | Status of the message |
| errorId | string | Error ID if the message has an error |
| errorText | string | Error text if the message has an error |
| payload | object | The payload that was used to send the notification trigger |
| overrides | object | Provider specific overrides used when triggering the notification |
| contextKeys | array | Context (single or multi) in which the message was sent |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/novu/main/json-schema/novu-message-response-dto-schema.json",
"title": "MessageResponseDto",
"description": "JSON Schema for Novu MessageResponseDto.",
"type": "object",
"properties": {
"_id": {
"type": "string",
"description": "Unique identifier for the message"
},
"_templateId": {
"type": [
"string",
"null"
],
"description": "Template ID associated with the message"
},
"_environmentId": {
"type": "string",
"description": "Environment ID where the message is sent"
},
"_messageTemplateId": {
"type": [
"string",
"null"
],
"description": "Message template ID"
},
"_organizationId": {
"type": "string",
"description": "Organization ID associated with the message"
},
"_notificationId": {
"type": "string",
"description": "Notification ID associated with the message"
},
"_subscriberId": {
"type": "string",
"description": "Subscriber ID associated with the message"
},
"subscriber": {
"description": "Subscriber details, if available",
"allOf": [
{
"type": "object",
"properties": {
"_id": {
"type": "string",
"description": "The internal ID generated by Novu for your subscriber. This ID does not match the `subscriberId` used in your queries. Refer to `subscriberId` for that identifier."
},
"firstName": {
"type": [
"string",
"null"
],
"description": "The first name of the subscriber."
},
"lastName": {
"type": [
"string",
"null"
],
"description": "The last name of the subscriber."
},
"email": {
"type": [
"string",
"null"
],
"description": "The email address of the subscriber."
},
"phone": {
"type": [
"string",
"null"
],
"description": "The phone number of the subscriber."
},
"avatar": {
"type": [
"string",
"null"
],
"description": "The URL of the subscriber's avatar image."
},
"locale": {
"type": [
"string",
"null"
],
"description": "The locale setting of the subscriber, indicating their preferred language or region."
},
"channels": {
"description": "An array of channel settings associated with the subscriber.",
"type": "array",
"items": {
"type": "object",
"properties": {
"providerId": {
"type": "string",
"description": "The provider identifier for the credentials",
"enum": [
"slack",
"discord",
"msteams",
"mattermost",
"ryver",
"zulip",
"grafana-on-call",
"getstream",
"rocket-chat",
"whatsapp-business",
"chat-webhook",
"novu-slack",
"telegram",
"fcm",
"apns",
"expo",
"one-signal",
"pushpad",
"push-webhook",
"pusher-beams",
"appio"
]
},
"integrationIdentifier": {
"type": "string",
"description": "The integration identifier"
},
"credentials": {
"description": "Credentials payload for the specified provider",
"allOf": [
{
"type": "object",
"properties": {
"webhookUrl": {
"type": "string",
"description": "Webhook URL used by chat app integrations. The webhook should be obtained from the chat app provider.",
"example": "https://example.com/webhook"
},
"channel": {
"type": "string",
"description": "Channel specification for Mattermost chat notifications.",
"example": "general"
},
"deviceTokens": {
"description": "Contains an array of the subscriber device tokens for a given provider. Used on Push integrations.",
"example": [
"token1",
"token2",
"token3"
],
"type": "array",
"items": {
"type": "string"
}
},
"alertUid": {
"type": "string",
"description": "Alert UID for Grafana on-call webhook payload.",
"example": "12345-abcde"
},
"title": {
"type": "string",
"description": "Title to be used with Grafana on-call webhook.",
"example": "Critical Alert"
},
"imageUrl": {
"type": "string",
"description": "Image URL property for Grafana on-call webhook.",
"example": "https://example.com/image.png"
},
"state": {
"type": "string",
"description": "State property for Grafana on-call webhook.",
"example": "resolved"
},
"externalUrl": {
"type": "string",
"description": "Link to upstream details property for Grafana on-call webhook.",
"example": "https://example.com/details"
}
}
}
]
},
"_integrationId": {
"type": "string",
"description": "The unique identifier of the integration associated with this channel."
}
},
"required": [
"providerId",
"credentials",
"_integrationId"
]
}
},
"topics": {
"description": "An array of topics that the subscriber is subscribed to.",
"deprecated": true,
"type": "array",
"items": {
"type": "string"
}
},
"isOnline": {
"type": [
"boolean",
"null"
],
"description": "Indicates whether the subscriber is currently online."
},
"lastOnlineAt": {
"type": [
"string",
"null"
],
"description": "The timestamp indicating when the subscriber was last online, in ISO 8601 format."
},
"__v": {
"type": "number",
"description": "The version of the subscriber document."
},
"data": {
"type": [
"object",
"null"
],
"description": "Additional custom data for the subscriber",
"additionalProperties": true
},
"timezone": {
"type": [
"string",
"null"
],
"description": "Timezone of the subscriber"
},
"subscriberId": {
"type": "string",
"description": "The identifier used to create this subscriber, which typically corresponds to the user ID in your system."
},
"_organizationId": {
"type": "string",
"description": "The unique identifier of the organization to which the subscriber belongs."
},
"_environmentId": {
"type": "string",
"description": "The unique identifier of the environment associated with this subscriber."
},
"deleted": {
"type": "boolean",
"description": "Indicates whether the subscriber has been deleted."
},
"createdAt": {
"type": "string",
"description": "The timestamp indicating when the subscriber was created, in ISO 8601 format."
},
"updatedAt": {
"type": "string",
"description": "The timestamp indicating when the subscriber was last updated, in ISO 8601 format."
}
},
"required": [
"subscriberId",
"_organizationId",
"_environmentId",
"deleted",
"createdAt",
"updatedAt"
]
}
]
},
"template": {
"description": "Workflow template associated with the message",
"allOf": [
{
"type": "object",
"properties": {
"_id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"active": {
"type": "boolean"
},
"draft": {
"type": "boolean"
},
"preferenceSettings": {
"type": "object",
"properties": {
"email": {
"type": "boolean",
"description": "Email channel preference",
"example": true
},
"sms": {
"type": "boolean",
"description": "SMS channel preference",
"example": false
},
"in_app": {
"type": "boolean",
"description": "In-app channel preference",
"example": true
},
"chat": {
"type": "boolean",
"description": "Chat channel preference",
"example": false
},
"push": {
"type": "boolean",
"description": "Push notification channel preference",
"example": true
}
}
},
"critical": {
"type": "boolean"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"_id": {
"type": "string",
"description": "Unique identifier for the notification step."
},
"uuid": {
"type": "string",
"description": "Universally unique identifier for the notification step."
},
"name": {
"type": "string",
"description": "Name of the notification step."
},
"_templateId": {
"type": "string",
"description": "ID of the template associated with this notification step."
},
"active": {
"type": "boolean",
"description": "Indicates whether the notification step is active."
},
"shouldStopOnFail": {
"type": "boolean",
"description": "Determines if the process should stop on failure."
},
"template": {
"description": "Message template used in this notification step.",
"allOf": [
{
"type": "object",
"properties": {}
}
]
},
"filters": {
"description": "Filters applied to this notification step.",
"type": "array",
"items": {
"type": "object",
"properties": {
"isNegated": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"BOOLEAN",
"TEXT",
"DATE",
"NUMBER",
"STATEMENT",
"LIST",
"MULTI_LIST",
"GROUP"
]
},
"value": {
"type": "string",
"enum": [
"AND",
"OR"
]
},
"children": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"value": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"LARGER",
"SMALLER",
"LARGER_EQUAL",
"SMALLER_EQUAL",
"EQUAL",
"NOT_EQUAL",
"ALL_IN",
"ANY_IN",
"NOT_IN",
"BETWEEN",
"NOT_BETWEEN",
"LIKE",
"NOT_LIKE",
"IN"
]
},
"on": {
"type": "string",
"enum": [
"subscriber",
"payload"
]
}
},
"required": [
"field",
"value",
"operator",
"on"
]
}
}
},
"required": [
"isNegated",
"type",
"value",
"children"
]
}
},
"_parentId": {
"type": "string",
"description": "ID of the parent notification step, if applicable."
},
"metadata": {
"description": "Metadata associated with the workflow step. Can vary based on the type of step.",
"oneOf": [
{
"type": "object",
"properties": {
"amount": {
"type": "number"
},
"unit": {
"type": "string",
"enum": [
"seconds",
"minutes",
"hours",
"days",
"weeks",
"months"
]
},
"digestKey": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"regular",
"backoff"
]
},
"backoff": {
"type": "boolean"
},
"backoffAmount": {
"type": "number"
},
"backoffUnit": {
"type": "string",
"enum": [
"seconds",
"minutes",
"hours",
"days",
"weeks",
"months"
]
},
"updateMode": {
"type": "boolean"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"amount": {
"type": "number"
},
"unit": {
"type": "string",
"enum": [
"seconds",
"minutes",
"hours",
"days",
"weeks",
"months"
]
},
"digestKey": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"timed"
]
},
"timed": {
"type": "object",
"properties": {
"atTime": {
"type": "string"
},
"weekDays": {
"type": "array",
"items": {
"type": "string",
"enum": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday",
"sunday"
]
}
},
"monthDays": {
"type": "array",
"items": {
"type": "string"
}
},
"ordinal": {
"type": "string",
"enum": [
"1",
"2",
"3",
"4",
"5",
"last"
]
},
"ordinalValue": {
"type": "string",
"enum": [
"day",
"weekday",
"weekend",
"sunday",
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday"
]
},
"monthlyType": {
"type": "string",
"enum": [
"each",
"on"
]
}
}
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"amount": {
"type": "number"
},
"unit": {
"type": "string",
"enum": [
"seconds",
"minutes",
"hours",
"days",
"weeks",
"months"
]
},
"type": {
"type": "string",
"enum": [
"regular"
]
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"scheduled"
]
},
"delayPath": {
"type": "string"
}
},
"required": [
"type",
"delayPath"
]
}
]
},
"replyCallback": {
"description": "Callback information for replies, including whether it is active and the callback URL.",
"allOf": [
{
"type": "object",
"properties": {
"active": {
"type": "boolean",
"description": "Indicates whether the reply callback is active."
},
"url": {
"type": "string",
"description": "The URL to which replies should be sent."
}
}
}
]
},
"variants": {
"type": "array",
"items": {
"type": "object",
"properties": {
"_id": {
"type": "string",
"description": "Unique identifier for the notification step."
},
"uuid": {
"type": "string",
"description": "Universally unique identifier for the notification step."
},
"name": {
"type": "string",
"description": "Name of the notification step."
},
"_templateId": {
"type": "string",
"description": "ID of the template associated with this notification step."
},
"active": {
"type": "boolean",
"description": "Indicates whether the notification step is active."
},
"shouldStopOnFail": {
"type": "boolean",
"description": "Determines if the process should stop on failure."
},
"template": {
"description": "Message template used in this notification step.",
"allOf": [
{
"type": "object",
"properties": {}
}
]
},
"filters": {
"description": "Filters applied to this notification step.",
"type": "array",
"items": {
"type": "object",
"properties": {
"isNegated": {
"type": "boolean"
},
"type": {
"type": "object"
},
"value": {
"type": "string",
"enum": [
"AND",
"OR"
]
},
"children": {
"type": "array",
"items": {
"type": "object"
}
}
},
"required": [
"isNegated",
"type",
"value",
"children"
]
}
},
"_parentId": {
"type": "string",
"description": "ID of the parent notification step, if applicable."
},
"metadata": {
"description": "Metadata associated with the workflow step. Can vary based on the type of step.",
"oneOf": [
{
"type": "object",
"properties": {
"amount": {
"type": "number"
},
"unit": {
"type": "string",
"enum": [
"seconds",
"minutes",
"hours",
"days",
"weeks",
"months"
]
},
"digestKey": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"regular",
"backoff"
]
},
"backoff": {
"type": "boolean"
},
"backoffAmount": {
"type": "number"
},
"backoffUnit": {
"type": "string",
"enum": [
"seconds",
"minutes",
"hours",
"days",
"weeks",
"months"
]
},
"updateMode": {
"type": "boolean"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"amount": {
"type": "number"
},
"unit": {
"type": "string",
"enum": [
"seconds",
"minutes",
"hours",
"days",
"weeks",
"months"
]
},
"digestKey": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"timed"
]
},
"timed": {
"type": "object"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"amount": {
"type": "number"
},
"unit": {
"type": "string",
"enum": [
# --- truncated at 32 KB (46 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/novu/refs/heads/main/json-schema/novu-message-response-dto-schema.json