- UpdateAction - Update notification action status
- MarkAll - Update all notifications state
- MarkAllAs - Update notifications state
Update in-app (inbox) notification's action status by its unique key identifier messageId and type field type. type field can be primary or secondary
using Novu;
using Novu.Models.Components;
using Novu.Models.Requests;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
SubscribersV1ControllerMarkActionAsSeenRequest req = new SubscribersV1ControllerMarkActionAsSeenRequest() {
MessageId = "<id>",
Type = "<value>",
SubscriberId = "<id>",
MarkMessageActionAsSeenDto = new MarkMessageActionAsSeenDto() {
Status = MarkMessageActionAsSeenDtoStatus.Pending,
},
};
var res = await sdk.SubscribersMessages.UpdateActionAsync(req);
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
request |
SubscribersV1ControllerMarkActionAsSeenRequest | ✔️ | The request object to use for the request. |
SubscribersV1ControllerMarkActionAsSeenResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Novu.Models.Errors.ErrorDto | 414 | application/json |
| Novu.Models.Errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| Novu.Models.Errors.ValidationErrorDto | 422 | application/json |
| Novu.Models.Errors.ErrorDto | 500 | application/json |
| Novu.Models.Errors.APIException | 4XX, 5XX | */* |
Update all subscriber in-app (inbox) notifications state such as read, unread, seen or unseen by subscriberId.
using Novu;
using Novu.Models.Components;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
var res = await sdk.SubscribersMessages.MarkAllAsync(
subscriberId: "<id>",
markAllMessageAsRequestDto: new MarkAllMessageAsRequestDto() {
MarkAs = MarkAs.Read,
}
);
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
SubscriberId |
string | ✔️ | N/A |
MarkAllMessageAsRequestDto |
MarkAllMessageAsRequestDto | ✔️ | N/A |
IdempotencyKey |
string | ➖ | A header for idempotency purposes |
SubscribersV1ControllerMarkAllUnreadAsReadResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Novu.Models.Errors.ErrorDto | 414 | application/json |
| Novu.Models.Errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| Novu.Models.Errors.ValidationErrorDto | 422 | application/json |
| Novu.Models.Errors.ErrorDto | 500 | application/json |
| Novu.Models.Errors.APIException | 4XX, 5XX | */* |
Update subscriber's multiple in-app (inbox) notifications state such as seen, read, unseen or unread by subscriberId. messageId is of type mongodbId of notifications
using Novu;
using Novu.Models.Components;
using System.Collections.Generic;
var sdk = new NovuSDK(secretKey: "YOUR_SECRET_KEY_HERE");
var res = await sdk.SubscribersMessages.MarkAllAsAsync(
subscriberId: "<id>",
messageMarkAsRequestDto: new MessageMarkAsRequestDto() {
MessageId = MessageId.CreateArrayOfStr(
new List<string>() {}
),
MarkAs = MessageMarkAsRequestDtoMarkAs.Seen,
}
);
// handle response| Parameter | Type | Required | Description |
|---|---|---|---|
SubscriberId |
string | ✔️ | N/A |
MessageMarkAsRequestDto |
MessageMarkAsRequestDto | ✔️ | N/A |
IdempotencyKey |
string | ➖ | A header for idempotency purposes |
SubscribersV1ControllerMarkMessagesAsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Novu.Models.Errors.ErrorDto | 414 | application/json |
| Novu.Models.Errors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| Novu.Models.Errors.ValidationErrorDto | 422 | application/json |
| Novu.Models.Errors.ErrorDto | 500 | application/json |
| Novu.Models.Errors.APIException | 4XX, 5XX | */* |