Search email servers
curl --request POST \
--url https://app.gtm-api.com/id/v4/api/email-boxes/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Team-SID: <api-key>' \
--data '
{
"filter": {
"sid": {
"eq": "<string>",
"in": [
"<string>"
]
},
"status": {
"in": [],
"nin": []
}
},
"page_size": 250
}
'import requests
url = "https://app.gtm-api.com/id/v4/api/email-boxes/search"
payload = {
"filter": {
"sid": {
"eq": "<string>",
"in": ["<string>"]
},
"status": {
"in": [],
"nin": []
}
},
"page_size": 250
}
headers = {
"Authorization": "Bearer <token>",
"Team-SID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Team-SID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
filter: {sid: {eq: '<string>', in: ['<string>']}, status: {in: [], nin: []}},
page_size: 250
})
};
fetch('https://app.gtm-api.com/id/v4/api/email-boxes/search', 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/id/v4/api/email-boxes/search",
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([
'filter' => [
'sid' => [
'eq' => '<string>',
'in' => [
'<string>'
]
],
'status' => [
'in' => [
],
'nin' => [
]
]
],
'page_size' => 250
]),
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/id/v4/api/email-boxes/search"
payload := strings.NewReader("{\n \"filter\": {\n \"sid\": {\n \"eq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ]\n },\n \"status\": {\n \"in\": [],\n \"nin\": []\n }\n },\n \"page_size\": 250\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.gtm-api.com/id/v4/api/email-boxes/search")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"sid\": {\n \"eq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ]\n },\n \"status\": {\n \"in\": [],\n \"nin\": []\n }\n },\n \"page_size\": 250\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gtm-api.com/id/v4/api/email-boxes/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Team-SID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": {\n \"sid\": {\n \"eq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ]\n },\n \"status\": {\n \"in\": [],\n \"nin\": []\n }\n },\n \"page_size\": 250\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"operation": "search",
"items": [
{
"item": {
"sid": "<string>",
"team_sid": "<string>",
"name": "<string>",
"plan": "starter",
"location": "hel1",
"status": "provisioning",
"suspended_reason": "payment_failed",
"complimentary": true,
"seats_cap": 1,
"seats_used": 1,
"ipv4": "<string>",
"release": "<string>",
"run": {
"verb": "<string>",
"status": "<string>",
"phase": "<string>",
"phase_index": 1,
"phase_count": 1,
"started_at": "<string>",
"error_code": "<string>"
},
"price": {
"amount": "<string>",
"currency": "<string>",
"interval": "<string>"
},
"renews_at": "<string>",
"paid_through": "<string>",
"failed_error_code": "<string>",
"created_at": "<string>",
"provisioned_at": "<string>",
"suspended_at": "<string>",
"updated_at": "<string>"
},
"included": {}
}
],
"pagination": {
"next_cursor": "<string>",
"has_more": true,
"total_count": 123
},
"applied_filters": {},
"includes": [
"<string>"
],
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
},
"counts": {}
}email_boxes
Search email servers
List the workspace’s email servers, oldest first: plan, location, status, seats_used of seats_cap, unit price, renews_at, and run (the newest unfinished lifecycle run, else the newest failed one: verb, status, phase_index of phase_count, error_code). Destroyed servers only when filter.status names destroyed. Use it to pick a sid, check room before a move, or watch a purchase or a plan change finish. No cursor; page_size 0 counts only. Requires can_view_email_accounts.
Contract:
- MCP tool
search_email_boxes, registry packagemcp.id/email_boxes, mountid.billing. - Operation
search, response envelopesearch. - Flags: read only.
POST
/
api
/
email-boxes
/
search
Search email servers
curl --request POST \
--url https://app.gtm-api.com/id/v4/api/email-boxes/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Team-SID: <api-key>' \
--data '
{
"filter": {
"sid": {
"eq": "<string>",
"in": [
"<string>"
]
},
"status": {
"in": [],
"nin": []
}
},
"page_size": 250
}
'import requests
url = "https://app.gtm-api.com/id/v4/api/email-boxes/search"
payload = {
"filter": {
"sid": {
"eq": "<string>",
"in": ["<string>"]
},
"status": {
"in": [],
"nin": []
}
},
"page_size": 250
}
headers = {
"Authorization": "Bearer <token>",
"Team-SID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Team-SID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
filter: {sid: {eq: '<string>', in: ['<string>']}, status: {in: [], nin: []}},
page_size: 250
})
};
fetch('https://app.gtm-api.com/id/v4/api/email-boxes/search', 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/id/v4/api/email-boxes/search",
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([
'filter' => [
'sid' => [
'eq' => '<string>',
'in' => [
'<string>'
]
],
'status' => [
'in' => [
],
'nin' => [
]
]
],
'page_size' => 250
]),
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/id/v4/api/email-boxes/search"
payload := strings.NewReader("{\n \"filter\": {\n \"sid\": {\n \"eq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ]\n },\n \"status\": {\n \"in\": [],\n \"nin\": []\n }\n },\n \"page_size\": 250\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.gtm-api.com/id/v4/api/email-boxes/search")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"sid\": {\n \"eq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ]\n },\n \"status\": {\n \"in\": [],\n \"nin\": []\n }\n },\n \"page_size\": 250\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gtm-api.com/id/v4/api/email-boxes/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Team-SID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": {\n \"sid\": {\n \"eq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ]\n },\n \"status\": {\n \"in\": [],\n \"nin\": []\n }\n },\n \"page_size\": 250\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"operation": "search",
"items": [
{
"item": {
"sid": "<string>",
"team_sid": "<string>",
"name": "<string>",
"plan": "starter",
"location": "hel1",
"status": "provisioning",
"suspended_reason": "payment_failed",
"complimentary": true,
"seats_cap": 1,
"seats_used": 1,
"ipv4": "<string>",
"release": "<string>",
"run": {
"verb": "<string>",
"status": "<string>",
"phase": "<string>",
"phase_index": 1,
"phase_count": 1,
"started_at": "<string>",
"error_code": "<string>"
},
"price": {
"amount": "<string>",
"currency": "<string>",
"interval": "<string>"
},
"renews_at": "<string>",
"paid_through": "<string>",
"failed_error_code": "<string>",
"created_at": "<string>",
"provisioned_at": "<string>",
"suspended_at": "<string>",
"updated_at": "<string>"
},
"included": {}
}
],
"pagination": {
"next_cursor": "<string>",
"has_more": true,
"total_count": 123
},
"applied_filters": {},
"includes": [
"<string>"
],
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
},
"counts": {}
}Authorizations
Body
application/json
Response
search success envelope.