Replace the current tenant's configuration
curl --request PUT \
--url https://api.example.com/tenants/current/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enforcement": {},
"audit_retention_days": 1,
"event_log_retention_hours": 1,
"trash_retention_days": 1
}
'import requests
url = "https://api.example.com/tenants/current/config"
payload = {
"enforcement": {},
"audit_retention_days": 1,
"event_log_retention_hours": 1,
"trash_retention_days": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enforcement: {},
audit_retention_days: 1,
event_log_retention_hours: 1,
trash_retention_days: 1
})
};
fetch('https://api.example.com/tenants/current/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/tenants/current/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enforcement' => [
],
'audit_retention_days' => 1,
'event_log_retention_hours' => 1,
'trash_retention_days' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/tenants/current/config"
payload := strings.NewReader("{\n \"enforcement\": {},\n \"audit_retention_days\": 1,\n \"event_log_retention_hours\": 1,\n \"trash_retention_days\": 1\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/tenants/current/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enforcement\": {},\n \"audit_retention_days\": 1,\n \"event_log_retention_hours\": 1,\n \"trash_retention_days\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/tenants/current/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enforcement\": {},\n \"audit_retention_days\": 1,\n \"event_log_retention_hours\": 1,\n \"trash_retention_days\": 1\n}"
response = http.request(request)
puts response.read_body{
"enforcement": {
"strict_mode": {
"types": [
"<string>"
]
},
"source_allowlist": {
"types": [
"<string>"
],
"sources": [
"<string>"
]
},
"source_filter": {
"types": [
"<string>"
],
"sources": [
"<string>"
]
}
},
"audit_retention_days": 1,
"event_log_retention_hours": 1,
"trash_retention_days": 1
}{
"error": {
"code": "validation_error",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "forbidden",
"message": "<string>",
"details": {}
}
}Tenants
Replace the current tenant's configuration
Overwrites the tenant’s config with the supplied object — full replacement, not merge. The accepted shape carries the optional enforcement block (strict_mode, source_allowlist, source_filter) plus the per-tenant cleanup-job overrides (audit_retention_days, event_log_retention_hours, trash_retention_days). Cleanup-job override values must be non-negative — 0 disables the corresponding job for this tenant.
Admin or tenant_admin. See Schema enforcement.
PUT
/
tenants
/
current
/
config
Replace the current tenant's configuration
curl --request PUT \
--url https://api.example.com/tenants/current/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enforcement": {},
"audit_retention_days": 1,
"event_log_retention_hours": 1,
"trash_retention_days": 1
}
'import requests
url = "https://api.example.com/tenants/current/config"
payload = {
"enforcement": {},
"audit_retention_days": 1,
"event_log_retention_hours": 1,
"trash_retention_days": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enforcement: {},
audit_retention_days: 1,
event_log_retention_hours: 1,
trash_retention_days: 1
})
};
fetch('https://api.example.com/tenants/current/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/tenants/current/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enforcement' => [
],
'audit_retention_days' => 1,
'event_log_retention_hours' => 1,
'trash_retention_days' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/tenants/current/config"
payload := strings.NewReader("{\n \"enforcement\": {},\n \"audit_retention_days\": 1,\n \"event_log_retention_hours\": 1,\n \"trash_retention_days\": 1\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/tenants/current/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enforcement\": {},\n \"audit_retention_days\": 1,\n \"event_log_retention_hours\": 1,\n \"trash_retention_days\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/tenants/current/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enforcement\": {},\n \"audit_retention_days\": 1,\n \"event_log_retention_hours\": 1,\n \"trash_retention_days\": 1\n}"
response = http.request(request)
puts response.read_body{
"enforcement": {
"strict_mode": {
"types": [
"<string>"
]
},
"source_allowlist": {
"types": [
"<string>"
],
"sources": [
"<string>"
]
},
"source_filter": {
"types": [
"<string>"
],
"sources": [
"<string>"
]
}
},
"audit_retention_days": 1,
"event_log_retention_hours": 1,
"trash_retention_days": 1
}{
"error": {
"code": "validation_error",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "forbidden",
"message": "<string>",
"details": {}
}
}Authorizations
Pass an API key (marfa_k1_...) or OAuth access token (marfa_at_...)
Body
application/json