API Reference
Subscribers
- GETGet subscribers
- POSTCreate subscriber
- POSTBulk create subscribers
- GETGet subscriber
- PUTUpsert subscriber
- DELDelete subscriber
- PUTUpdate subscriber credentials
- DELDelete subscriber credentials by providerId
- PATCHUpdate subscriber online status
- GETGet subscriber preferences
- GETGet subscriber global preferences
- PATCHUpdate subscriber preference
- PATCHUpdate subscriber global preferences
- GETGet in-app notification feed for a particular subscriber
- GETGet the unseen in-app notifications count for subscribers feed
- POSTMark a subscriber feed message as seen
- POSTMarks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed.
- POSTMark message action as seen
- GETHandle providers oauth redirect
- GETHandle chat oauth
Topics
Notification
Workflows
Workflow Overrides
Workflow groups
Integrations
Layouts
Execution Details
Organizations
Update subscriber credentials
Subscriber credentials associated to the delivery methods such as slack and push tokens.
curl --request PUT \
--url https://api.novu.co/v1/subscribers/{subscriberId}/credentials \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"providerId": "slack",
"integrationIdentifier": "<string>",
"credentials": {
"webhookUrl": "https://example.com/webhook",
"channel": "general",
"deviceTokens": [
"token1",
"token2",
"token3"
],
"alertUid": "12345-abcde",
"title": "Critical Alert",
"imageUrl": "https://example.com/image.png",
"state": "resolved",
"externalUrl": "https://example.com/details"
}
}'
{
"data": {
"_id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",
"avatar": "<string>",
"locale": "<string>",
"subscriberId": "<string>",
"channels": [
{
"providerId": "slack",
"integrationIdentifier": "<string>",
"credentials": {
"webhookUrl": "https://example.com/webhook",
"channel": "general",
"deviceTokens": [
"token1",
"token2",
"token3"
],
"alertUid": "12345-abcde",
"title": "Critical Alert",
"imageUrl": "https://example.com/image.png",
"state": "resolved",
"externalUrl": "https://example.com/details"
},
"_integrationId": "<string>"
}
],
"topics": [
"<string>"
],
"isOnline": true,
"lastOnlineAt": "<string>",
"_organizationId": "<string>",
"_environmentId": "<string>",
"deleted": true,
"createdAt": "<string>",
"updatedAt": "<string>",
"__v": 123,
"data": {},
"timezone": "<string>"
}
}
Enter your API key in the Authorization
field like the example shown below:
E.g ApiKey 18d2e625f05d80e
Authorizations
API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".
Path Parameters
Body
The provider identifier for the credentials
slack
, discord
, msteams
, mattermost
, ryver
, zulip
, grafana-on-call
, getstream
, rocket-chat
, whatsapp-business
, fcm
, apns
, expo
, one-signal
, pushpad
, push-webhook
, pusher-beams
Credentials payload for the specified provider
Webhook URL used by chat app integrations. The webhook should be obtained from the chat app provider.
"https://example.com/webhook"
Channel specification for Mattermost chat notifications.
"general"
Contains an array of the subscriber device tokens for a given provider. Used on Push integrations.
["token1", "token2", "token3"]
Alert UID for Grafana on-call webhook payload.
"12345-abcde"
Title to be used with Grafana on-call webhook.
"Critical Alert"
Image URL property for Grafana on-call webhook.
"https://example.com/image.png"
State property for Grafana on-call webhook.
"resolved"
Link to upstream details property for Grafana on-call webhook.
"https://example.com/details"
The integration identifier
Response
The identifier used to create this subscriber, which typically corresponds to the user ID in your system.
The unique identifier of the organization to which the subscriber belongs.
The unique identifier of the environment associated with this subscriber.
Indicates whether the subscriber has been deleted.
The timestamp indicating when the subscriber was created, in ISO 8601 format.
The timestamp indicating when the subscriber was last updated, in ISO 8601 format.
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.
The first name of the subscriber.
The last name of the subscriber.
The email address of the subscriber.
The phone number of the subscriber.
The URL of the subscriber's avatar image.
The locale setting of the subscriber, indicating their preferred language or region.
An array of channel settings associated with the subscriber.
The provider identifier for the credentials
slack
, discord
, msteams
, mattermost
, ryver
, zulip
, grafana-on-call
, getstream
, rocket-chat
, whatsapp-business
, fcm
, apns
, expo
, one-signal
, pushpad
, push-webhook
, pusher-beams
Credentials payload for the specified provider
Webhook URL used by chat app integrations. The webhook should be obtained from the chat app provider.
"https://example.com/webhook"
Channel specification for Mattermost chat notifications.
"general"
Contains an array of the subscriber device tokens for a given provider. Used on Push integrations.
["token1", "token2", "token3"]
Alert UID for Grafana on-call webhook payload.
"12345-abcde"
Title to be used with Grafana on-call webhook.
"Critical Alert"
Image URL property for Grafana on-call webhook.
"https://example.com/image.png"
State property for Grafana on-call webhook.
"resolved"
Link to upstream details property for Grafana on-call webhook.
"https://example.com/details"
The unique identifier of the integration associated with this channel.
The integration identifier
An array of topics that the subscriber is subscribed to.
Indicates whether the subscriber is currently online.
The timestamp indicating when the subscriber was last online, in ISO 8601 format.
The version of the subscriber document.
Additional custom data for the subscriber
Timezone of the subscriber
Was this page helpful?
curl --request PUT \
--url https://api.novu.co/v1/subscribers/{subscriberId}/credentials \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"providerId": "slack",
"integrationIdentifier": "<string>",
"credentials": {
"webhookUrl": "https://example.com/webhook",
"channel": "general",
"deviceTokens": [
"token1",
"token2",
"token3"
],
"alertUid": "12345-abcde",
"title": "Critical Alert",
"imageUrl": "https://example.com/image.png",
"state": "resolved",
"externalUrl": "https://example.com/details"
}
}'
{
"data": {
"_id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",
"avatar": "<string>",
"locale": "<string>",
"subscriberId": "<string>",
"channels": [
{
"providerId": "slack",
"integrationIdentifier": "<string>",
"credentials": {
"webhookUrl": "https://example.com/webhook",
"channel": "general",
"deviceTokens": [
"token1",
"token2",
"token3"
],
"alertUid": "12345-abcde",
"title": "Critical Alert",
"imageUrl": "https://example.com/image.png",
"state": "resolved",
"externalUrl": "https://example.com/details"
},
"_integrationId": "<string>"
}
],
"topics": [
"<string>"
],
"isOnline": true,
"lastOnlineAt": "<string>",
"_organizationId": "<string>",
"_environmentId": "<string>",
"deleted": true,
"createdAt": "<string>",
"updatedAt": "<string>",
"__v": 123,
"data": {},
"timezone": "<string>"
}
}