Snooze a notification
Snooze a specific in-app (inbox) notification by its unique identifier notificationId until a specified time.
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.subscribers.notifications.snooze({
subscriberId: "<id>",
notificationId: "<id>",
snoozeSubscriberNotificationDto: {
snoozeUntil: new Date("2026-03-01T10:00:00Z"),
},
});
console.log(result);
}
run();using Novu;
using Novu.Models.Components;
using Novu.Models.Requests;
using System;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
SubscribersControllerSnoozeNotificationRequest req = new SubscribersControllerSnoozeNotificationRequest() {
SubscriberId = "<id>",
NotificationId = "<id>",
SnoozeSubscriberNotificationDto = new SnoozeSubscriberNotificationDto() {
SnoozeUntil = System.DateTime.Parse("2026-03-01T10:00:00Z").ToUniversalTime(),
},
};
var res = await sdk.Subscribers.Notifications.SnoozeAsync(req);
// handle responsedeclare(strict_types=1);
require 'vendor/autoload.php';
use novu;
use novu\Models\Components;
use novu\Models\Operations;
use novu\Utils;
$sdk = novu\Novu::builder()
->setSecurity(
'YOUR_SECRET_KEY_HERE'
)
->build();
$request = new Operations\SubscribersControllerSnoozeNotificationRequest(
subscriberId: '<id>',
notificationId: '<id>',
snoozeSubscriberNotificationDto: new Components\SnoozeSubscriberNotificationDto(
snoozeUntil: Utils\Utils::parseDateTime('2026-03-01T10:00:00Z'),
),
);
$response = $sdk->subscribers->notifications->snooze(
request: $request
);
if ($response->inboxNotificationDto !== null) {
// handle response
}from novu_py import Novu
from novu_py.utils import parse_datetime
with Novu(
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:
res = novu.subscribers.notifications.snooze(request={
"subscriber_id": "<id>",
"notification_id": "<id>",
"snooze_subscriber_notification_dto": {
"snooze_until": parse_datetime("2026-03-01T10:00:00Z"),
},
})
# Handle response
print(res)package main
import(
"context"
"github.com/novuhq/novu-go/v3"
"github.com/novuhq/novu-go/v3/types"
"github.com/novuhq/novu-go/v3/models/components"
"github.com/novuhq/novu-go/v3/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := v3.New(
v3.WithSecurity("YOUR_SECRET_KEY_HERE"),
)
res, err := s.Subscribers.Notifications.Snooze(ctx, operations.SubscribersControllerSnoozeNotificationRequest{
SubscriberID: "<id>",
NotificationID: "<id>",
SnoozeSubscriberNotificationDto: components.SnoozeSubscriberNotificationDto{
SnoozeUntil: types.MustTimeFromString("2026-03-01T10:00:00Z"),
},
})
if err != nil {
log.Fatal(err)
}
if res.InboxNotificationDto != nil {
// handle response
}
}curl --request PATCH \
--url https://api.novu.co/v2/subscribers/{subscriberId}/notifications/{notificationId}/snooze \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"snoozeUntil": "2026-03-01T10:00:00Z"
}
'const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({snoozeUntil: '2026-03-01T10:00:00Z'})
};
fetch('https://api.novu.co/v2/subscribers/{subscriberId}/notifications/{notificationId}/snooze', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.patch("https://api.novu.co/v2/subscribers/{subscriberId}/notifications/{notificationId}/snooze")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"snoozeUntil\": \"2026-03-01T10:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novu.co/v2/subscribers/{subscriberId}/notifications/{notificationId}/snooze")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"snoozeUntil\": \"2026-03-01T10:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"transactionId": "<string>",
"body": "<string>",
"to": {
"id": "<string>",
"subscriberId": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"avatar": "<string>"
},
"isRead": true,
"isSeen": true,
"isArchived": true,
"isSnoozed": true,
"createdAt": "<string>",
"subject": "<string>",
"snoozedUntil": "<string>",
"deliveredAt": [
"<string>"
],
"readAt": "<string>",
"firstSeenAt": "<string>",
"archivedAt": "<string>",
"avatar": "<string>",
"primaryAction": {
"label": "<string>",
"isCompleted": true,
"redirect": {
"url": "<string>"
}
},
"secondaryAction": {
"label": "<string>",
"isCompleted": true,
"redirect": {
"url": "<string>"
}
},
"tags": [
"<string>"
],
"data": {},
"redirect": {
"url": "<string>"
},
"workflow": {
"id": "<string>",
"identifier": "<string>",
"name": "<string>",
"critical": true,
"tags": [
"<string>"
],
"data": {}
}
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"errors": {
"fieldName1": {
"messages": [
"Field is required",
"Must be a valid email address"
],
"value": "invalidEmail"
},
"fieldName2": {
"messages": [
"Must be at least 18 years old"
],
"value": 17
},
"fieldName3": {
"messages": [
"Must be a boolean value"
],
"value": true
},
"fieldName4": {
"messages": [
"Must be a valid object"
],
"value": {
"key": "value"
}
},
"fieldName5": {
"messages": [
"Field is missing"
],
"value": null
},
"fieldName6": {
"messages": [
"Undefined value"
]
}
},
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}"API rate limit exceeded"{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}"Please wait some time, then try again."Authorizations
API key authentication. Allowed headers-- "Authorization: ApiKey <novu_secret_key>".
Headers
A header for idempotency purposes
Path Parameters
The identifier of the subscriber
The identifier of the notification
Query Parameters
Context keys for filtering
Body
The date and time until which the notification should be snoozed
"2026-03-01T10:00:00Z"
Response
OK
Unique identifier of the notification
Transaction identifier of the notification
Body content of the notification
Subscriber this notification was sent to
Show child attributes
Show child attributes
Whether the notification has been read
Whether the notification has been seen
Whether the notification has been archived
Whether the notification is snoozed
ISO timestamp when the notification was created
Channel type through which the message is sent
in_app, email, sms, chat, push Severity of the workflow
high, medium, low, none Subject of the notification
ISO timestamp when the notification will be unsnoozed
Timestamps when the notification was delivered
ISO timestamp when the notification was read
ISO timestamp when the notification was first seen
ISO timestamp when the notification was archived
Avatar URL for the notification
Primary action button for the notification
Show child attributes
Show child attributes
Secondary action button for the notification
Show child attributes
Show child attributes
Tags associated with the notification
Custom data payload of the notification
Redirect configuration for the notification
Show child attributes
Show child attributes
Workflow associated with the notification
Show child attributes
Show child attributes
Was this page helpful?
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "YOUR_SECRET_KEY_HERE",
});
async function run() {
const result = await novu.subscribers.notifications.snooze({
subscriberId: "<id>",
notificationId: "<id>",
snoozeSubscriberNotificationDto: {
snoozeUntil: new Date("2026-03-01T10:00:00Z"),
},
});
console.log(result);
}
run();using Novu;
using Novu.Models.Components;
using Novu.Models.Requests;
using System;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
SubscribersControllerSnoozeNotificationRequest req = new SubscribersControllerSnoozeNotificationRequest() {
SubscriberId = "<id>",
NotificationId = "<id>",
SnoozeSubscriberNotificationDto = new SnoozeSubscriberNotificationDto() {
SnoozeUntil = System.DateTime.Parse("2026-03-01T10:00:00Z").ToUniversalTime(),
},
};
var res = await sdk.Subscribers.Notifications.SnoozeAsync(req);
// handle responsedeclare(strict_types=1);
require 'vendor/autoload.php';
use novu;
use novu\Models\Components;
use novu\Models\Operations;
use novu\Utils;
$sdk = novu\Novu::builder()
->setSecurity(
'YOUR_SECRET_KEY_HERE'
)
->build();
$request = new Operations\SubscribersControllerSnoozeNotificationRequest(
subscriberId: '<id>',
notificationId: '<id>',
snoozeSubscriberNotificationDto: new Components\SnoozeSubscriberNotificationDto(
snoozeUntil: Utils\Utils::parseDateTime('2026-03-01T10:00:00Z'),
),
);
$response = $sdk->subscribers->notifications->snooze(
request: $request
);
if ($response->inboxNotificationDto !== null) {
// handle response
}from novu_py import Novu
from novu_py.utils import parse_datetime
with Novu(
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:
res = novu.subscribers.notifications.snooze(request={
"subscriber_id": "<id>",
"notification_id": "<id>",
"snooze_subscriber_notification_dto": {
"snooze_until": parse_datetime("2026-03-01T10:00:00Z"),
},
})
# Handle response
print(res)package main
import(
"context"
"github.com/novuhq/novu-go/v3"
"github.com/novuhq/novu-go/v3/types"
"github.com/novuhq/novu-go/v3/models/components"
"github.com/novuhq/novu-go/v3/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := v3.New(
v3.WithSecurity("YOUR_SECRET_KEY_HERE"),
)
res, err := s.Subscribers.Notifications.Snooze(ctx, operations.SubscribersControllerSnoozeNotificationRequest{
SubscriberID: "<id>",
NotificationID: "<id>",
SnoozeSubscriberNotificationDto: components.SnoozeSubscriberNotificationDto{
SnoozeUntil: types.MustTimeFromString("2026-03-01T10:00:00Z"),
},
})
if err != nil {
log.Fatal(err)
}
if res.InboxNotificationDto != nil {
// handle response
}
}curl --request PATCH \
--url https://api.novu.co/v2/subscribers/{subscriberId}/notifications/{notificationId}/snooze \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"snoozeUntil": "2026-03-01T10:00:00Z"
}
'const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({snoozeUntil: '2026-03-01T10:00:00Z'})
};
fetch('https://api.novu.co/v2/subscribers/{subscriberId}/notifications/{notificationId}/snooze', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.patch("https://api.novu.co/v2/subscribers/{subscriberId}/notifications/{notificationId}/snooze")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"snoozeUntil\": \"2026-03-01T10:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novu.co/v2/subscribers/{subscriberId}/notifications/{notificationId}/snooze")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"snoozeUntil\": \"2026-03-01T10:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"transactionId": "<string>",
"body": "<string>",
"to": {
"id": "<string>",
"subscriberId": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"avatar": "<string>"
},
"isRead": true,
"isSeen": true,
"isArchived": true,
"isSnoozed": true,
"createdAt": "<string>",
"subject": "<string>",
"snoozedUntil": "<string>",
"deliveredAt": [
"<string>"
],
"readAt": "<string>",
"firstSeenAt": "<string>",
"archivedAt": "<string>",
"avatar": "<string>",
"primaryAction": {
"label": "<string>",
"isCompleted": true,
"redirect": {
"url": "<string>"
}
},
"secondaryAction": {
"label": "<string>",
"isCompleted": true,
"redirect": {
"url": "<string>"
}
},
"tags": [
"<string>"
],
"data": {},
"redirect": {
"url": "<string>"
},
"workflow": {
"id": "<string>",
"identifier": "<string>",
"name": "<string>",
"critical": true,
"tags": [
"<string>"
],
"data": {}
}
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"errors": {
"fieldName1": {
"messages": [
"Field is required",
"Must be a valid email address"
],
"value": "invalidEmail"
},
"fieldName2": {
"messages": [
"Must be at least 18 years old"
],
"value": 17
},
"fieldName3": {
"messages": [
"Must be a boolean value"
],
"value": true
},
"fieldName4": {
"messages": [
"Must be a valid object"
],
"value": {
"key": "value"
}
},
"fieldName5": {
"messages": [
"Field is missing"
],
"value": null
},
"fieldName6": {
"messages": [
"Undefined value"
]
}
},
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}"API rate limit exceeded"{
"statusCode": 404,
"timestamp": "2024-12-12T13:00:00Z",
"path": "/api/v1/resource",
"message": "xx xx xx ",
"ctx": {
"workflowId": "some_wf_id",
"stepId": "some_wf_id"
},
"errorId": "abc123"
}"Please wait some time, then try again."