Skip to content

Update tenant policy bundle

PUT/tenants/{tenant_id}/policies

Replaces the tenant's policy bundle. Fields not included in the request revert to platform defaults. Changes are immediately effective and audit-logged. Use when onboarding a tenant to a new plan, enabling/disabling modules mid-term, or applying data governance overrides.

Request

Path parameters

NameTypeRequiredDescription
tenant_idstringYes

The tenant identifier.

Request body

Content type application/json (required).

FieldTypeRequiredDescription
tenant_idstringNo

The tenant this policy bundle applies to (present on responses).

modulesmap of booleanNo

Map of module slug to enabled/disabled boolean.

feature_flagsobjectNo

Map of feature flag key to its value (boolean, string, or integer).

retentionobjectNo

Data retention override settings.

retention.audit_log_daysintegerNo

Number of days to retain audit log entries.

retention.activity_log_daysintegerNo

Number of days to retain activity log entries.

updated_atstring (date-time)No

Timestamp of the last policy bundle update (present on responses).

Example

{
  "modules": {
    "sales": true,
    "support": true,
    "omnichannel": true,
    "payroll": true
  },
  "feature_flags": {
    "ai_copilot_enabled": true,
    "ewa_enabled": true
  },
  "retention": {
    "audit_log_days": 730,
    "activity_log_days": 365
  }
}

Responses

200 Tenant policy bundle updated

Content type application/json, object · TenantPolicyBundleV1.

FieldTypeRequiredDescription
tenant_idstringNo

The tenant this policy bundle applies to (present on responses).

modulesmap of booleanNo

Map of module slug to enabled/disabled boolean.

feature_flagsobjectNo

Map of feature flag key to its value (boolean, string, or integer).

retentionobjectNo

Data retention override settings.

retention.audit_log_daysintegerNo

Number of days to retain audit log entries.

retention.activity_log_daysintegerNo

Number of days to retain activity log entries.

updated_atstring (date-time)No

Timestamp of the last policy bundle update (present on responses).

404 Tenant not found

422 Validation failed — check module keys or retention values

Example request

Paths are relative to the control-plane API base URL ($BASE_URL below).

curl -X PUT "$BASE_URL/tenants/{tenant_id}/policies" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"modules": {"sales": true, "support": true, "omnichannel": true, "payroll": true}, "feature_flags": {"ai_copilot_enabled": true, "ewa_enabled": true}, "retention": {"audit_log_days": 730, "activity_log_days": 365}}'
Loading