curl --request GET \
--url "https://api.nixflex.com/v1/agent-inbox/retention?number=%2B12025550123" \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
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.retention({"number": "+12025550123"});
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.retention(number='+12025550123')
nixflex inbox retention --number '+12025550123' --json --base-url "https://api.nixflex.com"
{
"name": "get_inbox_retention",
"arguments": {
"number": "+12025550123"
}
}
{
"call_retention_days": 90,
"web_days": null,
"web_expiry_confirmed": true,
"applies_to": "new_messages_agent_policy",
"legacy_web_policy": "account_policy_at_creation_or_90_days",
"zero_days_means": "next_cleanup_after_reply",
"archive_changes_retention": false,
"sms_days": 90,
"sms_processing_enabled": true,
"web_processing_enabled": true
}
Inbox
Read inbox retention
Read the Nixflex account retention default and inbox cleanup availability. Include a number to resolve retention for its assigned agent.
GET
/
agent-inbox
/
retention
curl --request GET \
--url "https://api.nixflex.com/v1/agent-inbox/retention?number=%2B12025550123" \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
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.retention({"number": "+12025550123"});
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.retention(number='+12025550123')
nixflex inbox retention --number '+12025550123' --json --base-url "https://api.nixflex.com"
{
"name": "get_inbox_retention",
"arguments": {
"number": "+12025550123"
}
}
{
"call_retention_days": 90,
"web_days": null,
"web_expiry_confirmed": true,
"applies_to": "new_messages_agent_policy",
"legacy_web_policy": "account_policy_at_creation_or_90_days",
"zero_days_means": "next_cleanup_after_reply",
"archive_changes_retention": false,
"sms_days": 90,
"sms_processing_enabled": true,
"web_processing_enabled": true
}
FIXED · account Inbox number discovery is account-wide. Filter threads by channel and number, and call history by number.
Do not send a request body.
Only number is accepted as a query field. URL-encode + in a query value. Without number, web_days is null rather than the account default. Zero days means cleanup on the next cleanup run after reply, not an immediate response-time deletion guarantee. Archiving does not extend retention. Requests return Cache-Control: no-store.
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
Read the account retention default and inbox cleanup availability. Include a number to resolve its assigned agent’s web-message retention policy.
Method: GET ·
Success: 200 ·
Scope: Owning account
The important part
- Use the returned policy for inbox history.
- A retention setting does not confirm that every background deletion has finished.
Authentication
SendAuthorization: Bearer KEY_ID:KEY_SECRET using the owning account’s server-side credential.
Request fields
| Field | Type | Required | Default | Limits and meaning |
|---|---|---|---|---|
number (query) | string | No | Omitted | International number with + and digits; no spaces. Pattern: ^\+[1-9][0-9]{6,14}$. |
Response fields
200 OK returns the shape below. Nullable fields can be unknown or unset; do not turn null into zero or false.
| Field | Type | Meaning |
|---|---|---|
call_retention_days | integer | Account retention default, 90 when unset. |
web_days | integer or null | Effective agent or account web days when number is supplied; null without number. |
web_expiry_confirmed | boolean | Web cleanup database prerequisites are confirmed. |
applies_to | string | Policy scope. Value: "new_messages_agent_policy". |
legacy_web_policy | string | Legacy-message fallback. Value: "account_policy_at_creation_or_90_days". |
zero_days_means | string | Zero-day cleanup timing. Value: "next_cleanup_after_reply". |
archive_changes_retention | boolean | Archiving does not change retention. Value: false. |
sms_days | integer | SMS retention days. Value: 90. |
sms_processing_enabled | boolean | SMS cleanup processing is enabled. |
web_processing_enabled | boolean | Cleanup enabled and web prerequisites confirmed. |
Example request
These examples require Node/CLI 0.11.0 or later, Python 0.4.0 or later and MCP 0.5.0 or later. KeepNIXFLEX_API_KEY private. cURL uses Bash; CLI uses PowerShell and reads the key through NIXFLEX_API_KEY. Replace fixture identifiers and reserved example numbers with approved account-owned values. Configure the existing MCP installation for the same account at https://api.nixflex.com before using the shown tool arguments. Python shows the synchronous client; AsyncNixflex uses the same method with async with and await.
curl --request GET \
--url "https://api.nixflex.com/v1/agent-inbox/retention?number=%2B12025550123" \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
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.retention({"number": "+12025550123"});
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.retention(number='+12025550123')
nixflex inbox retention --number '+12025550123' --json --base-url "https://api.nixflex.com"
{
"name": "get_inbox_retention",
"arguments": {
"number": "+12025550123"
}
}
Example response
Illustrative200 response. Identifiers and values are examples; some optional or compatibility fields are omitted.
{
"call_retention_days": 90,
"web_days": null,
"web_expiry_confirmed": true,
"applies_to": "new_messages_agent_policy",
"legacy_web_policy": "account_policy_at_creation_or_90_days",
"zero_days_means": "next_cleanup_after_reply",
"archive_changes_retention": false,
"sms_days": 90,
"sms_processing_enabled": true,
"web_processing_enabled": true
}
Errors
Failures return anerror object with code, message, doc_url and optional details. Each code links to the shared error catalog. Read the message and details before deciding whether to resend.
| Status | Code | Meaning | What to do |
|---|---|---|---|
| 400 | invalid_inbox_request | A path, query, body or settings value is invalid. | Correct the documented shape and limits. |
| 404 | inbox_not_found | The number or thread is unavailable to this account. | Check the number, thread and account state. |
| 503 | agent_inbox_disabled | The inbox feature is disabled. | Wait for feature availability. |
| 503 | inbox_unavailable | The inbox read or write could not be confirmed. | Retry reads with bounded backoff; reconcile writes first. |
| 401 | unauthorized | The credential is missing or invalid. | Check the full account credential. |
| 429 | rate_limit_exceeded | The account request limit was reached. | Wait for Retry-After. Reconcile uncertain writes before resending. |
Retry and idempotency
This is a read-only request. Retry transient connection or server failures with bounded backoff; respect Retry-After for 429. Do not retry validation or ownership errors unchanged. A later read can return newer state.Related endpoints
Authorizations
Query Parameters
Response
OK