---
title: "Inbox"
description: "The inbox endpoints of the HTTP API."
---

> Documentation Index
> Fetch the complete documentation index at: https://slashobserve.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Inbox

## GET /inbox

List what asks something of the signed-in person, newest first.

The inbox is the activity the caller can see, from the last 30 days, filtered to what asks something of them now; it stores no events of its own, so it cannot differ from `GET /activity`. Each item is an activity event with a `reason`, the first rule it matches, and `unread`. `proposal` is a proposal someone else opened on a dashboard whose folder the caller can edit and that is still open. `requested_block` is a block someone requested on an observation the caller created and can still edit, that is still requested. `mention` is a comment that mentions the caller by name. `reply` is a reply by someone else in a thread the caller wrote in, or a reply an agent run wrote for a run the caller requested. `run_failed` is a failed run the caller requested that nobody has continued. `repaired` is a health repair the caller started that saved a version. `proposal_closed` is a proposal the caller opened that someone else merged or discarded; its `excerpt` is the reason given for a discard. `access_request` is a request for Comment access to a dashboard or observation whose folder sharing the caller manages, that is still open: nobody has marked it done, the requester cannot comment yet and it is under 30 days old; its `excerpt` is the requester's note, and marking it done closes it for every person who received it. `view` chooses what the list holds: `for_you`, the default, every item with a reason; `proposals`, the `proposal` and `proposal_closed` items; `mentions`, the `mention` and `reply` items; and `everything`, every visible event from others plus every item with a reason, with `reason` null on those that have none. An item is unread when `PUT /api/v1/inbox/items/{seq}` marked it unread, or, when that never touched it, when it is newer than the position `POST /api/v1/inbox/read` stored for the caller; every item is unread until the caller reads once. `unread_count` counts the unread `for_you` items whatever the view is, and `100` means 100 or more. `question` is the first line of the thread message an agent run answered, cut to a title of at most 60 characters, on the item for that run's reply; it is null when that message was deleted or withdrawn, and it never comes from a chat prompt. `target_title` is the title of the dashboard, observation or proposal an item is about, and `excerpt` is the start of the comment for a `mention` or `reply`, the reason of a discarded proposal for `proposal_closed`, or the note of an `access_request`, as plain text; the rest of an item carries no comment, message or finding text, as in the activity log. A comment that mentions the caller and replies in a thread the caller wrote in is one `mention` item, not two. Only signed-in people may call it: a service-account key gets 403 `user_session_required`.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `view` | query | `"for_you"`, `"everything"`, `"proposals"`, `"mentions"` | Default `"for_you"`. |
| `filter` | query | `"open"`, `"unread"`, `"done"` | `open`, the default, lists every item the caller has not marked done; `unread` lists the open items that are unread; `done` lists the items the caller marked done with `PUT /api/v1/inbox/items/{seq}`. A done item is read, never counts in `unread_count`, and stays done when the inbox is read. Default `"open"`. |
| `cursor` | query | `string` | The `next_cursor` of the previous page. |
| `limit` | query | `integer` | Between 1 and 100. Default `50`. |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | One page of the inbox. | [`InboxList`](/docs/reference/api/schemas/#inboxlist) |
| `400` | The `view` is not one of the four (`invalid_view`), the `filter` is not `open`, `unread` or `done` (`invalid_filter`), the `cursor` is not one this server issued (`invalid_cursor`), or the `limit` is not an integer from 1 to 100 (`invalid_limit`). | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not a signed-in person (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## POST /inbox/read

Mark the inbox read up to one event.

Stores the caller's read position at the event with this `seq`: that event and everything older is read, and everything newer is unread. The position only moves forward, so a `seq` older than the stored one changes nothing. Only signed-in people may call it: a service-account key gets 403 `user_session_required`.

### Request body

`application/json`, required.

| Field | Type | Description |
| --- | --- | --- |
| `seq` (required) | `integer` (int64) | The `seq` of an activity event, normally the newest item the person has seen. |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `204` | The inbox is read up to the event, or already was. |   |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not a signed-in person (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) |
| `422` | No activity has that `seq` (`unknown_seq`). | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## PUT /inbox/items/{seq}

Mark one inbox item read, unread or done.

Send `unread` to mark the item with this `seq` read or unread for the caller, whatever its place relative to the stored read position; marking a done item unread also takes it out of done. `POST /api/v1/inbox/read` later sets every item up to its `seq` to read, including those marked unread here. Send `done: true` to mark it done: it leaves the default list and `filter=unread`, counts as read, and stays done when the inbox is read; `done: false` brings it back to the open list as read. Send exactly one of `unread` and `done`. Only signed-in people may call it: a service-account key gets 403 `user_session_required`.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `seq` (required) | path | `integer` (int64) |   |

### Request body

`application/json`, required.

| Field | Type | Description |
| --- | --- | --- |
| `unread` | `boolean` |   |
| `done` | `boolean` |   |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `204` | The item is in the requested state. |   |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not a signed-in person (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) |
| `422` | No activity has that `seq` (`unknown_seq`). | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new).
