Save workspace email/calendar settings
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 PUT \
--url https://api.gratona.com/v1/email-calendar/settings \
--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"
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.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
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', 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",
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([
'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"
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("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.gratona.com/v1/email-calendar/settings")
.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")
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 \"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": {
"id": 123,
"client_id": 123,
"enabled": true,
"matching_mode": "<string>",
"metadata_visibility": "<string>",
"metadata_sharing_confirmed_at": "2023-11-07T05:31:56Z",
"body_sharing_policy": "<string>",
"sync_lookback_months": 123,
"calendar_lookahead_months": 123,
"retention_months": 123,
"auto_link_exact_matches": true,
"auto_create_donors": true,
"created_by": 123,
"updated_by": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"allowed_providers_json": [
"<string>"
],
"internal_domains_json": [
"<string>"
],
"excluded_senders_json": [
"<string>"
],
"excluded_domains_json": [
"<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"
}{
"message": "<string>",
"requires_confirmation": true,
"retention_impact": {
"affected_body_count": 123,
"requires_confirmation": true,
"action": "<string>",
"retention_confirmation_token": "<string>"
}
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
Passport bearer token authentication for legacy admin sessions.
Body
Request fields accepted by this operation. Omitted optional properties retain the behavior described above.
Validation: boolean.
existing_records_only, selective_unmatched_queue, auto_create_after_reply, auto_create_all_contacts Validation: in:none,team.
none, team Validation: in:staff_controlled,admin_approval_required,disabled.
staff_controlled, admin_approval_required, disabled Validation: integer|min:1|max:60.
1 <= x <= 60Validation: integer|min:1|max:60.
1 <= x <= 60Validation: nullable|integer|min:0|max:120.
0 <= x <= 120Validation: boolean.
Validation: boolean.
Validation: boolean.
Validation: nullable|string|max:8192.
8192Validation: boolean.
Response
Save workspace email/calendar settings response.
Show child attributes
Show child attributes
curl --request PUT \
--url https://api.gratona.com/v1/email-calendar/settings \
--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"
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.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
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', 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",
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([
'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"
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("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.gratona.com/v1/email-calendar/settings")
.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")
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 \"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": {
"id": 123,
"client_id": 123,
"enabled": true,
"matching_mode": "<string>",
"metadata_visibility": "<string>",
"metadata_sharing_confirmed_at": "2023-11-07T05:31:56Z",
"body_sharing_policy": "<string>",
"sync_lookback_months": 123,
"calendar_lookahead_months": 123,
"retention_months": 123,
"auto_link_exact_matches": true,
"auto_create_donors": true,
"created_by": 123,
"updated_by": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"allowed_providers_json": [
"<string>"
],
"internal_domains_json": [
"<string>"
],
"excluded_senders_json": [
"<string>"
],
"excluded_domains_json": [
"<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"
}{
"message": "<string>",
"requires_confirmation": true,
"retention_impact": {
"affected_body_count": 123,
"requires_confirmation": true,
"action": "<string>",
"retention_confirmation_token": "<string>"
}
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}