# Mark a notification as viewed.

Source: <https://everruns.com/docs/api/operations/mark_notification_viewed/>

POST

/v1/notifications/{notification\_id}/view

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/notifications/example/view';
const options = {method: 'POST'};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request POST \
  --url https://app.everruns.com/api/v1/notifications/example/view
```

* Production APIapp.everruns.com/api/v1/notifications/{notification\_id}/view

## Parameters

### Path Parameters

**notification\_id**

required

string

Prefixed public identifier

## Responses

### 200

Success

Media typeapplication/json

object

**body**

required

Plain-text summary of what happened.

string

**created\_at**

required

Timestamp when this resource was created (RFC 3339).

string format: date-time

**href**

UI link that opens the resource the notification is about.

string | null

**id**

required

Prefixed public identifier. See [ID Schema](https://everruns.com/docs/advanced/id-schema/).

string

**kind**

required

Discriminator selecting the variant of this resource.

string

**occurrence\_count**

required

How many times the same event recurred into this notification.

integer format: int32

**payload**

required

Kind-specific structured detail.

object

**source**

One of:

* object

  What sent the notification. Absent on notifications written before senders were recorded.

  object

  **id**

  Public ID of the sender, when it has one.

  string | null

  **name**

  Display name of the sender.

  string | null

  **type**

  required

  `agent` or `system`.

  string

* null

  null

**target\_id**

Prefixed public identifier of the resource the notification is about.

string | null

**target\_type**

Kind of resource the notification is about, when it has one.

string | null

**title**

required

Human-readable title. Safe to render in user-facing messages.

string

**updated\_at**

required

Timestamp when this resource was last updated (RFC 3339).

string format: date-time

**viewed\_at**

When the current user marked the notification as viewed; null while unviewed.

string | null format: date-time

##### Example

```json
{
  "href": "/chat/session_01933b5a00007000800000000000001",
  "id": "notification_01933b5a00007000800000000000001",
  "kind": "health.issue",
  "occurrence_count": 1,
  "source": {
    "id": "agent_01933b5a00007000800000000000001",
    "name": "Platform Assistant",
    "type": "agent"
  },
  "target_id": "session_01933b5a00007000800000000000001",
  "target_type": "session",
  "title": "Agent run failed"
}
```

### 404

Notification not found