Subscribers
Retrieve subscriber notifications
deprecated
This API is deprecated, use v2 API instead. Retrieve subscriber in-app notifications by its unique key identifier subscriberId.
GET
/
v1
/
subscribers
/
{subscriberId}
/
notifications
/
feed
Retrieve subscriber notifications
curl --request GET \
--url https://api.novu.co/v1/subscribers/{subscriberId}/notifications/feed \
--header 'Authorization: <api-key>'import requests
url = "https://api.novu.co/v1/subscribers/{subscriberId}/notifications/feed"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.novu.co/v1/subscribers/{subscriberId}/notifications/feed', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.novu.co/v1/subscribers/{subscriberId}/notifications/feed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.novu.co/v1/subscribers/{subscriberId}/notifications/feed"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.novu.co/v1/subscribers/{subscriberId}/notifications/feed")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novu.co/v1/subscribers/{subscriberId}/notifications/feed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"hasMore": true,
"data": [
{
"_id": "615c1f2f9b0c5b001f8e4e3b",
"_templateId": "template_12345",
"_environmentId": "env_67890",
"_organizationId": "org_98765",
"_notificationId": "notification_123456",
"_subscriberId": "subscriber_112233",
"_jobId": "job_778899",
"transactionId": "transaction_123456",
"content": "This is a test notification content.",
"read": false,
"seen": true,
"archived": false,
"cta": {
"type": "redirect",
"data": {
"url": "<string>"
},
"action": {
"buttons": [
{
"content": "<string>",
"resultContent": "<string>"
}
],
"result": {
"payload": {}
}
}
},
"status": "sent",
"_messageTemplateId": "message_template_54321",
"_feedId": "feed_445566",
"createdAt": "2024-12-10T10:10:59.639Z",
"updatedAt": "2024-12-10T10:10:59.639Z",
"actor": {
"data": null
},
"subscriber": {
"subscriberId": "<string>",
"_id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"avatar": "<string>"
},
"templateIdentifier": "template_abcdef",
"providerId": "provider_xyz",
"subject": "Test Notification Subject",
"deviceTokens": [
"token1",
"token2"
],
"payload": {
"key": "value"
},
"data": {
"key": "value"
},
"overrides": {
"overrideKey": "overrideValue"
},
"tags": [
"tag1",
"tag2"
]
}
],
"pageSize": 2,
"page": 1,
"totalCount": 5
}{
"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
Query Parameters
Required range:
x >= 0Required range:
x <= 100Base64 encoded string of the partial payload JSON object
Response
OK
Indicates if there are more notifications to load.
Example:
true
Array of notifications returned in the response.
Show child attributes
Show child attributes
The number of notifications returned in this response.
Example:
2
The current page number of the notifications.
Example:
1
Total number of notifications available.
Example:
5
Was this page helpful?
⌘I
Retrieve subscriber notifications
curl --request GET \
--url https://api.novu.co/v1/subscribers/{subscriberId}/notifications/feed \
--header 'Authorization: <api-key>'import requests
url = "https://api.novu.co/v1/subscribers/{subscriberId}/notifications/feed"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.novu.co/v1/subscribers/{subscriberId}/notifications/feed', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.novu.co/v1/subscribers/{subscriberId}/notifications/feed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.novu.co/v1/subscribers/{subscriberId}/notifications/feed"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.novu.co/v1/subscribers/{subscriberId}/notifications/feed")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novu.co/v1/subscribers/{subscriberId}/notifications/feed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"hasMore": true,
"data": [
{
"_id": "615c1f2f9b0c5b001f8e4e3b",
"_templateId": "template_12345",
"_environmentId": "env_67890",
"_organizationId": "org_98765",
"_notificationId": "notification_123456",
"_subscriberId": "subscriber_112233",
"_jobId": "job_778899",
"transactionId": "transaction_123456",
"content": "This is a test notification content.",
"read": false,
"seen": true,
"archived": false,
"cta": {
"type": "redirect",
"data": {
"url": "<string>"
},
"action": {
"buttons": [
{
"content": "<string>",
"resultContent": "<string>"
}
],
"result": {
"payload": {}
}
}
},
"status": "sent",
"_messageTemplateId": "message_template_54321",
"_feedId": "feed_445566",
"createdAt": "2024-12-10T10:10:59.639Z",
"updatedAt": "2024-12-10T10:10:59.639Z",
"actor": {
"data": null
},
"subscriber": {
"subscriberId": "<string>",
"_id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"avatar": "<string>"
},
"templateIdentifier": "template_abcdef",
"providerId": "provider_xyz",
"subject": "Test Notification Subject",
"deviceTokens": [
"token1",
"token2"
],
"payload": {
"key": "value"
},
"data": {
"key": "value"
},
"overrides": {
"overrideKey": "overrideValue"
},
"tags": [
"tag1",
"tag2"
]
}
],
"pageSize": 2,
"page": 1,
"totalCount": 5
}{
"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."