AI Agents & API
Connect AI agents to TrekMail, manage API tokens, and automate domain and mailbox operations with the REST API and MCP server.
What you'll learn
- 1 What the TrekMail API does, how authentication works, and which plans include API access.
- 2 How to create, scope, constrain, and revoke API tokens from the dashboard.
- 3 Connect Claude Desktop, Claude Code, or other MCP-compatible agents to TrekMail.
Your curated guide for this category.
Follow this recommended order to get the most out of this category.
Articles in this category
16 articles-
1API Overview
What the TrekMail API does, how authentication works, and which plans include API access.
-
2Creating and Managing API Tokens
How to create, scope, constrain, and revoke API tokens from the dashboard.
-
3Connecting AI Agents (MCP)
Connect Claude Desktop, Claude Code, or other MCP-compatible agents to TrekMail.
-
4API Scopes and Plan Permissions
Full reference of API scopes, what each one controls, and which plans unlock them.
-
5Drive API Overview
Understand the TrekMail Drive API for files, folders, uploads, share links, storage usage, safe delete rules, and add-on boundaries.
-
6Drive API Quickstart
Create a scoped token, list spaces, upload a file, create a share link, and verify the audit log.
-
7Drive API Scopes and Permissions
Reference for the 9 Drive scopes, plan and add-on access, mailbox constraints, and safe token design.
-
8Drive MCP Tools Overview
Overview of the 38 Drive MCP tools and how agents use them for uploads, sharing, bulk operations, and add-on reads.
-
9Connecting AI Agents to TrekMail Drive
Configure scoped tokens and MCP safety gates for Drive file automation.
-
10Automating File Uploads with Drive API
Build safe upload automation with quota checks, idempotency keys, multipart uploads, MCP tools, and failure handling.
-
11Share Links API and MCP Guide
Create, list, and revoke public Drive links through REST or MCP with expiry dates and download caps.
-
12Drive Storage Add-on API Boundaries
What agents can read about the Drive Add-on, and why purchase, resize, and cancel stay dashboard-only.
-
13Drive Bulk File Operations via API/MCP
Move, trash, restore, or purge many Drive files and folders safely with REST API endpoints or MCP tools.
-
14Drive Security, Audit Trail, and Safe Delete/Purge Rules
Operate Drive automation safely with scoped tokens, audit logs, Trash-first deletion, purge separation, and link controls.
-
15Safety Rails and Delete Intents
How two-step delete intents, rate limits, and audit logging protect against accidental data loss.
-
16API Migrations
Import email from any IMAP provider via the REST API or MCP server.