curl --request GET \
--url "https://api.nixflex.com/v1/account/retention" \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
import Nixflex from 'nixflex';
const baseUrl = 'https://api.nixflex.com';
const client = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl,maxRetries:0});
const result = await client.account.retention();
// Handle result privately; do not log secrets or call content.
import os, json
from pathlib import Path
from nixflex import Nixflex
base_url = "https://api.nixflex.com"
with Nixflex(os.environ["NIXFLEX_API_KEY"], base_url=base_url,max_retries=0) as client:
result = client.account.retention()
# AsyncNixflex supports the same calls with await (and async with).
nixflex account retention --base-url https://api.nixflex.com --json
{
"call_retention_days": 90,
"applies_to": "new_agents",
"processing_enabled": true
}
Account and usage
Get account retention
Read the Nixflex account retention default for new agents. Existing agents retain their saved settings until explicitly updated.
GET
/
account
/
retention
curl --request GET \
--url "https://api.nixflex.com/v1/account/retention" \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
import Nixflex from 'nixflex';
const baseUrl = 'https://api.nixflex.com';
const client = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl,maxRetries:0});
const result = await client.account.retention();
// Handle result privately; do not log secrets or call content.
import os, json
from pathlib import Path
from nixflex import Nixflex
base_url = "https://api.nixflex.com"
with Nixflex(os.environ["NIXFLEX_API_KEY"], base_url=base_url,max_retries=0) as client:
result = client.account.retention()
# AsyncNixflex supports the same calls with await (and async with).
nixflex account retention --base-url https://api.nixflex.com --json
{
"call_retention_days": 90,
"applies_to": "new_agents",
"processing_enabled": true
}
FIXED · account
DELETE /v1/calls covers the owning account’s calls and related recordings. It takes no number or campaign filter. Its result reports sms_deleted=0.
NOT OFFERED → do this instead · number There is no bulk erase for just one customer’s number in a shared account. Resolve and verify each tenant-owned call ID, then use single-call deletion.
YOU CAN CHANGE · agent New agents inherit account retention on creation. Use the agent update to change its saved call-retention policy.
SCOPE · call Read availability first. Stored links expire. Distinguish pending, expired, unavailable and customer storage.
Read the compact AI rules
Read the account retention default for new agents. Existing agents keep their saved retention settings; use Update an agent to change one agent.
Method: GET ·
Success: 200 ·
Scope: Owning account
The important part
- Read the saved account retention policy.
- Policy values alone do not confirm pending cleanup is complete.
Authentication
SendAuthorization: Bearer KEY_ID:KEY_SECRET using the owning account’s server-side credential.
Request fields
No request body or query fields are required. No path, query or body fields are required. A new account defaults to 90 days if no account retention default has been saved.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 | Saved account default: 90, 30, 7, 1 or 0 days. Zero means delete eligible content after each call. Allowed: 90, 30, 7, 1, 0. |
applies_to | string | Only new agents inherit this default. |
processing_enabled | boolean | Whether the retention processing feature is enabled. This does not confirm that a particular record has been erased. |
Example request
Raw HTTP base URL:https://api.nixflex.com/v1. Node and Python SDK base URL: https://api.nixflex.com. The SDK adds /v1. Keep NIXFLEX_API_KEY in your private process environment. The shell examples use Bash syntax. SDK and CLI examples require Node/CLI 0.11.0 or later and Python 0.4.0 or later.
curl --request GET \
--url "https://api.nixflex.com/v1/account/retention" \
--header "Authorization: Bearer $NIXFLEX_API_KEY"
import Nixflex from 'nixflex';
const baseUrl = 'https://api.nixflex.com';
const client = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl,maxRetries:0});
const result = await client.account.retention();
// Handle result privately; do not log secrets or call content.
import os, json
from pathlib import Path
from nixflex import Nixflex
base_url = "https://api.nixflex.com"
with Nixflex(os.environ["NIXFLEX_API_KEY"], base_url=base_url,max_retries=0) as client:
result = client.account.retention()
# AsyncNixflex supports the same calls with await (and async with).
nixflex account retention --base-url https://api.nixflex.com --json
Example response
Illustrative200 response. Identifiers and values are examples; some optional or compatibility fields are omitted.
{
"call_retention_days": 90,
"applies_to": "new_agents",
"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 |
|---|---|---|---|
| 503 | retention_unavailable | The saved retention default could not be read. | Retry a bounded read after recovery; do not assume a default from the failure. |
| 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
Response
OK