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

# Build an inbox for SMS and web conversations

> Read Nixflex SMS and website inboxes, page through messages, use read versions and archive threads while keeping visitor identity and retention limits clear.

**FIXED · account** Inbox number discovery is account-wide. Filter threads by channel and number, and call history by number. `DELETE /v1/calls` purges calls and related recordings account-wide and reports sms\_deleted=0. For one customer verify each call ID, then use `DELETE /v1/calls/{id}`.

**NOT OFFERED → do this instead · number** A business\_number filter on campaign and opt-out reads does not establish tenant identity. Authorise the tenant and its number on your server. Keep that filter through SMS pagination. Bulk call deletion stays account-wide.

**YOU CAN CHANGE · account** Choose direction, source, outcome and period when supported. The number narrows a history read only. `direction` `all`, `inbound`, `outbound`, `web` · `source` `all`, `campaign`, `web`, `test`, `other` · `outcome` `all`, `successful`, `unsuccessful`, `unknown`, `failed` · `period` `all`, `today`, `week`, `month`.

**SCOPE · account** Keep the same filters with each server-issued cursor.

[Read the compact AI rules](https://docs.nixflex.com/ai-rules.md#inbox-history)

Read a number’s SMS or website threads, preserve server paging and mark only the messages the user actually saw as read.

Channels: **SMS and web** · Read marker: **Observed version** · Archive: **Inbox state only**

**The important part**

* Check feature availability before rendering an empty inbox.
* Preserve read\_version as a decimal string and pair both message cursor fields.
* Archiving does not delete messages or turn off automatic replies.

[Business guide](https://docs.nixflex.com/guides/business/agent-inbox.md) · [API reference](https://docs.nixflex.com/api-reference/introduction.md) · [Glossary](https://docs.nixflex.com/guides/glossary.md)

## Prerequisites

Use an owning account credential on the server. Check `GET /v1/agent-inbox/features` first. The inbox must be enabled; dashboard views can filter out API-managed numbers.

## 1. Read available numbers

SDK and CLI examples require Node/CLI 0.11.0 or later or Python 0.4.0 or later. See [installation and supported clients](https://docs.nixflex.com/sdks/ecosystem.md).

```bash cURL theme={"dark"}
curl --request GET \
  --url "https://api.nixflex.com/v1/agent-inbox/numbers?offset=0" \
  --header "Authorization: Bearer $NIXFLEX_API_KEY"
```

```javascript Node theme={"dark"}
import Nixflex from 'nixflex';

const c = new Nixflex({
  apiKey: process.env.NIXFLEX_API_KEY,
  baseUrl: 'https://api.nixflex.com',
  maxRetries: 0,
});
const result = await c.inbox.numbers({"offset": 0});
```

```python Python theme={"dark"}
import os
from nixflex import Nixflex

with Nixflex(
    api_key=os.environ["NIXFLEX_API_KEY"],
    base_url="https://api.nixflex.com",
    max_retries=0,
) as c:
    result = c.inbox.numbers(offset=0)
```

```powershell CLI (PowerShell) theme={"dark"}
nixflex inbox numbers --offset 0 --json --base-url "https://api.nixflex.com"
```

## 2. List a channel’s threads

GET `/v1/agent-inbox/{channel}/{number}`, with channel `sms` or `web`. Filters include archived, unread, search and period. List limits are 1–100, default 30; offsets are 0–10,000. Do not infer a complete inbox from one page.

## 3. Page the conversation

GET `/v1/agent-inbox/{channel}/{number}/thread/{thread}`. The message limit is 1–200, default 100. Pass `before` and `before_id` together from the server; a timestamp alone can skip messages sharing that time.

## 4. Change only the intended state

PATCH the thread with `archived` and/or the observed `read_version`. Keep version values as decimal strings, not floating-point numbers. Archiving is not deletion and does not disable automatic replies. Members read shared work; mutations require the permitted writer role.

## 5. Show identity and retention honestly

Website contact details are visitor-supplied and unverified. Recognition can end when browser storage changes. Read `/v1/agent-inbox/retention` and its processing flags; saved policy alone does not confirm cleanup ran. The inbox has no send route. A text sent with `POST /v1/sms` appears in that number’s SMS thread and does not pause automatic replies.

## Example response

The numbers response contains `numbers`, `agents` and `has_more`. Thread replies include messages and read/paging state; retain the exact returned versions. The [thread schema](https://docs.nixflex.com/api-reference/agent-inbox/get-agent-inbox-channel-number-thread-thread.md) defines the full response.

## Errors and limits

| Status/code | Recovery |
| - | - |
| 400 `invalid_inbox_request` | Check channel, E.164 number, filters and paired cursor. |
| 404 `inbox_not_found` | Check number/thread ownership. |
| Lost thread update response | Reread this thread before repeating the intended archive or read-marker change. |
| 503 `agent_inbox_disabled` | Feature is not enabled; do not render an empty-success inbox. |
| 503 `inbox_unavailable` | Retry bounded reads and preserve local state. |

## Next steps

* [List threads](https://docs.nixflex.com/api-reference/agent-inbox/get-agent-inbox-channel-number.md)
* [Read thread](https://docs.nixflex.com/api-reference/agent-inbox/get-agent-inbox-channel-number-thread-thread.md)
* [Change thread](https://docs.nixflex.com/api-reference/agent-inbox/patch-agent-inbox-channel-number-thread-thread.md)

## Related dashboard and AI tasks

* [Check website chat and voice conversations](https://docs.nixflex.com/guides/business/website/check-conversations.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.