Snooze
Snooze a notification
Snooze a specific in-app (inbox) notification by its unique identifier notificationId until a specified time.
PATCH
/
v2
/
subscribers
/
{subscriberId}
/
notifications
/
{notificationId}
/
snooze
PHP
declare(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
}
}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 responsecurl --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>",
"channelType": "in_app",
"severity": "high",
"subject": "<string>",
"snoozedUntil": "<string>",
"deliveredAt": [
"<string>"
],
"readAt": "<string>",
"firstSeenAt": "<string>",
"archivedAt": "<string>",
"avatar": "<string>",
"primaryAction": {
"label": "<string>",
"isCompleted": true,
"redirect": {
"url": "<string>",
"target": "_self"
}
},
"secondaryAction": {
"label": "<string>",
"isCompleted": true,
"redirect": {
"url": "<string>",
"target": "_self"
}
},
"tags": [
"<string>"
],
"data": {},
"redirect": {
"url": "<string>",
"target": "_self"
},
"workflow": {
"id": "<string>",
"identifier": "<string>",
"name": "<string>",
"critical": true,
"severity": "high",
"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
Path Parameters
Body
application/json
Response
OK
Was this page helpful?
⌘I
PHP
declare(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
}
}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 responsecurl --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>",
"channelType": "in_app",
"severity": "high",
"subject": "<string>",
"snoozedUntil": "<string>",
"deliveredAt": [
"<string>"
],
"readAt": "<string>",
"firstSeenAt": "<string>",
"archivedAt": "<string>",
"avatar": "<string>",
"primaryAction": {
"label": "<string>",
"isCompleted": true,
"redirect": {
"url": "<string>",
"target": "_self"
}
},
"secondaryAction": {
"label": "<string>",
"isCompleted": true,
"redirect": {
"url": "<string>",
"target": "_self"
}
},
"tags": [
"<string>"
],
"data": {},
"redirect": {
"url": "<string>",
"target": "_self"
},
"workflow": {
"id": "<string>",
"identifier": "<string>",
"name": "<string>",
"critical": true,
"severity": "high",
"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."