agentmail 0.4.17 → 0.4.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/domains/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/domains/client/Client.js +1 -1
- package/dist/cjs/api/resources/drafts/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/drafts/client/Client.js +1 -1
- package/dist/cjs/api/resources/events/types/EventType.d.ts +2 -0
- package/dist/cjs/api/resources/events/types/EventType.js +2 -0
- package/dist/cjs/api/resources/events/types/MessageReceivedBlockedEvent.d.ts +11 -0
- package/dist/cjs/api/resources/events/types/MessageReceivedBlockedEvent.js +3 -0
- package/dist/cjs/api/resources/events/types/MessageReceivedSpamEvent.d.ts +11 -0
- package/dist/cjs/api/resources/events/types/MessageReceivedSpamEvent.js +3 -0
- package/dist/cjs/api/resources/events/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/events/types/index.js +2 -0
- package/dist/cjs/api/resources/inboxEvents/exports.d.ts +1 -0
- package/dist/cjs/api/resources/inboxEvents/exports.js +18 -0
- package/dist/cjs/api/resources/inboxEvents/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxEvents/index.js +17 -0
- package/dist/cjs/api/resources/inboxEvents/types/InboxEvent.d.ts +17 -0
- package/dist/cjs/api/resources/inboxEvents/types/InboxEvent.js +3 -0
- package/dist/cjs/api/resources/inboxEvents/types/InboxEventId.d.ts +4 -0
- package/dist/cjs/api/resources/inboxEvents/types/InboxEventId.js +3 -0
- package/dist/cjs/api/resources/inboxEvents/types/InboxEventType.d.ts +6 -0
- package/dist/cjs/api/resources/inboxEvents/types/InboxEventType.js +9 -0
- package/dist/cjs/api/resources/inboxEvents/types/ListInboxEventsResponse.d.ts +8 -0
- package/dist/cjs/api/resources/inboxEvents/types/ListInboxEventsResponse.js +3 -0
- package/dist/cjs/api/resources/inboxEvents/types/index.d.ts +4 -0
- package/dist/cjs/api/resources/inboxEvents/types/index.js +20 -0
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +4 -1
- package/dist/cjs/api/resources/inboxes/client/Client.js +14 -9
- package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +1 -1
- package/dist/cjs/api/resources/inboxes/resources/events/client/Client.d.ts +32 -0
- package/dist/cjs/api/resources/inboxes/resources/events/client/Client.js +136 -0
- package/dist/cjs/api/resources/inboxes/resources/events/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/events/client/index.js +17 -0
- package/dist/cjs/api/resources/inboxes/resources/events/client/requests/ListInboxEventsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/inboxes/resources/events/client/requests/ListInboxEventsRequest.js +3 -0
- package/dist/cjs/api/resources/inboxes/resources/events/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/events/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/inboxes/resources/events/exports.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/resources/events/exports.js +21 -0
- package/dist/cjs/api/resources/inboxes/resources/events/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/events/index.js +17 -0
- package/dist/cjs/api/resources/inboxes/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/resources/index.js +3 -1
- package/dist/cjs/api/resources/inboxes/resources/lists/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/inboxes/resources/lists/client/Client.js +1 -1
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +1 -1
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +1 -1
- package/dist/cjs/api/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/index.js +3 -1
- package/dist/cjs/api/resources/lists/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/lists/client/Client.js +1 -1
- package/dist/cjs/api/resources/organizations/client/Client.d.ts +6 -1
- package/dist/cjs/api/resources/organizations/client/Client.js +6 -1
- package/dist/cjs/api/resources/pods/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/pods/client/Client.js +1 -1
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +1 -1
- package/dist/cjs/api/resources/pods/resources/drafts/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/pods/resources/drafts/client/Client.js +1 -1
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +1 -1
- package/dist/cjs/api/resources/pods/resources/lists/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/pods/resources/lists/client/Client.js +1 -1
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +1 -1
- package/dist/cjs/api/resources/threads/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/threads/client/Client.js +2 -2
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/webhooks/client/Client.js +1 -1
- package/dist/cjs/api/resources/websockets/client/Socket.d.ts +1 -1
- package/dist/cjs/serialization/resources/events/types/EventType.d.ts +1 -1
- package/dist/cjs/serialization/resources/events/types/EventType.js +2 -0
- package/dist/cjs/serialization/resources/events/types/MessageReceivedBlockedEvent.d.ts +16 -0
- package/dist/cjs/serialization/resources/events/types/MessageReceivedBlockedEvent.js +48 -0
- package/dist/cjs/serialization/resources/events/types/MessageReceivedSpamEvent.d.ts +16 -0
- package/dist/cjs/serialization/resources/events/types/MessageReceivedSpamEvent.js +48 -0
- package/dist/cjs/serialization/resources/events/types/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/events/types/index.js +2 -0
- package/dist/cjs/serialization/resources/inboxEvents/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/inboxEvents/index.js +17 -0
- package/dist/cjs/serialization/resources/inboxEvents/types/InboxEvent.d.ts +21 -0
- package/dist/cjs/serialization/resources/inboxEvents/types/InboxEvent.js +53 -0
- package/dist/cjs/serialization/resources/inboxEvents/types/InboxEventId.d.ts +7 -0
- package/dist/cjs/serialization/resources/inboxEvents/types/InboxEventId.js +39 -0
- package/dist/cjs/serialization/resources/inboxEvents/types/InboxEventType.d.ts +7 -0
- package/dist/cjs/serialization/resources/inboxEvents/types/InboxEventType.js +39 -0
- package/dist/cjs/serialization/resources/inboxEvents/types/ListInboxEventsResponse.d.ts +16 -0
- package/dist/cjs/serialization/resources/inboxEvents/types/ListInboxEventsResponse.js +48 -0
- package/dist/cjs/serialization/resources/inboxEvents/types/index.d.ts +4 -0
- package/dist/cjs/serialization/resources/inboxEvents/types/index.js +20 -0
- package/dist/cjs/serialization/resources/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/index.js +3 -1
- package/dist/cjs/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.d.ts +4 -2
- package/dist/cjs/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.js +4 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/domains/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/domains/client/Client.mjs +1 -1
- package/dist/esm/api/resources/drafts/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/drafts/client/Client.mjs +1 -1
- package/dist/esm/api/resources/events/types/EventType.d.mts +2 -0
- package/dist/esm/api/resources/events/types/EventType.mjs +2 -0
- package/dist/esm/api/resources/events/types/MessageReceivedBlockedEvent.d.mts +11 -0
- package/dist/esm/api/resources/events/types/MessageReceivedBlockedEvent.mjs +2 -0
- package/dist/esm/api/resources/events/types/MessageReceivedSpamEvent.d.mts +11 -0
- package/dist/esm/api/resources/events/types/MessageReceivedSpamEvent.mjs +2 -0
- package/dist/esm/api/resources/events/types/index.d.mts +2 -0
- package/dist/esm/api/resources/events/types/index.mjs +2 -0
- package/dist/esm/api/resources/inboxEvents/exports.d.mts +1 -0
- package/dist/esm/api/resources/inboxEvents/exports.mjs +2 -0
- package/dist/esm/api/resources/inboxEvents/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxEvents/index.mjs +1 -0
- package/dist/esm/api/resources/inboxEvents/types/InboxEvent.d.mts +17 -0
- package/dist/esm/api/resources/inboxEvents/types/InboxEvent.mjs +2 -0
- package/dist/esm/api/resources/inboxEvents/types/InboxEventId.d.mts +4 -0
- package/dist/esm/api/resources/inboxEvents/types/InboxEventId.mjs +2 -0
- package/dist/esm/api/resources/inboxEvents/types/InboxEventType.d.mts +6 -0
- package/dist/esm/api/resources/inboxEvents/types/InboxEventType.mjs +6 -0
- package/dist/esm/api/resources/inboxEvents/types/ListInboxEventsResponse.d.mts +8 -0
- package/dist/esm/api/resources/inboxEvents/types/ListInboxEventsResponse.mjs +2 -0
- package/dist/esm/api/resources/inboxEvents/types/index.d.mts +4 -0
- package/dist/esm/api/resources/inboxEvents/types/index.mjs +4 -0
- package/dist/esm/api/resources/inboxes/client/Client.d.mts +4 -1
- package/dist/esm/api/resources/inboxes/client/Client.mjs +6 -1
- package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +1 -1
- package/dist/esm/api/resources/inboxes/resources/events/client/Client.d.mts +32 -0
- package/dist/esm/api/resources/inboxes/resources/events/client/Client.mjs +99 -0
- package/dist/esm/api/resources/inboxes/resources/events/client/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/events/client/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/events/client/requests/ListInboxEventsRequest.d.mts +10 -0
- package/dist/esm/api/resources/inboxes/resources/events/client/requests/ListInboxEventsRequest.mjs +2 -0
- package/dist/esm/api/resources/inboxes/resources/events/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/events/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/events/exports.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/resources/events/exports.mjs +3 -0
- package/dist/esm/api/resources/inboxes/resources/events/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/events/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/resources/index.mjs +2 -0
- package/dist/esm/api/resources/inboxes/resources/lists/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/inboxes/resources/lists/client/Client.mjs +1 -1
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +1 -1
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +1 -1
- package/dist/esm/api/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/index.mjs +2 -0
- package/dist/esm/api/resources/lists/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/lists/client/Client.mjs +1 -1
- package/dist/esm/api/resources/organizations/client/Client.d.mts +6 -1
- package/dist/esm/api/resources/organizations/client/Client.mjs +6 -1
- package/dist/esm/api/resources/pods/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/pods/client/Client.mjs +1 -1
- package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +1 -1
- package/dist/esm/api/resources/pods/resources/drafts/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/pods/resources/drafts/client/Client.mjs +1 -1
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +1 -1
- package/dist/esm/api/resources/pods/resources/lists/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/pods/resources/lists/client/Client.mjs +1 -1
- package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +1 -1
- package/dist/esm/api/resources/threads/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/threads/client/Client.mjs +2 -2
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/webhooks/client/Client.mjs +1 -1
- package/dist/esm/api/resources/websockets/client/Socket.d.mts +1 -1
- package/dist/esm/serialization/resources/events/types/EventType.d.mts +1 -1
- package/dist/esm/serialization/resources/events/types/EventType.mjs +2 -0
- package/dist/esm/serialization/resources/events/types/MessageReceivedBlockedEvent.d.mts +16 -0
- package/dist/esm/serialization/resources/events/types/MessageReceivedBlockedEvent.mjs +12 -0
- package/dist/esm/serialization/resources/events/types/MessageReceivedSpamEvent.d.mts +16 -0
- package/dist/esm/serialization/resources/events/types/MessageReceivedSpamEvent.mjs +12 -0
- package/dist/esm/serialization/resources/events/types/index.d.mts +2 -0
- package/dist/esm/serialization/resources/events/types/index.mjs +2 -0
- package/dist/esm/serialization/resources/inboxEvents/index.d.mts +1 -0
- package/dist/esm/serialization/resources/inboxEvents/index.mjs +1 -0
- package/dist/esm/serialization/resources/inboxEvents/types/InboxEvent.d.mts +21 -0
- package/dist/esm/serialization/resources/inboxEvents/types/InboxEvent.mjs +17 -0
- package/dist/esm/serialization/resources/inboxEvents/types/InboxEventId.d.mts +7 -0
- package/dist/esm/serialization/resources/inboxEvents/types/InboxEventId.mjs +3 -0
- package/dist/esm/serialization/resources/inboxEvents/types/InboxEventType.d.mts +7 -0
- package/dist/esm/serialization/resources/inboxEvents/types/InboxEventType.mjs +3 -0
- package/dist/esm/serialization/resources/inboxEvents/types/ListInboxEventsResponse.d.mts +16 -0
- package/dist/esm/serialization/resources/inboxEvents/types/ListInboxEventsResponse.mjs +12 -0
- package/dist/esm/serialization/resources/inboxEvents/types/index.d.mts +4 -0
- package/dist/esm/serialization/resources/inboxEvents/types/index.mjs +4 -0
- package/dist/esm/serialization/resources/index.d.mts +2 -0
- package/dist/esm/serialization/resources/index.mjs +2 -0
- package/dist/esm/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.d.mts +4 -2
- package/dist/esm/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.mjs +4 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +1515 -436
- package/dist/llms.txt +11 -1
- package/package.json +12 -1
- package/reference.md +100 -18
package/dist/llms-full.txt
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
title: Welcome
|
|
4
4
|
slug: welcome
|
|
5
5
|
description: Your starting point for building with the AgentMail API.
|
|
6
|
-
|
|
6
|
+
---------------------
|
|
7
|
+
|
|
8
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
7
9
|
|
|
8
10
|
<Tip title="Welcome to AgentMail!" icon="fa-solid fa-star">
|
|
9
11
|
We're thrilled to have you here! Dive in to learn how to give your AI agents their own email inboxes.
|
|
@@ -43,13 +45,14 @@ AgentMail is an API platform for giving AI agents their own inboxes to send, rec
|
|
|
43
45
|
</Card>
|
|
44
46
|
</CardGroup>
|
|
45
47
|
|
|
46
|
-
|
|
47
48
|
***
|
|
48
49
|
|
|
49
50
|
title: Introduction
|
|
50
51
|
subtitle: Give AI agents email inboxes
|
|
51
52
|
slug: introduction
|
|
52
|
-
|
|
53
|
+
---------------------
|
|
54
|
+
|
|
55
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
53
56
|
|
|
54
57
|
## What is AgentMail?
|
|
55
58
|
|
|
@@ -147,7 +150,13 @@ Our customers use AgentMail for agent identity, authentication, and communicatio
|
|
|
147
150
|
## Get Started
|
|
148
151
|
|
|
149
152
|
<CardGroup>
|
|
150
|
-
<Card title="Quickstart" icon="fa-solid fa-book" href="/quickstart"
|
|
153
|
+
<Card title="Quickstart" icon="fa-solid fa-book" href="/quickstart">
|
|
154
|
+
Create your first inbox and send an email in minutes.
|
|
155
|
+
</Card>
|
|
156
|
+
|
|
157
|
+
<Card title="Receive emails" icon="fa-solid fa-bell" href="/webhooks-overview">
|
|
158
|
+
Set up webhooks or WebSockets to receive incoming messages in real time.
|
|
159
|
+
</Card>
|
|
151
160
|
|
|
152
161
|
<Card title="API Reference" icon="fa-solid fa-code" href="/api-reference" />
|
|
153
162
|
</CardGroup>
|
|
@@ -160,16 +169,15 @@ Our customers use AgentMail for agent identity, authentication, and communicatio
|
|
|
160
169
|
<Card title="Email" icon="fa-solid fa-envelope" href="mailto:support@agentmail.cc" />
|
|
161
170
|
</CardGroup>
|
|
162
171
|
|
|
163
|
-
|
|
164
172
|
***
|
|
165
173
|
|
|
166
174
|
title: Quickstart
|
|
167
175
|
subtitle: Create your first inbox with the AgentMail API
|
|
168
176
|
slug: quickstart
|
|
169
|
-
description:
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
177
|
+
description: Follow this guide to make your first AgentMail API request and create a new email inbox.
|
|
178
|
+
---------------------
|
|
179
|
+
|
|
180
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
173
181
|
|
|
174
182
|
## Quickest start
|
|
175
183
|
|
|
@@ -187,13 +195,39 @@ email inbox.
|
|
|
187
195
|
```
|
|
188
196
|
</CodeBlocks>
|
|
189
197
|
|
|
190
|
-
|
|
198
|
+
Sign up your agent and get an API key in one call (no console needed):
|
|
191
199
|
|
|
192
200
|
<CodeBlocks>
|
|
193
201
|
```python title="Python"
|
|
194
202
|
from agentmail import AgentMail
|
|
195
203
|
|
|
204
|
+
client = AgentMail()
|
|
205
|
+
response = client.agent.sign_up(human_email="you@example.com", username="my-agent")
|
|
206
|
+
# response.api_key -> store this securely
|
|
207
|
+
# response.inbox_id -> my-agent@agentmail.to
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
```typescript title="TypeScript"
|
|
211
|
+
import { AgentMailClient } from "agentmail";
|
|
212
|
+
|
|
213
|
+
const client = new AgentMailClient();
|
|
214
|
+
const response = await client.agent.signUp({ humanEmail: "you@example.com", username: "my-agent" });
|
|
215
|
+
// response.apiKey -> store this securely
|
|
216
|
+
// response.inboxId -> my-agent@agentmail.to
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
```bash title="CLI"
|
|
220
|
+
agentmail agent sign-up --human-email you@example.com --username my-agent
|
|
221
|
+
```
|
|
222
|
+
</CodeBlocks>
|
|
223
|
+
|
|
224
|
+
Verify with the OTP sent to your email, then send a message:
|
|
225
|
+
|
|
226
|
+
<CodeBlocks>
|
|
227
|
+
```python title="Python"
|
|
196
228
|
client = AgentMail(api_key="am_...")
|
|
229
|
+
client.agent.verify(otp_code="123456")
|
|
230
|
+
|
|
197
231
|
inbox = client.inboxes.create()
|
|
198
232
|
client.inboxes.messages.send(inbox.inbox_id, to="user@example.com", subject="Hello", text="Hello from my agent!")
|
|
199
233
|
```
|
|
@@ -201,14 +235,16 @@ Get your API key from the [Console](https://console.agentmail.to) and replace `a
|
|
|
201
235
|
```typescript title="TypeScript"
|
|
202
236
|
import { AgentMailClient } from "agentmail";
|
|
203
237
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
})
|
|
238
|
+
const client = new AgentMailClient({ apiKey: "am_..." });
|
|
239
|
+
await client.agent.verify({ otpCode: "123456" });
|
|
240
|
+
|
|
241
|
+
const inbox = await client.inboxes.create();
|
|
242
|
+
await client.inboxes.messages.send(inbox.inboxId, { to: "user@example.com", subject: "Hello", text: "Hello from my agent!" });
|
|
209
243
|
```
|
|
210
244
|
|
|
211
245
|
```bash title="CLI"
|
|
246
|
+
agentmail agent verify --otp-code 123456
|
|
247
|
+
|
|
212
248
|
# create an inbox
|
|
213
249
|
agentmail inboxes create
|
|
214
250
|
|
|
@@ -221,6 +257,10 @@ Get your API key from the [Console](https://console.agentmail.to) and replace `a
|
|
|
221
257
|
```
|
|
222
258
|
</CodeBlocks>
|
|
223
259
|
|
|
260
|
+
<Note>
|
|
261
|
+
Already have an account? Get your API key from the [Console](https://console.agentmail.to) and skip straight to sending emails.
|
|
262
|
+
</Note>
|
|
263
|
+
|
|
224
264
|
## Copy for Cursor / Claude
|
|
225
265
|
|
|
226
266
|
Copy one of the blocks below into Cursor or Claude for a complete, working AgentMail integration. Each block includes setup, API reference, error handling, rate limiting, and idempotency guidance.
|
|
@@ -232,6 +272,10 @@ Copy one of the blocks below into Cursor or Claude for a complete, working Agent
|
|
|
232
272
|
|
|
233
273
|
Setup: pip install agentmail python-dotenv. Set AGENTMAIL_API_KEY in .env.
|
|
234
274
|
|
|
275
|
+
Agent sign-up (no API key needed):
|
|
276
|
+
- agent.sign_up(human_email, username) — returns api_key, inbox_id, organization_id
|
|
277
|
+
- agent.verify(otp_code) — verify with OTP sent to human_email
|
|
278
|
+
|
|
235
279
|
API reference:
|
|
236
280
|
- inboxes.create(username?, domain?, display_name?, client_id?) — client_id for idempotent retries
|
|
237
281
|
- messages.send(inbox_id, to, subject, text, html?, cc?, bcc?, reply_to?, attachments?)
|
|
@@ -276,6 +320,10 @@ Copy one of the blocks below into Cursor or Claude for a complete, working Agent
|
|
|
276
320
|
*
|
|
277
321
|
* Setup: npm install agentmail dotenv. Set AGENTMAIL_API_KEY in .env.
|
|
278
322
|
*
|
|
323
|
+
* Agent sign-up (no API key needed):
|
|
324
|
+
* - agent.signUp({ humanEmail, username }) — returns apiKey, inboxId, organizationId
|
|
325
|
+
* - agent.verify({ otpCode }) — verify with OTP sent to humanEmail
|
|
326
|
+
*
|
|
279
327
|
* API reference:
|
|
280
328
|
* - inboxes.create({ username?, domain?, displayName?, clientId? }) — clientId for idempotent retries
|
|
281
329
|
* - messages.send(inboxId, { to, subject, text, html?, cc?, bcc?, replyTo?, attachments? })
|
|
@@ -327,25 +375,84 @@ Copy one of the blocks below into Cursor or Claude for a complete, working Agent
|
|
|
327
375
|
for reply content without quoted history.
|
|
328
376
|
</Tip>
|
|
329
377
|
|
|
330
|
-
This guide
|
|
378
|
+
This guide walks you through signing up, authenticating, and creating your first email inbox.
|
|
331
379
|
|
|
332
380
|
<Steps>
|
|
333
|
-
<Step title="
|
|
334
|
-
|
|
381
|
+
<Step title="Sign up and get an API key">
|
|
382
|
+
You have two options to get an API key:
|
|
383
|
+
|
|
384
|
+
**Option A: Agent sign-up (programmatic)**
|
|
385
|
+
|
|
386
|
+
Use the Agent API to create an account and get an API key without leaving your terminal. No console access needed.
|
|
387
|
+
|
|
388
|
+
<CodeBlocks>
|
|
389
|
+
```python title="Python"
|
|
390
|
+
from agentmail import AgentMail
|
|
391
|
+
|
|
392
|
+
client = AgentMail()
|
|
393
|
+
response = client.agent.sign_up(
|
|
394
|
+
human_email="you@example.com",
|
|
395
|
+
username="my-agent"
|
|
396
|
+
)
|
|
397
|
+
print(response.api_key) # store this securely
|
|
398
|
+
print(response.inbox_id) # my-agent@agentmail.to
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
```typescript title="TypeScript"
|
|
402
|
+
import { AgentMailClient } from "agentmail";
|
|
403
|
+
|
|
404
|
+
const client = new AgentMailClient();
|
|
405
|
+
const response = await client.agent.signUp({
|
|
406
|
+
humanEmail: "you@example.com",
|
|
407
|
+
username: "my-agent",
|
|
408
|
+
});
|
|
409
|
+
console.log(response.apiKey); // store this securely
|
|
410
|
+
console.log(response.inboxId); // my-agent@agentmail.to
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
```bash title="CLI"
|
|
414
|
+
agentmail agent sign-up \
|
|
415
|
+
--human-email you@example.com \
|
|
416
|
+
--username my-agent
|
|
417
|
+
```
|
|
418
|
+
</CodeBlocks>
|
|
335
419
|
|
|
336
|
-
|
|
420
|
+
A 6-digit OTP is sent to the provided email. Verify to unlock full permissions:
|
|
337
421
|
|
|
338
|
-
|
|
422
|
+
<CodeBlocks>
|
|
423
|
+
```python title="Python"
|
|
424
|
+
client = AgentMail(api_key=response.api_key)
|
|
425
|
+
client.agent.verify(otp_code="123456")
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
```typescript title="TypeScript"
|
|
429
|
+
const authedClient = new AgentMailClient({ apiKey: response.apiKey });
|
|
430
|
+
await authedClient.agent.verify({ otpCode: "123456" });
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
```bash title="CLI"
|
|
434
|
+
agentmail agent verify --otp-code 123456
|
|
435
|
+
```
|
|
436
|
+
</CodeBlocks>
|
|
437
|
+
|
|
438
|
+
<Info>
|
|
439
|
+
The sign-up endpoint is idempotent. Calling it again with the same email rotates the API key and resends the OTP if expired.
|
|
440
|
+
</Info>
|
|
441
|
+
|
|
442
|
+
**Option B: Console (manual)**
|
|
443
|
+
|
|
444
|
+
Go to the [AgentMail Console](https://console.agentmail.to), create an account, and generate an API key from the dashboard.
|
|
445
|
+

|
|
339
446
|
</Step>
|
|
340
447
|
|
|
341
|
-
<Step title="
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
keep your keys secure.
|
|
448
|
+
<Step title="Store your API key">
|
|
449
|
+
Create a `.env` file in your project root and add your key:
|
|
450
|
+
|
|
451
|
+
```bash
|
|
452
|
+
AGENTMAIL_API_KEY=am_...
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
We recommend using environment variables to keep your keys secure.
|
|
349
456
|
</Step>
|
|
350
457
|
|
|
351
458
|
<Step title="Install the SDK">
|
|
@@ -475,23 +582,40 @@ This guide will walk you through installing the AgentMail SDK, authenticating wi
|
|
|
475
582
|
|
|
476
583
|
## Next Steps
|
|
477
584
|
|
|
478
|
-
|
|
585
|
+
You've created an inbox and sent your first email. Now set up your agent to receive and respond to incoming messages:
|
|
586
|
+
|
|
587
|
+
<CardGroup>
|
|
588
|
+
<Card title="Receive emails with WebSockets" icon="fa-solid fa-plug" href="/websockets">
|
|
589
|
+
The fastest way to receive emails. No public URL or ngrok needed.
|
|
590
|
+
</Card>
|
|
591
|
+
|
|
592
|
+
<Card title="Receive emails with webhooks" icon="fa-solid fa-bell" href="/webhooks-overview">
|
|
593
|
+
Get real-time HTTP notifications when emails arrive.
|
|
594
|
+
</Card>
|
|
595
|
+
|
|
596
|
+
<Card title="Sending & receiving guide" icon="fa-solid fa-right-left" href="/sending-receiving-email">
|
|
597
|
+
Build a complete conversational agent workflow.
|
|
598
|
+
</Card>
|
|
599
|
+
|
|
600
|
+
<Card title="API Reference" icon="fa-solid fa-code" href="/api-reference">
|
|
601
|
+
Explore the full API with interactive examples.
|
|
602
|
+
</Card>
|
|
603
|
+
</CardGroup>
|
|
479
604
|
|
|
480
605
|
<Note>
|
|
481
606
|
Looking for a different language? Email us at
|
|
482
607
|
[support@agentmail.cc](mailto:support@agentmail.cc) and we'll get you set up.
|
|
483
608
|
</Note>
|
|
484
609
|
|
|
485
|
-
|
|
486
610
|
***
|
|
487
611
|
|
|
488
612
|
title: Inboxes
|
|
489
613
|
subtitle: The foundation of your agent's identity and communication.
|
|
490
614
|
slug: inboxes
|
|
491
|
-
description:
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
615
|
+
description: Learn how AgentMail Inboxes act as scalable, API-first email accounts for your agents.
|
|
616
|
+
---------------------
|
|
617
|
+
|
|
618
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
495
619
|
|
|
496
620
|
## What is an Inbox?
|
|
497
621
|
|
|
@@ -612,8 +736,8 @@ Here at AgentMail we've now made an `Inbox` an API resource, meaning you can per
|
|
|
612
736
|
--domain domain.com \
|
|
613
737
|
--display-name "Docs Tester"
|
|
614
738
|
|
|
615
|
-
#
|
|
616
|
-
agentmail inboxes
|
|
739
|
+
# get an inbox
|
|
740
|
+
agentmail inboxes get --inbox-id my_name@domain.com
|
|
617
741
|
|
|
618
742
|
# list all inboxes
|
|
619
743
|
agentmail inboxes list
|
|
@@ -727,16 +851,15 @@ Copy one of the blocks below into Cursor or Claude for complete Inboxes API know
|
|
|
727
851
|
```
|
|
728
852
|
</CodeBlocks>
|
|
729
853
|
|
|
730
|
-
|
|
731
854
|
***
|
|
732
855
|
|
|
733
856
|
title: Messages
|
|
734
857
|
subtitle: The fundamental unit of communication for your agents.
|
|
735
858
|
slug: messages
|
|
736
|
-
description:
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
859
|
+
description: Learn how to send, receive, and manage emails as Message objects with the AgentMail API.
|
|
860
|
+
---------------------
|
|
861
|
+
|
|
862
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
740
863
|
|
|
741
864
|
## What is a Message?
|
|
742
865
|
|
|
@@ -938,8 +1061,8 @@ You can retrieve the details of any specific `Message` by providing its ID along
|
|
|
938
1061
|
```
|
|
939
1062
|
|
|
940
1063
|
```bash title="CLI"
|
|
941
|
-
#
|
|
942
|
-
agentmail inboxes:messages
|
|
1064
|
+
# get a specific message
|
|
1065
|
+
agentmail inboxes:messages get \
|
|
943
1066
|
--inbox-id my_inbox@agentmail.to \
|
|
944
1067
|
--message-id "<abc123@agentmail.to>"
|
|
945
1068
|
```
|
|
@@ -1199,10 +1322,14 @@ When processing incoming messages, always treat `html` as the primary content so
|
|
|
1199
1322
|
|
|
1200
1323
|
## Receiving `Messages`
|
|
1201
1324
|
|
|
1325
|
+
<Warning>
|
|
1326
|
+
**Inbound emails require the sender's domain to have SPF or DKIM configured.** To reduce spoofing and phishing, AgentMail drops inbound emails when the sender's domain has neither SPF nor DKIM set up. If a sender reports that their email never arrived, this is the most likely cause. Once they configure SPF/DKIM on their domain, their emails will start landing in your inbox again. See [Why are my emails not showing up?](/knowledge-base/inbound-emails-missing) for details.
|
|
1327
|
+
</Warning>
|
|
1328
|
+
|
|
1202
1329
|
While you can periodically list `Messages` to check for new emails, the most efficient way to handle incoming `Messages` for your agents is with `Webhooks`. By configuring a `Webhook` endpoint, AgentMail can notify your application/agent in real-time as soon as a new `Message` arrives, so you can take action on them.
|
|
1203
1330
|
|
|
1204
1331
|
<CardGroup>
|
|
1205
|
-
<Card title="Guide: Webhooks" icon="fa-solid fa-bolt" href="/overview">
|
|
1332
|
+
<Card title="Guide: Webhooks" icon="fa-solid fa-bolt" href="/webhooks-overview">
|
|
1206
1333
|
Learn how to set up webhooks for real-time message processing.
|
|
1207
1334
|
</Card>
|
|
1208
1335
|
</CardGroup>
|
|
@@ -1268,16 +1395,15 @@ AgentMail doesn't have a dedicated "mark as read" endpoint — instead, you use
|
|
|
1268
1395
|
```
|
|
1269
1396
|
```
|
|
1270
1397
|
|
|
1271
|
-
|
|
1272
1398
|
***
|
|
1273
1399
|
|
|
1274
1400
|
title: Threads
|
|
1275
1401
|
subtitle: Organizing conversations across your Inboxes.
|
|
1276
1402
|
slug: threads
|
|
1277
|
-
description:
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1403
|
+
description: Learn how AgentMail Threads group messages into conversations and how to query them across your entire organization.
|
|
1404
|
+
---------------------
|
|
1405
|
+
|
|
1406
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
1281
1407
|
|
|
1282
1408
|
## What is a Thread?
|
|
1283
1409
|
|
|
@@ -1298,7 +1424,7 @@ This is the standard way to retrieve all the conversations associated with a sin
|
|
|
1298
1424
|
# You'll need an inbox ID to list threads from.
|
|
1299
1425
|
inbox_id = "inbound-agent@agentmail.to"
|
|
1300
1426
|
|
|
1301
|
-
# This
|
|
1427
|
+
# This loads all threads within the specified Inbox
|
|
1302
1428
|
|
|
1303
1429
|
inbox_threads = client.inboxes.threads.list(inbox_id=inbox_id)
|
|
1304
1430
|
|
|
@@ -1308,7 +1434,7 @@ This is the standard way to retrieve all the conversations associated with a sin
|
|
|
1308
1434
|
// You'll need an inbox ID to list threads from.
|
|
1309
1435
|
const inboxId = "inbound-agent@agentmail.to";
|
|
1310
1436
|
|
|
1311
|
-
// This
|
|
1437
|
+
// This loads all threads within the specified Inbox
|
|
1312
1438
|
const inboxThreads = await client.inboxes.threads.list("inbound-agent@agentmail.to");
|
|
1313
1439
|
|
|
1314
1440
|
console.log(`Found ${inboxThreads.count} threads in Inbox ${inboxId}.`);
|
|
@@ -1365,7 +1491,7 @@ You can also retrieve a single `Thread` by its ID. This will return the `Thread`
|
|
|
1365
1491
|
```python
|
|
1366
1492
|
thread_id = "thread_456def"
|
|
1367
1493
|
|
|
1368
|
-
# This
|
|
1494
|
+
# This loads a single thread and its messages
|
|
1369
1495
|
|
|
1370
1496
|
thread = client.threads.get(
|
|
1371
1497
|
thread_id="thread_id"
|
|
@@ -1378,7 +1504,7 @@ You can also retrieve a single `Thread` by its ID. This will return the `Thread`
|
|
|
1378
1504
|
```typescript title="TypeScript"
|
|
1379
1505
|
const threadId = "thread_456def";
|
|
1380
1506
|
|
|
1381
|
-
// This
|
|
1507
|
+
// This loads a single thread and its messages
|
|
1382
1508
|
const thread = await client.threads.get(
|
|
1383
1509
|
"thread_id"
|
|
1384
1510
|
)
|
|
@@ -1387,8 +1513,8 @@ You can also retrieve a single `Thread` by its ID. This will return the `Thread`
|
|
|
1387
1513
|
```
|
|
1388
1514
|
|
|
1389
1515
|
```bash title="CLI"
|
|
1390
|
-
#
|
|
1391
|
-
agentmail threads
|
|
1516
|
+
# get a single thread by id
|
|
1517
|
+
agentmail threads get \
|
|
1392
1518
|
--thread-id thread_456def
|
|
1393
1519
|
```
|
|
1394
1520
|
</CodeBlocks>
|
|
@@ -1476,16 +1602,15 @@ Copy one of the blocks below into Cursor or Claude for complete Threads API know
|
|
|
1476
1602
|
```
|
|
1477
1603
|
</CodeBlocks>
|
|
1478
1604
|
|
|
1479
|
-
|
|
1480
1605
|
***
|
|
1481
1606
|
|
|
1482
1607
|
title: Drafts
|
|
1483
1608
|
subtitle: Preparing and scheduling Messages for your agents.
|
|
1484
1609
|
slug: drafts
|
|
1485
|
-
description:
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1610
|
+
description: Learn how to create, manage, and send Drafts to enable advanced agent workflows like human-in-the-loop review and scheduled sending.
|
|
1611
|
+
---------------------
|
|
1612
|
+
|
|
1613
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
1489
1614
|
|
|
1490
1615
|
## What is a Draft?
|
|
1491
1616
|
|
|
@@ -1568,8 +1693,8 @@ Once a `Draft` is created, you can retrieve it by its ID
|
|
|
1568
1693
|
```
|
|
1569
1694
|
|
|
1570
1695
|
```bash title="CLI"
|
|
1571
|
-
#
|
|
1572
|
-
agentmail inboxes:drafts
|
|
1696
|
+
# get a draft by id
|
|
1697
|
+
agentmail inboxes:drafts get \
|
|
1573
1698
|
--inbox-id my_inbox@domain.com \
|
|
1574
1699
|
--draft-id draft_id_123
|
|
1575
1700
|
```
|
|
@@ -2033,16 +2158,15 @@ Copy one of the blocks below into Cursor or Claude for complete Drafts API knowl
|
|
|
2033
2158
|
```
|
|
2034
2159
|
</CodeBlocks>
|
|
2035
2160
|
|
|
2036
|
-
|
|
2037
2161
|
***
|
|
2038
2162
|
|
|
2039
2163
|
title: Labels
|
|
2040
2164
|
subtitle: Organizing and categorizing your agent's conversations at scale.
|
|
2041
2165
|
slug: labels
|
|
2042
|
-
description:
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2166
|
+
description: Learn how to use Labels to manage state, track campaigns, and filter messages for powerful agentic workflows.
|
|
2167
|
+
---------------------
|
|
2168
|
+
|
|
2169
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
2046
2170
|
|
|
2047
2171
|
## What are `Labels`?
|
|
2048
2172
|
|
|
@@ -2292,16 +2416,15 @@ Copy one of the blocks below into Cursor or Claude for complete Labels usage in
|
|
|
2292
2416
|
based on their content.
|
|
2293
2417
|
</Callout>
|
|
2294
2418
|
|
|
2295
|
-
|
|
2296
2419
|
***
|
|
2297
2420
|
|
|
2298
2421
|
title: Lists
|
|
2299
2422
|
subtitle: Filter emails by allowing or blocking specific addresses and domains.
|
|
2300
2423
|
slug: lists
|
|
2301
|
-
description:
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2424
|
+
description: Learn how to use Lists to control which email addresses and domains your agents can send to or receive from.
|
|
2425
|
+
---------------------
|
|
2426
|
+
|
|
2427
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
2305
2428
|
|
|
2306
2429
|
## What are Lists?
|
|
2307
2430
|
|
|
@@ -2415,8 +2538,8 @@ Retrieve a specific entry from a list by its email address or domain.
|
|
|
2415
2538
|
```
|
|
2416
2539
|
|
|
2417
2540
|
```bash title="CLI"
|
|
2418
|
-
#
|
|
2419
|
-
agentmail lists
|
|
2541
|
+
# get a specific entry
|
|
2542
|
+
agentmail lists get \
|
|
2420
2543
|
--direction receive \
|
|
2421
2544
|
--type allow \
|
|
2422
2545
|
--entry partner@example.com
|
|
@@ -2601,16 +2724,15 @@ Copy one of the blocks below into Cursor or Claude for complete Lists API knowle
|
|
|
2601
2724
|
```
|
|
2602
2725
|
</CodeBlocks>
|
|
2603
2726
|
|
|
2604
|
-
|
|
2605
2727
|
***
|
|
2606
2728
|
|
|
2607
2729
|
title: Attachments
|
|
2608
2730
|
subtitle: Sending and receiving files with your agents.
|
|
2609
2731
|
slug: attachments
|
|
2610
|
-
description:
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2732
|
+
description: Learn how to send files as attachments, and download incoming attachments from both messages and threads.
|
|
2733
|
+
---------------------
|
|
2734
|
+
|
|
2735
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
2614
2736
|
|
|
2615
2737
|
## What are `Attachments`?
|
|
2616
2738
|
|
|
@@ -2835,12 +2957,13 @@ Copy one of the blocks below into Cursor or Claude for complete Attachments usag
|
|
|
2835
2957
|
```
|
|
2836
2958
|
</CodeBlocks>
|
|
2837
2959
|
|
|
2838
|
-
|
|
2839
2960
|
***
|
|
2840
2961
|
|
|
2841
2962
|
title: Pods
|
|
2842
2963
|
description: Learn how to use pods for multi-tenant email management
|
|
2843
|
-
|
|
2964
|
+
---------------------
|
|
2965
|
+
|
|
2966
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
2844
2967
|
|
|
2845
2968
|
## What are Pods?
|
|
2846
2969
|
|
|
@@ -3131,16 +3254,15 @@ Pod: "Marketing-Agent"
|
|
|
3131
3254
|
* Learn about [Inboxes](/inboxes) and how to create email accounts within pods
|
|
3132
3255
|
* Explore [Domains](/custom-domains) to set up custom email domains for your pods
|
|
3133
3256
|
|
|
3134
|
-
|
|
3135
3257
|
***
|
|
3136
3258
|
|
|
3137
3259
|
title: Permissions
|
|
3138
3260
|
subtitle: Control what your API keys can access with granular permissions.
|
|
3139
3261
|
slug: permissions
|
|
3140
|
-
description:
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3262
|
+
description: Learn how to configure fine-grained permissions on API keys to restrict access to specific resources and operations.
|
|
3263
|
+
---------------------
|
|
3264
|
+
|
|
3265
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
3144
3266
|
|
|
3145
3267
|
## What are Permissions?
|
|
3146
3268
|
|
|
@@ -3207,6 +3329,10 @@ A restricted API key cannot create a child key with more permissions than itself
|
|
|
3207
3329
|
When a label visibility permission is denied, items with that label are automatically excluded from list results and return "not found" on direct access. For example, setting `label_spam_read` to `false` means the key will never see spam messages in any listing or lookup.
|
|
3208
3330
|
</Info>
|
|
3209
3331
|
|
|
3332
|
+
<Callout intent="info" title="Event subscriptions">
|
|
3333
|
+
Label visibility permissions also control whether an API key can subscribe to the corresponding event types on [webhooks](/events) and [WebSockets](/websockets). An API key without `label_spam_read` cannot create a webhook or WebSocket subscription for `message.received.spam` events, and an API key without `label_blocked_read` cannot subscribe to `message.received.blocked` events.
|
|
3334
|
+
</Callout>
|
|
3335
|
+
|
|
3210
3336
|
### Drafts
|
|
3211
3337
|
|
|
3212
3338
|
| Permission | Description |
|
|
@@ -3568,24 +3694,71 @@ Copy one of the blocks below into Cursor or Claude for complete Permissions API
|
|
|
3568
3694
|
* **Combine with scopes for defense in depth.** Pair permissions with [pod-scoped](/multi-tenancy#pod-scoped-keys) or [inbox-scoped](/multi-tenancy#inbox-scoped-keys) keys. Scopes limit *which* resources a key can see, while permissions limit *what* it can do.
|
|
3569
3695
|
* **Filter unwanted content from agents.** Set `label_spam_read`, `label_blocked_read`, and `label_trash_read` to `false` on agent-facing keys. This prevents agents from seeing or processing unwanted email, keeping their context clean.
|
|
3570
3696
|
|
|
3571
|
-
|
|
3572
3697
|
***
|
|
3573
3698
|
|
|
3574
3699
|
title: Agent Onboarding
|
|
3575
3700
|
subtitle: Everything you need to onboard your AI agent to AgentMail
|
|
3576
3701
|
slug: agent-onboarding
|
|
3577
|
-
description:
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3702
|
+
description: Resources for AI coding assistants, MCP servers, skills, and agent-friendly documentation.
|
|
3703
|
+
---------------------
|
|
3704
|
+
|
|
3705
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
3581
3706
|
|
|
3582
3707
|
> Everything you need to onboard your AI agent to AgentMail — the email platform built for AI agents.
|
|
3583
3708
|
|
|
3584
3709
|
If you're developing with AI, AgentMail offers several resources to improve your experience.
|
|
3585
3710
|
|
|
3586
|
-
##
|
|
3711
|
+
## Get an API key
|
|
3587
3712
|
|
|
3588
|
-
|
|
3713
|
+
Your agent can sign up programmatically using the Agent API. No console access needed.
|
|
3714
|
+
|
|
3715
|
+
<CodeBlocks>
|
|
3716
|
+
```python title="Python"
|
|
3717
|
+
from agentmail import AgentMail
|
|
3718
|
+
|
|
3719
|
+
client = AgentMail()
|
|
3720
|
+
response = client.agent.sign_up(human_email="you@example.com", username="my-agent")
|
|
3721
|
+
# response.api_key -> store this securely
|
|
3722
|
+
# response.inbox_id -> my-agent@agentmail.to
|
|
3723
|
+
```
|
|
3724
|
+
|
|
3725
|
+
```typescript title="TypeScript"
|
|
3726
|
+
import { AgentMailClient } from "agentmail";
|
|
3727
|
+
|
|
3728
|
+
const client = new AgentMailClient();
|
|
3729
|
+
const response = await client.agent.signUp({ humanEmail: "you@example.com", username: "my-agent" });
|
|
3730
|
+
// response.apiKey -> store this securely
|
|
3731
|
+
// response.inboxId -> my-agent@agentmail.to
|
|
3732
|
+
```
|
|
3733
|
+
|
|
3734
|
+
```bash title="CLI"
|
|
3735
|
+
agentmail agent sign-up --human-email you@example.com --username my-agent
|
|
3736
|
+
```
|
|
3737
|
+
</CodeBlocks>
|
|
3738
|
+
|
|
3739
|
+
A 6-digit OTP is sent to the provided email. Verify to unlock full permissions:
|
|
3740
|
+
|
|
3741
|
+
<CodeBlocks>
|
|
3742
|
+
```python title="Python"
|
|
3743
|
+
client = AgentMail(api_key=response.api_key)
|
|
3744
|
+
client.agent.verify(otp_code="123456")
|
|
3745
|
+
```
|
|
3746
|
+
|
|
3747
|
+
```typescript title="TypeScript"
|
|
3748
|
+
const authedClient = new AgentMailClient({ apiKey: response.apiKey });
|
|
3749
|
+
await authedClient.agent.verify({ otpCode: "123456" });
|
|
3750
|
+
```
|
|
3751
|
+
|
|
3752
|
+
```bash title="CLI"
|
|
3753
|
+
agentmail agent verify --otp-code 123456
|
|
3754
|
+
```
|
|
3755
|
+
</CodeBlocks>
|
|
3756
|
+
|
|
3757
|
+
<Info>
|
|
3758
|
+
The sign-up endpoint is idempotent. Calling it again with the same email rotates the API key and resends the OTP if expired.
|
|
3759
|
+
</Info>
|
|
3760
|
+
|
|
3761
|
+
Alternatively, a human can create an account at [console.agentmail.to](https://console.agentmail.to) and generate an API key from the dashboard.
|
|
3589
3762
|
|
|
3590
3763
|
<Info>
|
|
3591
3764
|
AgentMail's free tier includes 3 inboxes and 3,000 emails/month. Your agent can start building immediately.
|
|
@@ -3713,19 +3886,26 @@ export AGENTMAIL_API_KEY="your-api-key-here"
|
|
|
3713
3886
|
View the skill source and full documentation.
|
|
3714
3887
|
</Card>
|
|
3715
3888
|
|
|
3716
|
-
## Quick
|
|
3889
|
+
## Quick start for agents
|
|
3717
3890
|
|
|
3718
|
-
|
|
3891
|
+
Sign up, create an inbox, and send your first email:
|
|
3719
3892
|
|
|
3720
3893
|
<CodeBlocks>
|
|
3721
3894
|
```python title="Python"
|
|
3722
3895
|
from agentmail import AgentMail
|
|
3723
3896
|
|
|
3724
|
-
|
|
3897
|
+
# sign up (no API key needed)
|
|
3898
|
+
client = AgentMail()
|
|
3899
|
+
response = client.agent.sign_up(human_email="you@example.com", username="my-agent")
|
|
3900
|
+
|
|
3901
|
+
# after verifying with the OTP sent to your email:
|
|
3902
|
+
client = AgentMail(api_key=response.api_key)
|
|
3903
|
+
client.agent.verify(otp_code="123456")
|
|
3904
|
+
|
|
3905
|
+
# create an inbox and send an email
|
|
3725
3906
|
inbox = client.inboxes.create(display_name="My AI Agent")
|
|
3726
3907
|
print(f"Agent email: {inbox.inbox_id}")
|
|
3727
3908
|
|
|
3728
|
-
# Send an email
|
|
3729
3909
|
client.inboxes.messages.send(
|
|
3730
3910
|
inbox.inbox_id,
|
|
3731
3911
|
to="user@example.com",
|
|
@@ -3737,12 +3917,19 @@ Create an inbox and send your first email in a few lines:
|
|
|
3737
3917
|
```typescript title="TypeScript"
|
|
3738
3918
|
import { AgentMailClient } from "agentmail";
|
|
3739
3919
|
|
|
3740
|
-
|
|
3741
|
-
const
|
|
3920
|
+
// sign up (no API key needed)
|
|
3921
|
+
const client = new AgentMailClient();
|
|
3922
|
+
const response = await client.agent.signUp({ humanEmail: "you@example.com", username: "my-agent" });
|
|
3923
|
+
|
|
3924
|
+
// after verifying with the OTP sent to your email:
|
|
3925
|
+
const authedClient = new AgentMailClient({ apiKey: response.apiKey });
|
|
3926
|
+
await authedClient.agent.verify({ otpCode: "123456" });
|
|
3927
|
+
|
|
3928
|
+
// create an inbox and send an email
|
|
3929
|
+
const inbox = await authedClient.inboxes.create({ displayName: "My AI Agent" });
|
|
3742
3930
|
console.log(`Agent email: ${inbox.inboxId}`);
|
|
3743
3931
|
|
|
3744
|
-
|
|
3745
|
-
await client.inboxes.messages.send(inbox.inboxId, {
|
|
3932
|
+
await authedClient.inboxes.messages.send(inbox.inboxId, {
|
|
3746
3933
|
to: "user@example.com",
|
|
3747
3934
|
subject: "Hello from my AI agent",
|
|
3748
3935
|
text: "Hi! I'm an AI agent with my own email address."
|
|
@@ -3750,6 +3937,10 @@ Create an inbox and send your first email in a few lines:
|
|
|
3750
3937
|
```
|
|
3751
3938
|
|
|
3752
3939
|
```bash title="CLI"
|
|
3940
|
+
# sign up and verify
|
|
3941
|
+
agentmail agent sign-up --human-email you@example.com --username my-agent
|
|
3942
|
+
agentmail agent verify --otp-code 123456
|
|
3943
|
+
|
|
3753
3944
|
# create an inbox
|
|
3754
3945
|
agentmail inboxes create --display-name "My AI Agent"
|
|
3755
3946
|
|
|
@@ -3762,6 +3953,10 @@ Create an inbox and send your first email in a few lines:
|
|
|
3762
3953
|
```
|
|
3763
3954
|
</CodeBlocks>
|
|
3764
3955
|
|
|
3956
|
+
<Note>
|
|
3957
|
+
Already have an API key? Skip the sign-up step and initialize the client directly with your key.
|
|
3958
|
+
</Note>
|
|
3959
|
+
|
|
3765
3960
|
### Receive and reply to emails
|
|
3766
3961
|
|
|
3767
3962
|
<CodeBlocks>
|
|
@@ -3787,17 +3982,17 @@ Create an inbox and send your first email in a few lines:
|
|
|
3787
3982
|
|
|
3788
3983
|
```typescript title="TypeScript"
|
|
3789
3984
|
// List threads in the inbox
|
|
3790
|
-
const threads = await
|
|
3985
|
+
const threads = await authedClient.inboxes.threads.list(inbox.inboxId);
|
|
3791
3986
|
|
|
3792
3987
|
// Get the latest thread
|
|
3793
|
-
const thread = await
|
|
3988
|
+
const thread = await authedClient.inboxes.threads.get(
|
|
3794
3989
|
inbox.inboxId,
|
|
3795
3990
|
threads.threads[0].threadId
|
|
3796
3991
|
);
|
|
3797
3992
|
|
|
3798
3993
|
// Reply to the latest message
|
|
3799
3994
|
const latestMessage = thread.messages[thread.messages.length - 1];
|
|
3800
|
-
await
|
|
3995
|
+
await authedClient.inboxes.messages.reply(
|
|
3801
3996
|
inbox.inboxId,
|
|
3802
3997
|
latestMessage.messageId,
|
|
3803
3998
|
{ to: [latestMessage.from], text: "Thanks for your email! I'll look into this." }
|
|
@@ -3862,16 +4057,15 @@ Unlike traditional email APIs that are built for one-way transactional email, Ag
|
|
|
3862
4057
|
</Card>
|
|
3863
4058
|
</CardGroup>
|
|
3864
4059
|
|
|
3865
|
-
|
|
3866
4060
|
***
|
|
3867
4061
|
|
|
3868
4062
|
title: Skills
|
|
3869
4063
|
subtitle: Add AgentMail to AI coding assistants with the official skill
|
|
3870
4064
|
slug: integrations/skills
|
|
3871
|
-
description:
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
4065
|
+
description: AgentMail's official skill for OpenClaw, Claude Code, Cursor, and other AI assistants
|
|
4066
|
+
---------------------
|
|
4067
|
+
|
|
4068
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
3875
4069
|
|
|
3876
4070
|
## Getting started
|
|
3877
4071
|
|
|
@@ -3995,14 +4189,15 @@ Once installed, you can ask your AI assistant to perform email tasks:
|
|
|
3995
4189
|
* [AgentMail API Reference](/api-reference)
|
|
3996
4190
|
* [AgentMail Console](https://console.agentmail.to)
|
|
3997
4191
|
|
|
3998
|
-
|
|
3999
4192
|
***
|
|
4000
4193
|
|
|
4001
4194
|
title: MCP
|
|
4002
4195
|
subtitle: Connect AgentMail to any MCP-compatible AI client
|
|
4003
4196
|
slug: integrations/mcp
|
|
4004
4197
|
description: AgentMail's Model Context Protocol (MCP) integration
|
|
4005
|
-
|
|
4198
|
+
---------------------
|
|
4199
|
+
|
|
4200
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
4006
4201
|
|
|
4007
4202
|
## Getting started
|
|
4008
4203
|
|
|
@@ -4038,14 +4233,15 @@ The AgentMail MCP server works with any MCP-compatible client, including:
|
|
|
4038
4233
|
|
|
4039
4234
|
For detailed setup instructions and available tools, visit [mcp.agentmail.to](https://mcp.agentmail.to).
|
|
4040
4235
|
|
|
4041
|
-
|
|
4042
4236
|
***
|
|
4043
4237
|
|
|
4044
4238
|
title: CLI
|
|
4045
4239
|
subtitle: Manage AgentMail resources from the command line
|
|
4046
4240
|
slug: integrations/cli
|
|
4047
4241
|
description: AgentMail's official command-line interface
|
|
4048
|
-
|
|
4242
|
+
---------------------
|
|
4243
|
+
|
|
4244
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
4049
4245
|
|
|
4050
4246
|
## Getting started
|
|
4051
4247
|
|
|
@@ -4115,7 +4311,7 @@ agentmail webhooks create \
|
|
|
4115
4311
|
The CLI provides commands for:
|
|
4116
4312
|
|
|
4117
4313
|
* **Inbox management:** Create, list, update, and delete inboxes
|
|
4118
|
-
* **Message operations:** Send, reply, forward, and
|
|
4314
|
+
* **Message operations:** Send, reply, forward, and read emails
|
|
4119
4315
|
* **Thread management:** List and manage email threads
|
|
4120
4316
|
* **Drafts:** Create, update, send, and delete drafts
|
|
4121
4317
|
* **Webhooks:** Create and manage webhook endpoints
|
|
@@ -4155,14 +4351,15 @@ openclaw skills install agentmail-to/agentmail-skills/agentmail-cli
|
|
|
4155
4351
|
|
|
4156
4352
|
This works with any compatible tool, including OpenClaw, Claude Code, Cursor, and Codex. See the [Skills](/integrations/skills) page for more details.
|
|
4157
4353
|
|
|
4158
|
-
|
|
4159
4354
|
***
|
|
4160
4355
|
|
|
4161
4356
|
title: Google ADK
|
|
4162
4357
|
subtitle: Give your Google ADK agent its own email inbox
|
|
4163
4358
|
slug: integrations/google-adk
|
|
4164
4359
|
description: AgentMail's Google Agent Development Kit (ADK) integration
|
|
4165
|
-
|
|
4360
|
+
---------------------
|
|
4361
|
+
|
|
4362
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
4166
4363
|
|
|
4167
4364
|
## Getting started
|
|
4168
4365
|
|
|
@@ -4273,14 +4470,15 @@ Once connected, your ADK agent has access to the following AgentMail tools:
|
|
|
4273
4470
|
| `forward_message` | Forward a message to another recipient |
|
|
4274
4471
|
| `update_message` | Update message properties such as read status |
|
|
4275
4472
|
|
|
4276
|
-
|
|
4277
4473
|
***
|
|
4278
4474
|
|
|
4279
4475
|
title: OpenClaw
|
|
4280
4476
|
subtitle: Give your OpenClaw agent its own email inbox
|
|
4281
4477
|
slug: integrations/openclaw
|
|
4282
4478
|
description: AgentMail's OpenClaw integration
|
|
4283
|
-
|
|
4479
|
+
---------------------
|
|
4480
|
+
|
|
4481
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
4284
4482
|
|
|
4285
4483
|
## Getting started
|
|
4286
4484
|
|
|
@@ -4501,14 +4699,15 @@ Now OpenClaw will be notified whenever a new email arrives, allowing it to proac
|
|
|
4501
4699
|
* [OpenClaw Documentation](https://docs.openclaw.ai)
|
|
4502
4700
|
* [OpenClaw Skills Guide](https://docs.openclaw.ai/tools/skills)
|
|
4503
4701
|
|
|
4504
|
-
|
|
4505
4702
|
***
|
|
4506
4703
|
|
|
4507
4704
|
title: Replit
|
|
4508
4705
|
subtitle: Integrate AgentMail with your Replit apps and agents
|
|
4509
4706
|
slug: integrations/replit
|
|
4510
4707
|
description: AgentMail's Replit integration
|
|
4511
|
-
|
|
4708
|
+
---------------------
|
|
4709
|
+
|
|
4710
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
4512
4711
|
|
|
4513
4712
|
## Getting started
|
|
4514
4713
|
|
|
@@ -4717,14 +4916,15 @@ Email is critical to identity and communication on the internet. Much of the con
|
|
|
4717
4916
|
|
|
4718
4917
|
These are just a few select verticals, but we have seen AgentMail be effective in automating any email task across every function. If a human does it with email, it can be automated with AgentMail.
|
|
4719
4918
|
|
|
4720
|
-
|
|
4721
4919
|
***
|
|
4722
4920
|
|
|
4723
4921
|
title: x402
|
|
4724
4922
|
subtitle: Pay-per-use AgentMail with the x402 payment protocol
|
|
4725
4923
|
slug: integrations/x402
|
|
4726
4924
|
description: AgentMail's x402 integration for HTTP-native payments
|
|
4727
|
-
|
|
4925
|
+
---------------------
|
|
4926
|
+
|
|
4927
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
4728
4928
|
|
|
4729
4929
|
## Getting started
|
|
4730
4930
|
|
|
@@ -4879,14 +5079,15 @@ This means your agent can use the full AgentMail API (inboxes, messages, threads
|
|
|
4879
5079
|
* [AgentMail API reference](/api-reference)
|
|
4880
5080
|
* [WebSockets overview](/websockets)
|
|
4881
5081
|
|
|
4882
|
-
|
|
4883
5082
|
***
|
|
4884
5083
|
|
|
4885
5084
|
title: MPP
|
|
4886
5085
|
subtitle: Pay-per-use AgentMail with Stripe's Machine Payments Protocol
|
|
4887
5086
|
slug: integrations/mpp
|
|
4888
5087
|
description: AgentMail's MPP integration for machine-to-machine payments via Stripe
|
|
4889
|
-
|
|
5088
|
+
---------------------
|
|
5089
|
+
|
|
5090
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
4890
5091
|
|
|
4891
5092
|
## Getting started
|
|
4892
5093
|
|
|
@@ -4974,14 +5175,15 @@ This means your agent can use the full AgentMail API (inboxes, messages, threads
|
|
|
4974
5175
|
* [AgentMail API reference](/api-reference)
|
|
4975
5176
|
* [WebSockets overview](/websockets)
|
|
4976
5177
|
|
|
4977
|
-
|
|
4978
5178
|
***
|
|
4979
5179
|
|
|
4980
5180
|
title: Integrate LiveKit Agents
|
|
4981
5181
|
subtitle: Build a voice assistant with real time email capabilities.
|
|
4982
5182
|
slug: integrate-livekit-agents
|
|
4983
5183
|
description: A step-by-step guide to integrate with the LiveKit Agents SDK.
|
|
4984
|
-
|
|
5184
|
+
---------------------
|
|
5185
|
+
|
|
5186
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
4985
5187
|
|
|
4986
5188
|
## Overview
|
|
4987
5189
|
|
|
@@ -5108,16 +5310,92 @@ Run your agent inside the terminal and send it an email
|
|
|
5108
5310
|
python agent.py console
|
|
5109
5311
|
```
|
|
5110
5312
|
|
|
5313
|
+
***
|
|
5314
|
+
|
|
5315
|
+
title: Sim.ai
|
|
5316
|
+
subtitle: Connect AgentMail to your Sim.ai workflows
|
|
5317
|
+
slug: integrations/sim
|
|
5318
|
+
description: AgentMail's Sim.ai integration
|
|
5319
|
+
---------------------
|
|
5320
|
+
|
|
5321
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
5322
|
+
|
|
5323
|
+
## Getting started
|
|
5324
|
+
|
|
5325
|
+
[Sim.ai](https://sim.ai) is a platform for building agentic workflows. By connecting AgentMail to Sim, your workflows can create inboxes, send and receive emails, manage threads, handle drafts, and organize conversations with labels, all without writing backend code.
|
|
5326
|
+
|
|
5327
|
+
## Use cases
|
|
5328
|
+
|
|
5329
|
+
* **Dynamic inbox creation:** Spin up new inboxes on the fly for each agent, workflow, or customer for multi-tenant email handling.
|
|
5330
|
+
* **Automated email processing:** List and read incoming messages, then trigger downstream actions based on content, sender, or labels.
|
|
5331
|
+
* **Conversational email:** Reply to threads and forward messages to keep conversations flowing naturally within automated workflows.
|
|
5332
|
+
* **Draft and review workflows:** Create drafts, update them with AI-generated content, and send when approved for human-in-the-loop patterns.
|
|
5333
|
+
* **Email organization:** Apply labels to threads and messages to categorize, filter, and route emails through your automation pipeline.
|
|
5334
|
+
|
|
5335
|
+
## Prerequisites
|
|
5336
|
+
|
|
5337
|
+
1. An [AgentMail account](https://agentmail.to/) with an API key from the [AgentMail Console](https://console.agentmail.to)
|
|
5338
|
+
2. A [Sim.ai](https://sim.ai) account
|
|
5339
|
+
|
|
5340
|
+
## Setup
|
|
5341
|
+
|
|
5342
|
+
1. Open your workflow in the Sim builder.
|
|
5343
|
+
2. Add the **AgentMail** block from the tools panel.
|
|
5344
|
+
3. Paste your AgentMail API key into the configuration.
|
|
5345
|
+
4. Select the operation you need (for example, create inbox, send message, or list threads).
|
|
5346
|
+
5. Map the input fields to your workflow data and connect the block to the rest of your flow.
|
|
5347
|
+
|
|
5348
|
+
## Available operations
|
|
5349
|
+
|
|
5350
|
+
Once connected, Sim provides access to the following AgentMail operations:
|
|
5351
|
+
|
|
5352
|
+
### Inbox management
|
|
5353
|
+
|
|
5354
|
+
| Operation | Description |
|
|
5355
|
+
| ------------ | ---------------------------------------------------------------------- |
|
|
5356
|
+
| Create inbox | Create a new inbox with an optional username, domain, and display name |
|
|
5357
|
+
| Get inbox | Retrieve details for a specific inbox |
|
|
5358
|
+
| Delete inbox | Delete an inbox |
|
|
5359
|
+
|
|
5360
|
+
### Message operations
|
|
5361
|
+
|
|
5362
|
+
| Operation | Description |
|
|
5363
|
+
| ---------------- | ---------------------------------------- |
|
|
5364
|
+
| Send message | Send a new email from an inbox |
|
|
5365
|
+
| Get message | Retrieve details of a specific message |
|
|
5366
|
+
| Reply to message | Reply to an existing message in a thread |
|
|
5367
|
+
| Forward message | Forward a message to new recipients |
|
|
5368
|
+
|
|
5369
|
+
### Thread management
|
|
5370
|
+
|
|
5371
|
+
| Operation | Description |
|
|
5372
|
+
| ------------- | ---------------------------------------------------------------------------- |
|
|
5373
|
+
| Get thread | Retrieve a thread and its messages |
|
|
5374
|
+
| Delete thread | Delete a thread (moves to trash, or permanently deletes if already in trash) |
|
|
5375
|
+
|
|
5376
|
+
### Draft management
|
|
5377
|
+
|
|
5378
|
+
| Operation | Description |
|
|
5379
|
+
| ------------ | ------------------------------------ |
|
|
5380
|
+
| Create draft | Create a new email draft in an inbox |
|
|
5381
|
+
| Get draft | Retrieve details of a specific draft |
|
|
5382
|
+
| Delete draft | Delete a draft |
|
|
5383
|
+
|
|
5384
|
+
## Resources
|
|
5385
|
+
|
|
5386
|
+
* [Sim.ai AgentMail tool documentation](https://docs.sim.ai/tools/agentmail)
|
|
5387
|
+
* [AgentMail API reference](/api-reference)
|
|
5388
|
+
* [Webhooks overview](/webhooks/webhooks-overview)
|
|
5111
5389
|
|
|
5112
5390
|
***
|
|
5113
5391
|
|
|
5114
|
-
title:
|
|
5392
|
+
title: Guide: Sending & Receiving Email
|
|
5115
5393
|
subtitle: Building your first conversational agent workflow.
|
|
5116
5394
|
slug: sending-receiving-email
|
|
5117
|
-
description:
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5395
|
+
description: A step-by-step guide to the practical workflow of sending initial emails and handling replies to have a full conversation.
|
|
5396
|
+
---------------------
|
|
5397
|
+
|
|
5398
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
5121
5399
|
|
|
5122
5400
|
This guide walks you through the complete, practical workflow of an agent having a conversation. While the `Core Concepts` pages detail the individual API calls, this guide shows you how to stitch them together to create a functional conversational loop.
|
|
5123
5401
|
|
|
@@ -5264,7 +5542,7 @@ Here's the step-by-step logic for a polling-based conversational agent.
|
|
|
5264
5542
|
<Callout intent="success" title="Real-Time Processing with Webhooks">
|
|
5265
5543
|
For production applications, polling is inefficient. The best way to handle incoming replies is to use `Webhooks`. This allows AgentMail to notify your agent instantly when a new `Message` arrives, so you can reply in real-time.
|
|
5266
5544
|
|
|
5267
|
-
[**Learn how to set up `Webhooks` →**](/overview)
|
|
5545
|
+
[**Learn how to set up `Webhooks` →**](/webhooks-overview)
|
|
5268
5546
|
</Callout>
|
|
5269
5547
|
|
|
5270
5548
|
## Scheduling Emails
|
|
@@ -5313,16 +5591,15 @@ Create a `Draft` with the `send_at` field and AgentMail handles the rest. The em
|
|
|
5313
5591
|
For more details on scheduled sending—including how to cancel, reschedule, list scheduled drafts, and build conditional follow-up workflows—see the [**Drafts**](/drafts) page.
|
|
5314
5592
|
</Callout>
|
|
5315
5593
|
|
|
5316
|
-
|
|
5317
5594
|
***
|
|
5318
5595
|
|
|
5319
5596
|
title: IMAP & SMTP
|
|
5320
5597
|
subtitle: Connect to AgentMail with standard email protocols
|
|
5321
5598
|
slug: imap-smtp
|
|
5322
|
-
description:
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5599
|
+
description: Configure IMAP and SMTP to access your AgentMail inboxes using email clients or programmatic access.
|
|
5600
|
+
---------------------
|
|
5601
|
+
|
|
5602
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
5326
5603
|
|
|
5327
5604
|
<Callout intent="warn" title="IMAP is Under Development">
|
|
5328
5605
|
IMAP support is currently under development and will be available in the coming weeks. The documentation below describes the planned functionality. SMTP is fully available today.
|
|
@@ -5561,16 +5838,15 @@ sendEmail().catch(console.error);
|
|
|
5561
5838
|
| Access to all folders | API |
|
|
5562
5839
|
| Bulk operations | API |
|
|
5563
5840
|
|
|
5564
|
-
|
|
5565
5841
|
***
|
|
5566
5842
|
|
|
5567
|
-
title:
|
|
5568
|
-
subtitle:
|
|
5843
|
+
title: Guide: Multi-Tenancy
|
|
5844
|
+
subtitle: Pods, scoped keys, and event routing for your customers.
|
|
5569
5845
|
slug: multi-tenancy
|
|
5570
|
-
description:
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5846
|
+
description: How to use pods, scoped API keys, and webhook filtering to build multi-tenant email on AgentMail.
|
|
5847
|
+
---------------------
|
|
5848
|
+
|
|
5849
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
5574
5850
|
|
|
5575
5851
|
If you're building a platform where each of your customers needs their own email infrastructure, this is how you set it up. The basic idea: create a `Pod` per customer, give them a scoped API key, and route webhook events to the right place.
|
|
5576
5852
|
|
|
@@ -5856,18 +6132,15 @@ Here's what onboarding a new tenant looks like end to end:
|
|
|
5856
6132
|
```
|
|
5857
6133
|
</CodeBlocks>
|
|
5858
6134
|
|
|
5859
|
-
|
|
5860
6135
|
***
|
|
5861
6136
|
|
|
5862
6137
|
title: Using Custom Domains
|
|
5863
|
-
subtitle:
|
|
5864
|
-
Strengthen your agent's identity and improve deliverability with your own
|
|
5865
|
-
domain.
|
|
6138
|
+
subtitle: Strengthen your agent's identity and improve deliverability with your own domain.
|
|
5866
6139
|
slug: custom-domains
|
|
5867
|
-
description:
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
6140
|
+
description: A step-by-step guide to configuring your custom domain with AgentMail for enhanced branding and trust.
|
|
6141
|
+
---------------------
|
|
6142
|
+
|
|
6143
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
5871
6144
|
|
|
5872
6145
|
## Why Use a Custom Domain?
|
|
5873
6146
|
|
|
@@ -6266,18 +6539,15 @@ DNS can be tricky. Here are some common issues and how to resolve them.
|
|
|
6266
6539
|
|
|
6267
6540
|
Check out our guide on [Email Deliverability](/email-deliverability) for tips on warming up your new domain and maintaining a healthy sender reputation.
|
|
6268
6541
|
|
|
6269
|
-
|
|
6270
6542
|
***
|
|
6271
6543
|
|
|
6272
6544
|
title: Managing Your Domains
|
|
6273
|
-
subtitle:
|
|
6274
|
-
Best practices for monitoring, scaling, and optimizing your domain strategy
|
|
6275
|
-
for agent fleets.
|
|
6545
|
+
subtitle: Best practices for monitoring, scaling, and optimizing your domain strategy for agent fleets.
|
|
6276
6546
|
slug: managing-domains
|
|
6277
|
-
description:
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6547
|
+
description: Learn how to manage your custom domains effectively using AgentMail's API for enhanced deliverability and reputation management.
|
|
6548
|
+
---------------------
|
|
6549
|
+
|
|
6550
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
6281
6551
|
|
|
6282
6552
|
## From Setup to Strategy
|
|
6283
6553
|
|
|
@@ -6345,16 +6615,15 @@ By default, AgentMail configures your domain with a strict DMARC policy (`p=reje
|
|
|
6345
6615
|
|
|
6346
6616
|
However, this is obviously up to your discretion if you want to impose a more relaxed DMARC policy, whether its `p=none` where it doesn't do anything if both SPF and DMARC fail, or its `p=quarantine`, where it puts the mail in spam/junk. Feel free to do more research at your own discretion. You can do this by changing the value in the TXT record in your DNS configuration where the name starts with `_dmarc`.
|
|
6347
6617
|
|
|
6348
|
-
|
|
6349
6618
|
***
|
|
6350
6619
|
|
|
6351
6620
|
title: Webhooks Overview
|
|
6352
6621
|
subtitle: Get real-time notifications for email events.
|
|
6353
|
-
slug: overview
|
|
6354
|
-
description:
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6622
|
+
slug: webhooks-overview
|
|
6623
|
+
description: Learn how to use Webhooks to build responsive, event-driven email agents with AgentMail.
|
|
6624
|
+
---------------------
|
|
6625
|
+
|
|
6626
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
6358
6627
|
|
|
6359
6628
|
Webhooks are the best way to get real-time information about what's happening with your emails. Instead of constantly asking the AgentMail API if there's a new email (a process called polling), you can register a URL, and we will send you a `POST` request with the details as soon as an event happens.
|
|
6360
6629
|
|
|
@@ -6365,13 +6634,19 @@ This event-driven approach is more efficient and allows you to build fast, respo
|
|
|
6365
6634
|
* **Real-Time Speed:** Build conversational agents that can reply to incoming emails in seconds.
|
|
6366
6635
|
* **Efficiency:** Eliminates the need for constant polling, which saves you computational resources and simplifies your application logic.
|
|
6367
6636
|
|
|
6637
|
+
<Callout intent="info" title="Prefer a simpler setup?">
|
|
6638
|
+
If you don't want to expose a public URL or set up ngrok, [WebSockets](/websockets) let you receive the same events over a persistent connection with no external tooling required.
|
|
6639
|
+
</Callout>
|
|
6640
|
+
|
|
6368
6641
|
## Available Events
|
|
6369
6642
|
|
|
6370
|
-
AgentMail supports
|
|
6643
|
+
AgentMail supports nine webhook event types. When creating a webhook, you can subscribe to specific events or receive all of them. See [Webhook Events](/events) for full payload details.
|
|
6371
6644
|
|
|
6372
6645
|
**Message events:**
|
|
6373
6646
|
|
|
6374
6647
|
* **`message.received`** — New email received and processed in one of your inboxes
|
|
6648
|
+
* **`message.received.spam`** — A message was received and classified as spam (requires `label_spam_read` permission)
|
|
6649
|
+
* **`message.received.blocked`** — A message was received and matched a block list entry (requires `label_blocked_read` permission)
|
|
6375
6650
|
* **`message.sent`** — Message successfully sent from your inbox
|
|
6376
6651
|
* **`message.delivered`** — Delivery confirmed by the recipient's mail server
|
|
6377
6652
|
* **`message.bounced`** — Message failed to deliver and bounced back
|
|
@@ -6382,6 +6657,10 @@ AgentMail supports seven webhook event types. When creating a webhook, you can s
|
|
|
6382
6657
|
|
|
6383
6658
|
* **`domain.verified`** — Custom domain successfully verified
|
|
6384
6659
|
|
|
6660
|
+
<Callout intent="info">
|
|
6661
|
+
Spam and blocked events are excluded by default. To receive them, explicitly include `message.received.spam` or `message.received.blocked` in the `event_types` list when creating a webhook. Messages with these labels are no longer sent as `message.received`.
|
|
6662
|
+
</Callout>
|
|
6663
|
+
|
|
6385
6664
|
## The Webhook Workflow
|
|
6386
6665
|
|
|
6387
6666
|
The process is straightforward:
|
|
@@ -6418,7 +6697,7 @@ The process is straightforward:
|
|
|
6418
6697
|
```
|
|
6419
6698
|
</CodeBlocks>
|
|
6420
6699
|
|
|
6421
|
-
Specify which events to receive; omit `event_types` to subscribe to all event types.
|
|
6700
|
+
Specify which events to receive; omit `event_types` to subscribe to all standard event types. Spam and blocked events must always be explicitly included.
|
|
6422
6701
|
</Step>
|
|
6423
6702
|
|
|
6424
6703
|
<Step title="3. AgentMail Sends Events">
|
|
@@ -6459,7 +6738,7 @@ Omitted content is always available through the API. After receiving a webhook,
|
|
|
6459
6738
|
|
|
6460
6739
|
```bash title="CLI"
|
|
6461
6740
|
# fetch the full message after receiving a webhook
|
|
6462
|
-
agentmail inboxes:messages
|
|
6741
|
+
agentmail inboxes:messages get \
|
|
6463
6742
|
--inbox-id <inbox_id> \
|
|
6464
6743
|
--message-id <message_id>
|
|
6465
6744
|
```
|
|
@@ -6539,8 +6818,9 @@ Copy one of the blocks below into Cursor or Claude for complete Webhooks API kno
|
|
|
6539
6818
|
- webhooks.update(webhook_id, add_inbox_ids?, remove_inbox_ids?, add_pod_ids?, remove_pod_ids?)
|
|
6540
6819
|
- webhooks.delete(webhook_id)
|
|
6541
6820
|
|
|
6542
|
-
Events: message.received, message.sent, message.delivered, message.bounced, message.complained, message.rejected, domain.verified
|
|
6821
|
+
Events: message.received, message.received.spam, message.received.blocked, message.sent, message.delivered, message.bounced, message.complained, message.rejected, domain.verified
|
|
6543
6822
|
Payload: event_type, event_id, plus message/send/delivery/bounce/complaint/reject/domain. Verify with Svix (webhook.secret).
|
|
6823
|
+
Note: message.received.spam and message.received.blocked are excluded by default. To receive them, explicitly include them in event_types and ensure the API key has label_spam_read / label_blocked_read permissions.
|
|
6544
6824
|
"""
|
|
6545
6825
|
import os
|
|
6546
6826
|
from dotenv import load_dotenv
|
|
@@ -6567,7 +6847,8 @@ Copy one of the blocks below into Cursor or Claude for complete Webhooks API kno
|
|
|
6567
6847
|
* - webhooks.update(webhookId, { addInboxIds?, removeInboxIds?, addPodIds?, removePodIds? })
|
|
6568
6848
|
* - webhooks.delete(webhookId)
|
|
6569
6849
|
*
|
|
6570
|
-
* Events: message.received, message.sent, message.delivered, message.bounced, message.complained, message.rejected, domain.verified
|
|
6850
|
+
* Events: message.received, message.received.spam, message.received.blocked, message.sent, message.delivered, message.bounced, message.complained, message.rejected, domain.verified
|
|
6851
|
+
* Note: message.received.spam and message.received.blocked are excluded by default. To receive them, explicitly include them in eventTypes and ensure the API key has label_spam_read / label_blocked_read permissions.
|
|
6571
6852
|
* Verify with Svix using webhook.secret. Use express.raw() for body—signature needs raw payload.
|
|
6572
6853
|
*/
|
|
6573
6854
|
import { AgentMailClient } from "agentmail";
|
|
@@ -6599,18 +6880,23 @@ Copy one of the blocks below into Cursor or Claude for complete Webhooks API kno
|
|
|
6599
6880
|
Learn how to verify webhook signatures to secure your endpoints.
|
|
6600
6881
|
</Card>
|
|
6601
6882
|
|
|
6883
|
+
<Card title="WebSockets" href="/websockets">
|
|
6884
|
+
Receive events over a persistent connection with no public URL required.
|
|
6885
|
+
</Card>
|
|
6886
|
+
|
|
6602
6887
|
<Card title="Example: Event-Driven Agent" href="/github-star-agent">
|
|
6603
6888
|
Build a fully deployable, event-driven agent that can respond to emails in
|
|
6604
6889
|
real time.
|
|
6605
6890
|
</Card>
|
|
6606
6891
|
</CardGroup>
|
|
6607
6892
|
|
|
6608
|
-
|
|
6609
6893
|
***
|
|
6610
6894
|
|
|
6611
6895
|
title: Webhook Events
|
|
6612
6896
|
slug: events
|
|
6613
|
-
|
|
6897
|
+
---------------------
|
|
6898
|
+
|
|
6899
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
6614
6900
|
|
|
6615
6901
|
As mentioned in the overview, webhooks allow us to create event-driven applications.
|
|
6616
6902
|
|
|
@@ -6658,6 +6944,12 @@ The AgentMail SDKs export typed classes for each webhook event, so you can parse
|
|
|
6658
6944
|
} else if (eventType === "message.rejected") {
|
|
6659
6945
|
const event = await serialization.events.MessageRejectedEvent.parse(payload);
|
|
6660
6946
|
console.log(event.reject.reason);
|
|
6947
|
+
} else if (eventType === "message.received.spam") {
|
|
6948
|
+
const event = await serialization.events.MessageReceivedSpamEvent.parse(payload);
|
|
6949
|
+
console.log(event.message.subject);
|
|
6950
|
+
} else if (eventType === "message.received.blocked") {
|
|
6951
|
+
const event = await serialization.events.MessageReceivedBlockedEvent.parse(payload);
|
|
6952
|
+
console.log(event.message.subject);
|
|
6661
6953
|
} else if (eventType === "domain.verified") {
|
|
6662
6954
|
const event = await serialization.events.DomainVerifiedEvent.parse(payload);
|
|
6663
6955
|
console.log(event.domain.status);
|
|
@@ -6668,6 +6960,8 @@ The AgentMail SDKs export typed classes for each webhook event, so you can parse
|
|
|
6668
6960
|
```python title="Python"
|
|
6669
6961
|
from agentmail import (
|
|
6670
6962
|
MessageReceivedEvent,
|
|
6963
|
+
MessageReceivedSpamEvent,
|
|
6964
|
+
MessageReceivedBlockedEvent,
|
|
6671
6965
|
MessageSentEvent,
|
|
6672
6966
|
MessageBouncedEvent,
|
|
6673
6967
|
MessageDeliveredEvent,
|
|
@@ -6699,6 +6993,12 @@ The AgentMail SDKs export typed classes for each webhook event, so you can parse
|
|
|
6699
6993
|
elif event_type == "message.rejected":
|
|
6700
6994
|
event = MessageRejectedEvent(**payload)
|
|
6701
6995
|
print(event.reject.reason)
|
|
6996
|
+
elif event_type == "message.received.spam":
|
|
6997
|
+
event = MessageReceivedSpamEvent(**payload)
|
|
6998
|
+
print(event.message.subject)
|
|
6999
|
+
elif event_type == "message.received.blocked":
|
|
7000
|
+
event = MessageReceivedBlockedEvent(**payload)
|
|
7001
|
+
print(event.message.subject)
|
|
6702
7002
|
elif event_type == "domain.verified":
|
|
6703
7003
|
event = DomainVerifiedEvent(**payload)
|
|
6704
7004
|
print(event.domain.status)
|
|
@@ -6714,12 +7014,15 @@ Copy one of the blocks below into Cursor or Claude for webhook event parsing in
|
|
|
6714
7014
|
"""
|
|
6715
7015
|
AgentMail Webhook Events — copy into Cursor/Claude.
|
|
6716
7016
|
|
|
6717
|
-
Parse typed events: MessageReceivedEvent (
|
|
6718
|
-
|
|
6719
|
-
|
|
7017
|
+
Parse typed events: MessageReceivedEvent (message.received), MessageReceivedSpamEvent (message.received.spam), MessageReceivedBlockedEvent (message.received.blocked),
|
|
7018
|
+
MessageSentEvent (send), MessageBouncedEvent (bounce), MessageDeliveredEvent (delivery), MessageComplainedEvent (complaint),
|
|
7019
|
+
MessageRejectedEvent (reject), DomainVerifiedEvent (domain).
|
|
7020
|
+
Only message.received* includes full message+thread; others have send/delivery/bounce/complaint/reject/domain.
|
|
7021
|
+
Note: message.received.spam and message.received.blocked require label_spam_read / label_blocked_read permissions.
|
|
6720
7022
|
"""
|
|
6721
7023
|
from agentmail import (
|
|
6722
|
-
MessageReceivedEvent,
|
|
7024
|
+
MessageReceivedEvent, MessageReceivedSpamEvent, MessageReceivedBlockedEvent,
|
|
7025
|
+
MessageSentEvent, MessageBouncedEvent,
|
|
6723
7026
|
MessageDeliveredEvent, MessageComplainedEvent, MessageRejectedEvent, DomainVerifiedEvent,
|
|
6724
7027
|
)
|
|
6725
7028
|
|
|
@@ -6731,6 +7034,8 @@ Copy one of the blocks below into Cursor or Claude for webhook event parsing in
|
|
|
6731
7034
|
elif t == "message.delivered": e = MessageDeliveredEvent(**payload)
|
|
6732
7035
|
elif t == "message.complained": e = MessageComplainedEvent(**payload)
|
|
6733
7036
|
elif t == "message.rejected": e = MessageRejectedEvent(**payload); print(e.reject.reason)
|
|
7037
|
+
elif t == "message.received.spam": e = MessageReceivedSpamEvent(**payload); print(e.message.subject)
|
|
7038
|
+
elif t == "message.received.blocked": e = MessageReceivedBlockedEvent(**payload); print(e.message.subject)
|
|
6734
7039
|
elif t == "domain.verified": e = DomainVerifiedEvent(**payload); print(e.domain.status)
|
|
6735
7040
|
```
|
|
6736
7041
|
|
|
@@ -6738,8 +7043,10 @@ Copy one of the blocks below into Cursor or Claude for webhook event parsing in
|
|
|
6738
7043
|
/**
|
|
6739
7044
|
* AgentMail Webhook Events — copy into Cursor/Claude.
|
|
6740
7045
|
*
|
|
6741
|
-
* Parse with serialization.events
|
|
6742
|
-
*
|
|
7046
|
+
* Parse with serialization.events.<EventType>.parse(payload).
|
|
7047
|
+
* message.received → MessageReceivedEvent, message.received.spam → MessageReceivedSpamEvent, message.received.blocked → MessageReceivedBlockedEvent.
|
|
7048
|
+
* Only message.received* has message+thread; others have send/delivery/bounce/complaint/reject/domain.
|
|
7049
|
+
* message.received.spam and message.received.blocked require label_spam_read / label_blocked_read permissions.
|
|
6743
7050
|
*/
|
|
6744
7051
|
import { serialization } from "agentmail";
|
|
6745
7052
|
|
|
@@ -6763,6 +7070,12 @@ Copy one of the blocks below into Cursor or Claude for webhook event parsing in
|
|
|
6763
7070
|
} else if (t === "message.rejected") {
|
|
6764
7071
|
const e = await serialization.events.MessageRejectedEvent.parse(payload);
|
|
6765
7072
|
console.log(e.reject);
|
|
7073
|
+
} else if (t === "message.received.spam") {
|
|
7074
|
+
const e = await serialization.events.MessageReceivedSpamEvent.parse(payload);
|
|
7075
|
+
console.log(e.message.subject);
|
|
7076
|
+
} else if (t === "message.received.blocked") {
|
|
7077
|
+
const e = await serialization.events.MessageReceivedBlockedEvent.parse(payload);
|
|
7078
|
+
console.log(e.message.subject);
|
|
6766
7079
|
} else if (t === "domain.verified") {
|
|
6767
7080
|
const e = await serialization.events.DomainVerifiedEvent.parse(payload);
|
|
6768
7081
|
console.log(e.domain);
|
|
@@ -6833,6 +7146,106 @@ Copy one of the blocks below into Cursor or Claude for webhook event parsing in
|
|
|
6833
7146
|
```
|
|
6834
7147
|
</CodeGroup>
|
|
6835
7148
|
|
|
7149
|
+
### `message.received.spam`
|
|
7150
|
+
|
|
7151
|
+
* **Description:** Triggered when a new email is received and classified as spam. The payload structure is the same as `message.received`. Messages classified as spam are not delivered as `message.received` events.
|
|
7152
|
+
* **Example use-case:** Route spam to a review queue or log spam patterns for analysis.
|
|
7153
|
+
|
|
7154
|
+
<Callout intent="warn">
|
|
7155
|
+
This event is only delivered if the API key used to create the webhook has the `label_spam_read` permission. Without this permission, the webhook creation will be rejected with a `403 Forbidden` error.
|
|
7156
|
+
</Callout>
|
|
7157
|
+
|
|
7158
|
+
<CodeGroup>
|
|
7159
|
+
```json
|
|
7160
|
+
{
|
|
7161
|
+
"type": "event",
|
|
7162
|
+
"event_type": "message.received.spam",
|
|
7163
|
+
"event_id": "evt_spam123",
|
|
7164
|
+
"message": {
|
|
7165
|
+
"inbox_id": "inbox_456def",
|
|
7166
|
+
"thread_id": "thd_789ghi",
|
|
7167
|
+
"message_id": "<spam123@example.com>",
|
|
7168
|
+
"labels": ["spam"],
|
|
7169
|
+
"timestamp": "2023-10-27T10:00:00Z",
|
|
7170
|
+
"from": "spammer@example.com",
|
|
7171
|
+
"to": ["agent@agentmail.to"],
|
|
7172
|
+
"subject": "Suspicious offer",
|
|
7173
|
+
"preview": "You've been selected...",
|
|
7174
|
+
"text": "Full spam message body.",
|
|
7175
|
+
"html": "<html>...</html>",
|
|
7176
|
+
"size": 1024,
|
|
7177
|
+
"updated_at": "2023-10-27T10:00:00Z",
|
|
7178
|
+
"created_at": "2023-10-27T10:00:00Z"
|
|
7179
|
+
},
|
|
7180
|
+
"thread": {
|
|
7181
|
+
"inbox_id": "inbox_456def",
|
|
7182
|
+
"thread_id": "thd_789ghi",
|
|
7183
|
+
"labels": ["spam"],
|
|
7184
|
+
"timestamp": "2023-10-27T10:00:00Z",
|
|
7185
|
+
"senders": ["spammer@example.com"],
|
|
7186
|
+
"recipients": ["agent@agentmail.to"],
|
|
7187
|
+
"subject": "Suspicious offer",
|
|
7188
|
+
"preview": "You've been selected...",
|
|
7189
|
+
"last_message_id": "<spam123@example.com>",
|
|
7190
|
+
"message_count": 1,
|
|
7191
|
+
"size": 1024,
|
|
7192
|
+
"updated_at": "2023-10-27T10:00:00Z",
|
|
7193
|
+
"created_at": "2023-10-27T10:00:00Z"
|
|
7194
|
+
}
|
|
7195
|
+
}
|
|
7196
|
+
```
|
|
7197
|
+
</CodeGroup>
|
|
7198
|
+
|
|
7199
|
+
### `message.received.blocked`
|
|
7200
|
+
|
|
7201
|
+
* **Description:** Triggered when a new email is received and matched a block list entry. The payload structure is the same as `message.received`. Messages that match a block list are not delivered as `message.received` events.
|
|
7202
|
+
* **Example use-case:** Audit blocked senders or maintain a log of blocked messages.
|
|
7203
|
+
|
|
7204
|
+
<Callout intent="warn">
|
|
7205
|
+
This event is only delivered if the API key used to create the webhook has the `label_blocked_read` permission. Without this permission, the webhook creation will be rejected with a `403 Forbidden` error.
|
|
7206
|
+
</Callout>
|
|
7207
|
+
|
|
7208
|
+
<CodeGroup>
|
|
7209
|
+
```json
|
|
7210
|
+
{
|
|
7211
|
+
"type": "event",
|
|
7212
|
+
"event_type": "message.received.blocked",
|
|
7213
|
+
"event_id": "evt_blocked456",
|
|
7214
|
+
"message": {
|
|
7215
|
+
"inbox_id": "inbox_456def",
|
|
7216
|
+
"thread_id": "thd_789ghi",
|
|
7217
|
+
"message_id": "<blocked456@example.com>",
|
|
7218
|
+
"labels": ["blocked"],
|
|
7219
|
+
"timestamp": "2023-10-27T10:00:00Z",
|
|
7220
|
+
"from": "blocked-sender@example.com",
|
|
7221
|
+
"to": ["agent@agentmail.to"],
|
|
7222
|
+
"subject": "Blocked message",
|
|
7223
|
+
"preview": "This message was blocked...",
|
|
7224
|
+
"text": "Full blocked message body.",
|
|
7225
|
+
"html": "<html>...</html>",
|
|
7226
|
+
"size": 512,
|
|
7227
|
+
"updated_at": "2023-10-27T10:00:00Z",
|
|
7228
|
+
"created_at": "2023-10-27T10:00:00Z"
|
|
7229
|
+
},
|
|
7230
|
+
"thread": {
|
|
7231
|
+
"inbox_id": "inbox_456def",
|
|
7232
|
+
"thread_id": "thd_789ghi",
|
|
7233
|
+
"labels": ["blocked"],
|
|
7234
|
+
"timestamp": "2023-10-27T10:00:00Z",
|
|
7235
|
+
"senders": ["blocked-sender@example.com"],
|
|
7236
|
+
"recipients": ["agent@agentmail.to"],
|
|
7237
|
+
"subject": "Blocked message",
|
|
7238
|
+
"preview": "This message was blocked...",
|
|
7239
|
+
"last_message_id": "<blocked456@example.com>",
|
|
7240
|
+
"message_count": 1,
|
|
7241
|
+
"size": 512,
|
|
7242
|
+
"updated_at": "2023-10-27T10:00:00Z",
|
|
7243
|
+
"created_at": "2023-10-27T10:00:00Z"
|
|
7244
|
+
}
|
|
7245
|
+
}
|
|
7246
|
+
```
|
|
7247
|
+
</CodeGroup>
|
|
7248
|
+
|
|
6836
7249
|
### `message.sent`
|
|
6837
7250
|
|
|
6838
7251
|
* **Description:** Triggered when a message is successfully sent from one of your `Inboxes`.
|
|
@@ -7020,18 +7433,21 @@ When creating a webhook, you can specify which events to subscribe to. This allo
|
|
|
7020
7433
|
|
|
7021
7434
|
For example, if you only need to trigger workflows on incoming messages, you can subscribe to just `message.received`. If you're building a delivery tracking system, you might subscribe to `message.sent`, `message.delivered`, and `message.bounced`.
|
|
7022
7435
|
|
|
7023
|
-
|
|
7436
|
+
<Callout intent="info">
|
|
7437
|
+
By default, spam and blocked events are **not** delivered. To receive them, you must explicitly include `message.received.spam` or `message.received.blocked` in the `event_types` list when creating your webhook. The API key must also have the corresponding `label_spam_read` or `label_blocked_read` permission.
|
|
7438
|
+
</Callout>
|
|
7024
7439
|
|
|
7440
|
+
If you have any specific webhook notifications you would like, please ping us in the `#feature-requests` channel in the [Discord](https://discord.gg/hTYatWYWBc)
|
|
7025
7441
|
|
|
7026
7442
|
***
|
|
7027
7443
|
|
|
7028
7444
|
title: Webhook Setup Guide
|
|
7029
7445
|
subtitle: Step-by-step guide to configure webhooks.
|
|
7030
7446
|
slug: webhook-setup
|
|
7031
|
-
description:
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7447
|
+
description: A comprehensive guide to setting up webhooks with ngrok and AgentMail, including account creation, inbox setup, and code examples.
|
|
7448
|
+
---------------------
|
|
7449
|
+
|
|
7450
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
7035
7451
|
|
|
7036
7452
|
This guide walks you through the complete process of setting up webhooks to receive real-time notifications from AgentMail. You'll learn how to create an ngrok account, set up an inbox, configure webhooks, and write a simple webhook receiver.
|
|
7037
7453
|
|
|
@@ -7044,6 +7460,10 @@ Before you start, make sure you have:
|
|
|
7044
7460
|
* `pip` package manager
|
|
7045
7461
|
* Basic familiarity with Python and terminal commands
|
|
7046
7462
|
|
|
7463
|
+
<Callout intent="info" title="Want something simpler?">
|
|
7464
|
+
Webhooks require a public URL and tools like ngrok. If you'd rather skip that setup, [WebSockets](/websockets) give you real-time events over a persistent connection with no external tooling. See the [WebSockets quickstart](/websockets/quickstart).
|
|
7465
|
+
</Callout>
|
|
7466
|
+
|
|
7047
7467
|
## Installation
|
|
7048
7468
|
|
|
7049
7469
|
First, install the required Python packages:
|
|
@@ -7326,7 +7746,7 @@ For production deployments:
|
|
|
7326
7746
|
Learn how to verify webhook signatures for secure endpoints.
|
|
7327
7747
|
</Card>
|
|
7328
7748
|
|
|
7329
|
-
<Card title="Webhooks Overview" href="/overview">
|
|
7749
|
+
<Card title="Webhooks Overview" href="/webhooks-overview">
|
|
7330
7750
|
Learn more about how webhooks work and their payload structure.
|
|
7331
7751
|
</Card>
|
|
7332
7752
|
|
|
@@ -7335,16 +7755,15 @@ For production deployments:
|
|
|
7335
7755
|
</Card>
|
|
7336
7756
|
</CardGroup>
|
|
7337
7757
|
|
|
7338
|
-
|
|
7339
7758
|
***
|
|
7340
7759
|
|
|
7341
7760
|
title: Verifying Webhooks
|
|
7342
7761
|
subtitle: Ensure webhook requests are authentically from AgentMail.
|
|
7343
7762
|
slug: webhook-verification
|
|
7344
|
-
description:
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7763
|
+
description: Learn how to verify webhook signatures to secure your webhook endpoints and prevent spoofed requests.
|
|
7764
|
+
---------------------
|
|
7765
|
+
|
|
7766
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
7348
7767
|
|
|
7349
7768
|
When building webhook receivers, it's critical to verify that incoming requests actually originate from AgentMail and haven't been tampered with. AgentMail uses [Svix](https://www.svix.com/) to deliver webhooks, which provides cryptographic signature verification.
|
|
7350
7769
|
|
|
@@ -7391,7 +7810,7 @@ Each webhook endpoint has a unique signing secret that you'll use to verify requ
|
|
|
7391
7810
|
|
|
7392
7811
|
```bash title="CLI"
|
|
7393
7812
|
# get webhook details including the signing secret
|
|
7394
|
-
agentmail webhooks
|
|
7813
|
+
agentmail webhooks get --webhook-id ep_xxx
|
|
7395
7814
|
```
|
|
7396
7815
|
</CodeBlocks>
|
|
7397
7816
|
|
|
@@ -7787,16 +8206,15 @@ For production, you'll need to deploy your webhook server to a hosting provider
|
|
|
7787
8206
|
</Card>
|
|
7788
8207
|
</CardGroup>
|
|
7789
8208
|
|
|
7790
|
-
|
|
7791
8209
|
***
|
|
7792
8210
|
|
|
7793
8211
|
title: WebSockets
|
|
7794
|
-
subtitle:
|
|
8212
|
+
subtitle: Real-time, low-latency email event streaming
|
|
7795
8213
|
slug: websockets
|
|
7796
|
-
description:
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
8214
|
+
description: Learn how to use WebSockets for instant email notifications without webhooks or polling.
|
|
8215
|
+
---------------------
|
|
8216
|
+
|
|
8217
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
7800
8218
|
|
|
7801
8219
|
WebSockets provide a persistent, bidirectional connection to AgentMail for receiving email events in real-time. Unlike webhooks, WebSockets don't require a public URL or external tools like ngrok.
|
|
7802
8220
|
|
|
@@ -8024,6 +8442,12 @@ Subscribe(
|
|
|
8024
8442
|
inbox_ids=["agent@agentmail.to"],
|
|
8025
8443
|
event_types=["message.received", "message.sent"]
|
|
8026
8444
|
)
|
|
8445
|
+
|
|
8446
|
+
# Subscribe to spam and blocked events (requires label_spam_read / label_blocked_read permissions)
|
|
8447
|
+
Subscribe(
|
|
8448
|
+
inbox_ids=["agent@agentmail.to"],
|
|
8449
|
+
event_types=["message.received", "message.received.spam", "message.received.blocked"]
|
|
8450
|
+
)
|
|
8027
8451
|
```
|
|
8028
8452
|
|
|
8029
8453
|
**TypeScript:**
|
|
@@ -8047,8 +8471,19 @@ socket.sendSubscribe({
|
|
|
8047
8471
|
inboxIds: ["agent@agentmail.to"],
|
|
8048
8472
|
eventTypes: ["message.received", "message.sent"],
|
|
8049
8473
|
});
|
|
8474
|
+
|
|
8475
|
+
// Subscribe to spam and blocked events (requires label_spam_read / label_blocked_read permissions)
|
|
8476
|
+
socket.sendSubscribe({
|
|
8477
|
+
type: "subscribe",
|
|
8478
|
+
inboxIds: ["agent@agentmail.to"],
|
|
8479
|
+
eventTypes: ["message.received", "message.received.spam", "message.received.blocked"],
|
|
8480
|
+
});
|
|
8050
8481
|
```
|
|
8051
8482
|
|
|
8483
|
+
<Callout intent="info">
|
|
8484
|
+
By default (when no `event_types` are specified), spam and blocked events are excluded from the subscription. To receive spam events, explicitly include `message.received.spam` in `event_types` and ensure the API key has the `label_spam_read` permission. The same applies to `message.received.blocked` with the `label_blocked_read` permission.
|
|
8485
|
+
</Callout>
|
|
8486
|
+
|
|
8052
8487
|
***
|
|
8053
8488
|
|
|
8054
8489
|
## Event Types
|
|
@@ -8061,14 +8496,16 @@ socket.sendSubscribe({
|
|
|
8061
8496
|
|
|
8062
8497
|
### Message Events
|
|
8063
8498
|
|
|
8064
|
-
| Event
|
|
8065
|
-
|
|
|
8066
|
-
| `message_received`
|
|
8067
|
-
| `
|
|
8068
|
-
| `
|
|
8069
|
-
| `
|
|
8070
|
-
| `
|
|
8071
|
-
| `
|
|
8499
|
+
| Event | Python | TypeScript | Description |
|
|
8500
|
+
| -------------------------- | ----------------------------- | --------------------------------------- | ------------------------------------------ |
|
|
8501
|
+
| `message_received` | `MessageReceivedEvent` | `AgentMail.MessageReceivedEvent` | New email received |
|
|
8502
|
+
| `message_received_spam` | `MessageReceivedSpamEvent` | `AgentMail.MessageReceivedSpamEvent` | Email received, classified as spam |
|
|
8503
|
+
| `message_received_blocked` | `MessageReceivedBlockedEvent` | `AgentMail.MessageReceivedBlockedEvent` | Email received, matched a block list entry |
|
|
8504
|
+
| `message_sent` | `MessageSentEvent` | `AgentMail.MessageSentEvent` | Email was sent |
|
|
8505
|
+
| `message_delivered` | `MessageDeliveredEvent` | `AgentMail.MessageDeliveredEvent` | Email was delivered |
|
|
8506
|
+
| `message_bounced` | `MessageBouncedEvent` | `AgentMail.MessageBouncedEvent` | Email bounced |
|
|
8507
|
+
| `message_complained` | `MessageComplainedEvent` | `AgentMail.MessageComplainedEvent` | Email marked as spam |
|
|
8508
|
+
| `message_rejected` | `MessageRejectedEvent` | `AgentMail.MessageRejectedEvent` | Email was rejected |
|
|
8072
8509
|
|
|
8073
8510
|
### Domain Events
|
|
8074
8511
|
|
|
@@ -8180,7 +8617,8 @@ Copy one of the blocks below into Cursor or Claude for WebSockets in one shot.
|
|
|
8180
8617
|
Sync: with client.websockets.connect() as socket: socket.send_subscribe(Subscribe(inbox_ids=[...])); for event in socket: ...
|
|
8181
8618
|
Async: async with client.websockets.connect() as socket: await socket.send_subscribe(...); async for event in socket: ...
|
|
8182
8619
|
Subscribe(inbox_ids=[...], pod_ids=[...], event_types=[...])
|
|
8183
|
-
Event types: Subscribed, MessageReceivedEvent, MessageSentEvent, MessageDeliveredEvent, MessageBouncedEvent, MessageComplainedEvent, MessageRejectedEvent, DomainVerifiedEvent
|
|
8620
|
+
Event types: Subscribed, MessageReceivedEvent, MessageReceivedSpamEvent, MessageReceivedBlockedEvent, MessageSentEvent, MessageDeliveredEvent, MessageBouncedEvent, MessageComplainedEvent, MessageRejectedEvent, DomainVerifiedEvent
|
|
8621
|
+
Spam/blocked events require explicit opt-in via event_types and label_spam_read / label_blocked_read permissions.
|
|
8184
8622
|
"""
|
|
8185
8623
|
from agentmail import AgentMail, Subscribe, Subscribed, MessageReceivedEvent
|
|
8186
8624
|
|
|
@@ -8219,13 +8657,14 @@ Copy one of the blocks below into Cursor or Claude for WebSockets in one shot.
|
|
|
8219
8657
|
|
|
8220
8658
|
***
|
|
8221
8659
|
|
|
8222
|
-
|
|
8223
8660
|
***
|
|
8224
8661
|
|
|
8225
8662
|
title: WebSockets Quickstart
|
|
8226
8663
|
subtitle: Get started with real-time email event streaming
|
|
8227
8664
|
slug: websockets/quickstart
|
|
8228
|
-
|
|
8665
|
+
---------------------
|
|
8666
|
+
|
|
8667
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
8229
8668
|
|
|
8230
8669
|
## Copy for Cursor / Claude
|
|
8231
8670
|
|
|
@@ -8313,16 +8752,15 @@ with client.websockets.connect() as socket:
|
|
|
8313
8752
|
print(f"Received message from: {msg.from_}")
|
|
8314
8753
|
```
|
|
8315
8754
|
|
|
8316
|
-
|
|
8317
8755
|
***
|
|
8318
8756
|
|
|
8319
8757
|
title: Email Deliverability
|
|
8320
|
-
subtitle:
|
|
8758
|
+
subtitle: Best practices for landing your emails in the inbox, not the spam folder.
|
|
8321
8759
|
slug: email-deliverability
|
|
8322
|
-
description:
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8760
|
+
description: Learn the strategies and best practices for maximizing your email deliverability with AgentMail.
|
|
8761
|
+
---------------------
|
|
8762
|
+
|
|
8763
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
8326
8764
|
|
|
8327
8765
|
## What is Email Deliverability?
|
|
8328
8766
|
|
|
@@ -8428,16 +8866,15 @@ The content of your email plays a huge role in whether it's seen as a valuable m
|
|
|
8428
8866
|
</Step>
|
|
8429
8867
|
</Steps>
|
|
8430
8868
|
|
|
8431
|
-
|
|
8432
8869
|
***
|
|
8433
8870
|
|
|
8434
8871
|
title: Idempotent Requests
|
|
8435
8872
|
subtitle: Learn how to use idempotency keys to build safe and reliable API integrations.
|
|
8436
8873
|
slug: idempotency
|
|
8437
|
-
description:
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8874
|
+
description: A guide to using the client_id parameter in AgentMail to prevent duplicate resources and safely retry API requests.
|
|
8875
|
+
---------------------
|
|
8876
|
+
|
|
8877
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
8441
8878
|
|
|
8442
8879
|
## What is Idempotency?
|
|
8443
8880
|
|
|
@@ -8483,18 +8920,15 @@ To use idempotency effectively, the `client_id` you generate must be unique and
|
|
|
8483
8920
|
|
|
8484
8921
|
A common and highly effective pattern is to generate a UUID (like a `UUID v4`) on your client side for a resource you are about to create, save that UUID in your own database, and then use it as the `client_id` in the API call. This gives you a reliable key to use for any retries.
|
|
8485
8922
|
|
|
8486
|
-
|
|
8487
8923
|
***
|
|
8488
8924
|
|
|
8489
|
-
title:
|
|
8490
|
-
subtitle:
|
|
8491
|
-
Build a proactive, event-driven GitHub agent that uses Webhooks to handle
|
|
8492
|
-
replies in real time.
|
|
8925
|
+
title: Example: Event-Driven Agent
|
|
8926
|
+
subtitle: Build a proactive, event-driven GitHub agent that uses Webhooks to handle replies in real time.
|
|
8493
8927
|
slug: webhook-agent
|
|
8494
|
-
description:
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
8928
|
+
description: A step-by-step guide to building a sophisticated agent that performs proactive outreach and uses webhooks for inbound message processing.
|
|
8929
|
+
---------------------
|
|
8930
|
+
|
|
8931
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
8498
8932
|
|
|
8499
8933
|
This tutorial walks you through building a sophisticated, dual-mode agent. It will:
|
|
8500
8934
|
|
|
@@ -8902,15 +9336,14 @@ You now have a fully event-driven agent that can both initiate conversations and
|
|
|
8902
9336
|
```
|
|
8903
9337
|
```
|
|
8904
9338
|
|
|
8905
|
-
|
|
8906
9339
|
***
|
|
8907
9340
|
|
|
8908
9341
|
title: Auto-Reply Email Agent
|
|
8909
|
-
description:
|
|
8910
|
-
Build a simple agent that automatically responds to incoming emails with
|
|
8911
|
-
personalized messages
|
|
9342
|
+
description: Build a simple agent that automatically responds to incoming emails with personalized messages
|
|
8912
9343
|
---------------------
|
|
8913
9344
|
|
|
9345
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
9346
|
+
|
|
8914
9347
|
## Overview
|
|
8915
9348
|
|
|
8916
9349
|
Learn how to build an email auto-reply agent that automatically responds to incoming emails. This beginner-friendly example demonstrates the core concepts of building with AgentMail: receiving webhooks, processing email events, and sending automated replies.
|
|
@@ -9774,14 +10207,13 @@ Your agent now has conversation memory. When replying to follow-up emails, the A
|
|
|
9774
10207
|
|
|
9775
10208
|
If you build something cool with AgentMail, we'd love to hear about it. Share in our [Discord community](https://discord.gg/hTYatWYWBc)!
|
|
9776
10209
|
|
|
9777
|
-
|
|
9778
10210
|
***
|
|
9779
10211
|
|
|
9780
10212
|
title: Smart Email Labeling Agent
|
|
9781
|
-
description:
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
10213
|
+
description: Build an AI-powered agent that automatically classifies and labels incoming emails across multiple dimensions
|
|
10214
|
+
---------------------
|
|
10215
|
+
|
|
10216
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
9785
10217
|
|
|
9786
10218
|
## Overview
|
|
9787
10219
|
|
|
@@ -10490,15 +10922,14 @@ Use this data to identify bottlenecks, improve processes, and make data-driven d
|
|
|
10490
10922
|
|
|
10491
10923
|
Congratulations! You've built an AI-powered email classification system. This agent showcases how AgentMail's labeling feature can power sophisticated inbox automation and analytics.
|
|
10492
10924
|
|
|
10493
|
-
|
|
10494
10925
|
***
|
|
10495
10926
|
|
|
10496
10927
|
title: Sales Agent with WebSocket
|
|
10497
10928
|
slug: sales-agent-websocket
|
|
10498
|
-
description:
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10929
|
+
description: A step-by-step guide to building an AI-powered sales agent that uses WebSocket for real-time email processing without polling or webhooks.
|
|
10930
|
+
---------------------
|
|
10931
|
+
|
|
10932
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
10502
10933
|
|
|
10503
10934
|
## Overview
|
|
10504
10935
|
|
|
@@ -11216,6 +11647,7 @@ await socket.send_subscribe(Subscribe(inbox_ids=[
|
|
|
11216
11647
|
|
|
11217
11648
|
If you build something cool with AgentMail, we'd love to hear about it. Share in our [Discord community](https://discord.gg/hTYatWYWBc)!
|
|
11218
11649
|
|
|
11650
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
11219
11651
|
|
|
11220
11652
|
# Live Email Agents
|
|
11221
11653
|
|
|
@@ -11258,15 +11690,14 @@ Ready to build your own intelligent email agent? Check out our [quickstart guide
|
|
|
11258
11690
|
demo.
|
|
11259
11691
|
</Note>
|
|
11260
11692
|
|
|
11261
|
-
|
|
11262
11693
|
***
|
|
11263
11694
|
|
|
11264
11695
|
title: Frequently Asked Questions (FAQ)
|
|
11265
11696
|
slug: faq
|
|
11266
|
-
description:
|
|
11267
|
-
|
|
11268
|
-
|
|
11269
|
-
|
|
11697
|
+
description: Find answers to common questions about AgentMail, from core concepts to best practices and security.
|
|
11698
|
+
---------------------
|
|
11699
|
+
|
|
11700
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
11270
11701
|
|
|
11271
11702
|
<AccordionGroup>
|
|
11272
11703
|
<Accordion title="What is AgentMail?">
|
|
@@ -11298,7 +11729,7 @@ practices and security.
|
|
|
11298
11729
|
For production applications, **Webhooks are the recommended method**. They
|
|
11299
11730
|
provide real-time notifications and are far more efficient than constantly
|
|
11300
11731
|
polling the API for new messages. You can learn how to set them up in our
|
|
11301
|
-
[Webhooks Overview](/overview).
|
|
11732
|
+
[Webhooks Overview](/webhooks-overview).
|
|
11302
11733
|
</Accordion>
|
|
11303
11734
|
|
|
11304
11735
|
<Accordion title="How do I get just the new content from a reply?">
|
|
@@ -11318,16 +11749,15 @@ practices and security.
|
|
|
11318
11749
|
</Accordion>
|
|
11319
11750
|
</AccordionGroup>
|
|
11320
11751
|
|
|
11321
|
-
|
|
11322
11752
|
***
|
|
11323
11753
|
|
|
11324
11754
|
title: Email Reply Extraction with Talon
|
|
11325
11755
|
subtitle: Extract clean reply content from email threads using Talon library
|
|
11326
11756
|
slug: talon-reply-extraction
|
|
11327
|
-
description:
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
|
|
11757
|
+
description: Learn how to use Talon to extract new content from email replies, removing quoted text with 93.8% accuracy.
|
|
11758
|
+
---------------------
|
|
11759
|
+
|
|
11760
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
11331
11761
|
|
|
11332
11762
|
## Why Talon?
|
|
11333
11763
|
|
|
@@ -11857,15 +12287,14 @@ TalonJS provides 90.6% accuracy with slightly faster performance (1.88ms), makin
|
|
|
11857
12287
|
* The 3.2% accuracy difference is acceptable for most use cases
|
|
11858
12288
|
</Tip>
|
|
11859
12289
|
|
|
11860
|
-
|
|
11861
12290
|
***
|
|
11862
12291
|
|
|
11863
12292
|
title: Join the AgentMail Community
|
|
11864
12293
|
slug: community
|
|
11865
|
-
description:
|
|
11866
|
-
|
|
11867
|
-
|
|
11868
|
-
|
|
12294
|
+
description: Connect with the AgentMail team and developers, share what you're building, and get support.
|
|
12295
|
+
---------------------
|
|
12296
|
+
|
|
12297
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
11869
12298
|
|
|
11870
12299
|
<CardGroup>
|
|
11871
12300
|
<Card title="Join our Discord Server" href="https://discord.com/invite/hTYatWYWBc" icon="fa-brands fa-discord">
|
|
@@ -11890,13 +12319,14 @@ and get support.
|
|
|
11890
12319
|
To learn more about our premium plans and dedicated support options, please visit our website [here](https://agentmail.to/pricing).
|
|
11891
12320
|
</Callout>
|
|
11892
12321
|
|
|
11893
|
-
|
|
11894
12322
|
***
|
|
11895
12323
|
|
|
11896
12324
|
title: Support
|
|
11897
12325
|
slug: support
|
|
11898
12326
|
description: Get help with AgentMail through our support channels.
|
|
11899
|
-
|
|
12327
|
+
---------------------
|
|
12328
|
+
|
|
12329
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
11900
12330
|
|
|
11901
12331
|
## Need Help?
|
|
11902
12332
|
|
|
@@ -11908,13 +12338,14 @@ description: Get help with AgentMail through our support channels.
|
|
|
11908
12338
|
<Card title="Email Support" icon="fa-solid fa-envelope" href="mailto:support@agentmail.cc" />
|
|
11909
12339
|
</Cards>
|
|
11910
12340
|
|
|
11911
|
-
|
|
11912
12341
|
***
|
|
11913
12342
|
|
|
11914
|
-
title:
|
|
12343
|
+
title: Understanding Email Authentication (SPF, DKIM, DMARC)
|
|
11915
12344
|
slug: email-protocols
|
|
11916
|
-
description:
|
|
11917
|
-
|
|
12345
|
+
description: Learn why we ask for DNS records and what SPF, DKIM, and DMARC are.
|
|
12346
|
+
---------------------
|
|
12347
|
+
|
|
12348
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
11918
12349
|
|
|
11919
12350
|
When you add a custom domain to AgentMail, we ask you to add several records to your DNS settings. We understand that this can seem daunting, and we want to be completely transparent about what these records are and why they are necessary.
|
|
11920
12351
|
|
|
@@ -11987,14 +12418,15 @@ This is some records that we might give you:
|
|
|
11987
12418
|
|
|
11988
12419
|
We hope this provides a clear and transparent look into why these DNS records are required. By setting them up, you enable AgentMail to provide a secure and reliable email experience for your AI agents.
|
|
11989
12420
|
|
|
11990
|
-
|
|
11991
12421
|
***
|
|
11992
12422
|
|
|
11993
12423
|
title: SOC 2 Compliance
|
|
11994
12424
|
description: AgentMail's SOC 2 Type I and Type II compliance.
|
|
11995
|
-
|
|
11996
|
-
lastUpdated:
|
|
11997
|
-
|
|
12425
|
+
sidebar_position: 40
|
|
12426
|
+
lastUpdated: 2026-03-17
|
|
12427
|
+
---------------------
|
|
12428
|
+
|
|
12429
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
11998
12430
|
|
|
11999
12431
|
> AgentMail has achieved **SOC 2 Type I** (July 2025) and **Type II** (Q1 2026) compliance.
|
|
12000
12432
|
|
|
@@ -12122,13 +12554,14 @@ Organizations evaluating AgentMail can [request SOC 2 documentation](mailto:secu
|
|
|
12122
12554
|
|
|
12123
12555
|
***
|
|
12124
12556
|
|
|
12125
|
-
|
|
12126
12557
|
***
|
|
12127
12558
|
|
|
12128
12559
|
title: Spam & Virus Detection
|
|
12129
12560
|
slug: spam-virus-detection
|
|
12130
12561
|
description: How AgentMail automatically scans incoming emails for spam and viruses.
|
|
12131
|
-
|
|
12562
|
+
---------------------
|
|
12563
|
+
|
|
12564
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
12132
12565
|
|
|
12133
12566
|
AgentMail automatically scans every inbound message for spam and viruses before it reaches your inbox. This happens transparently — there is nothing you need to configure.
|
|
12134
12567
|
|
|
@@ -12179,14 +12612,15 @@ Each thread object includes a `spam` label indicating whether it was flagged as
|
|
|
12179
12612
|
}
|
|
12180
12613
|
```
|
|
12181
12614
|
|
|
12182
|
-
|
|
12183
12615
|
***
|
|
12184
12616
|
|
|
12185
12617
|
title: API Welcome
|
|
12186
12618
|
subtitle: Getting Started with AgentMail
|
|
12187
12619
|
slug: api-reference
|
|
12188
12620
|
description: Quick overview of the AgentMail SDK
|
|
12189
|
-
|
|
12621
|
+
---------------------
|
|
12622
|
+
|
|
12623
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
12190
12624
|
|
|
12191
12625
|
## Introduction
|
|
12192
12626
|
|
|
@@ -12224,6 +12658,7 @@ If you have any other languages you would like us to support, please [reach out
|
|
|
12224
12658
|
|
|
12225
12659
|
All of our SDKs are open source and available under the MIT license.
|
|
12226
12660
|
|
|
12661
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
12227
12662
|
|
|
12228
12663
|
# Sign Up
|
|
12229
12664
|
|
|
@@ -12511,6 +12946,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
12511
12946
|
dataTask.resume()
|
|
12512
12947
|
```
|
|
12513
12948
|
|
|
12949
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
12950
|
+
|
|
12514
12951
|
# Verify
|
|
12515
12952
|
|
|
12516
12953
|
POST https://api.agentmail.to/v0/agent/verify
|
|
@@ -12768,6 +13205,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
12768
13205
|
dataTask.resume()
|
|
12769
13206
|
```
|
|
12770
13207
|
|
|
13208
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
13209
|
+
|
|
12771
13210
|
# List Inboxes
|
|
12772
13211
|
|
|
12773
13212
|
GET https://api.agentmail.to/v0/inboxes
|
|
@@ -13050,13 +13489,15 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
13050
13489
|
dataTask.resume()
|
|
13051
13490
|
```
|
|
13052
13491
|
|
|
13492
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
13493
|
+
|
|
13053
13494
|
# Get Inbox
|
|
13054
13495
|
|
|
13055
13496
|
GET https://api.agentmail.to/v0/inboxes/{inbox_id}
|
|
13056
13497
|
|
|
13057
13498
|
**CLI:**
|
|
13058
13499
|
```bash
|
|
13059
|
-
agentmail inboxes
|
|
13500
|
+
agentmail inboxes get --inbox-id <inbox_id>
|
|
13060
13501
|
```
|
|
13061
13502
|
|
|
13062
13503
|
Reference: https://docs.agentmail.to/api-reference/inboxes/get
|
|
@@ -13076,7 +13517,7 @@ paths:
|
|
|
13076
13517
|
description: |-
|
|
13077
13518
|
**CLI:**
|
|
13078
13519
|
```bash
|
|
13079
|
-
agentmail inboxes
|
|
13520
|
+
agentmail inboxes get --inbox-id <inbox_id>
|
|
13080
13521
|
```
|
|
13081
13522
|
tags:
|
|
13082
13523
|
- subpackage_inboxes
|
|
@@ -13315,6 +13756,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
13315
13756
|
dataTask.resume()
|
|
13316
13757
|
```
|
|
13317
13758
|
|
|
13759
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
13760
|
+
|
|
13318
13761
|
# Create Inbox
|
|
13319
13762
|
|
|
13320
13763
|
POST https://api.agentmail.to/v0/inboxes
|
|
@@ -13603,6 +14046,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
13603
14046
|
dataTask.resume()
|
|
13604
14047
|
```
|
|
13605
14048
|
|
|
14049
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
14050
|
+
|
|
13606
14051
|
# Update Inbox
|
|
13607
14052
|
|
|
13608
14053
|
PATCH https://api.agentmail.to/v0/inboxes/{inbox_id}
|
|
@@ -13910,6 +14355,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
13910
14355
|
dataTask.resume()
|
|
13911
14356
|
```
|
|
13912
14357
|
|
|
14358
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
14359
|
+
|
|
13913
14360
|
# Delete Inbox
|
|
13914
14361
|
|
|
13915
14362
|
DELETE https://api.agentmail.to/v0/inboxes/{inbox_id}
|
|
@@ -14127,6 +14574,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
14127
14574
|
dataTask.resume()
|
|
14128
14575
|
```
|
|
14129
14576
|
|
|
14577
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
14578
|
+
|
|
14130
14579
|
# List Threads
|
|
14131
14580
|
|
|
14132
14581
|
GET https://api.agentmail.to/v0/inboxes/{inbox_id}/threads
|
|
@@ -14626,13 +15075,15 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
14626
15075
|
dataTask.resume()
|
|
14627
15076
|
```
|
|
14628
15077
|
|
|
15078
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
15079
|
+
|
|
14629
15080
|
# Get Thread
|
|
14630
15081
|
|
|
14631
15082
|
GET https://api.agentmail.to/v0/inboxes/{inbox_id}/threads/{thread_id}
|
|
14632
15083
|
|
|
14633
15084
|
**CLI:**
|
|
14634
15085
|
```bash
|
|
14635
|
-
agentmail inboxes:threads
|
|
15086
|
+
agentmail inboxes:threads get --inbox-id <inbox_id> --thread-id <thread_id>
|
|
14636
15087
|
```
|
|
14637
15088
|
|
|
14638
15089
|
Reference: https://docs.agentmail.to/api-reference/inboxes/threads/get
|
|
@@ -14654,7 +15105,7 @@ paths:
|
|
|
14654
15105
|
|
|
14655
15106
|
```bash
|
|
14656
15107
|
|
|
14657
|
-
agentmail inboxes:threads
|
|
15108
|
+
agentmail inboxes:threads get --inbox-id <inbox_id> --thread-id
|
|
14658
15109
|
<thread_id>
|
|
14659
15110
|
|
|
14660
15111
|
```
|
|
@@ -15199,6 +15650,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
15199
15650
|
dataTask.resume()
|
|
15200
15651
|
```
|
|
15201
15652
|
|
|
15653
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
15654
|
+
|
|
15202
15655
|
# Get Attachment
|
|
15203
15656
|
|
|
15204
15657
|
GET https://api.agentmail.to/v0/inboxes/{inbox_id}/threads/{thread_id}/attachments/{attachment_id}
|
|
@@ -15495,6 +15948,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
15495
15948
|
dataTask.resume()
|
|
15496
15949
|
```
|
|
15497
15950
|
|
|
15951
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
15952
|
+
|
|
15498
15953
|
# Update Thread
|
|
15499
15954
|
|
|
15500
15955
|
PATCH https://api.agentmail.to/v0/inboxes/{inbox_id}/threads/{thread_id}
|
|
@@ -15804,6 +16259,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
15804
16259
|
dataTask.resume()
|
|
15805
16260
|
```
|
|
15806
16261
|
|
|
16262
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
16263
|
+
|
|
15807
16264
|
# Delete Thread
|
|
15808
16265
|
|
|
15809
16266
|
DELETE https://api.agentmail.to/v0/inboxes/{inbox_id}/threads/{thread_id}
|
|
@@ -16048,6 +16505,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
16048
16505
|
dataTask.resume()
|
|
16049
16506
|
```
|
|
16050
16507
|
|
|
16508
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
16509
|
+
|
|
16051
16510
|
# List Messages
|
|
16052
16511
|
|
|
16053
16512
|
GET https://api.agentmail.to/v0/inboxes/{inbox_id}/messages
|
|
@@ -16566,13 +17025,15 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
16566
17025
|
dataTask.resume()
|
|
16567
17026
|
```
|
|
16568
17027
|
|
|
17028
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
17029
|
+
|
|
16569
17030
|
# Get Message
|
|
16570
17031
|
|
|
16571
17032
|
GET https://api.agentmail.to/v0/inboxes/{inbox_id}/messages/{message_id}
|
|
16572
17033
|
|
|
16573
17034
|
**CLI:**
|
|
16574
17035
|
```bash
|
|
16575
|
-
agentmail inboxes:messages
|
|
17036
|
+
agentmail inboxes:messages get --inbox-id <inbox_id> --message-id <message_id>
|
|
16576
17037
|
```
|
|
16577
17038
|
|
|
16578
17039
|
Reference: https://docs.agentmail.to/api-reference/inboxes/messages/get
|
|
@@ -16594,7 +17055,7 @@ paths:
|
|
|
16594
17055
|
|
|
16595
17056
|
```bash
|
|
16596
17057
|
|
|
16597
|
-
agentmail inboxes:messages
|
|
17058
|
+
agentmail inboxes:messages get --inbox-id <inbox_id> --message-id
|
|
16598
17059
|
<message_id>
|
|
16599
17060
|
|
|
16600
17061
|
```
|
|
@@ -17012,6 +17473,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
17012
17473
|
dataTask.resume()
|
|
17013
17474
|
```
|
|
17014
17475
|
|
|
17476
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
17477
|
+
|
|
17015
17478
|
# Get Attachment
|
|
17016
17479
|
|
|
17017
17480
|
GET https://api.agentmail.to/v0/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id}
|
|
@@ -17308,6 +17771,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
17308
17771
|
dataTask.resume()
|
|
17309
17772
|
```
|
|
17310
17773
|
|
|
17774
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
17775
|
+
|
|
17311
17776
|
# Get Raw Message
|
|
17312
17777
|
|
|
17313
17778
|
GET https://api.agentmail.to/v0/inboxes/{inbox_id}/messages/{message_id}/raw
|
|
@@ -17570,6 +18035,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
17570
18035
|
dataTask.resume()
|
|
17571
18036
|
```
|
|
17572
18037
|
|
|
18038
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
18039
|
+
|
|
17573
18040
|
# Update Message
|
|
17574
18041
|
|
|
17575
18042
|
PATCH https://api.agentmail.to/v0/inboxes/{inbox_id}/messages/{message_id}
|
|
@@ -17882,6 +18349,246 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
17882
18349
|
dataTask.resume()
|
|
17883
18350
|
```
|
|
17884
18351
|
|
|
18352
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
18353
|
+
|
|
18354
|
+
# Delete Message
|
|
18355
|
+
|
|
18356
|
+
DELETE https://api.agentmail.to/v0/inboxes/{inbox_id}/messages/{message_id}
|
|
18357
|
+
|
|
18358
|
+
Permanently deletes a message.
|
|
18359
|
+
|
|
18360
|
+
**CLI:**
|
|
18361
|
+
```bash
|
|
18362
|
+
agentmail inboxes:messages delete --inbox-id <inbox_id> --message-id <message_id>
|
|
18363
|
+
```
|
|
18364
|
+
|
|
18365
|
+
Reference: https://docs.agentmail.to/api-reference/inboxes/messages/delete
|
|
18366
|
+
|
|
18367
|
+
## OpenAPI Specification
|
|
18368
|
+
|
|
18369
|
+
```yaml
|
|
18370
|
+
openapi: 3.1.0
|
|
18371
|
+
info:
|
|
18372
|
+
title: api
|
|
18373
|
+
version: 1.0.0
|
|
18374
|
+
paths:
|
|
18375
|
+
/v0/inboxes/{inbox_id}/messages/{message_id}:
|
|
18376
|
+
delete:
|
|
18377
|
+
operationId: delete
|
|
18378
|
+
summary: Delete Message
|
|
18379
|
+
description: >-
|
|
18380
|
+
Permanently deletes a message.
|
|
18381
|
+
|
|
18382
|
+
|
|
18383
|
+
**CLI:**
|
|
18384
|
+
|
|
18385
|
+
```bash
|
|
18386
|
+
|
|
18387
|
+
agentmail inboxes:messages delete --inbox-id <inbox_id> --message-id
|
|
18388
|
+
<message_id>
|
|
18389
|
+
|
|
18390
|
+
```
|
|
18391
|
+
tags:
|
|
18392
|
+
- subpackage_inboxes.subpackage_inboxes/messages
|
|
18393
|
+
parameters:
|
|
18394
|
+
- name: inbox_id
|
|
18395
|
+
in: path
|
|
18396
|
+
required: true
|
|
18397
|
+
schema:
|
|
18398
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
18399
|
+
- name: message_id
|
|
18400
|
+
in: path
|
|
18401
|
+
required: true
|
|
18402
|
+
schema:
|
|
18403
|
+
$ref: '#/components/schemas/type_messages:MessageId'
|
|
18404
|
+
- name: Authorization
|
|
18405
|
+
in: header
|
|
18406
|
+
description: Bearer authentication
|
|
18407
|
+
required: true
|
|
18408
|
+
schema:
|
|
18409
|
+
type: string
|
|
18410
|
+
responses:
|
|
18411
|
+
'200':
|
|
18412
|
+
description: Successful response
|
|
18413
|
+
'404':
|
|
18414
|
+
description: Error response with status 404
|
|
18415
|
+
content:
|
|
18416
|
+
application/json:
|
|
18417
|
+
schema:
|
|
18418
|
+
$ref: '#/components/schemas/type_:ErrorResponse'
|
|
18419
|
+
servers:
|
|
18420
|
+
- url: https://api.agentmail.to
|
|
18421
|
+
- url: https://x402.api.agentmail.to
|
|
18422
|
+
- url: https://mpp.api.agentmail.to
|
|
18423
|
+
- url: https://api.agentmail.eu
|
|
18424
|
+
components:
|
|
18425
|
+
schemas:
|
|
18426
|
+
type_inboxes:InboxId:
|
|
18427
|
+
type: string
|
|
18428
|
+
description: The ID of the inbox.
|
|
18429
|
+
title: InboxId
|
|
18430
|
+
type_messages:MessageId:
|
|
18431
|
+
type: string
|
|
18432
|
+
description: ID of message.
|
|
18433
|
+
title: MessageId
|
|
18434
|
+
type_:ErrorName:
|
|
18435
|
+
type: string
|
|
18436
|
+
description: Name of error.
|
|
18437
|
+
title: ErrorName
|
|
18438
|
+
type_:ErrorMessage:
|
|
18439
|
+
type: string
|
|
18440
|
+
description: Error message.
|
|
18441
|
+
title: ErrorMessage
|
|
18442
|
+
type_:ErrorResponse:
|
|
18443
|
+
type: object
|
|
18444
|
+
properties:
|
|
18445
|
+
name:
|
|
18446
|
+
$ref: '#/components/schemas/type_:ErrorName'
|
|
18447
|
+
message:
|
|
18448
|
+
$ref: '#/components/schemas/type_:ErrorMessage'
|
|
18449
|
+
required:
|
|
18450
|
+
- name
|
|
18451
|
+
- message
|
|
18452
|
+
title: ErrorResponse
|
|
18453
|
+
securitySchemes:
|
|
18454
|
+
Bearer:
|
|
18455
|
+
type: http
|
|
18456
|
+
scheme: bearer
|
|
18457
|
+
|
|
18458
|
+
```
|
|
18459
|
+
|
|
18460
|
+
## SDK Code Examples
|
|
18461
|
+
|
|
18462
|
+
```typescript
|
|
18463
|
+
import { AgentMailClient } from "agentmail";
|
|
18464
|
+
|
|
18465
|
+
async function main() {
|
|
18466
|
+
const client = new AgentMailClient({
|
|
18467
|
+
apiKey: "YOUR_TOKEN_HERE",
|
|
18468
|
+
});
|
|
18469
|
+
await client.inboxes.messages.delete("inbox_id", "message_id");
|
|
18470
|
+
}
|
|
18471
|
+
main();
|
|
18472
|
+
|
|
18473
|
+
```
|
|
18474
|
+
|
|
18475
|
+
```python
|
|
18476
|
+
from agentmail import AgentMail
|
|
18477
|
+
|
|
18478
|
+
client = AgentMail(
|
|
18479
|
+
api_key="YOUR_TOKEN_HERE",
|
|
18480
|
+
)
|
|
18481
|
+
|
|
18482
|
+
client.inboxes.messages.delete(
|
|
18483
|
+
inbox_id="inbox_id",
|
|
18484
|
+
message_id="message_id",
|
|
18485
|
+
)
|
|
18486
|
+
|
|
18487
|
+
```
|
|
18488
|
+
|
|
18489
|
+
```go
|
|
18490
|
+
package main
|
|
18491
|
+
|
|
18492
|
+
import (
|
|
18493
|
+
"fmt"
|
|
18494
|
+
"net/http"
|
|
18495
|
+
"io"
|
|
18496
|
+
)
|
|
18497
|
+
|
|
18498
|
+
func main() {
|
|
18499
|
+
|
|
18500
|
+
url := "https://api.agentmail.to/v0/inboxes/inbox_id/messages/message_id"
|
|
18501
|
+
|
|
18502
|
+
req, _ := http.NewRequest("DELETE", url, nil)
|
|
18503
|
+
|
|
18504
|
+
req.Header.Add("Authorization", "Bearer <api_key>")
|
|
18505
|
+
|
|
18506
|
+
res, _ := http.DefaultClient.Do(req)
|
|
18507
|
+
|
|
18508
|
+
defer res.Body.Close()
|
|
18509
|
+
body, _ := io.ReadAll(res.Body)
|
|
18510
|
+
|
|
18511
|
+
fmt.Println(res)
|
|
18512
|
+
fmt.Println(string(body))
|
|
18513
|
+
|
|
18514
|
+
}
|
|
18515
|
+
```
|
|
18516
|
+
|
|
18517
|
+
```ruby
|
|
18518
|
+
require 'uri'
|
|
18519
|
+
require 'net/http'
|
|
18520
|
+
|
|
18521
|
+
url = URI("https://api.agentmail.to/v0/inboxes/inbox_id/messages/message_id")
|
|
18522
|
+
|
|
18523
|
+
http = Net::HTTP.new(url.host, url.port)
|
|
18524
|
+
http.use_ssl = true
|
|
18525
|
+
|
|
18526
|
+
request = Net::HTTP::Delete.new(url)
|
|
18527
|
+
request["Authorization"] = 'Bearer <api_key>'
|
|
18528
|
+
|
|
18529
|
+
response = http.request(request)
|
|
18530
|
+
puts response.read_body
|
|
18531
|
+
```
|
|
18532
|
+
|
|
18533
|
+
```java
|
|
18534
|
+
import com.mashape.unirest.http.HttpResponse;
|
|
18535
|
+
import com.mashape.unirest.http.Unirest;
|
|
18536
|
+
|
|
18537
|
+
HttpResponse<String> response = Unirest.delete("https://api.agentmail.to/v0/inboxes/inbox_id/messages/message_id")
|
|
18538
|
+
.header("Authorization", "Bearer <api_key>")
|
|
18539
|
+
.asString();
|
|
18540
|
+
```
|
|
18541
|
+
|
|
18542
|
+
```php
|
|
18543
|
+
<?php
|
|
18544
|
+
require_once('vendor/autoload.php');
|
|
18545
|
+
|
|
18546
|
+
$client = new \GuzzleHttp\Client();
|
|
18547
|
+
|
|
18548
|
+
$response = $client->request('DELETE', 'https://api.agentmail.to/v0/inboxes/inbox_id/messages/message_id', [
|
|
18549
|
+
'headers' => [
|
|
18550
|
+
'Authorization' => 'Bearer <api_key>',
|
|
18551
|
+
],
|
|
18552
|
+
]);
|
|
18553
|
+
|
|
18554
|
+
echo $response->getBody();
|
|
18555
|
+
```
|
|
18556
|
+
|
|
18557
|
+
```csharp
|
|
18558
|
+
using RestSharp;
|
|
18559
|
+
|
|
18560
|
+
var client = new RestClient("https://api.agentmail.to/v0/inboxes/inbox_id/messages/message_id");
|
|
18561
|
+
var request = new RestRequest(Method.DELETE);
|
|
18562
|
+
request.AddHeader("Authorization", "Bearer <api_key>");
|
|
18563
|
+
IRestResponse response = client.Execute(request);
|
|
18564
|
+
```
|
|
18565
|
+
|
|
18566
|
+
```swift
|
|
18567
|
+
import Foundation
|
|
18568
|
+
|
|
18569
|
+
let headers = ["Authorization": "Bearer <api_key>"]
|
|
18570
|
+
|
|
18571
|
+
let request = NSMutableURLRequest(url: NSURL(string: "https://api.agentmail.to/v0/inboxes/inbox_id/messages/message_id")! as URL,
|
|
18572
|
+
cachePolicy: .useProtocolCachePolicy,
|
|
18573
|
+
timeoutInterval: 10.0)
|
|
18574
|
+
request.httpMethod = "DELETE"
|
|
18575
|
+
request.allHTTPHeaderFields = headers
|
|
18576
|
+
|
|
18577
|
+
let session = URLSession.shared
|
|
18578
|
+
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
|
|
18579
|
+
if (error != nil) {
|
|
18580
|
+
print(error as Any)
|
|
18581
|
+
} else {
|
|
18582
|
+
let httpResponse = response as? HTTPURLResponse
|
|
18583
|
+
print(httpResponse)
|
|
18584
|
+
}
|
|
18585
|
+
})
|
|
18586
|
+
|
|
18587
|
+
dataTask.resume()
|
|
18588
|
+
```
|
|
18589
|
+
|
|
18590
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
18591
|
+
|
|
17885
18592
|
# Send Message
|
|
17886
18593
|
|
|
17887
18594
|
POST https://api.agentmail.to/v0/inboxes/{inbox_id}/messages/send
|
|
@@ -18288,6 +18995,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
18288
18995
|
dataTask.resume()
|
|
18289
18996
|
```
|
|
18290
18997
|
|
|
18998
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
18999
|
+
|
|
18291
19000
|
# Reply To Message
|
|
18292
19001
|
|
|
18293
19002
|
POST https://api.agentmail.to/v0/inboxes/{inbox_id}/messages/{message_id}/reply
|
|
@@ -18700,6 +19409,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
18700
19409
|
dataTask.resume()
|
|
18701
19410
|
```
|
|
18702
19411
|
|
|
19412
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
19413
|
+
|
|
18703
19414
|
# Reply All Message
|
|
18704
19415
|
|
|
18705
19416
|
POST https://api.agentmail.to/v0/inboxes/{inbox_id}/messages/{message_id}/reply-all
|
|
@@ -19088,6 +19799,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
19088
19799
|
dataTask.resume()
|
|
19089
19800
|
```
|
|
19090
19801
|
|
|
19802
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
19803
|
+
|
|
19091
19804
|
# Forward Message
|
|
19092
19805
|
|
|
19093
19806
|
POST https://api.agentmail.to/v0/inboxes/{inbox_id}/messages/{message_id}/forward
|
|
@@ -19500,6 +20213,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
19500
20213
|
dataTask.resume()
|
|
19501
20214
|
```
|
|
19502
20215
|
|
|
20216
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
20217
|
+
|
|
19503
20218
|
# List Drafts
|
|
19504
20219
|
|
|
19505
20220
|
GET https://api.agentmail.to/v0/inboxes/{inbox_id}/drafts
|
|
@@ -19952,13 +20667,15 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
19952
20667
|
dataTask.resume()
|
|
19953
20668
|
```
|
|
19954
20669
|
|
|
20670
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
20671
|
+
|
|
19955
20672
|
# Get Draft
|
|
19956
20673
|
|
|
19957
20674
|
GET https://api.agentmail.to/v0/inboxes/{inbox_id}/drafts/{draft_id}
|
|
19958
20675
|
|
|
19959
20676
|
**CLI:**
|
|
19960
20677
|
```bash
|
|
19961
|
-
agentmail inboxes:drafts
|
|
20678
|
+
agentmail inboxes:drafts get --inbox-id <inbox_id> --draft-id <draft_id>
|
|
19962
20679
|
```
|
|
19963
20680
|
|
|
19964
20681
|
Reference: https://docs.agentmail.to/api-reference/inboxes/drafts/get
|
|
@@ -19975,14 +20692,10 @@ paths:
|
|
|
19975
20692
|
get:
|
|
19976
20693
|
operationId: get
|
|
19977
20694
|
summary: Get Draft
|
|
19978
|
-
description:
|
|
20695
|
+
description: |-
|
|
19979
20696
|
**CLI:**
|
|
19980
|
-
|
|
19981
20697
|
```bash
|
|
19982
|
-
|
|
19983
|
-
agentmail inboxes:drafts retrieve --inbox-id <inbox_id> --draft-id
|
|
19984
|
-
<draft_id>
|
|
19985
|
-
|
|
20698
|
+
agentmail inboxes:drafts get --inbox-id <inbox_id> --draft-id <draft_id>
|
|
19986
20699
|
```
|
|
19987
20700
|
tags:
|
|
19988
20701
|
- subpackage_inboxes.subpackage_inboxes/drafts
|
|
@@ -20372,6 +21085,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
20372
21085
|
dataTask.resume()
|
|
20373
21086
|
```
|
|
20374
21087
|
|
|
21088
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
21089
|
+
|
|
20375
21090
|
# Get Attachment
|
|
20376
21091
|
|
|
20377
21092
|
GET https://api.agentmail.to/v0/inboxes/{inbox_id}/drafts/{draft_id}/attachments/{attachment_id}
|
|
@@ -20668,6 +21383,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
20668
21383
|
dataTask.resume()
|
|
20669
21384
|
```
|
|
20670
21385
|
|
|
21386
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
21387
|
+
|
|
20671
21388
|
# Create Draft
|
|
20672
21389
|
|
|
20673
21390
|
POST https://api.agentmail.to/v0/inboxes/{inbox_id}/drafts
|
|
@@ -21156,6 +21873,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
21156
21873
|
dataTask.resume()
|
|
21157
21874
|
```
|
|
21158
21875
|
|
|
21876
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
21877
|
+
|
|
21159
21878
|
# Update Draft
|
|
21160
21879
|
|
|
21161
21880
|
PATCH https://api.agentmail.to/v0/inboxes/{inbox_id}/drafts/{draft_id}
|
|
@@ -21621,6 +22340,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
21621
22340
|
dataTask.resume()
|
|
21622
22341
|
```
|
|
21623
22342
|
|
|
22343
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
22344
|
+
|
|
21624
22345
|
# Delete Draft
|
|
21625
22346
|
|
|
21626
22347
|
DELETE https://api.agentmail.to/v0/inboxes/{inbox_id}/drafts/{draft_id}
|
|
@@ -21852,6 +22573,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
21852
22573
|
dataTask.resume()
|
|
21853
22574
|
```
|
|
21854
22575
|
|
|
22576
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
22577
|
+
|
|
21855
22578
|
# Send Draft
|
|
21856
22579
|
|
|
21857
22580
|
POST https://api.agentmail.to/v0/inboxes/{inbox_id}/drafts/{draft_id}/send
|
|
@@ -22172,6 +22895,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
22172
22895
|
dataTask.resume()
|
|
22173
22896
|
```
|
|
22174
22897
|
|
|
22898
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
22899
|
+
|
|
22175
22900
|
# List Entries
|
|
22176
22901
|
|
|
22177
22902
|
GET https://api.agentmail.to/v0/inboxes/{inbox_id}/lists/{direction}/{type}
|
|
@@ -22486,13 +23211,15 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
22486
23211
|
dataTask.resume()
|
|
22487
23212
|
```
|
|
22488
23213
|
|
|
23214
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
23215
|
+
|
|
22489
23216
|
# Get List Entry
|
|
22490
23217
|
|
|
22491
23218
|
GET https://api.agentmail.to/v0/inboxes/{inbox_id}/lists/{direction}/{type}/{entry}
|
|
22492
23219
|
|
|
22493
23220
|
**CLI:**
|
|
22494
23221
|
```bash
|
|
22495
|
-
agentmail inboxes:lists
|
|
23222
|
+
agentmail inboxes:lists get --inbox-id <inbox_id> --direction <direction> --type <type> --entry <entry>
|
|
22496
23223
|
```
|
|
22497
23224
|
|
|
22498
23225
|
Reference: https://docs.agentmail.to/api-reference/inboxes/lists/get
|
|
@@ -22514,7 +23241,7 @@ paths:
|
|
|
22514
23241
|
|
|
22515
23242
|
```bash
|
|
22516
23243
|
|
|
22517
|
-
agentmail inboxes:lists
|
|
23244
|
+
agentmail inboxes:lists get --inbox-id <inbox_id> --direction
|
|
22518
23245
|
<direction> --type <type> --entry <entry>
|
|
22519
23246
|
|
|
22520
23247
|
```
|
|
@@ -22792,6 +23519,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
22792
23519
|
dataTask.resume()
|
|
22793
23520
|
```
|
|
22794
23521
|
|
|
23522
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
23523
|
+
|
|
22795
23524
|
# Create List Entry
|
|
22796
23525
|
|
|
22797
23526
|
POST https://api.agentmail.to/v0/inboxes/{inbox_id}/lists/{direction}/{type}
|
|
@@ -23129,6 +23858,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
23129
23858
|
dataTask.resume()
|
|
23130
23859
|
```
|
|
23131
23860
|
|
|
23861
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
23862
|
+
|
|
23132
23863
|
# Delete List Entry
|
|
23133
23864
|
|
|
23134
23865
|
DELETE https://api.agentmail.to/v0/inboxes/{inbox_id}/lists/{direction}/{type}/{entry}
|
|
@@ -23384,6 +24115,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
23384
24115
|
dataTask.resume()
|
|
23385
24116
|
```
|
|
23386
24117
|
|
|
24118
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
24119
|
+
|
|
23387
24120
|
# Query Metrics
|
|
23388
24121
|
|
|
23389
24122
|
GET https://api.agentmail.to/v0/inboxes/{inbox_id}/metrics
|
|
@@ -23693,6 +24426,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
23693
24426
|
dataTask.resume()
|
|
23694
24427
|
```
|
|
23695
24428
|
|
|
24429
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
24430
|
+
|
|
23696
24431
|
# List API Keys
|
|
23697
24432
|
|
|
23698
24433
|
GET https://api.agentmail.to/v0/inboxes/{inbox_id}/api-keys
|
|
@@ -24114,6 +24849,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
24114
24849
|
dataTask.resume()
|
|
24115
24850
|
```
|
|
24116
24851
|
|
|
24852
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
24853
|
+
|
|
24117
24854
|
# Create API Key
|
|
24118
24855
|
|
|
24119
24856
|
POST https://api.agentmail.to/v0/inboxes/{inbox_id}/api-keys
|
|
@@ -24315,8 +25052,6 @@ components:
|
|
|
24315
25052
|
$ref: '#/components/schemas/type_api-keys:Name'
|
|
24316
25053
|
permissions:
|
|
24317
25054
|
$ref: '#/components/schemas/type_api-keys:ApiKeyPermissions'
|
|
24318
|
-
required:
|
|
24319
|
-
- name
|
|
24320
25055
|
title: CreateApiKeyRequest
|
|
24321
25056
|
type_api-keys:ApiKeyId:
|
|
24322
25057
|
type: string
|
|
@@ -24406,9 +25141,7 @@ async function main() {
|
|
|
24406
25141
|
const client = new AgentMailClient({
|
|
24407
25142
|
apiKey: "YOUR_TOKEN_HERE",
|
|
24408
25143
|
});
|
|
24409
|
-
await client.inboxes.apiKeys.create("inbox_id", {
|
|
24410
|
-
name: "name",
|
|
24411
|
-
});
|
|
25144
|
+
await client.inboxes.apiKeys.create("inbox_id", {});
|
|
24412
25145
|
}
|
|
24413
25146
|
main();
|
|
24414
25147
|
|
|
@@ -24423,7 +25156,6 @@ client = AgentMail(
|
|
|
24423
25156
|
|
|
24424
25157
|
client.inboxes.api_keys.create(
|
|
24425
25158
|
inbox_id="inbox_id",
|
|
24426
|
-
name="name",
|
|
24427
25159
|
)
|
|
24428
25160
|
|
|
24429
25161
|
```
|
|
@@ -24442,7 +25174,7 @@ func main() {
|
|
|
24442
25174
|
|
|
24443
25175
|
url := "https://api.agentmail.to/v0/inboxes/inbox_id/api-keys"
|
|
24444
25176
|
|
|
24445
|
-
payload := strings.NewReader("{
|
|
25177
|
+
payload := strings.NewReader("{}")
|
|
24446
25178
|
|
|
24447
25179
|
req, _ := http.NewRequest("POST", url, payload)
|
|
24448
25180
|
|
|
@@ -24472,7 +25204,7 @@ http.use_ssl = true
|
|
|
24472
25204
|
request = Net::HTTP::Post.new(url)
|
|
24473
25205
|
request["Authorization"] = 'Bearer <api_key>'
|
|
24474
25206
|
request["Content-Type"] = 'application/json'
|
|
24475
|
-
request.body = "{
|
|
25207
|
+
request.body = "{}"
|
|
24476
25208
|
|
|
24477
25209
|
response = http.request(request)
|
|
24478
25210
|
puts response.read_body
|
|
@@ -24485,7 +25217,7 @@ import com.mashape.unirest.http.Unirest;
|
|
|
24485
25217
|
HttpResponse<String> response = Unirest.post("https://api.agentmail.to/v0/inboxes/inbox_id/api-keys")
|
|
24486
25218
|
.header("Authorization", "Bearer <api_key>")
|
|
24487
25219
|
.header("Content-Type", "application/json")
|
|
24488
|
-
.body("{
|
|
25220
|
+
.body("{}")
|
|
24489
25221
|
.asString();
|
|
24490
25222
|
```
|
|
24491
25223
|
|
|
@@ -24496,9 +25228,7 @@ require_once('vendor/autoload.php');
|
|
|
24496
25228
|
$client = new \GuzzleHttp\Client();
|
|
24497
25229
|
|
|
24498
25230
|
$response = $client->request('POST', 'https://api.agentmail.to/v0/inboxes/inbox_id/api-keys', [
|
|
24499
|
-
'body' => '{
|
|
24500
|
-
"name": "name"
|
|
24501
|
-
}',
|
|
25231
|
+
'body' => '{}',
|
|
24502
25232
|
'headers' => [
|
|
24503
25233
|
'Authorization' => 'Bearer <api_key>',
|
|
24504
25234
|
'Content-Type' => 'application/json',
|
|
@@ -24515,7 +25245,7 @@ var client = new RestClient("https://api.agentmail.to/v0/inboxes/inbox_id/api-ke
|
|
|
24515
25245
|
var request = new RestRequest(Method.POST);
|
|
24516
25246
|
request.AddHeader("Authorization", "Bearer <api_key>");
|
|
24517
25247
|
request.AddHeader("Content-Type", "application/json");
|
|
24518
|
-
request.AddParameter("application/json", "{
|
|
25248
|
+
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
|
|
24519
25249
|
IRestResponse response = client.Execute(request);
|
|
24520
25250
|
```
|
|
24521
25251
|
|
|
@@ -24526,7 +25256,7 @@ let headers = [
|
|
|
24526
25256
|
"Authorization": "Bearer <api_key>",
|
|
24527
25257
|
"Content-Type": "application/json"
|
|
24528
25258
|
]
|
|
24529
|
-
let parameters = [
|
|
25259
|
+
let parameters = [] as [String : Any]
|
|
24530
25260
|
|
|
24531
25261
|
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
|
|
24532
25262
|
|
|
@@ -24550,6 +25280,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
24550
25280
|
dataTask.resume()
|
|
24551
25281
|
```
|
|
24552
25282
|
|
|
25283
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
25284
|
+
|
|
24553
25285
|
# Delete API Key
|
|
24554
25286
|
|
|
24555
25287
|
DELETE https://api.agentmail.to/v0/inboxes/{inbox_id}/api-keys/{api_key_id}
|
|
@@ -24781,6 +25513,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
24781
25513
|
dataTask.resume()
|
|
24782
25514
|
```
|
|
24783
25515
|
|
|
25516
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
25517
|
+
|
|
24784
25518
|
# List Threads
|
|
24785
25519
|
|
|
24786
25520
|
GET https://api.agentmail.to/v0/threads
|
|
@@ -25273,13 +26007,15 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
25273
26007
|
dataTask.resume()
|
|
25274
26008
|
```
|
|
25275
26009
|
|
|
26010
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
26011
|
+
|
|
25276
26012
|
# Get Thread
|
|
25277
26013
|
|
|
25278
26014
|
GET https://api.agentmail.to/v0/threads/{thread_id}
|
|
25279
26015
|
|
|
25280
26016
|
**CLI:**
|
|
25281
26017
|
```bash
|
|
25282
|
-
agentmail threads
|
|
26018
|
+
agentmail threads get --thread-id <thread_id>
|
|
25283
26019
|
```
|
|
25284
26020
|
|
|
25285
26021
|
Reference: https://docs.agentmail.to/api-reference/threads/get
|
|
@@ -25299,7 +26035,7 @@ paths:
|
|
|
25299
26035
|
description: |-
|
|
25300
26036
|
**CLI:**
|
|
25301
26037
|
```bash
|
|
25302
|
-
agentmail threads
|
|
26038
|
+
agentmail threads get --thread-id <thread_id>
|
|
25303
26039
|
```
|
|
25304
26040
|
tags:
|
|
25305
26041
|
- subpackage_threads
|
|
@@ -25836,13 +26572,15 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
25836
26572
|
dataTask.resume()
|
|
25837
26573
|
```
|
|
25838
26574
|
|
|
26575
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
26576
|
+
|
|
25839
26577
|
# Get Attachment
|
|
25840
26578
|
|
|
25841
26579
|
GET https://api.agentmail.to/v0/threads/{thread_id}/attachments/{attachment_id}
|
|
25842
26580
|
|
|
25843
26581
|
**CLI:**
|
|
25844
26582
|
```bash
|
|
25845
|
-
agentmail threads
|
|
26583
|
+
agentmail threads get-attachment --thread-id <thread_id> --attachment-id <attachment_id>
|
|
25846
26584
|
```
|
|
25847
26585
|
|
|
25848
26586
|
Reference: https://docs.agentmail.to/api-reference/threads/get-attachment
|
|
@@ -25864,8 +26602,8 @@ paths:
|
|
|
25864
26602
|
|
|
25865
26603
|
```bash
|
|
25866
26604
|
|
|
25867
|
-
agentmail threads
|
|
25868
|
-
|
|
26605
|
+
agentmail threads get-attachment --thread-id <thread_id> --attachment-id
|
|
26606
|
+
<attachment_id>
|
|
25869
26607
|
|
|
25870
26608
|
```
|
|
25871
26609
|
tags:
|
|
@@ -26122,6 +26860,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
26122
26860
|
dataTask.resume()
|
|
26123
26861
|
```
|
|
26124
26862
|
|
|
26863
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
26864
|
+
|
|
26125
26865
|
# Update Thread
|
|
26126
26866
|
|
|
26127
26867
|
PATCH https://api.agentmail.to/v0/threads/{thread_id}
|
|
@@ -26421,6 +27161,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
26421
27161
|
dataTask.resume()
|
|
26422
27162
|
```
|
|
26423
27163
|
|
|
27164
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
27165
|
+
|
|
26424
27166
|
# Delete Thread
|
|
26425
27167
|
|
|
26426
27168
|
DELETE https://api.agentmail.to/v0/threads/{thread_id}
|
|
@@ -26654,6 +27396,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
26654
27396
|
dataTask.resume()
|
|
26655
27397
|
```
|
|
26656
27398
|
|
|
27399
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
27400
|
+
|
|
26657
27401
|
# List Drafts
|
|
26658
27402
|
|
|
26659
27403
|
GET https://api.agentmail.to/v0/drafts
|
|
@@ -27099,13 +27843,15 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
27099
27843
|
dataTask.resume()
|
|
27100
27844
|
```
|
|
27101
27845
|
|
|
27846
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
27847
|
+
|
|
27102
27848
|
# Get Draft
|
|
27103
27849
|
|
|
27104
27850
|
GET https://api.agentmail.to/v0/drafts/{draft_id}
|
|
27105
27851
|
|
|
27106
27852
|
**CLI:**
|
|
27107
27853
|
```bash
|
|
27108
|
-
agentmail drafts
|
|
27854
|
+
agentmail drafts get --draft-id <draft_id>
|
|
27109
27855
|
```
|
|
27110
27856
|
|
|
27111
27857
|
Reference: https://docs.agentmail.to/api-reference/drafts/get
|
|
@@ -27125,7 +27871,7 @@ paths:
|
|
|
27125
27871
|
description: |-
|
|
27126
27872
|
**CLI:**
|
|
27127
27873
|
```bash
|
|
27128
|
-
agentmail drafts
|
|
27874
|
+
agentmail drafts get --draft-id <draft_id>
|
|
27129
27875
|
```
|
|
27130
27876
|
tags:
|
|
27131
27877
|
- subpackage_drafts
|
|
@@ -27509,6 +28255,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
27509
28255
|
dataTask.resume()
|
|
27510
28256
|
```
|
|
27511
28257
|
|
|
28258
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
28259
|
+
|
|
27512
28260
|
# Get Attachment
|
|
27513
28261
|
|
|
27514
28262
|
GET https://api.agentmail.to/v0/drafts/{draft_id}/attachments/{attachment_id}
|
|
@@ -27795,6 +28543,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
27795
28543
|
dataTask.resume()
|
|
27796
28544
|
```
|
|
27797
28545
|
|
|
28546
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
28547
|
+
|
|
27798
28548
|
# List Webhooks
|
|
27799
28549
|
|
|
27800
28550
|
GET https://api.agentmail.to/v0/webhooks
|
|
@@ -27889,6 +28639,8 @@ components:
|
|
|
27889
28639
|
type: string
|
|
27890
28640
|
enum:
|
|
27891
28641
|
- message.received
|
|
28642
|
+
- message.received.spam
|
|
28643
|
+
- message.received.blocked
|
|
27892
28644
|
- message.sent
|
|
27893
28645
|
- message.delivered
|
|
27894
28646
|
- message.bounced
|
|
@@ -28107,13 +28859,15 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
28107
28859
|
dataTask.resume()
|
|
28108
28860
|
```
|
|
28109
28861
|
|
|
28862
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
28863
|
+
|
|
28110
28864
|
# Get Webhook
|
|
28111
28865
|
|
|
28112
28866
|
GET https://api.agentmail.to/v0/webhooks/{webhook_id}
|
|
28113
28867
|
|
|
28114
28868
|
**CLI:**
|
|
28115
28869
|
```bash
|
|
28116
|
-
agentmail webhooks
|
|
28870
|
+
agentmail webhooks get --webhook-id <webhook_id>
|
|
28117
28871
|
```
|
|
28118
28872
|
|
|
28119
28873
|
Reference: https://docs.agentmail.to/api-reference/webhooks/get
|
|
@@ -28133,7 +28887,7 @@ paths:
|
|
|
28133
28887
|
description: |-
|
|
28134
28888
|
**CLI:**
|
|
28135
28889
|
```bash
|
|
28136
|
-
agentmail webhooks
|
|
28890
|
+
agentmail webhooks get --webhook-id <webhook_id>
|
|
28137
28891
|
```
|
|
28138
28892
|
tags:
|
|
28139
28893
|
- subpackage_webhooks
|
|
@@ -28181,6 +28935,8 @@ components:
|
|
|
28181
28935
|
type: string
|
|
28182
28936
|
enum:
|
|
28183
28937
|
- message.received
|
|
28938
|
+
- message.received.spam
|
|
28939
|
+
- message.received.blocked
|
|
28184
28940
|
- message.sent
|
|
28185
28941
|
- message.delivered
|
|
28186
28942
|
- message.bounced
|
|
@@ -28402,6 +29158,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
28402
29158
|
dataTask.resume()
|
|
28403
29159
|
```
|
|
28404
29160
|
|
|
29161
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
29162
|
+
|
|
28405
29163
|
# Create Webhook
|
|
28406
29164
|
|
|
28407
29165
|
POST https://api.agentmail.to/v0/webhooks
|
|
@@ -28477,6 +29235,8 @@ components:
|
|
|
28477
29235
|
type: string
|
|
28478
29236
|
enum:
|
|
28479
29237
|
- message.received
|
|
29238
|
+
- message.received.spam
|
|
29239
|
+
- message.received.blocked
|
|
28480
29240
|
- message.sent
|
|
28481
29241
|
- message.delivered
|
|
28482
29242
|
- message.bounced
|
|
@@ -28753,6 +29513,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
28753
29513
|
dataTask.resume()
|
|
28754
29514
|
```
|
|
28755
29515
|
|
|
29516
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
29517
|
+
|
|
28756
29518
|
# Update Webhook
|
|
28757
29519
|
|
|
28758
29520
|
PATCH https://api.agentmail.to/v0/webhooks/{webhook_id}
|
|
@@ -28871,6 +29633,8 @@ components:
|
|
|
28871
29633
|
type: string
|
|
28872
29634
|
enum:
|
|
28873
29635
|
- message.received
|
|
29636
|
+
- message.received.spam
|
|
29637
|
+
- message.received.blocked
|
|
28874
29638
|
- message.sent
|
|
28875
29639
|
- message.delivered
|
|
28876
29640
|
- message.bounced
|
|
@@ -29110,6 +29874,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
29110
29874
|
dataTask.resume()
|
|
29111
29875
|
```
|
|
29112
29876
|
|
|
29877
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
29878
|
+
|
|
29113
29879
|
# Delete Webhook
|
|
29114
29880
|
|
|
29115
29881
|
DELETE https://api.agentmail.to/v0/webhooks/{webhook_id}
|
|
@@ -29327,6 +30093,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
29327
30093
|
dataTask.resume()
|
|
29328
30094
|
```
|
|
29329
30095
|
|
|
30096
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
30097
|
+
|
|
29330
30098
|
# Message Received
|
|
29331
30099
|
|
|
29332
30100
|
POST
|
|
@@ -29756,6 +30524,8 @@ components:
|
|
|
29756
30524
|
|
|
29757
30525
|
```
|
|
29758
30526
|
|
|
30527
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
30528
|
+
|
|
29759
30529
|
# Message Sent
|
|
29760
30530
|
|
|
29761
30531
|
POST
|
|
@@ -29882,6 +30652,8 @@ components:
|
|
|
29882
30652
|
|
|
29883
30653
|
```
|
|
29884
30654
|
|
|
30655
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
30656
|
+
|
|
29885
30657
|
# Message Delivered
|
|
29886
30658
|
|
|
29887
30659
|
POST
|
|
@@ -30008,6 +30780,8 @@ components:
|
|
|
30008
30780
|
|
|
30009
30781
|
```
|
|
30010
30782
|
|
|
30783
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
30784
|
+
|
|
30011
30785
|
# Message Bounced
|
|
30012
30786
|
|
|
30013
30787
|
POST
|
|
@@ -30155,6 +30929,8 @@ components:
|
|
|
30155
30929
|
|
|
30156
30930
|
```
|
|
30157
30931
|
|
|
30932
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
30933
|
+
|
|
30158
30934
|
# Message Complained
|
|
30159
30935
|
|
|
30160
30936
|
POST
|
|
@@ -30289,6 +31065,8 @@ components:
|
|
|
30289
31065
|
|
|
30290
31066
|
```
|
|
30291
31067
|
|
|
31068
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
31069
|
+
|
|
30292
31070
|
# Message Rejected
|
|
30293
31071
|
|
|
30294
31072
|
POST
|
|
@@ -30413,6 +31191,8 @@ components:
|
|
|
30413
31191
|
|
|
30414
31192
|
```
|
|
30415
31193
|
|
|
31194
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
31195
|
+
|
|
30416
31196
|
# Domain Verified
|
|
30417
31197
|
|
|
30418
31198
|
POST
|
|
@@ -30608,6 +31388,8 @@ components:
|
|
|
30608
31388
|
|
|
30609
31389
|
```
|
|
30610
31390
|
|
|
31391
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
31392
|
+
|
|
30611
31393
|
# Connect
|
|
30612
31394
|
|
|
30613
31395
|
GET /v0
|
|
@@ -30640,19 +31422,23 @@ channels:
|
|
|
30640
31422
|
- $ref: >-
|
|
30641
31423
|
#/components/messages/subpackage_websockets.websockets-server-1-message_received
|
|
30642
31424
|
- $ref: >-
|
|
30643
|
-
#/components/messages/subpackage_websockets.websockets-server-2-
|
|
31425
|
+
#/components/messages/subpackage_websockets.websockets-server-2-message_received_spam
|
|
31426
|
+
- $ref: >-
|
|
31427
|
+
#/components/messages/subpackage_websockets.websockets-server-3-message_received_blocked
|
|
30644
31428
|
- $ref: >-
|
|
30645
|
-
#/components/messages/subpackage_websockets.websockets-server-
|
|
31429
|
+
#/components/messages/subpackage_websockets.websockets-server-4-message_sent
|
|
30646
31430
|
- $ref: >-
|
|
30647
|
-
#/components/messages/subpackage_websockets.websockets-server-
|
|
31431
|
+
#/components/messages/subpackage_websockets.websockets-server-5-message_delivered
|
|
30648
31432
|
- $ref: >-
|
|
30649
|
-
#/components/messages/subpackage_websockets.websockets-server-
|
|
31433
|
+
#/components/messages/subpackage_websockets.websockets-server-6-message_bounced
|
|
30650
31434
|
- $ref: >-
|
|
30651
|
-
#/components/messages/subpackage_websockets.websockets-server-
|
|
31435
|
+
#/components/messages/subpackage_websockets.websockets-server-7-message_complained
|
|
30652
31436
|
- $ref: >-
|
|
30653
|
-
#/components/messages/subpackage_websockets.websockets-server-
|
|
31437
|
+
#/components/messages/subpackage_websockets.websockets-server-8-message_rejected
|
|
30654
31438
|
- $ref: >-
|
|
30655
|
-
#/components/messages/subpackage_websockets.websockets-server-
|
|
31439
|
+
#/components/messages/subpackage_websockets.websockets-server-9-domain_verified
|
|
31440
|
+
- $ref: >-
|
|
31441
|
+
#/components/messages/subpackage_websockets.websockets-server-10-error
|
|
30656
31442
|
subscribe:
|
|
30657
31443
|
operationId: websockets-subscribe
|
|
30658
31444
|
summary: Client message
|
|
@@ -30684,31 +31470,39 @@ components:
|
|
|
30684
31470
|
name: message_received
|
|
30685
31471
|
payload:
|
|
30686
31472
|
$ref: '#/components/schemas/type_events:MessageReceivedEvent'
|
|
30687
|
-
subpackage_websockets.websockets-server-2-
|
|
31473
|
+
subpackage_websockets.websockets-server-2-message_received_spam:
|
|
31474
|
+
name: message_received_spam
|
|
31475
|
+
payload:
|
|
31476
|
+
$ref: '#/components/schemas/type_events:MessageReceivedSpamEvent'
|
|
31477
|
+
subpackage_websockets.websockets-server-3-message_received_blocked:
|
|
31478
|
+
name: message_received_blocked
|
|
31479
|
+
payload:
|
|
31480
|
+
$ref: '#/components/schemas/type_events:MessageReceivedBlockedEvent'
|
|
31481
|
+
subpackage_websockets.websockets-server-4-message_sent:
|
|
30688
31482
|
name: message_sent
|
|
30689
31483
|
payload:
|
|
30690
31484
|
$ref: '#/components/schemas/type_events:MessageSentEvent'
|
|
30691
|
-
subpackage_websockets.websockets-server-
|
|
31485
|
+
subpackage_websockets.websockets-server-5-message_delivered:
|
|
30692
31486
|
name: message_delivered
|
|
30693
31487
|
payload:
|
|
30694
31488
|
$ref: '#/components/schemas/type_events:MessageDeliveredEvent'
|
|
30695
|
-
subpackage_websockets.websockets-server-
|
|
31489
|
+
subpackage_websockets.websockets-server-6-message_bounced:
|
|
30696
31490
|
name: message_bounced
|
|
30697
31491
|
payload:
|
|
30698
31492
|
$ref: '#/components/schemas/type_events:MessageBouncedEvent'
|
|
30699
|
-
subpackage_websockets.websockets-server-
|
|
31493
|
+
subpackage_websockets.websockets-server-7-message_complained:
|
|
30700
31494
|
name: message_complained
|
|
30701
31495
|
payload:
|
|
30702
31496
|
$ref: '#/components/schemas/type_events:MessageComplainedEvent'
|
|
30703
|
-
subpackage_websockets.websockets-server-
|
|
31497
|
+
subpackage_websockets.websockets-server-8-message_rejected:
|
|
30704
31498
|
name: message_rejected
|
|
30705
31499
|
payload:
|
|
30706
31500
|
$ref: '#/components/schemas/type_events:MessageRejectedEvent'
|
|
30707
|
-
subpackage_websockets.websockets-server-
|
|
31501
|
+
subpackage_websockets.websockets-server-9-domain_verified:
|
|
30708
31502
|
name: domain_verified
|
|
30709
31503
|
payload:
|
|
30710
31504
|
$ref: '#/components/schemas/type_events:DomainVerifiedEvent'
|
|
30711
|
-
subpackage_websockets.websockets-server-
|
|
31505
|
+
subpackage_websockets.websockets-server-10-error:
|
|
30712
31506
|
name: error
|
|
30713
31507
|
payload:
|
|
30714
31508
|
$ref: '#/components/schemas/type_websockets:Error'
|
|
@@ -30717,6 +31511,8 @@ components:
|
|
|
30717
31511
|
type: string
|
|
30718
31512
|
enum:
|
|
30719
31513
|
- message.received
|
|
31514
|
+
- message.received.spam
|
|
31515
|
+
- message.received.blocked
|
|
30720
31516
|
- message.sent
|
|
30721
31517
|
- message.delivered
|
|
30722
31518
|
- message.bounced
|
|
@@ -31126,6 +31922,60 @@ components:
|
|
|
31126
31922
|
- message
|
|
31127
31923
|
- thread
|
|
31128
31924
|
title: MessageReceivedEvent
|
|
31925
|
+
type_events:MessageReceivedSpamEvent:
|
|
31926
|
+
type: object
|
|
31927
|
+
properties:
|
|
31928
|
+
type:
|
|
31929
|
+
type: string
|
|
31930
|
+
enum:
|
|
31931
|
+
- event
|
|
31932
|
+
event_type:
|
|
31933
|
+
type: string
|
|
31934
|
+
enum:
|
|
31935
|
+
- message.received.spam
|
|
31936
|
+
event_id:
|
|
31937
|
+
$ref: '#/components/schemas/type_events:EventId'
|
|
31938
|
+
message:
|
|
31939
|
+
$ref: '#/components/schemas/type_messages:Message'
|
|
31940
|
+
thread:
|
|
31941
|
+
$ref: '#/components/schemas/type_threads:ThreadItem'
|
|
31942
|
+
required:
|
|
31943
|
+
- type
|
|
31944
|
+
- event_type
|
|
31945
|
+
- event_id
|
|
31946
|
+
- message
|
|
31947
|
+
- thread
|
|
31948
|
+
description: >-
|
|
31949
|
+
A message was received and classified as spam. Requires
|
|
31950
|
+
`label_spam_read` permission.
|
|
31951
|
+
title: MessageReceivedSpamEvent
|
|
31952
|
+
type_events:MessageReceivedBlockedEvent:
|
|
31953
|
+
type: object
|
|
31954
|
+
properties:
|
|
31955
|
+
type:
|
|
31956
|
+
type: string
|
|
31957
|
+
enum:
|
|
31958
|
+
- event
|
|
31959
|
+
event_type:
|
|
31960
|
+
type: string
|
|
31961
|
+
enum:
|
|
31962
|
+
- message.received.blocked
|
|
31963
|
+
event_id:
|
|
31964
|
+
$ref: '#/components/schemas/type_events:EventId'
|
|
31965
|
+
message:
|
|
31966
|
+
$ref: '#/components/schemas/type_messages:Message'
|
|
31967
|
+
thread:
|
|
31968
|
+
$ref: '#/components/schemas/type_threads:ThreadItem'
|
|
31969
|
+
required:
|
|
31970
|
+
- type
|
|
31971
|
+
- event_type
|
|
31972
|
+
- event_id
|
|
31973
|
+
- message
|
|
31974
|
+
- thread
|
|
31975
|
+
description: >-
|
|
31976
|
+
A message was received and matched a block list entry. Requires
|
|
31977
|
+
`label_blocked_read` permission.
|
|
31978
|
+
title: MessageReceivedBlockedEvent
|
|
31129
31979
|
type_events:Timestamp:
|
|
31130
31980
|
type: string
|
|
31131
31981
|
format: date-time
|
|
@@ -31551,6 +32401,8 @@ components:
|
|
|
31551
32401
|
|
|
31552
32402
|
```
|
|
31553
32403
|
|
|
32404
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
32405
|
+
|
|
31554
32406
|
# List Domains
|
|
31555
32407
|
|
|
31556
32408
|
GET https://api.agentmail.to/v0/domains
|
|
@@ -31833,13 +32685,15 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
31833
32685
|
dataTask.resume()
|
|
31834
32686
|
```
|
|
31835
32687
|
|
|
32688
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
32689
|
+
|
|
31836
32690
|
# Get Domain
|
|
31837
32691
|
|
|
31838
32692
|
GET https://api.agentmail.to/v0/domains/{domain_id}
|
|
31839
32693
|
|
|
31840
32694
|
**CLI:**
|
|
31841
32695
|
```bash
|
|
31842
|
-
agentmail domains
|
|
32696
|
+
agentmail domains get --domain-id <domain_id>
|
|
31843
32697
|
```
|
|
31844
32698
|
|
|
31845
32699
|
Reference: https://docs.agentmail.to/api-reference/domains/get
|
|
@@ -31859,7 +32713,7 @@ paths:
|
|
|
31859
32713
|
description: |-
|
|
31860
32714
|
**CLI:**
|
|
31861
32715
|
```bash
|
|
31862
|
-
agentmail domains
|
|
32716
|
+
agentmail domains get --domain-id <domain_id>
|
|
31863
32717
|
```
|
|
31864
32718
|
tags:
|
|
31865
32719
|
- subpackage_domains
|
|
@@ -32159,6 +33013,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
32159
33013
|
dataTask.resume()
|
|
32160
33014
|
```
|
|
32161
33015
|
|
|
33016
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
33017
|
+
|
|
32162
33018
|
# Get Zone File
|
|
32163
33019
|
|
|
32164
33020
|
GET https://api.agentmail.to/v0/domains/{domain_id}/zone-file
|
|
@@ -32381,6 +33237,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
32381
33237
|
dataTask.resume()
|
|
32382
33238
|
```
|
|
32383
33239
|
|
|
33240
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
33241
|
+
|
|
32384
33242
|
# Create Domain
|
|
32385
33243
|
|
|
32386
33244
|
POST https://api.agentmail.to/v0/domains
|
|
@@ -32744,6 +33602,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
32744
33602
|
dataTask.resume()
|
|
32745
33603
|
```
|
|
32746
33604
|
|
|
33605
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
33606
|
+
|
|
32747
33607
|
# Update Domain
|
|
32748
33608
|
|
|
32749
33609
|
PATCH https://api.agentmail.to/v0/domains/{domain_id}
|
|
@@ -33101,6 +33961,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
33101
33961
|
dataTask.resume()
|
|
33102
33962
|
```
|
|
33103
33963
|
|
|
33964
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
33965
|
+
|
|
33104
33966
|
# Delete Domain
|
|
33105
33967
|
|
|
33106
33968
|
DELETE https://api.agentmail.to/v0/domains/{domain_id}
|
|
@@ -33318,6 +34180,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
33318
34180
|
dataTask.resume()
|
|
33319
34181
|
```
|
|
33320
34182
|
|
|
34183
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
34184
|
+
|
|
33321
34185
|
# Verify Domain
|
|
33322
34186
|
|
|
33323
34187
|
POST https://api.agentmail.to/v0/domains/{domain_id}/verify
|
|
@@ -33535,6 +34399,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
33535
34399
|
dataTask.resume()
|
|
33536
34400
|
```
|
|
33537
34401
|
|
|
34402
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
34403
|
+
|
|
33538
34404
|
# List Entries
|
|
33539
34405
|
|
|
33540
34406
|
GET https://api.agentmail.to/v0/lists/{direction}/{type}
|
|
@@ -33828,13 +34694,15 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
33828
34694
|
dataTask.resume()
|
|
33829
34695
|
```
|
|
33830
34696
|
|
|
34697
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
34698
|
+
|
|
33831
34699
|
# Get List Entry
|
|
33832
34700
|
|
|
33833
34701
|
GET https://api.agentmail.to/v0/lists/{direction}/{type}/{entry}
|
|
33834
34702
|
|
|
33835
34703
|
**CLI:**
|
|
33836
34704
|
```bash
|
|
33837
|
-
agentmail lists
|
|
34705
|
+
agentmail lists get --direction <direction> --type <type> --entry <entry>
|
|
33838
34706
|
```
|
|
33839
34707
|
|
|
33840
34708
|
Reference: https://docs.agentmail.to/api-reference/lists/get
|
|
@@ -33856,7 +34724,7 @@ paths:
|
|
|
33856
34724
|
|
|
33857
34725
|
```bash
|
|
33858
34726
|
|
|
33859
|
-
agentmail lists
|
|
34727
|
+
agentmail lists get --direction <direction> --type <type> --entry
|
|
33860
34728
|
<entry>
|
|
33861
34729
|
|
|
33862
34730
|
```
|
|
@@ -34117,6 +34985,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
34117
34985
|
dataTask.resume()
|
|
34118
34986
|
```
|
|
34119
34987
|
|
|
34988
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
34989
|
+
|
|
34120
34990
|
# Create List Entry
|
|
34121
34991
|
|
|
34122
34992
|
POST https://api.agentmail.to/v0/lists/{direction}/{type}
|
|
@@ -34437,6 +35307,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
34437
35307
|
dataTask.resume()
|
|
34438
35308
|
```
|
|
34439
35309
|
|
|
35310
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
35311
|
+
|
|
34440
35312
|
# Delete List Entry
|
|
34441
35313
|
|
|
34442
35314
|
DELETE https://api.agentmail.to/v0/lists/{direction}/{type}/{entry}
|
|
@@ -34682,6 +35554,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
34682
35554
|
dataTask.resume()
|
|
34683
35555
|
```
|
|
34684
35556
|
|
|
35557
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
35558
|
+
|
|
34685
35559
|
# Query Metrics
|
|
34686
35560
|
|
|
34687
35561
|
GET https://api.agentmail.to/v0/metrics
|
|
@@ -34980,6 +35854,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
34980
35854
|
dataTask.resume()
|
|
34981
35855
|
```
|
|
34982
35856
|
|
|
35857
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
35858
|
+
|
|
34983
35859
|
# List API Keys
|
|
34984
35860
|
|
|
34985
35861
|
GET https://api.agentmail.to/v0/api-keys
|
|
@@ -35374,6 +36250,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
35374
36250
|
dataTask.resume()
|
|
35375
36251
|
```
|
|
35376
36252
|
|
|
36253
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
36254
|
+
|
|
35377
36255
|
# Create API Key
|
|
35378
36256
|
|
|
35379
36257
|
POST https://api.agentmail.to/v0/api-keys
|
|
@@ -35560,8 +36438,6 @@ components:
|
|
|
35560
36438
|
$ref: '#/components/schemas/type_api-keys:Name'
|
|
35561
36439
|
permissions:
|
|
35562
36440
|
$ref: '#/components/schemas/type_api-keys:ApiKeyPermissions'
|
|
35563
|
-
required:
|
|
35564
|
-
- name
|
|
35565
36441
|
title: CreateApiKeyRequest
|
|
35566
36442
|
type_api-keys:ApiKeyId:
|
|
35567
36443
|
type: string
|
|
@@ -35636,9 +36512,7 @@ async function main() {
|
|
|
35636
36512
|
const client = new AgentMailClient({
|
|
35637
36513
|
apiKey: "YOUR_TOKEN_HERE",
|
|
35638
36514
|
});
|
|
35639
|
-
await client.apiKeys.create({
|
|
35640
|
-
name: "name",
|
|
35641
|
-
});
|
|
36515
|
+
await client.apiKeys.create({});
|
|
35642
36516
|
}
|
|
35643
36517
|
main();
|
|
35644
36518
|
|
|
@@ -35651,9 +36525,7 @@ client = AgentMail(
|
|
|
35651
36525
|
api_key="YOUR_TOKEN_HERE",
|
|
35652
36526
|
)
|
|
35653
36527
|
|
|
35654
|
-
client.api_keys.create(
|
|
35655
|
-
name="name",
|
|
35656
|
-
)
|
|
36528
|
+
client.api_keys.create()
|
|
35657
36529
|
|
|
35658
36530
|
```
|
|
35659
36531
|
|
|
@@ -35671,7 +36543,7 @@ func main() {
|
|
|
35671
36543
|
|
|
35672
36544
|
url := "https://api.agentmail.to/v0/api-keys"
|
|
35673
36545
|
|
|
35674
|
-
payload := strings.NewReader("{
|
|
36546
|
+
payload := strings.NewReader("{}")
|
|
35675
36547
|
|
|
35676
36548
|
req, _ := http.NewRequest("POST", url, payload)
|
|
35677
36549
|
|
|
@@ -35701,7 +36573,7 @@ http.use_ssl = true
|
|
|
35701
36573
|
request = Net::HTTP::Post.new(url)
|
|
35702
36574
|
request["Authorization"] = 'Bearer <api_key>'
|
|
35703
36575
|
request["Content-Type"] = 'application/json'
|
|
35704
|
-
request.body = "{
|
|
36576
|
+
request.body = "{}"
|
|
35705
36577
|
|
|
35706
36578
|
response = http.request(request)
|
|
35707
36579
|
puts response.read_body
|
|
@@ -35714,7 +36586,7 @@ import com.mashape.unirest.http.Unirest;
|
|
|
35714
36586
|
HttpResponse<String> response = Unirest.post("https://api.agentmail.to/v0/api-keys")
|
|
35715
36587
|
.header("Authorization", "Bearer <api_key>")
|
|
35716
36588
|
.header("Content-Type", "application/json")
|
|
35717
|
-
.body("{
|
|
36589
|
+
.body("{}")
|
|
35718
36590
|
.asString();
|
|
35719
36591
|
```
|
|
35720
36592
|
|
|
@@ -35725,9 +36597,7 @@ require_once('vendor/autoload.php');
|
|
|
35725
36597
|
$client = new \GuzzleHttp\Client();
|
|
35726
36598
|
|
|
35727
36599
|
$response = $client->request('POST', 'https://api.agentmail.to/v0/api-keys', [
|
|
35728
|
-
'body' => '{
|
|
35729
|
-
"name": "name"
|
|
35730
|
-
}',
|
|
36600
|
+
'body' => '{}',
|
|
35731
36601
|
'headers' => [
|
|
35732
36602
|
'Authorization' => 'Bearer <api_key>',
|
|
35733
36603
|
'Content-Type' => 'application/json',
|
|
@@ -35744,7 +36614,7 @@ var client = new RestClient("https://api.agentmail.to/v0/api-keys");
|
|
|
35744
36614
|
var request = new RestRequest(Method.POST);
|
|
35745
36615
|
request.AddHeader("Authorization", "Bearer <api_key>");
|
|
35746
36616
|
request.AddHeader("Content-Type", "application/json");
|
|
35747
|
-
request.AddParameter("application/json", "{
|
|
36617
|
+
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
|
|
35748
36618
|
IRestResponse response = client.Execute(request);
|
|
35749
36619
|
```
|
|
35750
36620
|
|
|
@@ -35755,7 +36625,7 @@ let headers = [
|
|
|
35755
36625
|
"Authorization": "Bearer <api_key>",
|
|
35756
36626
|
"Content-Type": "application/json"
|
|
35757
36627
|
]
|
|
35758
|
-
let parameters = [
|
|
36628
|
+
let parameters = [] as [String : Any]
|
|
35759
36629
|
|
|
35760
36630
|
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
|
|
35761
36631
|
|
|
@@ -35779,6 +36649,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
35779
36649
|
dataTask.resume()
|
|
35780
36650
|
```
|
|
35781
36651
|
|
|
36652
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
36653
|
+
|
|
35782
36654
|
# Delete API Key
|
|
35783
36655
|
|
|
35784
36656
|
DELETE https://api.agentmail.to/v0/api-keys/{api_key_id}
|
|
@@ -35996,6 +36868,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
35996
36868
|
dataTask.resume()
|
|
35997
36869
|
```
|
|
35998
36870
|
|
|
36871
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
36872
|
+
|
|
35999
36873
|
# List Pods
|
|
36000
36874
|
|
|
36001
36875
|
GET https://api.agentmail.to/v0/pods
|
|
@@ -36265,13 +37139,15 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
36265
37139
|
dataTask.resume()
|
|
36266
37140
|
```
|
|
36267
37141
|
|
|
37142
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
37143
|
+
|
|
36268
37144
|
# Get Pod
|
|
36269
37145
|
|
|
36270
37146
|
GET https://api.agentmail.to/v0/pods/{pod_id}
|
|
36271
37147
|
|
|
36272
37148
|
**CLI:**
|
|
36273
37149
|
```bash
|
|
36274
|
-
agentmail pods
|
|
37150
|
+
agentmail pods get --pod-id <pod_id>
|
|
36275
37151
|
```
|
|
36276
37152
|
|
|
36277
37153
|
Reference: https://docs.agentmail.to/api-reference/pods/get
|
|
@@ -36291,7 +37167,7 @@ paths:
|
|
|
36291
37167
|
description: |-
|
|
36292
37168
|
**CLI:**
|
|
36293
37169
|
```bash
|
|
36294
|
-
agentmail pods
|
|
37170
|
+
agentmail pods get --pod-id <pod_id>
|
|
36295
37171
|
```
|
|
36296
37172
|
tags:
|
|
36297
37173
|
- subpackage_pods
|
|
@@ -36517,6 +37393,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
36517
37393
|
dataTask.resume()
|
|
36518
37394
|
```
|
|
36519
37395
|
|
|
37396
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
37397
|
+
|
|
36520
37398
|
# Create Pod
|
|
36521
37399
|
|
|
36522
37400
|
POST https://api.agentmail.to/v0/pods
|
|
@@ -36791,6 +37669,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
36791
37669
|
dataTask.resume()
|
|
36792
37670
|
```
|
|
36793
37671
|
|
|
37672
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
37673
|
+
|
|
36794
37674
|
# Delete Pod
|
|
36795
37675
|
|
|
36796
37676
|
DELETE https://api.agentmail.to/v0/pods/{pod_id}
|
|
@@ -37008,6 +37888,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
37008
37888
|
dataTask.resume()
|
|
37009
37889
|
```
|
|
37010
37890
|
|
|
37891
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
37892
|
+
|
|
37011
37893
|
# List Inboxes
|
|
37012
37894
|
|
|
37013
37895
|
GET https://api.agentmail.to/v0/pods/{pod_id}/inboxes
|
|
@@ -37322,13 +38204,15 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
37322
38204
|
dataTask.resume()
|
|
37323
38205
|
```
|
|
37324
38206
|
|
|
38207
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
38208
|
+
|
|
37325
38209
|
# Get Inbox
|
|
37326
38210
|
|
|
37327
38211
|
GET https://api.agentmail.to/v0/pods/{pod_id}/inboxes/{inbox_id}
|
|
37328
38212
|
|
|
37329
38213
|
**CLI:**
|
|
37330
38214
|
```bash
|
|
37331
|
-
agentmail pods:inboxes
|
|
38215
|
+
agentmail pods:inboxes get --pod-id <pod_id> --inbox-id <inbox_id>
|
|
37332
38216
|
```
|
|
37333
38217
|
|
|
37334
38218
|
Reference: https://docs.agentmail.to/api-reference/pods/inboxes/get
|
|
@@ -37348,7 +38232,7 @@ paths:
|
|
|
37348
38232
|
description: |-
|
|
37349
38233
|
**CLI:**
|
|
37350
38234
|
```bash
|
|
37351
|
-
agentmail pods:inboxes
|
|
38235
|
+
agentmail pods:inboxes get --pod-id <pod_id> --inbox-id <inbox_id>
|
|
37352
38236
|
```
|
|
37353
38237
|
tags:
|
|
37354
38238
|
- subpackage_pods.subpackage_pods/inboxes
|
|
@@ -37593,6 +38477,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
37593
38477
|
dataTask.resume()
|
|
37594
38478
|
```
|
|
37595
38479
|
|
|
38480
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
38481
|
+
|
|
37596
38482
|
# Create Inbox
|
|
37597
38483
|
|
|
37598
38484
|
POST https://api.agentmail.to/v0/pods/{pod_id}/inboxes
|
|
@@ -37899,6 +38785,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
37899
38785
|
dataTask.resume()
|
|
37900
38786
|
```
|
|
37901
38787
|
|
|
38788
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
38789
|
+
|
|
37902
38790
|
# Update Inbox
|
|
37903
38791
|
|
|
37904
38792
|
PATCH https://api.agentmail.to/v0/pods/{pod_id}/inboxes/{inbox_id}
|
|
@@ -38208,6 +39096,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
38208
39096
|
dataTask.resume()
|
|
38209
39097
|
```
|
|
38210
39098
|
|
|
39099
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
39100
|
+
|
|
38211
39101
|
# Delete Inbox
|
|
38212
39102
|
|
|
38213
39103
|
DELETE https://api.agentmail.to/v0/pods/{pod_id}/inboxes/{inbox_id}
|
|
@@ -38435,6 +39325,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
38435
39325
|
dataTask.resume()
|
|
38436
39326
|
```
|
|
38437
39327
|
|
|
39328
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
39329
|
+
|
|
38438
39330
|
# List Threads
|
|
38439
39331
|
|
|
38440
39332
|
GET https://api.agentmail.to/v0/pods/{pod_id}/threads
|
|
@@ -38938,13 +39830,15 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
38938
39830
|
dataTask.resume()
|
|
38939
39831
|
```
|
|
38940
39832
|
|
|
39833
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
39834
|
+
|
|
38941
39835
|
# Get Thread
|
|
38942
39836
|
|
|
38943
39837
|
GET https://api.agentmail.to/v0/pods/{pod_id}/threads/{thread_id}
|
|
38944
39838
|
|
|
38945
39839
|
**CLI:**
|
|
38946
39840
|
```bash
|
|
38947
|
-
agentmail pods:threads
|
|
39841
|
+
agentmail pods:threads get --pod-id <pod_id> --thread-id <thread_id>
|
|
38948
39842
|
```
|
|
38949
39843
|
|
|
38950
39844
|
Reference: https://docs.agentmail.to/api-reference/pods/threads/get
|
|
@@ -38961,14 +39855,10 @@ paths:
|
|
|
38961
39855
|
get:
|
|
38962
39856
|
operationId: get
|
|
38963
39857
|
summary: Get Thread
|
|
38964
|
-
description:
|
|
39858
|
+
description: |-
|
|
38965
39859
|
**CLI:**
|
|
38966
|
-
|
|
38967
39860
|
```bash
|
|
38968
|
-
|
|
38969
|
-
agentmail pods:threads retrieve --pod-id <pod_id> --thread-id
|
|
38970
|
-
<thread_id>
|
|
38971
|
-
|
|
39861
|
+
agentmail pods:threads get --pod-id <pod_id> --thread-id <thread_id>
|
|
38972
39862
|
```
|
|
38973
39863
|
tags:
|
|
38974
39864
|
- subpackage_pods.subpackage_pods/threads
|
|
@@ -39515,6 +40405,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
39515
40405
|
dataTask.resume()
|
|
39516
40406
|
```
|
|
39517
40407
|
|
|
40408
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
40409
|
+
|
|
39518
40410
|
# Get Attachment
|
|
39519
40411
|
|
|
39520
40412
|
GET https://api.agentmail.to/v0/pods/{pod_id}/threads/{thread_id}/attachments/{attachment_id}
|
|
@@ -39811,6 +40703,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
39811
40703
|
dataTask.resume()
|
|
39812
40704
|
```
|
|
39813
40705
|
|
|
40706
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
40707
|
+
|
|
39814
40708
|
# Update Thread
|
|
39815
40709
|
|
|
39816
40710
|
PATCH https://api.agentmail.to/v0/pods/{pod_id}/threads/{thread_id}
|
|
@@ -40120,6 +41014,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
40120
41014
|
dataTask.resume()
|
|
40121
41015
|
```
|
|
40122
41016
|
|
|
41017
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
41018
|
+
|
|
40123
41019
|
# Delete Thread
|
|
40124
41020
|
|
|
40125
41021
|
DELETE https://api.agentmail.to/v0/pods/{pod_id}/threads/{thread_id}
|
|
@@ -40363,6 +41259,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
40363
41259
|
dataTask.resume()
|
|
40364
41260
|
```
|
|
40365
41261
|
|
|
41262
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
41263
|
+
|
|
40366
41264
|
# List Drafts
|
|
40367
41265
|
|
|
40368
41266
|
GET https://api.agentmail.to/v0/pods/{pod_id}/drafts
|
|
@@ -40819,13 +41717,15 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
40819
41717
|
dataTask.resume()
|
|
40820
41718
|
```
|
|
40821
41719
|
|
|
41720
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
41721
|
+
|
|
40822
41722
|
# Get Draft
|
|
40823
41723
|
|
|
40824
41724
|
GET https://api.agentmail.to/v0/pods/{pod_id}/drafts/{draft_id}
|
|
40825
41725
|
|
|
40826
41726
|
**CLI:**
|
|
40827
41727
|
```bash
|
|
40828
|
-
agentmail pods:drafts
|
|
41728
|
+
agentmail pods:drafts get --pod-id <pod_id> --draft-id <draft_id>
|
|
40829
41729
|
```
|
|
40830
41730
|
|
|
40831
41731
|
Reference: https://docs.agentmail.to/api-reference/pods/drafts/get
|
|
@@ -40845,7 +41745,7 @@ paths:
|
|
|
40845
41745
|
description: |-
|
|
40846
41746
|
**CLI:**
|
|
40847
41747
|
```bash
|
|
40848
|
-
agentmail pods:drafts
|
|
41748
|
+
agentmail pods:drafts get --pod-id <pod_id> --draft-id <draft_id>
|
|
40849
41749
|
```
|
|
40850
41750
|
tags:
|
|
40851
41751
|
- subpackage_pods.subpackage_pods/drafts
|
|
@@ -41239,6 +42139,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
41239
42139
|
dataTask.resume()
|
|
41240
42140
|
```
|
|
41241
42141
|
|
|
42142
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
42143
|
+
|
|
41242
42144
|
# Get Attachment
|
|
41243
42145
|
|
|
41244
42146
|
GET https://api.agentmail.to/v0/pods/{pod_id}/drafts/{draft_id}/attachments/{attachment_id}
|
|
@@ -41535,6 +42437,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
41535
42437
|
dataTask.resume()
|
|
41536
42438
|
```
|
|
41537
42439
|
|
|
42440
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
42441
|
+
|
|
41538
42442
|
# List Domains
|
|
41539
42443
|
|
|
41540
42444
|
GET https://api.agentmail.to/v0/pods/{pod_id}/domains
|
|
@@ -41849,13 +42753,15 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
41849
42753
|
dataTask.resume()
|
|
41850
42754
|
```
|
|
41851
42755
|
|
|
42756
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
42757
|
+
|
|
41852
42758
|
# Get Domain
|
|
41853
42759
|
|
|
41854
42760
|
GET https://api.agentmail.to/v0/pods/{pod_id}/domains/{domain_id}
|
|
41855
42761
|
|
|
41856
42762
|
**CLI:**
|
|
41857
42763
|
```bash
|
|
41858
|
-
agentmail pods:domains
|
|
42764
|
+
agentmail pods:domains get --pod-id <pod_id> --domain-id <domain_id>
|
|
41859
42765
|
```
|
|
41860
42766
|
|
|
41861
42767
|
Reference: https://docs.agentmail.to/api-reference/pods/domains/get
|
|
@@ -41872,14 +42778,10 @@ paths:
|
|
|
41872
42778
|
get:
|
|
41873
42779
|
operationId: get
|
|
41874
42780
|
summary: Get Domain
|
|
41875
|
-
description:
|
|
42781
|
+
description: |-
|
|
41876
42782
|
**CLI:**
|
|
41877
|
-
|
|
41878
42783
|
```bash
|
|
41879
|
-
|
|
41880
|
-
agentmail pods:domains retrieve --pod-id <pod_id> --domain-id
|
|
41881
|
-
<domain_id>
|
|
41882
|
-
|
|
42784
|
+
agentmail pods:domains get --pod-id <pod_id> --domain-id <domain_id>
|
|
41883
42785
|
```
|
|
41884
42786
|
tags:
|
|
41885
42787
|
- subpackage_pods.subpackage_pods/domains
|
|
@@ -42185,6 +43087,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
42185
43087
|
dataTask.resume()
|
|
42186
43088
|
```
|
|
42187
43089
|
|
|
43090
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
43091
|
+
|
|
42188
43092
|
# Get Zone File
|
|
42189
43093
|
|
|
42190
43094
|
GET https://api.agentmail.to/v0/pods/{pod_id}/domains/{domain_id}/zone-file
|
|
@@ -42421,6 +43325,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
42421
43325
|
dataTask.resume()
|
|
42422
43326
|
```
|
|
42423
43327
|
|
|
43328
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
43329
|
+
|
|
42424
43330
|
# Create Domain
|
|
42425
43331
|
|
|
42426
43332
|
POST https://api.agentmail.to/v0/pods/{pod_id}/domains
|
|
@@ -42790,6 +43696,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
42790
43696
|
dataTask.resume()
|
|
42791
43697
|
```
|
|
42792
43698
|
|
|
43699
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
43700
|
+
|
|
42793
43701
|
# Update Domain
|
|
42794
43702
|
|
|
42795
43703
|
PATCH https://api.agentmail.to/v0/pods/{pod_id}/domains/{domain_id}
|
|
@@ -43153,6 +44061,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
43153
44061
|
dataTask.resume()
|
|
43154
44062
|
```
|
|
43155
44063
|
|
|
44064
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
44065
|
+
|
|
43156
44066
|
# Delete Domain
|
|
43157
44067
|
|
|
43158
44068
|
DELETE https://api.agentmail.to/v0/pods/{pod_id}/domains/{domain_id}
|
|
@@ -43380,6 +44290,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
43380
44290
|
dataTask.resume()
|
|
43381
44291
|
```
|
|
43382
44292
|
|
|
44293
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
44294
|
+
|
|
43383
44295
|
# Verify Domain
|
|
43384
44296
|
|
|
43385
44297
|
POST https://api.agentmail.to/v0/pods/{pod_id}/domains/{domain_id}/verify
|
|
@@ -43607,6 +44519,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
43607
44519
|
dataTask.resume()
|
|
43608
44520
|
```
|
|
43609
44521
|
|
|
44522
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
44523
|
+
|
|
43610
44524
|
# List Entries
|
|
43611
44525
|
|
|
43612
44526
|
GET https://api.agentmail.to/v0/pods/{pod_id}/lists/{direction}/{type}
|
|
@@ -43921,13 +44835,15 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
43921
44835
|
dataTask.resume()
|
|
43922
44836
|
```
|
|
43923
44837
|
|
|
44838
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
44839
|
+
|
|
43924
44840
|
# Get List Entry
|
|
43925
44841
|
|
|
43926
44842
|
GET https://api.agentmail.to/v0/pods/{pod_id}/lists/{direction}/{type}/{entry}
|
|
43927
44843
|
|
|
43928
44844
|
**CLI:**
|
|
43929
44845
|
```bash
|
|
43930
|
-
agentmail pods:lists
|
|
44846
|
+
agentmail pods:lists get --pod-id <pod_id> --direction <direction> --type <type> --entry <entry>
|
|
43931
44847
|
```
|
|
43932
44848
|
|
|
43933
44849
|
Reference: https://docs.agentmail.to/api-reference/pods/lists/get
|
|
@@ -43949,7 +44865,7 @@ paths:
|
|
|
43949
44865
|
|
|
43950
44866
|
```bash
|
|
43951
44867
|
|
|
43952
|
-
agentmail pods:lists
|
|
44868
|
+
agentmail pods:lists get --pod-id <pod_id> --direction <direction>
|
|
43953
44869
|
--type <type> --entry <entry>
|
|
43954
44870
|
|
|
43955
44871
|
```
|
|
@@ -44227,6 +45143,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
44227
45143
|
dataTask.resume()
|
|
44228
45144
|
```
|
|
44229
45145
|
|
|
45146
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
45147
|
+
|
|
44230
45148
|
# Create List Entry
|
|
44231
45149
|
|
|
44232
45150
|
POST https://api.agentmail.to/v0/pods/{pod_id}/lists/{direction}/{type}
|
|
@@ -44564,6 +45482,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
44564
45482
|
dataTask.resume()
|
|
44565
45483
|
```
|
|
44566
45484
|
|
|
45485
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
45486
|
+
|
|
44567
45487
|
# Delete List Entry
|
|
44568
45488
|
|
|
44569
45489
|
DELETE https://api.agentmail.to/v0/pods/{pod_id}/lists/{direction}/{type}/{entry}
|
|
@@ -44819,6 +45739,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
44819
45739
|
dataTask.resume()
|
|
44820
45740
|
```
|
|
44821
45741
|
|
|
45742
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
45743
|
+
|
|
44822
45744
|
# Query Metrics
|
|
44823
45745
|
|
|
44824
45746
|
GET https://api.agentmail.to/v0/pods/{pod_id}/metrics
|
|
@@ -45128,6 +46050,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
45128
46050
|
dataTask.resume()
|
|
45129
46051
|
```
|
|
45130
46052
|
|
|
46053
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
46054
|
+
|
|
45131
46055
|
# List API Keys
|
|
45132
46056
|
|
|
45133
46057
|
GET https://api.agentmail.to/v0/pods/{pod_id}/api-keys
|
|
@@ -45549,6 +46473,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
45549
46473
|
dataTask.resume()
|
|
45550
46474
|
```
|
|
45551
46475
|
|
|
46476
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
46477
|
+
|
|
45552
46478
|
# Create API Key
|
|
45553
46479
|
|
|
45554
46480
|
POST https://api.agentmail.to/v0/pods/{pod_id}/api-keys
|
|
@@ -45750,8 +46676,6 @@ components:
|
|
|
45750
46676
|
$ref: '#/components/schemas/type_api-keys:Name'
|
|
45751
46677
|
permissions:
|
|
45752
46678
|
$ref: '#/components/schemas/type_api-keys:ApiKeyPermissions'
|
|
45753
|
-
required:
|
|
45754
|
-
- name
|
|
45755
46679
|
title: CreateApiKeyRequest
|
|
45756
46680
|
type_api-keys:ApiKeyId:
|
|
45757
46681
|
type: string
|
|
@@ -45841,9 +46765,7 @@ async function main() {
|
|
|
45841
46765
|
const client = new AgentMailClient({
|
|
45842
46766
|
apiKey: "YOUR_TOKEN_HERE",
|
|
45843
46767
|
});
|
|
45844
|
-
await client.pods.apiKeys.create("pod_id", {
|
|
45845
|
-
name: "name",
|
|
45846
|
-
});
|
|
46768
|
+
await client.pods.apiKeys.create("pod_id", {});
|
|
45847
46769
|
}
|
|
45848
46770
|
main();
|
|
45849
46771
|
|
|
@@ -45858,7 +46780,6 @@ client = AgentMail(
|
|
|
45858
46780
|
|
|
45859
46781
|
client.pods.api_keys.create(
|
|
45860
46782
|
pod_id="pod_id",
|
|
45861
|
-
name="name",
|
|
45862
46783
|
)
|
|
45863
46784
|
|
|
45864
46785
|
```
|
|
@@ -45877,7 +46798,7 @@ func main() {
|
|
|
45877
46798
|
|
|
45878
46799
|
url := "https://api.agentmail.to/v0/pods/pod_id/api-keys"
|
|
45879
46800
|
|
|
45880
|
-
payload := strings.NewReader("{
|
|
46801
|
+
payload := strings.NewReader("{}")
|
|
45881
46802
|
|
|
45882
46803
|
req, _ := http.NewRequest("POST", url, payload)
|
|
45883
46804
|
|
|
@@ -45907,7 +46828,7 @@ http.use_ssl = true
|
|
|
45907
46828
|
request = Net::HTTP::Post.new(url)
|
|
45908
46829
|
request["Authorization"] = 'Bearer <api_key>'
|
|
45909
46830
|
request["Content-Type"] = 'application/json'
|
|
45910
|
-
request.body = "{
|
|
46831
|
+
request.body = "{}"
|
|
45911
46832
|
|
|
45912
46833
|
response = http.request(request)
|
|
45913
46834
|
puts response.read_body
|
|
@@ -45920,7 +46841,7 @@ import com.mashape.unirest.http.Unirest;
|
|
|
45920
46841
|
HttpResponse<String> response = Unirest.post("https://api.agentmail.to/v0/pods/pod_id/api-keys")
|
|
45921
46842
|
.header("Authorization", "Bearer <api_key>")
|
|
45922
46843
|
.header("Content-Type", "application/json")
|
|
45923
|
-
.body("{
|
|
46844
|
+
.body("{}")
|
|
45924
46845
|
.asString();
|
|
45925
46846
|
```
|
|
45926
46847
|
|
|
@@ -45931,9 +46852,7 @@ require_once('vendor/autoload.php');
|
|
|
45931
46852
|
$client = new \GuzzleHttp\Client();
|
|
45932
46853
|
|
|
45933
46854
|
$response = $client->request('POST', 'https://api.agentmail.to/v0/pods/pod_id/api-keys', [
|
|
45934
|
-
'body' => '{
|
|
45935
|
-
"name": "name"
|
|
45936
|
-
}',
|
|
46855
|
+
'body' => '{}',
|
|
45937
46856
|
'headers' => [
|
|
45938
46857
|
'Authorization' => 'Bearer <api_key>',
|
|
45939
46858
|
'Content-Type' => 'application/json',
|
|
@@ -45950,7 +46869,7 @@ var client = new RestClient("https://api.agentmail.to/v0/pods/pod_id/api-keys");
|
|
|
45950
46869
|
var request = new RestRequest(Method.POST);
|
|
45951
46870
|
request.AddHeader("Authorization", "Bearer <api_key>");
|
|
45952
46871
|
request.AddHeader("Content-Type", "application/json");
|
|
45953
|
-
request.AddParameter("application/json", "{
|
|
46872
|
+
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
|
|
45954
46873
|
IRestResponse response = client.Execute(request);
|
|
45955
46874
|
```
|
|
45956
46875
|
|
|
@@ -45961,7 +46880,7 @@ let headers = [
|
|
|
45961
46880
|
"Authorization": "Bearer <api_key>",
|
|
45962
46881
|
"Content-Type": "application/json"
|
|
45963
46882
|
]
|
|
45964
|
-
let parameters = [
|
|
46883
|
+
let parameters = [] as [String : Any]
|
|
45965
46884
|
|
|
45966
46885
|
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
|
|
45967
46886
|
|
|
@@ -45985,6 +46904,8 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
45985
46904
|
dataTask.resume()
|
|
45986
46905
|
```
|
|
45987
46906
|
|
|
46907
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
46908
|
+
|
|
45988
46909
|
# Delete API Key
|
|
45989
46910
|
|
|
45990
46911
|
DELETE https://api.agentmail.to/v0/pods/{pod_id}/api-keys/{api_key_id}
|
|
@@ -46216,11 +47137,18 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
46216
47137
|
dataTask.resume()
|
|
46217
47138
|
```
|
|
46218
47139
|
|
|
47140
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
47141
|
+
|
|
46219
47142
|
# Get Organization
|
|
46220
47143
|
|
|
46221
47144
|
GET https://api.agentmail.to/v0/organizations
|
|
46222
47145
|
|
|
46223
|
-
|
|
47146
|
+
Returns the organization for the authenticated API key (usage limits, counts, and billing metadata).
|
|
47147
|
+
|
|
47148
|
+
**CLI:**
|
|
47149
|
+
```bash
|
|
47150
|
+
agentmail organizations get
|
|
47151
|
+
```
|
|
46224
47152
|
|
|
46225
47153
|
Reference: https://docs.agentmail.to/api-reference/organizations/get
|
|
46226
47154
|
|
|
@@ -46236,7 +47164,18 @@ paths:
|
|
|
46236
47164
|
get:
|
|
46237
47165
|
operationId: get
|
|
46238
47166
|
summary: Get Organization
|
|
46239
|
-
description:
|
|
47167
|
+
description: >-
|
|
47168
|
+
Returns the organization for the authenticated API key (usage limits,
|
|
47169
|
+
counts, and billing metadata).
|
|
47170
|
+
|
|
47171
|
+
|
|
47172
|
+
**CLI:**
|
|
47173
|
+
|
|
47174
|
+
```bash
|
|
47175
|
+
|
|
47176
|
+
agentmail organizations get
|
|
47177
|
+
|
|
47178
|
+
```
|
|
46240
47179
|
tags:
|
|
46241
47180
|
- subpackage_organizations
|
|
46242
47181
|
parameters:
|
|
@@ -46451,7 +47390,9 @@ dataTask.resume()
|
|
|
46451
47390
|
title: Knowledge Base
|
|
46452
47391
|
subtitle: A collection of answers to frequently asked questions.
|
|
46453
47392
|
slug: knowledge-base
|
|
46454
|
-
|
|
47393
|
+
---------------------
|
|
47394
|
+
|
|
47395
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
46455
47396
|
|
|
46456
47397
|
## Getting Started
|
|
46457
47398
|
|
|
@@ -46543,6 +47484,10 @@ slug: knowledge-base
|
|
|
46543
47484
|
<Card title="Emails bouncing" icon="fa-solid fa-rotate-left" href="/knowledge-base/emails-bouncing">
|
|
46544
47485
|
Diagnose and resolve email bounce issues.
|
|
46545
47486
|
</Card>
|
|
47487
|
+
|
|
47488
|
+
<Card title="Email spoofing protection" icon="fa-solid fa-shield-halved" href="/knowledge-base/inbound-emails-missing">
|
|
47489
|
+
How AgentMail protects your inboxes from unauthenticated senders.
|
|
47490
|
+
</Card>
|
|
46546
47491
|
</Cards>
|
|
46547
47492
|
|
|
46548
47493
|
## DNS Guides
|
|
@@ -46567,13 +47512,14 @@ Step-by-step instructions for verifying your domain with popular DNS providers.
|
|
|
46567
47512
|
</Card>
|
|
46568
47513
|
</Cards>
|
|
46569
47514
|
|
|
46570
|
-
|
|
46571
47515
|
***
|
|
46572
47516
|
|
|
46573
47517
|
title: What is AgentMail and how is it different?
|
|
46574
47518
|
subtitle: Understand how AgentMail compares to traditional email providers.
|
|
46575
47519
|
slug: knowledge-base/what-is-agentmail
|
|
46576
|
-
|
|
47520
|
+
---------------------
|
|
47521
|
+
|
|
47522
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
46577
47523
|
|
|
46578
47524
|
AgentMail is email infrastructure built specifically for AI agents. Unlike transactional email APIs that focus on one-way sending, AgentMail is built for two-way agent communication: dedicated inboxes, native threading, and full receiving support with no shared sending domains.
|
|
46579
47525
|
|
|
@@ -46606,13 +47552,14 @@ AgentMail is the right choice when:
|
|
|
46606
47552
|
|
|
46607
47553
|
Yes. AgentMail's send API works similarly. Replace your existing send call with `client.inboxes.messages.send()` and you get the same sending capability plus full receiving, threading, and agent identity features on top. See the [Quickstart](/quickstart) to get started in minutes.
|
|
46608
47554
|
|
|
46609
|
-
|
|
46610
47555
|
***
|
|
46611
47556
|
|
|
46612
47557
|
title: What can I do with an AgentMail inbox?
|
|
46613
47558
|
subtitle: A complete overview of inbox capabilities for AI agents.
|
|
46614
47559
|
slug: knowledge-base/inbox-capabilities
|
|
46615
|
-
|
|
47560
|
+
---------------------
|
|
47561
|
+
|
|
47562
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
46616
47563
|
|
|
46617
47564
|
An AgentMail inbox is a full email account for your AI agent. Each inbox gets a unique email address and can send, receive, reply, forward, and manage emails entirely through the API.
|
|
46618
47565
|
|
|
@@ -46704,13 +47651,14 @@ if threads.threads:
|
|
|
46704
47651
|
)
|
|
46705
47652
|
```
|
|
46706
47653
|
|
|
46707
|
-
|
|
46708
47654
|
***
|
|
46709
47655
|
|
|
46710
47656
|
title: How do I create my first inbox?
|
|
46711
47657
|
subtitle: Get up and running with your first AgentMail inbox.
|
|
46712
47658
|
slug: knowledge-base/creating-first-inbox
|
|
46713
|
-
|
|
47659
|
+
---------------------
|
|
47660
|
+
|
|
47661
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
46714
47662
|
|
|
46715
47663
|
Creating an inbox gives your AI agent its own email address. You can create inboxes on the default `@agentmail.to` domain or on your own custom domain.
|
|
46716
47664
|
|
|
@@ -46803,13 +47751,14 @@ Now that you have an inbox, explore what you can do with it:
|
|
|
46803
47751
|
* [Set up webhooks](/webhook-setup) to get notified when emails arrive
|
|
46804
47752
|
* [Use labels](/labels) to track message state in your agent workflows
|
|
46805
47753
|
|
|
46806
|
-
|
|
46807
47754
|
***
|
|
46808
47755
|
|
|
46809
47756
|
title: How do I get my API key?
|
|
46810
47757
|
subtitle: Create and manage your AgentMail API keys.
|
|
46811
47758
|
slug: knowledge-base/getting-api-key
|
|
46812
|
-
|
|
47759
|
+
---------------------
|
|
47760
|
+
|
|
47761
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
46813
47762
|
|
|
46814
47763
|
You need an API key to authenticate requests to the AgentMail API. API keys start with `am_` and are created in the AgentMail Console.
|
|
46815
47764
|
|
|
@@ -46873,13 +47822,14 @@ No credit card required to get started. The free tier includes:
|
|
|
46873
47822
|
|
|
46874
47823
|
To create more inboxes or send higher volumes, see the [pricing page](https://agentmail.to/pricing).
|
|
46875
47824
|
|
|
46876
|
-
|
|
46877
47825
|
***
|
|
46878
47826
|
|
|
46879
47827
|
title: How do I handle inbound emails with my agent?
|
|
46880
47828
|
subtitle: Compare Webhooks and WebSockets for processing incoming emails.
|
|
46881
47829
|
slug: knowledge-base/handling-inbound-emails
|
|
46882
|
-
|
|
47830
|
+
---------------------
|
|
47831
|
+
|
|
47832
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
46883
47833
|
|
|
46884
47834
|
AgentMail offers two ways to process incoming emails, each suited to different use cases.
|
|
46885
47835
|
|
|
@@ -46983,13 +47933,14 @@ See the [WebSocket Overview](/websockets) for more details.
|
|
|
46983
47933
|
|
|
46984
47934
|
For most production use cases, **webhooks** are recommended. They are reliable, event-driven, and integrate well with serverless platforms. If you need real-time events without exposing a public URL, **WebSockets** are the best option.
|
|
46985
47935
|
|
|
46986
|
-
|
|
46987
47936
|
***
|
|
46988
47937
|
|
|
46989
47938
|
title: How do I set up allowlists and blocklists?
|
|
46990
47939
|
subtitle: Control who your AI agent can send to and receive from.
|
|
46991
47940
|
slug: knowledge-base/allowlists-blocklists
|
|
46992
|
-
|
|
47941
|
+
---------------------
|
|
47942
|
+
|
|
47943
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
46993
47944
|
|
|
46994
47945
|
Allowlists and blocklists let you control who your AI agent can communicate with. This is a critical safety feature for autonomous agents running in production with minimal human oversight.
|
|
46995
47946
|
|
|
@@ -47130,13 +48081,14 @@ Without guardrails, an autonomous agent could email the wrong people, respond to
|
|
|
47130
48081
|
|
|
47131
48082
|
For more details on the Lists API, see the [Lists core concept](/lists) documentation.
|
|
47132
48083
|
|
|
47133
|
-
|
|
47134
48084
|
***
|
|
47135
48085
|
|
|
47136
48086
|
title: How do I manage threaded conversations?
|
|
47137
48087
|
subtitle: Maintain context across multi-turn email conversations with your agent.
|
|
47138
48088
|
slug: knowledge-base/threaded-conversations
|
|
47139
|
-
|
|
48089
|
+
---------------------
|
|
48090
|
+
|
|
48091
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
47140
48092
|
|
|
47141
48093
|
Threads are how AgentMail organizes conversations. Every time your agent sends a new email, a thread is created. Replies are automatically grouped into the same thread, giving your agent full conversation context.
|
|
47142
48094
|
|
|
@@ -47260,13 +48212,14 @@ for thread in unreplied.threads:
|
|
|
47260
48212
|
* Use labels like `unreplied`, `replied`, `escalated`, and `resolved` to track conversation state
|
|
47261
48213
|
* Always reply to the **last message** in a thread to keep email headers correct
|
|
47262
48214
|
|
|
47263
|
-
|
|
47264
48215
|
***
|
|
47265
48216
|
|
|
47266
48217
|
title: How do I build a human-in-the-loop workflow?
|
|
47267
48218
|
subtitle: Keep humans in control of your agent's email communications.
|
|
47268
48219
|
slug: knowledge-base/human-in-the-loop
|
|
47269
|
-
|
|
48220
|
+
---------------------
|
|
48221
|
+
|
|
48222
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
47270
48223
|
|
|
47271
48224
|
AgentMail provides several mechanisms for keeping humans involved when agents send emails. You can combine these approaches to match the level of oversight your workflow requires.
|
|
47272
48225
|
|
|
@@ -47366,13 +48319,14 @@ This acts as a hard safety boundary. Your agent can only email recipients you ha
|
|
|
47366
48319
|
* **Use labels consistently** across your agents so dashboards and alerting work reliably
|
|
47367
48320
|
* **Combine approaches:** for example, use allowlists for autonomous sending to known recipients, drafts for unknown recipients, and CC a human on everything during the first week
|
|
47368
48321
|
|
|
47369
|
-
|
|
47370
48322
|
***
|
|
47371
48323
|
|
|
47372
48324
|
title: How do I use Pods for multi-tenant email?
|
|
47373
|
-
subtitle:
|
|
48325
|
+
subtitle: Isolate inboxes, domains, and data across tenants with Pods.
|
|
47374
48326
|
slug: knowledge-base/pods-multi-tenant
|
|
47375
|
-
|
|
48327
|
+
---------------------
|
|
48328
|
+
|
|
48329
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
47376
48330
|
|
|
47377
48331
|
Pods provide tenant isolation for multi-tenant applications. Each Pod is an isolated workspace containing its own inboxes, domains, threads, and drafts, completely separated from other Pods.
|
|
47378
48332
|
|
|
@@ -47486,13 +48440,14 @@ client.pods.delete(pod_id=pod.pod_id)
|
|
|
47486
48440
|
|
|
47487
48441
|
For more details, see the [Pods core concept](/pods) documentation.
|
|
47488
48442
|
|
|
47489
|
-
|
|
47490
48443
|
***
|
|
47491
48444
|
|
|
47492
48445
|
title: How do I use labels to track email state?
|
|
47493
48446
|
subtitle: Use labels to manage agent workflow state on emails and threads.
|
|
47494
48447
|
slug: knowledge-base/labels-track-state
|
|
47495
|
-
|
|
48448
|
+
---------------------
|
|
48449
|
+
|
|
48450
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
47496
48451
|
|
|
47497
48452
|
Labels are string-based tags you attach to messages and threads. They are the primary way agents track state, classify emails, and filter conversations in AgentMail.
|
|
47498
48453
|
|
|
@@ -47620,13 +48575,14 @@ for thread_item in unreplied.threads:
|
|
|
47620
48575
|
|
|
47621
48576
|
For more details, see the [Labels core concept](/labels) documentation.
|
|
47622
48577
|
|
|
47623
|
-
|
|
47624
48578
|
***
|
|
47625
48579
|
|
|
47626
48580
|
title: How do I set up a custom domain?
|
|
47627
48581
|
subtitle: Send emails from your own domain instead of @agentmail.to.
|
|
47628
48582
|
slug: knowledge-base/custom-domain-setup
|
|
47629
|
-
|
|
48583
|
+
---------------------
|
|
48584
|
+
|
|
48585
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
47630
48586
|
|
|
47631
48587
|
Custom domains let your agent send emails from your brand (e.g., `agent@yourcompany.com`) instead of the default `@agentmail.to`. This improves deliverability and builds trust with recipients.
|
|
47632
48588
|
|
|
@@ -47718,13 +48674,14 @@ console.log(`Created: ${inbox.inboxId}`);
|
|
|
47718
48674
|
* **One SPF record per domain:** if you already have an SPF record, merge AgentMail's `include:` into the existing record rather than creating a second one
|
|
47719
48675
|
For a detailed walkthrough, see the [Creating Custom Domains](/custom-domains) guide.
|
|
47720
48676
|
|
|
47721
|
-
|
|
47722
48677
|
***
|
|
47723
48678
|
|
|
47724
|
-
title:
|
|
48679
|
+
title: How do I set up SPF, DKIM, and DMARC?
|
|
47725
48680
|
subtitle: Authenticate your domain for reliable email deliverability.
|
|
47726
48681
|
slug: knowledge-base/spf-dkim-dmarc
|
|
47727
|
-
|
|
48682
|
+
---------------------
|
|
48683
|
+
|
|
48684
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
47728
48685
|
|
|
47729
48686
|
SPF, DKIM, and DMARC are three email authentication protocols that prove your emails are legitimate. They are essential for deliverability: Gmail, Outlook, and other major providers now require all three for reliable inbox placement.
|
|
47730
48687
|
|
|
@@ -47815,13 +48772,14 @@ For step-by-step DNS instructions, see our provider guides: [Cloudflare](/knowle
|
|
|
47815
48772
|
|
|
47816
48773
|
For a deeper explanation of how these protocols work, see the [SPF, DKIM, DMARC](/email-protocols) documentation.
|
|
47817
48774
|
|
|
47818
|
-
|
|
47819
48775
|
***
|
|
47820
48776
|
|
|
47821
48777
|
title: Why are my emails going to spam?
|
|
47822
48778
|
subtitle: Troubleshoot and fix spam folder placement issues.
|
|
47823
48779
|
slug: knowledge-base/emails-going-to-spam
|
|
47824
|
-
|
|
48780
|
+
---------------------
|
|
48781
|
+
|
|
48782
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
47825
48783
|
|
|
47826
48784
|
If your agent's emails are landing in spam instead of the inbox, work through these common causes in order. The most frequent issues are at the top.
|
|
47827
48785
|
|
|
@@ -47886,13 +48844,14 @@ If you have checked all of the above and emails are still going to spam, reach o
|
|
|
47886
48844
|
|
|
47887
48845
|
For a comprehensive guide to maximizing deliverability, see the [Email Deliverability](/email-deliverability) best practices.
|
|
47888
48846
|
|
|
47889
|
-
|
|
47890
48847
|
***
|
|
47891
48848
|
|
|
47892
48849
|
title: Warming Up
|
|
47893
48850
|
subtitle: Gradually build sending reputation on a new domain or inbox.
|
|
47894
48851
|
slug: knowledge-base/domain-warming
|
|
47895
|
-
|
|
48852
|
+
---------------------
|
|
48853
|
+
|
|
48854
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
47896
48855
|
|
|
47897
48856
|
Warming up is the process of gradually increasing your email volume on a new domain to build sender reputation with mailbox providers like Gmail, Outlook, and Yahoo.
|
|
47898
48857
|
You can connect AgentMail inboxes to Instantly and Smartlead for programmatic warm up using [SMTP credentials](https://docs.agentmail.to/imap-smtp#finding-your-credentials).
|
|
@@ -47967,13 +48926,14 @@ You can track bounces and complaints by using [Query Metrics](https://docs.agent
|
|
|
47967
48926
|
|
|
47968
48927
|
For more deliverability best practices, see the [Email Deliverability](/email-deliverability) guide.
|
|
47969
48928
|
|
|
47970
|
-
|
|
47971
48929
|
***
|
|
47972
48930
|
|
|
47973
48931
|
title: How do I avoid MX record conflicts?
|
|
47974
48932
|
subtitle: Add AgentMail DNS records without breaking existing email.
|
|
47975
48933
|
slug: knowledge-base/mx-record-conflicts
|
|
47976
|
-
|
|
48934
|
+
---------------------
|
|
48935
|
+
|
|
48936
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
47977
48937
|
|
|
47978
48938
|
If you already use Gmail, Outlook, or another email provider for your domain, adding AgentMail's MX records could conflict with your existing setup. Here is how to avoid that.
|
|
47979
48939
|
|
|
@@ -48050,13 +49010,14 @@ Your team's email continues to flow through Gmail. Agent emails go through Agent
|
|
|
48050
49010
|
|
|
48051
49011
|
Pick whatever makes sense for your brand. The important thing is that it is a separate subdomain from your root domain's email.
|
|
48052
49012
|
|
|
48053
|
-
|
|
48054
49013
|
***
|
|
48055
49014
|
|
|
48056
49015
|
title: What does a 403 error mean?
|
|
48057
49016
|
subtitle: Common causes of API 403 Forbidden errors and how to fix them.
|
|
48058
49017
|
slug: knowledge-base/api-403-error
|
|
48059
|
-
|
|
49018
|
+
---------------------
|
|
49019
|
+
|
|
49020
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
48060
49021
|
|
|
48061
49022
|
A `403 Forbidden` response from the AgentMail API means your request was rejected. This can happen for several reasons, and the fix depends on the cause.
|
|
48062
49023
|
|
|
@@ -48118,13 +49079,14 @@ If you get a `200` response, your key is valid and working. You can then copy th
|
|
|
48118
49079
|
|
|
48119
49080
|
If none of the above resolves your issue, reach out in our [Discord](https://discord.com/invite/hTYatWYWBc) support channel or email [support@agentmail.cc](mailto:support@agentmail.cc) with the full error response and the endpoint you are calling.
|
|
48120
49081
|
|
|
48121
|
-
|
|
48122
49082
|
***
|
|
48123
49083
|
|
|
48124
49084
|
title: What are the rate limits?
|
|
48125
49085
|
subtitle: Understand AgentMail's rate limits and how to work within them.
|
|
48126
49086
|
slug: knowledge-base/rate-limits
|
|
48127
|
-
|
|
49087
|
+
---------------------
|
|
49088
|
+
|
|
49089
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
48128
49090
|
|
|
48129
49091
|
AgentMail is built for high-volume agent workflows. Limits vary by plan.
|
|
48130
49092
|
|
|
@@ -48178,13 +49140,14 @@ async function sendWithRetry(inboxId: string, params: any, maxRetries = 3) {
|
|
|
48178
49140
|
|
|
48179
49141
|
If you need higher sending volumes or more inboxes than your current plan allows, contact [support@agentmail.cc](mailto:support@agentmail.cc) or visit the [pricing page](https://agentmail.to/pricing) for enterprise options.
|
|
48180
49142
|
|
|
48181
|
-
|
|
48182
49143
|
***
|
|
48183
49144
|
|
|
48184
49145
|
title: How do I prevent duplicate sends?
|
|
48185
49146
|
subtitle: Use idempotency to avoid sending the same email twice.
|
|
48186
49147
|
slug: knowledge-base/preventing-duplicate-sends
|
|
48187
|
-
|
|
49148
|
+
---------------------
|
|
49149
|
+
|
|
49150
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
48188
49151
|
|
|
48189
49152
|
AI agents can sometimes retry requests due to network errors, timeouts, or logic bugs. Without safeguards, this can cause the same email to be sent multiple times. Here is how to prevent that.
|
|
48190
49153
|
|
|
@@ -48273,13 +49236,14 @@ Since drafts support `clientId`, creating the same draft multiple times is safe.
|
|
|
48273
49236
|
|
|
48274
49237
|
For more details, see the [Idempotent Requests](/idempotency) guide.
|
|
48275
49238
|
|
|
48276
|
-
|
|
48277
49239
|
***
|
|
48278
49240
|
|
|
48279
49241
|
title: Why is my domain not verifying?
|
|
48280
49242
|
subtitle: What to do when your domain verification is stuck.
|
|
48281
49243
|
slug: knowledge-base/domain-not-verifying
|
|
48282
|
-
|
|
49244
|
+
---------------------
|
|
49245
|
+
|
|
49246
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
48283
49247
|
|
|
48284
49248
|
If your domain is stuck in a pending or failed verification state, work through these common causes.
|
|
48285
49249
|
|
|
@@ -48351,13 +49315,14 @@ You can check your domain's status in the [AgentMail Console](https://console.ag
|
|
|
48351
49315
|
|
|
48352
49316
|
If you have checked all of the above and your domain is still not verifying, email [support@agentmail.cc](mailto:support@agentmail.cc) with your domain name and a screenshot of your DNS records. We can help diagnose the issue.
|
|
48353
49317
|
|
|
48354
|
-
|
|
48355
49318
|
***
|
|
48356
49319
|
|
|
48357
49320
|
title: Why are my emails bouncing?
|
|
48358
49321
|
subtitle: Diagnose and resolve email bounce issues.
|
|
48359
49322
|
slug: knowledge-base/emails-bouncing
|
|
48360
|
-
|
|
49323
|
+
---------------------
|
|
49324
|
+
|
|
49325
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
48361
49326
|
|
|
48362
49327
|
A bounced email means the recipient's mail server rejected your message. Understanding the bounce type helps you take the right action.
|
|
48363
49328
|
|
|
@@ -48442,13 +49407,107 @@ await client.webhooks.create({
|
|
|
48442
49407
|
|
|
48443
49408
|
For more on maintaining healthy sending metrics, see the [Email Deliverability](/email-deliverability) best practices.
|
|
48444
49409
|
|
|
49410
|
+
***
|
|
49411
|
+
|
|
49412
|
+
title: Why are my emails not showing up?
|
|
49413
|
+
subtitle: The most common reason inbound emails go missing is that the sender's domain isn't authenticated.
|
|
49414
|
+
slug: knowledge-base/inbound-emails-missing
|
|
49415
|
+
---------------------
|
|
49416
|
+
|
|
49417
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
49418
|
+
|
|
49419
|
+
<Warning>
|
|
49420
|
+
**The sender's domain must have SPF or DKIM configured.** To reduce spoofing and phishing, AgentMail now drops inbound emails when the sender's domain has neither SPF nor DKIM set up. If a sender reports that their email never arrived, this is the most likely cause — once they configure SPF/DKIM on their domain, their emails will start landing in your inbox again.
|
|
49421
|
+
</Warning>
|
|
49422
|
+
|
|
49423
|
+
AgentMail verifies every inbound email using SPF, DKIM, and DMARC authentication before delivering it to your inbox. Emails that fail any of these checks are dropped to prevent spoofing, phishing, and spam from reaching your agents.
|
|
49424
|
+
|
|
49425
|
+
This is the same standard enforced by Gmail, Outlook, Yahoo, and other major email providers.
|
|
49426
|
+
|
|
49427
|
+
## How inbound authentication works
|
|
49428
|
+
|
|
49429
|
+
When an email arrives, AgentMail inspects the SPF, DKIM, and DMARC verdicts provided by the receiving mail server. To be delivered, an email must meet **all** of the following conditions:
|
|
49430
|
+
|
|
49431
|
+
* Neither SPF nor DKIM returns a `FAIL` verdict
|
|
49432
|
+
* At least one of SPF or DKIM is configured (not both `GRAY`)
|
|
49433
|
+
* DMARC does not return `FAIL` (unless the sender's DMARC policy is `none`)
|
|
49434
|
+
* The message passes virus scanning
|
|
49435
|
+
|
|
49436
|
+
If any check fails, the email is dropped.
|
|
49437
|
+
|
|
49438
|
+
| Scenario | SPF | DKIM | Result |
|
|
49439
|
+
| ------------------------------ | ---- | ---- | --------- |
|
|
49440
|
+
| Both pass | PASS | PASS | Delivered |
|
|
49441
|
+
| One passes, other unconfigured | PASS | GRAY | Delivered |
|
|
49442
|
+
| One passes, other unconfigured | GRAY | PASS | Delivered |
|
|
49443
|
+
| Neither configured | GRAY | GRAY | Dropped |
|
|
49444
|
+
| Either explicitly fails | FAIL | any | Dropped |
|
|
49445
|
+
| Either explicitly fails | any | FAIL | Dropped |
|
|
49446
|
+
|
|
49447
|
+
<Warning>
|
|
49448
|
+
Emails dropped due to failed authentication are **silently rejected**. The sender's mail server may still report successful delivery because AgentMail's servers did receive the message, but it was rejected during authentication verification. The sender gets no bounce-back or error notification.
|
|
49449
|
+
</Warning>
|
|
49450
|
+
|
|
49451
|
+
## Why this matters
|
|
49452
|
+
|
|
49453
|
+
Without these checks, anyone could send emails claiming to be from any domain. SPF and DKIM authentication proves that the sending server is authorized to send on behalf of the domain in the `From` address, while DMARC ties those results to the domain's published policy. Dropping unauthenticated emails protects your agents from:
|
|
49454
|
+
|
|
49455
|
+
* **Spoofing:** forged sender addresses impersonating trusted contacts
|
|
49456
|
+
* **Phishing:** malicious emails designed to trick your agent into taking harmful actions
|
|
49457
|
+
* **Spam:** bulk unsolicited email from unverified sources
|
|
49458
|
+
|
|
49459
|
+
## Diagnosing missing emails
|
|
49460
|
+
|
|
49461
|
+
If a sender reports that their email never arrived, check whether their domain has SPF and DKIM records configured:
|
|
49462
|
+
|
|
49463
|
+
```bash
|
|
49464
|
+
# check for SPF record
|
|
49465
|
+
dig TXT example.com +short
|
|
49466
|
+
# look for a record starting with "v=spf1"
|
|
49467
|
+
```
|
|
49468
|
+
|
|
49469
|
+
For DKIM, use [MXToolbox DKIM Lookup](https://mxtoolbox.com/dkim.aspx) or a similar tool. DKIM records are stored under a selector-specific subdomain (e.g., `google._domainkey.example.com`), and the selector name varies by email provider, so there is no single DNS query that covers all cases.
|
|
49470
|
+
|
|
49471
|
+
You can also use [MXToolbox SPF Lookup](https://mxtoolbox.com/spf.aspx) to verify SPF records online.
|
|
49472
|
+
|
|
49473
|
+
If the domain has neither an SPF record nor a DKIM record, that is the cause. Emails from that domain will be dropped by AgentMail and likely by other providers as well.
|
|
49474
|
+
|
|
49475
|
+
## What to tell the sender
|
|
49476
|
+
|
|
49477
|
+
The sender needs to configure SPF and/or DKIM on their domain's DNS. This is not something you can fix on the AgentMail side, as the records must be set up by the domain owner.
|
|
49478
|
+
|
|
49479
|
+
* Add an SPF record to authorize their mail server (e.g., `v=spf1 include:_spf.google.com ~all` for Google Workspace)
|
|
49480
|
+
* Enable DKIM signing through their email provider's admin console
|
|
49481
|
+
* Consider adding a DMARC record for full authentication coverage
|
|
49482
|
+
|
|
49483
|
+
Most email providers have setup guides: [Google Workspace](https://support.google.com/a/answer/33786), [Microsoft 365](https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/email-authentication-spf-configure), [Amazon SES](https://docs.aws.amazon.com/ses/latest/dg/send-email-authentication-spf.html).
|
|
49484
|
+
|
|
49485
|
+
## Google Workspace and internal routing
|
|
49486
|
+
|
|
49487
|
+
If the sender uses Google Workspace and the AgentMail inbox is on a subdomain of a Google Workspace domain, Google may route the email internally instead of sending it through external MX records. In this case, the email never reaches AgentMail's servers at all.
|
|
49488
|
+
|
|
49489
|
+
For example, if the Google Workspace domain is `yourcompany.com` and the AgentMail inbox is on `agents.yourcompany.com`, Google Workspace may intercept emails to `agents.yourcompany.com` and deliver them internally.
|
|
49490
|
+
|
|
49491
|
+
**How to fix:** In Google Admin Console, go to **Apps > Google Workspace > Gmail > Routing** and add a routing rule that sends mail for the AgentMail subdomain to the external MX records instead of handling it internally.
|
|
49492
|
+
|
|
49493
|
+
## Still not receiving emails?
|
|
49494
|
+
|
|
49495
|
+
If the sender's domain does have SPF/DKIM configured and emails are still not arriving:
|
|
49496
|
+
|
|
49497
|
+
* Verify your domain's MX records are correctly pointing to AgentMail (see [MX record conflicts](/knowledge-base/mx-record-conflicts))
|
|
49498
|
+
* Check that your domain is fully verified in the [AgentMail Console](https://console.agentmail.to)
|
|
49499
|
+
* Make sure you are listening for incoming emails via [webhooks or WebSockets](/knowledge-base/handling-inbound-emails)
|
|
49500
|
+
|
|
49501
|
+
If none of the above resolves the issue, reach out in our [Discord](https://discord.com/invite/hTYatWYWBc) support channel or email [support@agentmail.cc](mailto:support@agentmail.cc).
|
|
48445
49502
|
|
|
48446
49503
|
***
|
|
48447
49504
|
|
|
48448
|
-
title:
|
|
49505
|
+
title: DNS Guide: Cloudflare
|
|
48449
49506
|
subtitle: Step-by-step instructions for adding AgentMail DNS records in Cloudflare.
|
|
48450
49507
|
slug: knowledge-base/dns-cloudflare
|
|
48451
|
-
|
|
49508
|
+
---------------------
|
|
49509
|
+
|
|
49510
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
48452
49511
|
|
|
48453
49512
|
## Steps
|
|
48454
49513
|
|
|
@@ -48516,13 +49575,14 @@ Cloudflare DNS typically propagates within **1 to 5 minutes**, making it one of
|
|
|
48516
49575
|
|
|
48517
49576
|
* **Name field auto-strips domain:** Cloudflare removes the domain portion from the Name field automatically. If your DKIM selector is `agentmail._domainkey`, enter just that. Do not enter `agentmail._domainkey.yourdomain.com`, or the record will be created incorrectly.
|
|
48518
49577
|
|
|
48519
|
-
|
|
48520
49578
|
***
|
|
48521
49579
|
|
|
48522
|
-
title:
|
|
49580
|
+
title: DNS Guide: GoDaddy
|
|
48523
49581
|
subtitle: Step-by-step instructions for adding AgentMail DNS records in GoDaddy.
|
|
48524
49582
|
slug: knowledge-base/dns-godaddy
|
|
48525
|
-
|
|
49583
|
+
---------------------
|
|
49584
|
+
|
|
49585
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
48526
49586
|
|
|
48527
49587
|
## Steps
|
|
48528
49588
|
|
|
@@ -48587,13 +49647,14 @@ GoDaddy DNS typically propagates within **15 to 30 minutes**, but it can occasio
|
|
|
48587
49647
|
|
|
48588
49648
|
* **Parked domain or forwarding:** If your domain is parked or has forwarding enabled, GoDaddy may override your MX records. Disable parking and forwarding before setting up email receiving.
|
|
48589
49649
|
|
|
48590
|
-
|
|
48591
49650
|
***
|
|
48592
49651
|
|
|
48593
|
-
title:
|
|
49652
|
+
title: DNS Guide: Route 53 (AWS)
|
|
48594
49653
|
subtitle: Step-by-step instructions for adding AgentMail DNS records in AWS Route 53.
|
|
48595
49654
|
slug: knowledge-base/dns-route53
|
|
48596
|
-
|
|
49655
|
+
---------------------
|
|
49656
|
+
|
|
49657
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
48597
49658
|
|
|
48598
49659
|
## Steps
|
|
48599
49660
|
|
|
@@ -48661,13 +49722,32 @@ Route 53 name servers typically pick up changes within **60 seconds**, but full
|
|
|
48661
49722
|
|
|
48662
49723
|
* **Multiple values in one record:** Route 53 lets you add multiple values to a single record. If you need to add a second MX entry, add it as a new line in the same MX record rather than creating a separate record.
|
|
48663
49724
|
|
|
49725
|
+
* **DKIM TXT record too long (CharacterStringTooLong error):** If your DKIM record is provided as a TXT value (rather than a CNAME), the DKIM public key is often longer than the 255-character limit that Route 53 enforces per string segment. You will see an error like `CharacterStringTooLong (Value is too long)`. To fix this, split the value into two quoted strings within a single record. The split point should be near the middle of the `p=` value. The two quoted strings must have **no space and no line break** between the closing and opening quotes. For example:
|
|
49726
|
+
|
|
49727
|
+
```
|
|
49728
|
+
"v=DKIM1; k=rsa; p=MIIBIjANBgkqhki...firsthalf""secondhalf...wIDAQAB"
|
|
49729
|
+
```
|
|
49730
|
+
|
|
49731
|
+
In Route 53, paste the entire value (both quoted strings) into the **Value** field as a single entry. If Route 53 shows two separate copy-pastable values instead of one, there is likely a space or line break between the two strings. Remove it so the closing `"` and opening `"` are directly adjacent (`""`).
|
|
49732
|
+
|
|
49733
|
+
**Incorrect:** A space or line break between the two quoted strings causes Route 53 to treat them as separate values.
|
|
49734
|
+
|
|
49735
|
+
<img src="https://files.buildwithfern.com/https://agentmail-production.docs.buildwithfern.com/5145d22514b03251934e96ef49b78f8ca79e6b20bfa7ec5065a343ac547338e9/assets/route53-dkim-incorrect.png" alt="Incorrect Route 53 DKIM configuration with space between quoted strings" />
|
|
49736
|
+
|
|
49737
|
+
**Correct:** The two quoted strings are directly adjacent with no space, producing a single value in Route 53.
|
|
49738
|
+
|
|
49739
|
+
<img src="https://files.buildwithfern.com/https://agentmail-production.docs.buildwithfern.com/d67b72b3e23c286ef81bb101c57098bab684785fca4bf3791fd7f0fffe864740/assets/route53-dkim-correct.png" alt="Correct Route 53 DKIM configuration with no space between quoted strings" />
|
|
49740
|
+
|
|
49741
|
+
You can also use the AWS CLI to add the record, which handles multi-string TXT values more reliably.
|
|
48664
49742
|
|
|
48665
49743
|
***
|
|
48666
49744
|
|
|
48667
|
-
title:
|
|
49745
|
+
title: DNS Guide: Namecheap
|
|
48668
49746
|
subtitle: Step-by-step instructions for adding AgentMail DNS records in Namecheap.
|
|
48669
49747
|
slug: knowledge-base/dns-namecheap
|
|
48670
|
-
|
|
49748
|
+
---------------------
|
|
49749
|
+
|
|
49750
|
+
For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.agentmail.to/llms.txt. For full content including API reference and SDK examples, see https://docs.agentmail.to/llms-full.txt.
|
|
48671
49751
|
|
|
48672
49752
|
## Steps
|
|
48673
49753
|
|
|
@@ -48734,4 +49814,3 @@ Namecheap DNS typically propagates within **15 to 30 minutes**, but in some case
|
|
|
48734
49814
|
|
|
48735
49815
|
* **Propagation delays:** Unlike some providers, Namecheap propagation can take 15 to 30 minutes. If verification fails, wait and retry before troubleshooting further.
|
|
48736
49816
|
|
|
48737
|
-
|