Update email server settings
curl --request PATCH \
--url https://app.gtm-api.com/email/v4/api/email-box-settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Team-SID: <api-key>' \
--data '
{
"defaults": {
"sending_window": {
"time_zone": "<string>",
"days": [
4
],
"start": "<string>",
"end": "<string>"
},
"daily_limit": 1000,
"min_interval_seconds": 1800,
"google_email_oauth_app_sid": "<string>",
"microsoft_email_oauth_app_sid": "<string>"
},
"alert_recipients": [
"jsmith@example.com"
]
}
'import requests
url = "https://app.gtm-api.com/email/v4/api/email-box-settings"
payload = {
"defaults": {
"sending_window": {
"time_zone": "<string>",
"days": [4],
"start": "<string>",
"end": "<string>"
},
"daily_limit": 1000,
"min_interval_seconds": 1800,
"google_email_oauth_app_sid": "<string>",
"microsoft_email_oauth_app_sid": "<string>"
},
"alert_recipients": ["jsmith@example.com"]
}
headers = {
"Authorization": "Bearer <token>",
"Team-SID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Team-SID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
defaults: {
sending_window: {time_zone: '<string>', days: [4], start: '<string>', end: '<string>'},
daily_limit: 1000,
min_interval_seconds: 1800,
google_email_oauth_app_sid: '<string>',
microsoft_email_oauth_app_sid: '<string>'
},
alert_recipients: ['jsmith@example.com']
})
};
fetch('https://app.gtm-api.com/email/v4/api/email-box-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://app.gtm-api.com/email/v4/api/email-box-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'defaults' => [
'sending_window' => [
'time_zone' => '<string>',
'days' => [
4
],
'start' => '<string>',
'end' => '<string>'
],
'daily_limit' => 1000,
'min_interval_seconds' => 1800,
'google_email_oauth_app_sid' => '<string>',
'microsoft_email_oauth_app_sid' => '<string>'
],
'alert_recipients' => [
'jsmith@example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Team-SID: <api-key>"
],
]);
$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://app.gtm-api.com/email/v4/api/email-box-settings"
payload := strings.NewReader("{\n \"defaults\": {\n \"sending_window\": {\n \"time_zone\": \"<string>\",\n \"days\": [\n 4\n ],\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"daily_limit\": 1000,\n \"min_interval_seconds\": 1800,\n \"google_email_oauth_app_sid\": \"<string>\",\n \"microsoft_email_oauth_app_sid\": \"<string>\"\n },\n \"alert_recipients\": [\n \"jsmith@example.com\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Team-SID", "<api-key>")
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.patch("https://app.gtm-api.com/email/v4/api/email-box-settings")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"defaults\": {\n \"sending_window\": {\n \"time_zone\": \"<string>\",\n \"days\": [\n 4\n ],\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"daily_limit\": 1000,\n \"min_interval_seconds\": 1800,\n \"google_email_oauth_app_sid\": \"<string>\",\n \"microsoft_email_oauth_app_sid\": \"<string>\"\n },\n \"alert_recipients\": [\n \"jsmith@example.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gtm-api.com/email/v4/api/email-box-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Team-SID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"defaults\": {\n \"sending_window\": {\n \"time_zone\": \"<string>\",\n \"days\": [\n 4\n ],\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"daily_limit\": 1000,\n \"min_interval_seconds\": 1800,\n \"google_email_oauth_app_sid\": \"<string>\",\n \"microsoft_email_oauth_app_sid\": \"<string>\"\n },\n \"alert_recipients\": [\n \"jsmith@example.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"operation": "update",
"item": {
"email_box_sid": "<string>",
"defaults": {
"sending_window": {
"time_zone": "<string>",
"days": [
123
],
"start": "<string>",
"end": "<string>"
},
"daily_limit": 123,
"min_interval_seconds": 123,
"warmup_config": {
"enabled": true,
"ramp_start_daily": 123,
"ramp_step_per_day": 123,
"target_daily": 123
},
"google_email_oauth_app_sid": "<string>",
"microsoft_email_oauth_app_sid": "<string>"
},
"alert_recipients": [
"<string>"
],
"updated_at": "<string>"
},
"updated_fields": [
"<string>"
],
"previous_values": {},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
}
}
email_box_settings
Update email server settings
Save the settings of an email server. defaults is partial: a key sent replaces, a key left out stays, and sending_window and warmup_config are replaced whole (sending_window null clears the window). alert_recipients replaces the whole list, so send the current addresses back with a new one. The defaults reach mailboxes connected from now on; the mailboxes the server already holds keep theirs until apply_email_box_settings_defaults. A sign-in application named here must be the team’s, verified and of that provider. Requires can_update_email_accounts.
Contract:
- MCP tool
update_email_box_settings, registry packagemcp.email/email_box_settings, mountemail.infrastructure. - Operation
update, response envelopeupdate. - Flags: none.
PATCH
/
api
/
email-box-settings
Update email server settings
curl --request PATCH \
--url https://app.gtm-api.com/email/v4/api/email-box-settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Team-SID: <api-key>' \
--data '
{
"defaults": {
"sending_window": {
"time_zone": "<string>",
"days": [
4
],
"start": "<string>",
"end": "<string>"
},
"daily_limit": 1000,
"min_interval_seconds": 1800,
"google_email_oauth_app_sid": "<string>",
"microsoft_email_oauth_app_sid": "<string>"
},
"alert_recipients": [
"jsmith@example.com"
]
}
'import requests
url = "https://app.gtm-api.com/email/v4/api/email-box-settings"
payload = {
"defaults": {
"sending_window": {
"time_zone": "<string>",
"days": [4],
"start": "<string>",
"end": "<string>"
},
"daily_limit": 1000,
"min_interval_seconds": 1800,
"google_email_oauth_app_sid": "<string>",
"microsoft_email_oauth_app_sid": "<string>"
},
"alert_recipients": ["jsmith@example.com"]
}
headers = {
"Authorization": "Bearer <token>",
"Team-SID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Team-SID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
defaults: {
sending_window: {time_zone: '<string>', days: [4], start: '<string>', end: '<string>'},
daily_limit: 1000,
min_interval_seconds: 1800,
google_email_oauth_app_sid: '<string>',
microsoft_email_oauth_app_sid: '<string>'
},
alert_recipients: ['jsmith@example.com']
})
};
fetch('https://app.gtm-api.com/email/v4/api/email-box-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://app.gtm-api.com/email/v4/api/email-box-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'defaults' => [
'sending_window' => [
'time_zone' => '<string>',
'days' => [
4
],
'start' => '<string>',
'end' => '<string>'
],
'daily_limit' => 1000,
'min_interval_seconds' => 1800,
'google_email_oauth_app_sid' => '<string>',
'microsoft_email_oauth_app_sid' => '<string>'
],
'alert_recipients' => [
'jsmith@example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Team-SID: <api-key>"
],
]);
$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://app.gtm-api.com/email/v4/api/email-box-settings"
payload := strings.NewReader("{\n \"defaults\": {\n \"sending_window\": {\n \"time_zone\": \"<string>\",\n \"days\": [\n 4\n ],\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"daily_limit\": 1000,\n \"min_interval_seconds\": 1800,\n \"google_email_oauth_app_sid\": \"<string>\",\n \"microsoft_email_oauth_app_sid\": \"<string>\"\n },\n \"alert_recipients\": [\n \"jsmith@example.com\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Team-SID", "<api-key>")
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.patch("https://app.gtm-api.com/email/v4/api/email-box-settings")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"defaults\": {\n \"sending_window\": {\n \"time_zone\": \"<string>\",\n \"days\": [\n 4\n ],\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"daily_limit\": 1000,\n \"min_interval_seconds\": 1800,\n \"google_email_oauth_app_sid\": \"<string>\",\n \"microsoft_email_oauth_app_sid\": \"<string>\"\n },\n \"alert_recipients\": [\n \"jsmith@example.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gtm-api.com/email/v4/api/email-box-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Team-SID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"defaults\": {\n \"sending_window\": {\n \"time_zone\": \"<string>\",\n \"days\": [\n 4\n ],\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"daily_limit\": 1000,\n \"min_interval_seconds\": 1800,\n \"google_email_oauth_app_sid\": \"<string>\",\n \"microsoft_email_oauth_app_sid\": \"<string>\"\n },\n \"alert_recipients\": [\n \"jsmith@example.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"operation": "update",
"item": {
"email_box_sid": "<string>",
"defaults": {
"sending_window": {
"time_zone": "<string>",
"days": [
123
],
"start": "<string>",
"end": "<string>"
},
"daily_limit": 123,
"min_interval_seconds": 123,
"warmup_config": {
"enabled": true,
"ramp_start_daily": 123,
"ramp_step_per_day": 123,
"target_daily": 123
},
"google_email_oauth_app_sid": "<string>",
"microsoft_email_oauth_app_sid": "<string>"
},
"alert_recipients": [
"<string>"
],
"updated_at": "<string>"
},
"updated_fields": [
"<string>"
],
"previous_values": {},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
}
}
Authorizations
Headers
Body
application/json