Preview email retention changes
Requires email/calendar deployment availability and the route permissions. Connected account operations use the authenticated tenant and mailbox owner; body/metadata sharing remains separately authorized. Requires workspace manager authority. In intelligence v2, matching_mode accepts only existing_records_only and auto_create_donors is forced false. Metadata sharing needs an explicit confirm_metadata_sharing attestation. Disabling bodies or shortening retention can remove retained content: preview returns a fifteen-minute actor/settings/count-bound token, then save must supply that token and confirmed_retention_impact true. Changing the proposal or concurrent settings invalidates confirmation.
curl --request POST \
--url https://api.gratona.com/v1/email-calendar/settings/impact \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"allowed_providers_json": [
"<string>"
],
"sync_lookback_months": 30,
"calendar_lookahead_months": 30,
"retention_months": 60,
"internal_domains_json": [
"<string>"
],
"excluded_senders_json": [
"<string>"
],
"excluded_domains_json": [
"<string>"
],
"auto_link_exact_matches": true,
"auto_create_donors": true,
"confirmed_retention_impact": true,
"retention_confirmation_token": "<string>",
"confirm_metadata_sharing": true
}
'import requests
url = "https://api.gratona.com/v1/email-calendar/settings/impact"
payload = {
"enabled": True,
"allowed_providers_json": ["<string>"],
"sync_lookback_months": 30,
"calendar_lookahead_months": 30,
"retention_months": 60,
"internal_domains_json": ["<string>"],
"excluded_senders_json": ["<string>"],
"excluded_domains_json": ["<string>"],
"auto_link_exact_matches": True,
"auto_create_donors": True,
"confirmed_retention_impact": True,
"retention_confirmation_token": "<string>",
"confirm_metadata_sharing": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
allowed_providers_json: ['<string>'],
sync_lookback_months: 30,
calendar_lookahead_months: 30,
retention_months: 60,
internal_domains_json: ['<string>'],
excluded_senders_json: ['<string>'],
excluded_domains_json: ['<string>'],
auto_link_exact_matches: true,
auto_create_donors: true,
confirmed_retention_impact: true,
retention_confirmation_token: '<string>',
confirm_metadata_sharing: true
})
};
fetch('https://api.gratona.com/v1/email-calendar/settings/impact', 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.gratona.com/v1/email-calendar/settings/impact",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'allowed_providers_json' => [
'<string>'
],
'sync_lookback_months' => 30,
'calendar_lookahead_months' => 30,
'retention_months' => 60,
'internal_domains_json' => [
'<string>'
],
'excluded_senders_json' => [
'<string>'
],
'excluded_domains_json' => [
'<string>'
],
'auto_link_exact_matches' => true,
'auto_create_donors' => true,
'confirmed_retention_impact' => true,
'retention_confirmation_token' => '<string>',
'confirm_metadata_sharing' => true
]),
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.gratona.com/v1/email-calendar/settings/impact"
payload := strings.NewReader("{\n \"enabled\": true,\n \"allowed_providers_json\": [\n \"<string>\"\n ],\n \"sync_lookback_months\": 30,\n \"calendar_lookahead_months\": 30,\n \"retention_months\": 60,\n \"internal_domains_json\": [\n \"<string>\"\n ],\n \"excluded_senders_json\": [\n \"<string>\"\n ],\n \"excluded_domains_json\": [\n \"<string>\"\n ],\n \"auto_link_exact_matches\": true,\n \"auto_create_donors\": true,\n \"confirmed_retention_impact\": true,\n \"retention_confirmation_token\": \"<string>\",\n \"confirm_metadata_sharing\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.gratona.com/v1/email-calendar/settings/impact")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"allowed_providers_json\": [\n \"<string>\"\n ],\n \"sync_lookback_months\": 30,\n \"calendar_lookahead_months\": 30,\n \"retention_months\": 60,\n \"internal_domains_json\": [\n \"<string>\"\n ],\n \"excluded_senders_json\": [\n \"<string>\"\n ],\n \"excluded_domains_json\": [\n \"<string>\"\n ],\n \"auto_link_exact_matches\": true,\n \"auto_create_donors\": true,\n \"confirmed_retention_impact\": true,\n \"retention_confirmation_token\": \"<string>\",\n \"confirm_metadata_sharing\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/email-calendar/settings/impact")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"allowed_providers_json\": [\n \"<string>\"\n ],\n \"sync_lookback_months\": 30,\n \"calendar_lookahead_months\": 30,\n \"retention_months\": 60,\n \"internal_domains_json\": [\n \"<string>\"\n ],\n \"excluded_senders_json\": [\n \"<string>\"\n ],\n \"excluded_domains_json\": [\n \"<string>\"\n ],\n \"auto_link_exact_matches\": true,\n \"auto_create_donors\": true,\n \"confirmed_retention_impact\": true,\n \"retention_confirmation_token\": \"<string>\",\n \"confirm_metadata_sharing\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"affected_body_count": 123,
"requires_confirmation": true,
"action": "<string>",
"retention_confirmation_token": "<string>"
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
Body
Request fields accepted by this operation. Omitted optional properties retain the behavior described above.
curl --request POST \
--url https://api.gratona.com/v1/email-calendar/settings/impact \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"allowed_providers_json": [
"<string>"
],
"sync_lookback_months": 30,
"calendar_lookahead_months": 30,
"retention_months": 60,
"internal_domains_json": [
"<string>"
],
"excluded_senders_json": [
"<string>"
],
"excluded_domains_json": [
"<string>"
],
"auto_link_exact_matches": true,
"auto_create_donors": true,
"confirmed_retention_impact": true,
"retention_confirmation_token": "<string>",
"confirm_metadata_sharing": true
}
'import requests
url = "https://api.gratona.com/v1/email-calendar/settings/impact"
payload = {
"enabled": True,
"allowed_providers_json": ["<string>"],
"sync_lookback_months": 30,
"calendar_lookahead_months": 30,
"retention_months": 60,
"internal_domains_json": ["<string>"],
"excluded_senders_json": ["<string>"],
"excluded_domains_json": ["<string>"],
"auto_link_exact_matches": True,
"auto_create_donors": True,
"confirmed_retention_impact": True,
"retention_confirmation_token": "<string>",
"confirm_metadata_sharing": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
allowed_providers_json: ['<string>'],
sync_lookback_months: 30,
calendar_lookahead_months: 30,
retention_months: 60,
internal_domains_json: ['<string>'],
excluded_senders_json: ['<string>'],
excluded_domains_json: ['<string>'],
auto_link_exact_matches: true,
auto_create_donors: true,
confirmed_retention_impact: true,
retention_confirmation_token: '<string>',
confirm_metadata_sharing: true
})
};
fetch('https://api.gratona.com/v1/email-calendar/settings/impact', 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.gratona.com/v1/email-calendar/settings/impact",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'allowed_providers_json' => [
'<string>'
],
'sync_lookback_months' => 30,
'calendar_lookahead_months' => 30,
'retention_months' => 60,
'internal_domains_json' => [
'<string>'
],
'excluded_senders_json' => [
'<string>'
],
'excluded_domains_json' => [
'<string>'
],
'auto_link_exact_matches' => true,
'auto_create_donors' => true,
'confirmed_retention_impact' => true,
'retention_confirmation_token' => '<string>',
'confirm_metadata_sharing' => true
]),
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.gratona.com/v1/email-calendar/settings/impact"
payload := strings.NewReader("{\n \"enabled\": true,\n \"allowed_providers_json\": [\n \"<string>\"\n ],\n \"sync_lookback_months\": 30,\n \"calendar_lookahead_months\": 30,\n \"retention_months\": 60,\n \"internal_domains_json\": [\n \"<string>\"\n ],\n \"excluded_senders_json\": [\n \"<string>\"\n ],\n \"excluded_domains_json\": [\n \"<string>\"\n ],\n \"auto_link_exact_matches\": true,\n \"auto_create_donors\": true,\n \"confirmed_retention_impact\": true,\n \"retention_confirmation_token\": \"<string>\",\n \"confirm_metadata_sharing\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.gratona.com/v1/email-calendar/settings/impact")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"allowed_providers_json\": [\n \"<string>\"\n ],\n \"sync_lookback_months\": 30,\n \"calendar_lookahead_months\": 30,\n \"retention_months\": 60,\n \"internal_domains_json\": [\n \"<string>\"\n ],\n \"excluded_senders_json\": [\n \"<string>\"\n ],\n \"excluded_domains_json\": [\n \"<string>\"\n ],\n \"auto_link_exact_matches\": true,\n \"auto_create_donors\": true,\n \"confirmed_retention_impact\": true,\n \"retention_confirmation_token\": \"<string>\",\n \"confirm_metadata_sharing\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/email-calendar/settings/impact")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"allowed_providers_json\": [\n \"<string>\"\n ],\n \"sync_lookback_months\": 30,\n \"calendar_lookahead_months\": 30,\n \"retention_months\": 60,\n \"internal_domains_json\": [\n \"<string>\"\n ],\n \"excluded_senders_json\": [\n \"<string>\"\n ],\n \"excluded_domains_json\": [\n \"<string>\"\n ],\n \"auto_link_exact_matches\": true,\n \"auto_create_donors\": true,\n \"confirmed_retention_impact\": true,\n \"retention_confirmation_token\": \"<string>\",\n \"confirm_metadata_sharing\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"affected_body_count": 123,
"requires_confirmation": true,
"action": "<string>",
"retention_confirmation_token": "<string>"
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}