# post\_\_systemevent\_read

`POST /systemevent/read`

*Mark System Event(s) as Read*

Marks one or more system events as read for the current authenticated user. Send a single **id** or an array **ids** in the request body. Used to track which notifications the user has seen. Events must belong to the same organization as the user; events in other orgs are ignored.

**Key Features:**

* Persists read state per user and per event (server-side)
* Supports a single event id or multiple ids in one request
* Idempotent: calling again for an already-read event still returns success
* Used by notification UIs (e.g. bell icon) to clear unread state

**Authentication:**

* Requires valid Bearer token authentication
* User must be associated with an organization
* Only events in the user’s organization are marked as read; others are skipped

**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 markSystemEventAsRead = async (systemEventLogId: number | number[]): Promise<SystemEventReadStatusResponse> => {
  const body = Array.isArray(systemEventLogId) ? { ids: systemEventLogId } : { id: systemEventLogId };
  return this.makeRequest<SystemEventReadStatusResponse>('systemevent/read', 'POST', body);
};
```

#### Code Samples

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

```shell
# Mark one system event as read
curl -X POST 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 read
curl -X POST 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
POST 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: 'POST',
  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.post '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.post('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('POST', '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("POST");
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("POST", "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="#post__systemevent_systemeventid-read-parameters" id="post__systemevent_systemeventid-read-parameters"></a>

| Name | In   | Type      | Required | Description                                                           |
| ---- | ---- | --------- | -------- | --------------------------------------------------------------------- |
| id   | body | number    | false    | Single system event log ID to mark as read (use **id** or **ids**)    |
| ids  | body | number\[] | false    | Array of system event log IDs to mark as read (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"
}
```

> 403 Response

```json
{
  "error": "User not associated with an organization"
}
```

> 500 Response

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

#### Responses <a href="#post__systemevent_systemeventid-read-responses" id="post__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 read 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 |
| 403    | [Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)             | User not associated with an organization  | Inline |
| 500    | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | Internal server error                     | Inline |

#### Response Schema <a href="#post__systemevent_systemeventid-read-responseschema" id="post__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**, **403**, **500**

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

This operation requires authentication via Bearer token. Only events in the user’s organization are marked as read; other ids are ignored.


---

# 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/post__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.
