Delete email account
curl --request DELETE \
--url https://app.gtm-api.com/email/v4/api/email-accounts/{sid} \
--header 'Authorization: Bearer <token>' \
--header 'Team-SID: <api-key>'import requests
url = "https://app.gtm-api.com/email/v4/api/email-accounts/{sid}"
headers = {
"Authorization": "Bearer <token>",
"Team-SID": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Team-SID': '<api-key>'}
};
fetch('https://app.gtm-api.com/email/v4/api/email-accounts/{sid}', 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-accounts/{sid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://app.gtm-api.com/email/v4/api/email-accounts/{sid}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Team-SID", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://app.gtm-api.com/email/v4/api/email-accounts/{sid}")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gtm-api.com/email/v4/api/email-accounts/{sid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Team-SID"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"operation": "delete",
"item": {},
"already_deleted": true,
"soft_deleted": true,
"cascade": {
"summary": "<string>",
"details": [
{
"entity": "<string>",
"deleted": 123,
"cancelled": 123
}
],
"recovery_available_until": "<string>"
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
}
}email_accounts
Delete email account
Delete a mailbox from the platform: sync and sending stop, the provider grant is revoked and the stored credentials are purged, its mirrored mail, queued messages included, leaves the workspace’s data, and its seat on the server is freed. The mailbox at its provider is not touched. There is no confirmation step on the route: the first call deletes. To stop a mailbox and keep its data use disconnect_email_account; to stop only outbound, pause_email_account_sending. Repeating answers already_deleted true. Requires can_manage_email_accounts.
Contract:
- MCP tool
delete_email_account, registry packagemcp.email/email_accounts, mountemail.accounts. - Operation
delete, response envelopedelete_cascade. - Flags: dangerous: the MCP layer gates it behind a preview/commit token, and the effect cannot be undone through this API.
DELETE
/
api
/
email-accounts
/
{sid}
Delete email account
curl --request DELETE \
--url https://app.gtm-api.com/email/v4/api/email-accounts/{sid} \
--header 'Authorization: Bearer <token>' \
--header 'Team-SID: <api-key>'import requests
url = "https://app.gtm-api.com/email/v4/api/email-accounts/{sid}"
headers = {
"Authorization": "Bearer <token>",
"Team-SID": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Team-SID': '<api-key>'}
};
fetch('https://app.gtm-api.com/email/v4/api/email-accounts/{sid}', 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-accounts/{sid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://app.gtm-api.com/email/v4/api/email-accounts/{sid}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Team-SID", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://app.gtm-api.com/email/v4/api/email-accounts/{sid}")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gtm-api.com/email/v4/api/email-accounts/{sid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Team-SID"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"operation": "delete",
"item": {},
"already_deleted": true,
"soft_deleted": true,
"cascade": {
"summary": "<string>",
"details": [
{
"entity": "<string>",
"deleted": 123,
"cancelled": 123
}
],
"recovery_available_until": "<string>"
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
}
}Authorizations
Headers
Response
delete_cascade success envelope.