Mark a subscriber messages as seen, read, unseen or unread
POST
/v1/subscribers/{subscriberId}/messages/mark-as
Authorization
Authorization
<token>API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".
In: header
Request Body
application/json
RequiredmessageId
Requiredstring | array<string>markAs
RequiredstringValue in:
"read" | "seen" | "unread" | "unseen"
Path Parameters
subscriberId
RequiredstringHeader Parameters
idempotency-key
stringA header for idempotency purposes
curl -X POST "https://api.novu.co/v1/subscribers/<string>/messages/mark-as" \
-H "idempotency-key: <string>" \
-H "Authorization: <token>" \
-H "Content-Type: application/json" \
-d '{
"messageId": "string",
"markAs": "read"
}'
Created
[
{
"_id": "string",
"_templateId": "string",
"_environmentId": "string",
"_messageTemplateId": "string",
"_organizationId": "string",
"_notificationId": "string",
"_subscriberId": "string",
"subscriber": {
"_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": 0,
"data": {},
"timezone": "string"
},
"template": {
"_id": "string",
"name": "string",
"description": "string",
"active": true,
"draft": true,
"preferenceSettings": {
"email": true,
"sms": true,
"in_app": true,
"chat": true,
"push": true
},
"critical": true,
"tags": [
"string"
],
"steps": [
{
"_id": "string",
"uuid": "string",
"name": "string",
"_templateId": "string",
"active": true,
"shouldStopOnFail": true,
"template": {},
"filters": [
{
"isNegated": true,
"type": "BOOLEAN",
"value": "AND",
"children": [
{
"field": "string",
"value": "string",
"operator": "LARGER",
"on": "subscriber"
}
]
}
],
"_parentId": "string",
"metadata": {
"amount": 0,
"unit": "seconds",
"digestKey": "string",
"type": "regular",
"backoff": true,
"backoffAmount": 0,
"backoffUnit": "seconds",
"updateMode": true
},
"replyCallback": {
"active": true,
"url": "string"
},
"variants": [
{
"_id": "string",
"uuid": "string",
"name": "string",
"_templateId": "string",
"active": true,
"shouldStopOnFail": true,
"template": {},
"filters": [
{
"isNegated": true,
"type": "BOOLEAN",
"value": "AND",
"children": [
{
"field": "string",
"value": "string",
"operator": "LARGER",
"on": "subscriber"
}
]
}
],
"_parentId": "string",
"metadata": {
"amount": 0,
"unit": "seconds",
"digestKey": "string",
"type": "regular",
"backoff": true,
"backoffAmount": 0,
"backoffUnit": "seconds",
"updateMode": true
},
"replyCallback": {
"active": true,
"url": "string"
}
}
]
}
],
"_organizationId": "string",
"_creatorId": "string",
"_environmentId": "string",
"triggers": [
{
"type": "event",
"identifier": "string",
"variables": [
{
"name": "string"
}
],
"subscriberVariables": [
{
"name": "string"
}
]
}
],
"_notificationGroupId": "string",
"_parentId": "string",
"deleted": true,
"deletedAt": "string",
"deletedBy": "string",
"notificationGroup": {
"_id": "string",
"name": "string",
"_environmentId": "string",
"_organizationId": "string",
"_parentId": "string"
},
"data": {},
"workflowIntegrationStatus": {}
},
"templateIdentifier": "string",
"createdAt": "string",
"lastSeenDate": "string",
"lastReadDate": "string",
"content": {
"type": "button",
"content": "string",
"url": "string",
"styles": {
"textAlign": "center"
}
},
"transactionId": "string",
"subject": "string",
"channel": "in_app",
"read": true,
"seen": true,
"email": "string",
"phone": "string",
"directWebhookUrl": "string",
"providerId": "string",
"deviceTokens": [
"string"
],
"title": "string",
"cta": {
"type": "redirect",
"data": {
"url": "string"
},
"action": {
"status": "pending",
"buttons": [
{
"type": "primary",
"content": "string",
"resultContent": "string"
}
],
"result": {
"payload": {},
"type": "primary"
}
}
},
"_feedId": "string",
"status": "sent",
"errorId": "string",
"errorText": "string",
"payload": {},
"overrides": {}
}
]