# delete\_\_systemevent\_read

`DELETE /systemevent/read`

*Mark System Event(s) as Unread*

Marks one or more system events as unread for the current authenticated user by removing the read records. Send a single **id** or an array **ids** in the request body. Used to allow users to “mark as unread” in notification UIs. The operation is idempotent: deleting an already-unread event still returns success.

**Key Features:**

* Removes server-side read state for the current user and the given event(s)
* Supports a single event id or multiple ids in one request
* Idempotent: calling again when the event is already unread still returns success
* Used by notification UIs to support “Mark as unread”

**Authentication:**

* Requires valid Bearer token authentication
* User can only remove their own read state (no cross-user scope)

**Request Body:** JSON with either **id** (number) or **ids** (array of numbers). At least one valid integer id is required.

#### TypeScript Client Library

```typescript
// Single id or array of ids
public markSystemEventAsUnread = async (systemEventLogId: number | number[]): Promise<SystemEventReadStatusResponse> => {
  const body = Array.isArray(systemEventLogId) ? { ids: systemEventLogId } : { id: systemEventLogId };
  return this.makeRequest<SystemEventReadStatusResponse>('systemevent/read', 'DELETE', body);
};
```

#### Code Samples

{% tabs %}
{% tab title="Shell" %}

```shell
# Mark one system event as unread
curl -X DELETE https://backend.flashback.tech/systemevent/read \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer your-jwt-token' \
  -d '{"id": 12345}'

# Mark multiple events as unread
curl -X DELETE https://backend.flashback.tech/systemevent/read \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer your-jwt-token' \
  -d '{"ids": [12345, 12346, 12347]}'
```

{% endtab %}

{% tab title="HTTP" %}

```http
DELETE https://backend.flashback.tech/systemevent/read HTTP/1.1
Host: backend.flashback.tech
Accept: application/json
Content-Type: application/json
Authorization: Bearer your-jwt-token

{"id": 12345}
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json',
  'Authorization': 'Bearer your-jwt-token'
};

fetch('https://backend.flashback.tech/systemevent/read', {
  method: 'DELETE',
  headers: headers,
  body: JSON.stringify({ id: 12345 })
})
.then(function(res) { return res.json(); })
.then(function(body) { console.log(body); });
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'rest-client'

headers = {
  'Accept' => 'application/json',
  'Content-Type' => 'application/json',
  'Authorization' => 'Bearer your-jwt-token'
}

result = RestClient.delete 'https://backend.flashback.tech/systemevent/read',
  { id: 12345 }.to_json, headers: headers

p JSON.parse(result)
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json',
  'Authorization': 'Bearer your-jwt-token'
}

r = requests.delete('https://backend.flashback.tech/systemevent/read',
                    headers=headers, json={'id': 12345})
print(r.json())
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'Authorization' => 'Bearer your-jwt-token',
);

$client = new \GuzzleHttp\Client();

try {
    $response = $client->request('DELETE', 'https://backend.flashback.tech/systemevent/read', array(
        'headers' => $headers,
        'json' => array('id' => 12345),
    ));
    print_r($response->getBody()->getContents());
} catch (\GuzzleHttp\Exception\BadResponseException $e) {
    print_r($e->getMessage());
}
```

{% endtab %}

{% tab title="Java" %}

```java
URL obj = new URL("https://backend.flashback.tech/systemevent/read");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Content-Type", "application/json");
con.setRequestProperty("Authorization", "Bearer your-jwt-token");
con.setDoOutput(true);
con.getOutputStream().write("{\"id\":12345}".getBytes());

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
    "bytes"
    "net/http"
)

func main() {
    headers := map[string][]string{
        "Accept":       []string{"application/json"},
        "Content-Type": []string{"application/json"},
        "Authorization": []string{"Bearer your-jwt-token"},
    }
    body := []byte(`{"id":12345}`)
    req, err := http.NewRequest("DELETE", "https://backend.flashback.tech/systemevent/read", bytes.NewReader(body))
    if err != nil { return }
    for k, v := range headers { req.Header[k] = v }

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
```

{% endtab %}
{% endtabs %}

#### Parameters <a href="#delete__systemevent_systemeventid-read-parameters" id="delete__systemevent_systemeventid-read-parameters"></a>

| Name | In   | Type      | Required | Description                                                             |
| ---- | ---- | --------- | -------- | ----------------------------------------------------------------------- |
| id   | body | number    | false    | Single system event log ID to mark as unread (use **id** or **ids**)    |
| ids  | body | number\[] | false    | Array of system event log IDs to mark as unread (use **id** or **ids**) |

Provide either **id** or **ids**; at least one valid integer id is required.

#### Example responses

> 200 Response

```json
{
  "success": true
}
```

> 400 Response

```json
{
  "error": "Missing or invalid id or ids"
}
```

> 401 Response

```json
{
  "error": "Unauthorized"
}
```

> 500 Response

```json
{
  "error": "Internal server error"
}
```

#### Responses <a href="#delete__systemevent_systemeventid-read-responses" id="delete__systemevent_systemeventid-read-responses"></a>

| Status | Meaning                                                                    | Description                               | Schema |
| ------ | -------------------------------------------------------------------------- | ----------------------------------------- | ------ |
| 200    | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)                    | Event(s) marked as unread successfully    | Inline |
| 400    | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)           | Missing or invalid id or ids              | Inline |
| 401    | [Unauthorized](https://tools.ietf.org/html/rfc7231#section-6.5.2)          | Authentication required or user not found | Inline |
| 500    | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | Internal server error                     | Inline |

#### Response Schema <a href="#delete__systemevent_systemeventid-read-responseschema" id="delete__systemevent_systemeventid-read-responseschema"></a>

Status Code **200**

| Name      | Type    | Required | Restrictions | Description                     |
| --------- | ------- | -------- | ------------ | ------------------------------- |
| » success | boolean | true     | none         | Whether the operation succeeded |

Status Code **400**, **401**, **500**

| Name    | Type   | Required | Restrictions | Description   |
| ------- | ------ | -------- | ------------ | ------------- |
| » error | string | true     | none         | Error message |

This operation requires authentication via Bearer token.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flashback.tech/support-reference/platform-api-reference/other-apis/delete__systemevent_read.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
