API Reference
Organization Settings
Read tenant-level settings: default project, retention policy, allowed login providers, audit export toggles, MFA enforcement, IP allowlists. Settings apply to every member of the organisation.
GET/admin/tenant-settings
Authentication
Accepts a JWT bearer token (Authorization: Bearer eyJ…) or an API key (X-API-Key: ms_live_…). API-key callers should send X-Project-ID unless the key is project-locked. Cross-tenant operators must send X-Tenant-ID.
Response
Returns 200 OK with the following body.
| Field | Type | Required | Description |
|---|---|---|---|
retention_days | integer | optional | Default memory retention. null = indefinite. |
mfa_required | boolean | optional | Whether MFA is enforced for every member. |
allowed_login_providers | string[] | optional | Permitted SSO / OAuth providers. |
ip_allowlist | string[] | optional | CIDR list. Empty = allow all. |
audit_export_enabled | boolean | optional | Whether audit export endpoints are accessible. |
updated_at | string | optional | RFC 3339 UTC. |
200.json
{"retention_days": 90,"mfa_required": true,"allowed_login_providers": ["password","okta","google"],"ip_allowlist": ["10.0.0.0/8"],"audit_export_enabled": true,"updated_at": "2026-05-04T10:00:00Z"}
Errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Body or query failed schema validation. The error includes the offending field name. |
| 401 | unauthenticated | Missing or invalid bearer token / API key. |
| 403 | forbidden | Authenticated principal lacks the required scope, role, or project access. |
| 404 | not_found | Target resource does not exist or is not visible to the calling tenant. |
| 429 | rate_limited | Per-IP or per-route limit exceeded. Respect the Retry-After header. |
| 500 | internal_error | Unhandled server error. Quote the request_id when contacting support. |
Examples
cURL
curl -X GET https://api.memorysync.io/admin/tenant-settings \-H "Authorization: Bearer $MEMORYSYNC_KEY"
javascript
import { MemorySync } from 'memorysync'const client = new MemorySync({ apiKey: process.env.MEMORYSYNC_KEY })const result = await client.request({method: 'GET',path: '/admin/tenant-settings',})console.log(result)
python
from memorysync import Clientclient = Client(api_key=os.environ["MEMORYSYNC_KEY"])result = client.request(method="GET",path="/admin/tenant-settings",)print(result)
Behavior & notes
Update settings via PUT /admin/tenant-settings with the full settings payload. Changes take effect on the next request — no provisioning delay. Every change writes an audit row with the previous and new values.