---
title: "Update notifications state"
method: POST
path: "/v1/subscribers/{subscriberId}/messages/mark-as"
tags: ["Subscribers"]
deprecated: true
---

# Update notifications state

`POST /v1/subscribers/{subscriberId}/messages/mark-as`

## Request

- Base URL: `https://api.notifly.io`
- URL: `https://api.notifly.io/v1/subscribers/{subscriberId}/messages/mark-as`
- Auth: API key in header `Authorization`

> **Deprecated.**

This API is deprecated, use v2 API instead. Update subscriber's multiple in-app notifications state such as seen, read, unseen or unread by **subscriberId**. 
      **messageId** is of type mongodbId of notifications.

## Path parameters

- `subscriberId` string, required

## Request body

- MessageMarkAsRequestDto
  - `messageId` union, required
    - string
    - string[]
  - `markAs` 'read' | 'seen' | 'unread' | 'unseen', required

## Response `201`

Created

- object
  - `data` MessageResponseDto[]
    - `_id` string: Unique identifier for the message
    - `_templateId` string, nullable: Template ID associated with the message
    - `_environmentId` string, required: Environment ID where the message is sent
    - `_messageTemplateId` string, nullable: Message template ID
    - `_organizationId` string, required: Organization ID associated with the message
    - `_notificationId` string, required: Notification ID associated with the message
    - `_subscriberId` string, required: Subscriber ID associated with the message
    - `subscriber` SubscriberResponseDto
      - `_id` string: The internal ID generated by Notifly for your subscriber. This ID does not match the `subscriberId` used in your queries. Refer to `subscriberId` for that identifier.
      - `firstName` string, nullable: The first name of the subscriber.
      - `lastName` string, nullable: The last name of the subscriber.
      - `email` string, nullable: The email address of the subscriber.
      - `phone` string, nullable: The phone number of the subscriber.
      - `avatar` string, nullable: The URL of the subscriber's avatar image.
      - `locale` string, nullable: The locale setting of the subscriber, indicating their preferred language or region.
      - `channels` ChannelSettingsDto[]: An array of channel settings associated with the subscriber.
        - `providerId` 'slack' | 'discord' | 'msteams' | 'webex-messaging' | 'mattermost' | 'ryver' | 'zulip' | 'grafana-on-call' | 'getstream' | 'rocket-chat' | 'whatsapp-business' | 'line' | 'chat-webhook' | 'novu-slack' | 'telegram' | 'sendblue' | 'novu-web-chat' | 'fcm' | 'apns' | 'expo' | 'one-signal' | 'pushpad' | 'push-webhook' | 'pusher-beams' | 'appio' | 'web-push', required: The provider identifier for the credentials
        - `integrationIdentifier` string: The integration identifier
        - `credentials` ChannelCredentials, required
          - `webhookUrl` string: Webhook URL used by chat app integrations. The webhook should be obtained from the chat app provider.
          - `channel` string: Channel specification for Mattermost chat notifications.
          - `deviceTokens` string[]: Contains an array of the subscriber device tokens for a given provider. Used on Push integrations.
          - `alertUid` string: Alert UID for Grafana on-call webhook payload.
          - `title` string: Title to be used with Grafana on-call webhook.
          - `imageUrl` string: Image URL property for Grafana on-call webhook.
          - `state` string: State property for Grafana on-call webhook.
          - `externalUrl` string: Link to upstream details property for Grafana on-call webhook.
        - `_integrationId` string, required: The unique identifier of the integration associated with this channel.
      - `topics` string[]: An array of topics that the subscriber is subscribed to.
      - `isOnline` boolean, nullable: Indicates whether the subscriber is currently online.
      - `lastOnlineAt` string, nullable: The timestamp indicating when the subscriber was last online, in ISO 8601 format.
      - `__v` number: The version of the subscriber document.
      - `data` object, nullable: Additional custom data for the subscriber
      - `timezone` string, nullable: Timezone of the subscriber
      - `subscriberId` string, required: The identifier used to create this subscriber, which typically corresponds to the user ID in your system.
      - `_organizationId` string, required: The unique identifier of the organization to which the subscriber belongs.
      - `_environmentId` string, required: The unique identifier of the environment associated with this subscriber.
      - `deleted` boolean, required: Indicates whether the subscriber has been deleted.
      - `createdAt` string, required: The timestamp indicating when the subscriber was created, in ISO 8601 format.
      - `updatedAt` string, required: The timestamp indicating when the subscriber was last updated, in ISO 8601 format.
    - `template` WorkflowResponse
      - `_id` string
      - `name` string, required
      - `description` string, required
      - `active` boolean, required
      - `draft` boolean, required
      - `preferenceSettings` SubscriberPreferenceChannels, required
        - `email` boolean: Email channel preference
        - `sms` boolean: SMS channel preference
        - `in_app` boolean: In-app channel preference
        - `chat` boolean: Chat channel preference
        - `push` boolean: Push notification channel preference
        - `tool` boolean: Tool channel preference
      - `critical` boolean, required
      - `tags` string[], required
      - `steps` NotificationStepDto[], required
        - `_id` string: Unique identifier for the notification step.
        - `uuid` string: Universally unique identifier for the notification step.
        - `name` string: Name of the notification step.
        - `_templateId` string: ID of the template associated with this notification step.
        - `active` boolean: Indicates whether the notification step is active.
        - `shouldStopOnFail` boolean: Determines if the process should stop on failure.
        - `template` MessageTemplate
        - `filters` StepFilterDto[]: Filters applied to this notification step.
          - `isNegated` boolean, required
          - `type` 'BOOLEAN' | 'TEXT' | 'DATE' | 'NUMBER' | 'STATEMENT' | 'LIST' | 'MULTI_LIST' | 'GROUP', required
          - `value` 'AND' | 'OR', required
          - `children` FieldFilterPartDto[], required
            - `field` string, required
            - `value` string, required
            - `operator` 'LARGER' | 'SMALLER' | 'LARGER_EQUAL' | 'SMALLER_EQUAL' | 'EQUAL' | 'NOT_EQUAL' | 'ALL_IN' | 'ANY_IN' | 'NOT_IN' | 'BETWEEN' | 'NOT_BETWEEN' | 'LIKE' | 'NOT_LIKE' | 'IN', required
            - `on` 'subscriber' | 'payload', required
        - `_parentId` string: ID of the parent notification step, if applicable.
        - `metadata` union: Metadata associated with the workflow step. Can vary based on the type of step.
          - DigestRegularMetadata
            - `amount` number
            - `unit` 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months'
            - `digestKey` string
            - `type` 'regular' | 'backoff', required
            - `backoff` boolean
            - `backoffAmount` number
            - `backoffUnit` 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months'
            - `updateMode` boolean
          - DigestTimedMetadata
            - `amount` number
            - `unit` 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months'
            - `digestKey` string
            - `type` 'timed', required
            - `timed` TimedConfig
              - …
          - DelayRegularMetadata
            - `amount` number
            - `unit` 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months'
            - `type` 'regular', required
          - DelayScheduledMetadata
            - `type` 'scheduled', required
            - `delayPath` string, required
        - `replyCallback` ReplyCallback
          - `active` boolean: Indicates whether the reply callback is active.
          - `url` string: The URL to which replies should be sent.
        - `variants` NotificationStepData[]
          - `_id` string: Unique identifier for the notification step.
          - `uuid` string: Universally unique identifier for the notification step.
          - `name` string: Name of the notification step.
          - `_templateId` string: ID of the template associated with this notification step.
          - `active` boolean: Indicates whether the notification step is active.
          - `shouldStopOnFail` boolean: Determines if the process should stop on failure.
          - `template` MessageTemplate
          - `filters` StepFilterDto[]: Filters applied to this notification step.
            - `isNegated` boolean, required
            - `type` 'BOOLEAN' | 'TEXT' | 'DATE' | 'NUMBER' | 'STATEMENT' | 'LIST' | 'MULTI_LIST' | 'GROUP', required
            - `value` 'AND' | 'OR', required
            - `children` FieldFilterPartDto[], required
              - …
          - `_parentId` string: ID of the parent notification step, if applicable.
          - `metadata` union: Metadata associated with the workflow step. Can vary based on the type of step.
            - DigestRegularMetadata
              - …
            - DigestTimedMetadata
              - …
            - DelayRegularMetadata
              - …
            - DelayScheduledMetadata
              - …
          - `replyCallback` ReplyCallback
            - `active` boolean: Indicates whether the reply callback is active.
            - `url` string: The URL to which replies should be sent.
      - `_organizationId` string, required
      - `_creatorId` string, required
      - `_environmentId` string, required
      - `triggers` NotificationTrigger[], required
        - `type` 'event', required
        - `identifier` string, required
        - `variables` NotificationTriggerVariable[], required
          - `name` string, required: Name of the variable
        - `subscriberVariables` NotificationTriggerVariable[]
          - `name` string, required: Name of the variable
      - `_notificationGroupId` string, required
      - `_parentId` string
      - `deleted` boolean, required
      - `deletedAt` string, required
      - `deletedBy` string, required
      - `notificationGroup` NotificationGroup
        - `_id` string
        - `name` string, required
        - `_environmentId` string, required
        - `_organizationId` string, required
        - `_parentId` string
      - `data` object
      - `workflowIntegrationStatus` object
    - `templateIdentifier` string: Identifier for the message template
    - `createdAt` string, required: Creation date of the message
    - `deliveredAt` string[]: Array of delivery dates for the message, if the message has multiple delivery dates, for example after being snoozed
    - `lastSeenDate` string: Last seen date of the message, if available
    - `lastReadDate` string: Last read date of the message, if available
    - `content` union: Content of the message, can be an email block or a string
      - EmailBlock[]
        - `type` 'button' | 'text', required: Type of the email block
        - `content` string, required: Content of the email block
        - `url` string: URL associated with the email block, if any
        - `styles` EmailBlockStyles
          - `textAlign` 'center' | 'left' | 'right', required: Text alignment for the email block
      - string: String representation of the content
    - `transactionId` string, required: Transaction ID associated with the message
    - `subject` string: Subject of the message, if applicable
    - `channel` 'in_app' | 'email' | 'sms' | 'chat' | 'push' | 'tool', required: Channel type through which the message is sent
    - `read` boolean, required: Indicates if the message has been read
    - `seen` boolean, required: Indicates if the message has been seen
    - `snoozedUntil` string: Date when the message will be unsnoozed
    - `email` string: Email address associated with the message, if applicable
    - `phone` string: Phone number associated with the message, if applicable
    - `directWebhookUrl` string: Direct webhook URL for the message, if applicable
    - `providerId` string: Provider ID associated with the message, if applicable
    - `deviceTokens` string[]: Device tokens associated with the message, if applicable
    - `title` string: Title of the message, if applicable
    - `cta` MessageCTA, required
      - `type` 'redirect': Type of call to action
      - `data` MessageCTAData
        - `url` string: URL for the call to action
      - `action` MessageAction
        - `status` 'pending' | 'done': Status of the message action
        - `buttons` MessageButton[]: List of buttons associated with the message action
          - `type` 'primary' | 'secondary', required: Type of button for the action result
          - `content` string, required: Content of the button
          - `resultContent` string: Content of the result when the button is clicked
        - `result` MessageActionResult
          - `payload` object: Payload of the action result
          - `type` 'primary' | 'secondary': Type of button for the action result
    - `_feedId` string, nullable: Feed ID associated with the message, if applicable
    - `status` 'sent' | 'error' | 'warning', required: Status of the message
    - `errorId` string: Error ID if the message has an error
    - `errorText` string: Error text if the message has an error
    - `payload` object: The payload that was used to send the notification trigger
    - `overrides` object: Provider specific overrides used when triggering the notification
    - `contextKeys` string[]: Context (single or multi) in which the message was sent

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `405`: Method Not Allowed
- `409`: Conflict
- `413`: Payload Too Large
- `414`: URI Too Long
- `415`: Unsupported Media Type
- `422`: Unprocessable Entity
- `429`: The client has sent too many requests in a given amount of time.
- `500`: Internal Server Error
- `503`: The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.

---

[API](https://skmtc.dev/notifly/apis/notifly-api.md) · [All operations](https://skmtc.dev/notifly/apis/notifly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/notifly/apis/notifly-api/revisions/af909b9e1e57?raw)
