agentmail 0.1.5 → 0.1.7
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/README.md +63 -0
- package/dist/cjs/BaseClient.d.ts +14 -1
- package/dist/cjs/BaseClient.js +59 -0
- package/dist/cjs/Client.d.ts +30 -29
- package/dist/cjs/Client.js +12 -53
- package/dist/cjs/api/resources/apiKeys/client/Client.d.ts +12 -12
- package/dist/cjs/api/resources/apiKeys/client/Client.js +29 -31
- package/dist/cjs/api/resources/domains/client/Client.d.ts +19 -19
- package/dist/cjs/api/resources/domains/client/Client.js +60 -53
- package/dist/cjs/api/resources/domains/types/Domain.d.ts +1 -0
- package/dist/cjs/api/resources/domains/types/DomainItem.d.ts +1 -0
- package/dist/cjs/api/resources/drafts/client/Client.d.ts +10 -10
- package/dist/cjs/api/resources/drafts/client/Client.js +23 -28
- package/dist/cjs/api/resources/events/types/DomainVerifiedEvent.d.ts +7 -0
- package/dist/cjs/api/resources/{webhooks → events}/types/EventType.d.ts +1 -0
- package/dist/cjs/api/resources/{webhooks → events}/types/EventType.js +1 -0
- package/dist/cjs/api/resources/events/types/EventTypes.d.ts +5 -0
- package/dist/cjs/api/resources/events/types/EventTypes.js +3 -0
- package/dist/cjs/api/resources/events/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/events/types/index.js +3 -0
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +30 -30
- package/dist/cjs/api/resources/inboxes/client/Client.js +55 -51
- package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.d.ts +27 -27
- package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +77 -70
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +25 -25
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +83 -73
- package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.d.ts +8 -8
- package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.js +17 -25
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +17 -17
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +51 -50
- package/dist/cjs/api/resources/inboxes/types/Inbox.d.ts +1 -0
- package/dist/cjs/api/resources/messages/types/ReplyToMessageRequest.d.ts +1 -0
- package/dist/cjs/api/resources/messages/types/SendMessageHeaders.d.ts +4 -0
- package/dist/cjs/api/resources/messages/types/SendMessageHeaders.js +3 -0
- package/dist/cjs/api/resources/messages/types/SendMessageRequest.d.ts +1 -0
- package/dist/cjs/api/resources/messages/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/messages/types/index.js +1 -0
- package/dist/cjs/api/resources/metrics/client/Client.d.ts +7 -7
- package/dist/cjs/api/resources/metrics/client/Client.js +12 -20
- package/dist/cjs/api/resources/pods/client/Client.d.ts +27 -27
- package/dist/cjs/api/resources/pods/client/Client.js +44 -43
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +15 -15
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +41 -43
- package/dist/cjs/api/resources/pods/resources/drafts/client/Client.d.ts +12 -12
- package/dist/cjs/api/resources/pods/resources/drafts/client/Client.js +30 -35
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +19 -19
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +53 -52
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +13 -13
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +39 -41
- package/dist/cjs/api/resources/threads/client/Client.d.ts +11 -11
- package/dist/cjs/api/resources/threads/client/Client.js +32 -34
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +15 -15
- package/dist/cjs/api/resources/webhooks/client/Client.js +40 -39
- package/dist/cjs/api/resources/webhooks/types/CreateWebhookRequest.d.ts +1 -1
- package/dist/cjs/api/resources/webhooks/types/Webhook.d.ts +1 -1
- package/dist/cjs/api/resources/webhooks/types/index.d.ts +0 -2
- package/dist/cjs/api/resources/webhooks/types/index.js +0 -2
- package/dist/cjs/api/resources/websockets/client/Client.d.ts +6 -6
- package/dist/cjs/api/resources/websockets/client/Client.js +8 -19
- package/dist/cjs/api/resources/websockets/client/Socket.d.ts +1 -1
- package/dist/cjs/api/resources/websockets/types/Subscribe.d.ts +5 -1
- package/dist/cjs/api/resources/websockets/types/Subscribed.d.ts +5 -1
- package/dist/cjs/auth/BearerAuthProvider.d.ts +14 -0
- package/dist/cjs/auth/BearerAuthProvider.js +72 -0
- package/dist/cjs/auth/index.d.ts +1 -0
- package/dist/cjs/auth/index.js +5 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +4 -1
- package/dist/cjs/core/auth/BearerToken.d.ts +3 -1
- package/dist/cjs/core/auth/BearerToken.js +7 -6
- package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
- package/dist/cjs/core/auth/index.d.ts +1 -0
- package/dist/cjs/core/auth/index.js +3 -1
- package/dist/cjs/core/exports.d.ts +1 -0
- package/dist/cjs/core/exports.js +1 -0
- package/dist/cjs/core/fetcher/Fetcher.d.ts +4 -1
- package/dist/cjs/core/fetcher/Fetcher.js +202 -9
- package/dist/cjs/core/fetcher/getRequestBody.d.ts +1 -1
- package/dist/cjs/core/fetcher/getRequestBody.js +4 -0
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/cjs/core/fetcher/makeRequest.js +0 -2
- package/dist/cjs/core/fetcher/requestWithRetries.js +0 -9
- package/dist/cjs/core/fetcher/signals.d.ts +0 -6
- package/dist/cjs/core/fetcher/signals.js +0 -12
- package/dist/cjs/core/headers.js +6 -4
- package/dist/cjs/core/index.d.ts +1 -0
- package/dist/cjs/core/index.js +2 -1
- package/dist/cjs/core/logging/exports.d.ts +18 -0
- package/dist/cjs/core/logging/exports.js +45 -0
- package/dist/cjs/core/logging/index.d.ts +1 -0
- package/dist/cjs/core/logging/index.js +17 -0
- package/dist/cjs/core/logging/logger.d.ts +126 -0
- package/dist/cjs/core/logging/logger.js +144 -0
- package/dist/cjs/core/schemas/Schema.d.ts +1 -0
- package/dist/cjs/core/schemas/Schema.js +1 -0
- package/dist/cjs/core/schemas/builders/primitives/index.d.ts +1 -0
- package/dist/cjs/core/schemas/builders/primitives/index.js +3 -1
- package/dist/cjs/core/schemas/builders/primitives/never.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/primitives/never.js +14 -0
- package/dist/cjs/core/url/join.js +0 -1
- package/dist/cjs/serialization/resources/domains/types/Domain.d.ts +2 -0
- package/dist/cjs/serialization/resources/domains/types/Domain.js +2 -0
- package/dist/cjs/serialization/resources/domains/types/DomainItem.d.ts +2 -0
- package/dist/cjs/serialization/resources/domains/types/DomainItem.js +2 -0
- package/dist/cjs/serialization/resources/events/types/DomainVerifiedEvent.d.ts +14 -0
- package/dist/cjs/serialization/resources/events/types/DomainVerifiedEvent.js +46 -0
- package/dist/cjs/serialization/resources/{webhooks → events}/types/EventType.d.ts +2 -2
- package/dist/cjs/serialization/resources/{webhooks → events}/types/EventType.js +1 -0
- package/dist/cjs/serialization/resources/{webhooks → events}/types/EventTypes.d.ts +1 -1
- package/dist/cjs/serialization/resources/events/types/index.d.ts +3 -0
- package/dist/cjs/serialization/resources/events/types/index.js +3 -0
- package/dist/cjs/serialization/resources/inboxes/types/Inbox.d.ts +2 -0
- package/dist/cjs/serialization/resources/inboxes/types/Inbox.js +2 -0
- package/dist/cjs/serialization/resources/messages/types/ReplyToMessageRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/messages/types/ReplyToMessageRequest.js +2 -0
- package/dist/cjs/serialization/resources/messages/types/SendMessageHeaders.d.ts +7 -0
- package/dist/cjs/serialization/resources/messages/types/SendMessageHeaders.js +39 -0
- package/dist/cjs/serialization/resources/messages/types/SendMessageRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/messages/types/SendMessageRequest.js +2 -0
- package/dist/cjs/serialization/resources/messages/types/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/messages/types/index.js +1 -0
- package/dist/cjs/serialization/resources/webhooks/types/CreateWebhookRequest.d.ts +1 -1
- package/dist/cjs/serialization/resources/webhooks/types/CreateWebhookRequest.js +1 -1
- package/dist/cjs/serialization/resources/webhooks/types/Webhook.d.ts +1 -1
- package/dist/cjs/serialization/resources/webhooks/types/Webhook.js +1 -1
- package/dist/cjs/serialization/resources/webhooks/types/index.d.ts +0 -2
- package/dist/cjs/serialization/resources/webhooks/types/index.js +0 -2
- package/dist/cjs/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.d.ts +3 -2
- package/dist/cjs/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.js +2 -0
- package/dist/cjs/serialization/resources/websockets/types/Subscribe.d.ts +4 -1
- package/dist/cjs/serialization/resources/websockets/types/Subscribe.js +4 -1
- package/dist/cjs/serialization/resources/websockets/types/Subscribed.d.ts +4 -1
- package/dist/cjs/serialization/resources/websockets/types/Subscribed.js +4 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +14 -1
- package/dist/esm/BaseClient.mjs +24 -1
- package/dist/esm/Client.d.mts +30 -29
- package/dist/esm/Client.mjs +21 -29
- package/dist/esm/api/resources/apiKeys/client/Client.d.mts +12 -12
- package/dist/esm/api/resources/apiKeys/client/Client.mjs +28 -30
- package/dist/esm/api/resources/domains/client/Client.d.mts +19 -19
- package/dist/esm/api/resources/domains/client/Client.mjs +59 -52
- package/dist/esm/api/resources/domains/types/Domain.d.mts +1 -0
- package/dist/esm/api/resources/domains/types/DomainItem.d.mts +1 -0
- package/dist/esm/api/resources/drafts/client/Client.d.mts +10 -10
- package/dist/esm/api/resources/drafts/client/Client.mjs +22 -27
- package/dist/esm/api/resources/events/types/DomainVerifiedEvent.d.mts +7 -0
- package/dist/esm/api/resources/{webhooks → events}/types/EventType.d.mts +1 -0
- package/dist/esm/api/resources/{webhooks → events}/types/EventType.mjs +1 -0
- package/dist/esm/api/resources/events/types/EventTypes.d.mts +5 -0
- package/dist/esm/api/resources/events/types/EventTypes.mjs +2 -0
- package/dist/esm/api/resources/events/types/index.d.mts +3 -0
- package/dist/esm/api/resources/events/types/index.mjs +3 -0
- package/dist/esm/api/resources/inboxes/client/Client.d.mts +30 -30
- package/dist/esm/api/resources/inboxes/client/Client.mjs +58 -54
- package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.d.mts +27 -27
- package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +76 -69
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +25 -25
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +82 -72
- package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.d.mts +8 -8
- package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.mjs +16 -24
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +17 -17
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +50 -49
- package/dist/esm/api/resources/inboxes/types/Inbox.d.mts +1 -0
- package/dist/esm/api/resources/messages/types/ReplyToMessageRequest.d.mts +1 -0
- package/dist/esm/api/resources/messages/types/SendMessageHeaders.d.mts +4 -0
- package/dist/esm/api/resources/messages/types/SendMessageHeaders.mjs +2 -0
- package/dist/esm/api/resources/messages/types/SendMessageRequest.d.mts +1 -0
- package/dist/esm/api/resources/messages/types/index.d.mts +1 -0
- package/dist/esm/api/resources/messages/types/index.mjs +1 -0
- package/dist/esm/api/resources/metrics/client/Client.d.mts +7 -7
- package/dist/esm/api/resources/metrics/client/Client.mjs +11 -19
- package/dist/esm/api/resources/pods/client/Client.d.mts +27 -27
- package/dist/esm/api/resources/pods/client/Client.mjs +47 -46
- package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +15 -15
- package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +40 -42
- package/dist/esm/api/resources/pods/resources/drafts/client/Client.d.mts +12 -12
- package/dist/esm/api/resources/pods/resources/drafts/client/Client.mjs +29 -34
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +19 -19
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +52 -51
- package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +13 -13
- package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +38 -40
- package/dist/esm/api/resources/threads/client/Client.d.mts +11 -11
- package/dist/esm/api/resources/threads/client/Client.mjs +31 -33
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +15 -15
- package/dist/esm/api/resources/webhooks/client/Client.mjs +39 -38
- package/dist/esm/api/resources/webhooks/types/CreateWebhookRequest.d.mts +1 -1
- package/dist/esm/api/resources/webhooks/types/Webhook.d.mts +1 -1
- package/dist/esm/api/resources/webhooks/types/index.d.mts +0 -2
- package/dist/esm/api/resources/webhooks/types/index.mjs +0 -2
- package/dist/esm/api/resources/websockets/client/Client.d.mts +6 -6
- package/dist/esm/api/resources/websockets/client/Client.mjs +7 -18
- package/dist/esm/api/resources/websockets/client/Socket.d.mts +1 -1
- package/dist/esm/api/resources/websockets/types/Subscribe.d.mts +5 -1
- package/dist/esm/api/resources/websockets/types/Subscribed.d.mts +5 -1
- package/dist/esm/auth/BearerAuthProvider.d.mts +14 -0
- package/dist/esm/auth/BearerAuthProvider.mjs +35 -0
- package/dist/esm/auth/index.d.mts +1 -0
- package/dist/esm/auth/index.mjs +1 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +4 -1
- package/dist/esm/core/auth/BearerToken.d.mts +3 -1
- package/dist/esm/core/auth/BearerToken.mjs +7 -6
- package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
- package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
- package/dist/esm/core/auth/index.d.mts +1 -0
- package/dist/esm/core/auth/index.mjs +1 -0
- package/dist/esm/core/exports.d.mts +1 -0
- package/dist/esm/core/exports.mjs +1 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +4 -1
- package/dist/esm/core/fetcher/Fetcher.mjs +202 -9
- package/dist/esm/core/fetcher/getRequestBody.d.mts +1 -1
- package/dist/esm/core/fetcher/getRequestBody.mjs +4 -0
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +0 -2
- package/dist/esm/core/fetcher/requestWithRetries.mjs +0 -9
- package/dist/esm/core/fetcher/signals.d.mts +0 -6
- package/dist/esm/core/fetcher/signals.mjs +0 -12
- package/dist/esm/core/headers.mjs +6 -4
- package/dist/esm/core/index.d.mts +1 -0
- package/dist/esm/core/index.mjs +1 -0
- package/dist/esm/core/logging/exports.d.mts +18 -0
- package/dist/esm/core/logging/exports.mjs +9 -0
- package/dist/esm/core/logging/index.d.mts +1 -0
- package/dist/esm/core/logging/index.mjs +1 -0
- package/dist/esm/core/logging/logger.d.mts +126 -0
- package/dist/esm/core/logging/logger.mjs +138 -0
- package/dist/esm/core/schemas/Schema.d.mts +1 -0
- package/dist/esm/core/schemas/Schema.mjs +1 -0
- package/dist/esm/core/schemas/builders/primitives/index.d.mts +1 -0
- package/dist/esm/core/schemas/builders/primitives/index.mjs +1 -0
- package/dist/esm/core/schemas/builders/primitives/never.d.mts +2 -0
- package/dist/esm/core/schemas/builders/primitives/never.mjs +11 -0
- package/dist/esm/core/url/join.mjs +0 -1
- package/dist/esm/serialization/resources/domains/types/Domain.d.mts +2 -0
- package/dist/esm/serialization/resources/domains/types/Domain.mjs +2 -0
- package/dist/esm/serialization/resources/domains/types/DomainItem.d.mts +2 -0
- package/dist/esm/serialization/resources/domains/types/DomainItem.mjs +2 -0
- package/dist/esm/serialization/resources/events/types/DomainVerifiedEvent.d.mts +14 -0
- package/dist/esm/serialization/resources/events/types/DomainVerifiedEvent.mjs +10 -0
- package/dist/esm/serialization/resources/{webhooks → events}/types/EventType.d.mts +2 -2
- package/dist/esm/serialization/resources/{webhooks → events}/types/EventType.mjs +1 -0
- package/dist/esm/serialization/resources/{webhooks → events}/types/EventTypes.d.mts +1 -1
- package/dist/esm/serialization/resources/events/types/index.d.mts +3 -0
- package/dist/esm/serialization/resources/events/types/index.mjs +3 -0
- package/dist/esm/serialization/resources/inboxes/types/Inbox.d.mts +2 -0
- package/dist/esm/serialization/resources/inboxes/types/Inbox.mjs +2 -0
- package/dist/esm/serialization/resources/messages/types/ReplyToMessageRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/messages/types/ReplyToMessageRequest.mjs +2 -0
- package/dist/esm/serialization/resources/messages/types/SendMessageHeaders.d.mts +7 -0
- package/dist/esm/serialization/resources/messages/types/SendMessageHeaders.mjs +3 -0
- package/dist/esm/serialization/resources/messages/types/SendMessageRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/messages/types/SendMessageRequest.mjs +2 -0
- package/dist/esm/serialization/resources/messages/types/index.d.mts +1 -0
- package/dist/esm/serialization/resources/messages/types/index.mjs +1 -0
- package/dist/esm/serialization/resources/webhooks/types/CreateWebhookRequest.d.mts +1 -1
- package/dist/esm/serialization/resources/webhooks/types/CreateWebhookRequest.mjs +1 -1
- package/dist/esm/serialization/resources/webhooks/types/Webhook.d.mts +1 -1
- package/dist/esm/serialization/resources/webhooks/types/Webhook.mjs +1 -1
- package/dist/esm/serialization/resources/webhooks/types/index.d.mts +0 -2
- package/dist/esm/serialization/resources/webhooks/types/index.mjs +0 -2
- package/dist/esm/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.d.mts +3 -2
- package/dist/esm/serialization/resources/websockets/client/socket/WebsocketsSocketResponse.mjs +2 -0
- package/dist/esm/serialization/resources/websockets/types/Subscribe.d.mts +4 -1
- package/dist/esm/serialization/resources/websockets/types/Subscribe.mjs +4 -1
- package/dist/esm/serialization/resources/websockets/types/Subscribed.d.mts +4 -1
- package/dist/esm/serialization/resources/websockets/types/Subscribed.mjs +4 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +1241 -123
- package/dist/llms.txt +7 -1
- package/package.json +1 -1
- package/reference.md +170 -170
- package/dist/cjs/api/resources/webhooks/types/EventTypes.d.ts +0 -5
- package/dist/esm/api/resources/webhooks/types/EventTypes.d.mts +0 -5
- /package/dist/cjs/api/resources/{webhooks/types/EventTypes.js → events/types/DomainVerifiedEvent.js} +0 -0
- /package/dist/cjs/serialization/resources/{webhooks → events}/types/EventTypes.js +0 -0
- /package/dist/esm/api/resources/{webhooks/types/EventTypes.mjs → events/types/DomainVerifiedEvent.mjs} +0 -0
- /package/dist/esm/serialization/resources/{webhooks → events}/types/EventTypes.mjs +0 -0
package/dist/llms-full.txt
CHANGED
|
@@ -171,7 +171,7 @@ This guide will walk you through installing the AgentMail SDK, authenticating wi
|
|
|
171
171
|
<Step title="Create an API Key">
|
|
172
172
|
Now that you're in the console, you'll need to create an API key to
|
|
173
173
|
authenticate your requests. Navigate to the API Keys section in your console
|
|
174
|
-
dashboard.  Click
|
|
175
175
|
"Create New API Key" and give it a descriptive name. Once created, copy the
|
|
176
176
|
API key and store it securely. Create a `.env` file in your project's root
|
|
177
177
|
directory and add your key to it. We recommend using environment variables to
|
|
@@ -312,7 +312,7 @@ Unlike traditional email providers that are designed for human scale, AgentMail
|
|
|
312
312
|
|
|
313
313
|
As the diagram below illustrates, your `organization` is the top-level container that holds all your resources. You can provision many `Inboxes` within your `organization`, each with its own `Threads`, `Messages`, and `Attachments`, allowing you to manage a large fleet of agents seamlessly.
|
|
314
314
|
|
|
315
|
-
<img src="file:
|
|
315
|
+
<img src="file:5059430e-56d3-4f25-8e53-c039ee07eae3" alt="AgentMail Organizational Hierarchy" />
|
|
316
316
|
|
|
317
317
|
<Steps>
|
|
318
318
|
<Step title="Organization">
|
|
@@ -732,7 +732,7 @@ Here is an example of a well-structured and styled HTML header:
|
|
|
732
732
|
</CodeBlocks>
|
|
733
733
|
|
|
734
734
|
<Frame caption="Look how pretty this message looks!">
|
|
735
|
-
<img src="file:
|
|
735
|
+
<img src="file:c026b6cd-f41d-4bc0-9818-5058474f4b79" alt="rendered css" />
|
|
736
736
|
</Frame>
|
|
737
737
|
|
|
738
738
|
## Receiving `Messages`
|
|
@@ -1507,6 +1507,256 @@ Pod: "Marketing-Agent"
|
|
|
1507
1507
|
* Explore [Domains](/custom-domains) to set up custom email domains for your pods
|
|
1508
1508
|
|
|
1509
1509
|
|
|
1510
|
+
# Integrations
|
|
1511
|
+
|
|
1512
|
+
> Overview of AgentMail's integrations
|
|
1513
|
+
|
|
1514
|
+
## Platforms
|
|
1515
|
+
|
|
1516
|
+
<CardGroup>
|
|
1517
|
+
<Card title="Replit" icon="fa-solid fa-box-open" href="replit" />
|
|
1518
|
+
|
|
1519
|
+
<Card title="Smithery" icon="fa-solid fa-box-open" href="smithery" />
|
|
1520
|
+
</CardGroup>
|
|
1521
|
+
|
|
1522
|
+
## Frameworks
|
|
1523
|
+
|
|
1524
|
+
<CardGroup>
|
|
1525
|
+
<Card title="Mastra" icon="fa-solid fa-box-open" href="mastra" />
|
|
1526
|
+
|
|
1527
|
+
<Card title="CrewAI" icon="fa-solid fa-box-open" href="crewai" />
|
|
1528
|
+
</CardGroup>
|
|
1529
|
+
|
|
1530
|
+
|
|
1531
|
+
# Replit
|
|
1532
|
+
|
|
1533
|
+
> AgentMail's Replit integration
|
|
1534
|
+
|
|
1535
|
+
## Getting started
|
|
1536
|
+
|
|
1537
|
+
Replit is a cloud-based app and agent builder with a built in IDE, AI assistant, and deployment infrastructure.
|
|
1538
|
+
|
|
1539
|
+
AgentMail is a "connector" integration on Replit, meaning your Replit apps and agents can use it directly.
|
|
1540
|
+
|
|
1541
|
+
### Setup
|
|
1542
|
+
|
|
1543
|
+
Navigate to the Intregrations tab in the Replit builder. Find AgentMail and click Connect/Sign in. Then paste in your AgentMail API key from the AgentMail Console. That's it.
|
|
1544
|
+
|
|
1545
|
+
## How it works
|
|
1546
|
+
|
|
1547
|
+
Replit uses Mastra, a TypeScript framework for building agents. Everytime you create a new app/agent Replit will generate a set of Mastra tools to interface with the AgentMail API, based on your use case and requirements.
|
|
1548
|
+
|
|
1549
|
+
Below is a collections of prebuilt tools that Replit can use out of the box to serve virtually any use case.
|
|
1550
|
+
|
|
1551
|
+
### Tools
|
|
1552
|
+
|
|
1553
|
+
<CodeBlocks>
|
|
1554
|
+
```typescript title="TypeScript"
|
|
1555
|
+
import { createTool } from '@mastra/core/tools'
|
|
1556
|
+
import { z } from 'zod'
|
|
1557
|
+
|
|
1558
|
+
import { AgentMailClient } from 'agentmail'
|
|
1559
|
+
|
|
1560
|
+
const ListItemsInput = z.object({
|
|
1561
|
+
limit: z.number().optional().describe('Max number of items to return'),
|
|
1562
|
+
pageToken: z.string().optional().describe('Pagination page token'),
|
|
1563
|
+
})
|
|
1564
|
+
|
|
1565
|
+
const InboxId = z.string().describe('ID of inbox')
|
|
1566
|
+
|
|
1567
|
+
const GetInboxInput = z.object({ inboxId: InboxId })
|
|
1568
|
+
|
|
1569
|
+
const CreateInboxInput = z.object({
|
|
1570
|
+
username: z.string().optional().describe('Username'),
|
|
1571
|
+
domain: z.string().optional().describe('Domain'),
|
|
1572
|
+
displayName: z.string().optional().describe('Display name'),
|
|
1573
|
+
})
|
|
1574
|
+
|
|
1575
|
+
const ListInboxItemsInput = ListItemsInput.extend({
|
|
1576
|
+
inboxId: InboxId,
|
|
1577
|
+
labels: z.array(z.string()).optional().describe('Filter items with labels'),
|
|
1578
|
+
before: z.coerce.date().optional().describe('Filter items before datetime'),
|
|
1579
|
+
after: z.coerce.date().optional().describe('Filter items after datetime'),
|
|
1580
|
+
})
|
|
1581
|
+
|
|
1582
|
+
const GetThreadInput = GetInboxInput.extend({
|
|
1583
|
+
threadId: z.string().describe('ID of thread'),
|
|
1584
|
+
})
|
|
1585
|
+
|
|
1586
|
+
const MessageId = z.string().describe('ID of message')
|
|
1587
|
+
|
|
1588
|
+
const BaseMessageInput = z.object({
|
|
1589
|
+
inboxId: InboxId,
|
|
1590
|
+
text: z.string().optional().describe('Plain text body'),
|
|
1591
|
+
html: z.string().optional().describe('HTML body'),
|
|
1592
|
+
labels: z.array(z.string()).optional().describe('Labels'),
|
|
1593
|
+
})
|
|
1594
|
+
|
|
1595
|
+
const SendMessageInput = BaseMessageInput.extend({
|
|
1596
|
+
to: z.union([z.string(), z.array(z.string())]).describe('To recipients'),
|
|
1597
|
+
cc: z
|
|
1598
|
+
.union([z.string(), z.array(z.string())])
|
|
1599
|
+
.optional()
|
|
1600
|
+
.describe('CC recipients'),
|
|
1601
|
+
bcc: z
|
|
1602
|
+
.union([z.string(), z.array(z.string())])
|
|
1603
|
+
.optional()
|
|
1604
|
+
.describe('BCC recipients'),
|
|
1605
|
+
})
|
|
1606
|
+
|
|
1607
|
+
const ReplyToMessageInput = BaseMessageInput.extend({ messageId: MessageId })
|
|
1608
|
+
|
|
1609
|
+
const UpdateMessageInput = z.object({
|
|
1610
|
+
inboxId: InboxId,
|
|
1611
|
+
messageId: MessageId,
|
|
1612
|
+
addLabels: z.array(z.string()).optional().describe('Labels to add'),
|
|
1613
|
+
removeLabels: z.array(z.string()).optional().describe('Labels to remove'),
|
|
1614
|
+
})
|
|
1615
|
+
|
|
1616
|
+
const listInboxesTool = createTool({
|
|
1617
|
+
id: 'list-inboxes',
|
|
1618
|
+
description: 'List inboxes',
|
|
1619
|
+
inputSchema: ListItemsInput,
|
|
1620
|
+
execute: ({ context }) => {
|
|
1621
|
+
const client = new AgentMailClient()
|
|
1622
|
+
return client.inboxes.list(context)
|
|
1623
|
+
},
|
|
1624
|
+
})
|
|
1625
|
+
|
|
1626
|
+
const createInboxTool = createTool({
|
|
1627
|
+
id: 'create-inbox',
|
|
1628
|
+
description: 'Create inbox',
|
|
1629
|
+
inputSchema: CreateInboxInput,
|
|
1630
|
+
execute: ({ context }) => {
|
|
1631
|
+
const client = new AgentMailClient()
|
|
1632
|
+
return client.inboxes.create(context)
|
|
1633
|
+
},
|
|
1634
|
+
})
|
|
1635
|
+
|
|
1636
|
+
const deleteInboxTool = createTool({
|
|
1637
|
+
id: 'delete-inbox',
|
|
1638
|
+
description: 'Delete inbox',
|
|
1639
|
+
inputSchema: GetInboxInput,
|
|
1640
|
+
execute: ({ context }) => {
|
|
1641
|
+
const client = new AgentMailClient()
|
|
1642
|
+
return client.inboxes.delete(context.inboxId)
|
|
1643
|
+
},
|
|
1644
|
+
})
|
|
1645
|
+
|
|
1646
|
+
const listThreadsTool = createTool({
|
|
1647
|
+
id: 'list-threads',
|
|
1648
|
+
description: 'List threads',
|
|
1649
|
+
inputSchema: ListInboxItemsInput,
|
|
1650
|
+
execute: ({ context }) => {
|
|
1651
|
+
const client = new AgentMailClient()
|
|
1652
|
+
return client.inboxes.threads.list(context.inboxId, context)
|
|
1653
|
+
},
|
|
1654
|
+
})
|
|
1655
|
+
|
|
1656
|
+
const getThreadTool = createTool({
|
|
1657
|
+
id: 'get-thread',
|
|
1658
|
+
description: 'Get thread and its messages',
|
|
1659
|
+
inputSchema: GetThreadInput,
|
|
1660
|
+
execute: ({ context }) => {
|
|
1661
|
+
const client = new AgentMailClient()
|
|
1662
|
+
return client.inboxes.threads.get(context.inboxId, context.threadId)
|
|
1663
|
+
},
|
|
1664
|
+
})
|
|
1665
|
+
|
|
1666
|
+
const sendMessageTool = createTool({
|
|
1667
|
+
id: 'send-message',
|
|
1668
|
+
description: 'Send message',
|
|
1669
|
+
inputSchema: SendMessageInput,
|
|
1670
|
+
execute: ({ context }) => {
|
|
1671
|
+
const client = new AgentMailClient()
|
|
1672
|
+
return client.inboxes.messages.send(context.inboxId, context)
|
|
1673
|
+
},
|
|
1674
|
+
})
|
|
1675
|
+
|
|
1676
|
+
const replyToMessageTool = createTool({
|
|
1677
|
+
id: 'reply-to-message',
|
|
1678
|
+
description: 'Reply to message',
|
|
1679
|
+
inputSchema: ReplyToMessageInput,
|
|
1680
|
+
execute: ({ context }) => {
|
|
1681
|
+
const client = new AgentMailClient()
|
|
1682
|
+
return client.inboxes.messages.reply(context.inboxId, context.messageId, context)
|
|
1683
|
+
},
|
|
1684
|
+
})
|
|
1685
|
+
|
|
1686
|
+
const updateMessageTool = createTool({
|
|
1687
|
+
id: 'update-message',
|
|
1688
|
+
description: 'Update message',
|
|
1689
|
+
inputSchema: UpdateMessageInput,
|
|
1690
|
+
execute: ({ context }) => {
|
|
1691
|
+
const client = new AgentMailClient()
|
|
1692
|
+
return client.inboxes.messages.update(context.inboxId, context.messageId, context)
|
|
1693
|
+
},
|
|
1694
|
+
})
|
|
1695
|
+
|
|
1696
|
+
export const tools = {
|
|
1697
|
+
listInboxesTool,
|
|
1698
|
+
createInboxTool,
|
|
1699
|
+
deleteInboxTool,
|
|
1700
|
+
listThreadsTool,
|
|
1701
|
+
getThreadTool,
|
|
1702
|
+
sendMessageTool,
|
|
1703
|
+
replyToMessageTool,
|
|
1704
|
+
updateMessageTool,
|
|
1705
|
+
}
|
|
1706
|
+
```
|
|
1707
|
+
</CodeBlocks>
|
|
1708
|
+
|
|
1709
|
+
## About AgentMail
|
|
1710
|
+
|
|
1711
|
+
AgentMail is the email inbox API for AI agents. It gives agents their own email inboxes, like Gmail does for humans. Unlike other email APIs, AgentMail is for both sending and receiving, supporting two-way email conversations.
|
|
1712
|
+
|
|
1713
|
+
Email is critical to identity and communication on the internet. Much of the context that people use for their work exists within email. AgentMail enables AI agents to meet people where they work and use the internet like humans do.
|
|
1714
|
+
|
|
1715
|
+
### Features
|
|
1716
|
+
|
|
1717
|
+
1. **Programmatic inboxes:** Create, manage, and delete inboxes via API
|
|
1718
|
+
2. **Threads and replies:** Facilitate 2-way emals conversations with persistant and relevant context
|
|
1719
|
+
3. **Attachments:** Send, receive, and download attachments so agents can work with documents
|
|
1720
|
+
4. **Realtime events:** Build event-driven agents and systems with Webhooks and Websockets
|
|
1721
|
+
5. **Custom domains:** Whitelabel your or your customers' inboxes to automate client-facing work
|
|
1722
|
+
6. **Language/Framework SDKs:** Use your prefered language and framework
|
|
1723
|
+
|
|
1724
|
+
### Use cases
|
|
1725
|
+
|
|
1726
|
+
1. **Process inbound:** Receive, triage, and process inbound emails
|
|
1727
|
+
2. **Automate outbound:** Draft, schedule, and send outbound emails
|
|
1728
|
+
3. **Join conversations:** Address an agent directly or CC it in an existing email thread
|
|
1729
|
+
4. **Identify and authenticate:** Agents can sign up, receive 2FA code, and authenticate with any application
|
|
1730
|
+
|
|
1731
|
+
### Verticals
|
|
1732
|
+
|
|
1733
|
+
1. **Operations:** Automate internal workflows, vendor communications, and cross-team coordination
|
|
1734
|
+
2. **Support:** Handle customer inquiries, ticket management, and automated responses at scale
|
|
1735
|
+
3. **Procurement:** Streamline vendor onboarding, RFP processes, and purchase order management
|
|
1736
|
+
4. **Sales:** Automate lead qualification, follow-ups, and customer outreach campaigns
|
|
1737
|
+
5. **Recruiting:** Automate candidate outreach, interview scheduling, and applicant communication
|
|
1738
|
+
|
|
1739
|
+
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.
|
|
1740
|
+
|
|
1741
|
+
|
|
1742
|
+
# Smithery
|
|
1743
|
+
|
|
1744
|
+
> AgentMail's Smithery integration
|
|
1745
|
+
|
|
1746
|
+
|
|
1747
|
+
|
|
1748
|
+
# Mastra
|
|
1749
|
+
|
|
1750
|
+
> AgentMail's Mastra integration
|
|
1751
|
+
|
|
1752
|
+
|
|
1753
|
+
|
|
1754
|
+
# CrewAI
|
|
1755
|
+
|
|
1756
|
+
> AgentMail's CrewAI integration
|
|
1757
|
+
|
|
1758
|
+
|
|
1759
|
+
|
|
1510
1760
|
# Guide: Sending & Receiving Email
|
|
1511
1761
|
|
|
1512
1762
|
> A step-by-step guide to the practical workflow of sending initial emails and handling replies to have a full conversation.
|
|
@@ -1759,7 +2009,7 @@ Configuring your domain is a three-step process: add the domain via API, copy th
|
|
|
1759
2009
|
After creating your domain in the AgentMail Console, click the "Download BIND Zone File" button to get the complete zone file.
|
|
1760
2010
|
|
|
1761
2011
|
<Frame caption="Downloading BIND zone file from AgentMail Console">
|
|
1762
|
-
<img src="file:
|
|
2012
|
+
<img src="file:abd861e7-e3c4-4253-843d-5e1877e84487" alt="Download BIND Zone File from Console" />
|
|
1763
2013
|
</Frame>
|
|
1764
2014
|
|
|
1765
2015
|
<Tabs>
|
|
@@ -1770,13 +2020,13 @@ Configuring your domain is a three-step process: add the domain via API, copy th
|
|
|
1770
2020
|
2. Click **"Import zone file"** in the top right corner
|
|
1771
2021
|
|
|
1772
2022
|
<Frame caption="Importing BIND zone file in AWS Route 53">
|
|
1773
|
-
<img src="file:
|
|
2023
|
+
<img src="file:1381b9e1-8945-463b-8211-f3cb7d8ff390" alt="AWS Route 53 BIND Import" />
|
|
1774
2024
|
</Frame>
|
|
1775
2025
|
|
|
1776
2026
|
3. Paste the CONTENTS of downloaded BIND zone file
|
|
1777
2027
|
|
|
1778
2028
|
<Frame caption="Open the file with text editor and paste the contents. It should look similar to what we have in this image.">
|
|
1779
|
-
<img src="file:
|
|
2029
|
+
<img src="file:a1ec7b55-2283-4e6c-af6f-5bfca7ad00d6" alt="AWS Route 53 BIND Import" />
|
|
1780
2030
|
</Frame>
|
|
1781
2031
|
|
|
1782
2032
|
4. Review the records and click **"Import"**
|
|
@@ -1789,13 +2039,13 @@ Configuring your domain is a three-step process: add the domain via API, copy th
|
|
|
1789
2039
|
2. Navigate to **DNS > Records**
|
|
1790
2040
|
|
|
1791
2041
|
<Frame caption="This is what the page looks like">
|
|
1792
|
-
<img src="file:
|
|
2042
|
+
<img src="file:ba36964f-3f3e-439c-80f0-c71884757f68" alt="Cloudflare BIND Import" />
|
|
1793
2043
|
</Frame>
|
|
1794
2044
|
|
|
1795
2045
|
3. Click **"Import and Export"**
|
|
1796
2046
|
|
|
1797
2047
|
<Frame caption="You should be able to just drop the file in">
|
|
1798
|
-
<img src="file:
|
|
2048
|
+
<img src="file:990c0430-f086-4365-813f-a3b6463d5e07" alt="Cloudflare BIND Import" />
|
|
1799
2049
|
</Frame>
|
|
1800
2050
|
|
|
1801
2051
|
4. Upload the downloaded BIND zone file as is
|
|
@@ -1808,13 +2058,13 @@ Configuring your domain is a three-step process: add the domain via API, copy th
|
|
|
1808
2058
|
2. Navigate to the **DNS** subtab of the domain you want to send from
|
|
1809
2059
|
|
|
1810
2060
|
<Frame caption="Click on this button!">
|
|
1811
|
-
<img src="file:
|
|
2061
|
+
<img src="file:86a3ef0e-6f6e-4eb3-a721-52c1730f0b49" alt="Porkbun DNS Management" />
|
|
1812
2062
|
</Frame>
|
|
1813
2063
|
|
|
1814
2064
|
3. Scroll down to the quick upload section
|
|
1815
2065
|
|
|
1816
2066
|
<Frame caption="Upload your BIND zone file here">
|
|
1817
|
-
<img src="file:
|
|
2067
|
+
<img src="file:295db837-0235-4696-b96d-5318f68b49f5" alt="Porkbun Zone File Import" />
|
|
1818
2068
|
</Frame>
|
|
1819
2069
|
|
|
1820
2070
|
4. Upload the downloaded BIND zone file as is
|
|
@@ -1898,7 +2148,7 @@ Configuring your domain is a three-step process: add the domain via API, copy th
|
|
|
1898
2148
|
* **Value:** Can directly copy paste the `value` from the API response (e.g., `{random_letters_numbers}.dkim.amazonses.com`).
|
|
1899
2149
|
|
|
1900
2150
|
<Frame caption="Example of adding a CNAME record in Route 53. Notice that AWS already appends the root domain (agentmail.cc) to the end of the name value!">
|
|
1901
|
-
<img src="file:
|
|
2151
|
+
<img src="file:e57473d0-08bd-4ddc-ba64-0ff6c2e49ccc" alt="AWS Route 53 Record Configuration" />
|
|
1902
2152
|
</Frame>
|
|
1903
2153
|
|
|
1904
2154
|
* **TXT (DMARC/SPF):**
|
|
@@ -2008,7 +2258,7 @@ DNS can be tricky. Here are some common issues and how to resolve them.
|
|
|
2008
2258
|
|
|
2009
2259
|
## Best Practices for Domain Management
|
|
2010
2260
|
|
|
2011
|
-
Check out our guide on [Email Deliverability](/
|
|
2261
|
+
Check out our guide on [Email Deliverability](/email-deliverability) for tips on warming up your new domain and maintaining a healthy sender reputation.
|
|
2012
2262
|
|
|
2013
2263
|
|
|
2014
2264
|
# Managing Your Domains
|
|
@@ -2434,13 +2684,13 @@ Ngrok creates a secure tunnel from a public URL to your local development server
|
|
|
2434
2684
|
|
|
2435
2685
|
Visit [ngrok.com](https://ngrok.com/) and click "Sign up" to create a free account.
|
|
2436
2686
|
|
|
2437
|
-
<img src="file:
|
|
2687
|
+
<img src="file:b2e9355e-36a9-46dc-bbe0-8192253fc301" alt="Ngrok homepage" />
|
|
2438
2688
|
|
|
2439
2689
|
### 1.2 Choose your platform and install
|
|
2440
2690
|
|
|
2441
2691
|
After logging in, ngrok will guide you through the setup process. Select your operating system and follow the installation instructions.
|
|
2442
2692
|
|
|
2443
|
-
<img src="file:
|
|
2693
|
+
<img src="file:3905deb7-315f-48fe-adee-1f4e4a115bcd" alt="Ngrok setup instructions" />
|
|
2444
2694
|
|
|
2445
2695
|
For macOS, you can install ngrok via Homebrew:
|
|
2446
2696
|
|
|
@@ -2486,7 +2736,7 @@ ngrok http 3000
|
|
|
2486
2736
|
|
|
2487
2737
|
You should see output similar to this:
|
|
2488
2738
|
|
|
2489
|
-
<img src="file:
|
|
2739
|
+
<img src="file:96fe265e-bc8e-40fc-8bb1-a53acadb74ca" alt="Ngrok terminal output" />
|
|
2490
2740
|
|
|
2491
2741
|
Copy the **Forwarding URL** (e.g., `https://your-subdomain.ngrok-free.app`). This is the public URL that AgentMail will use to send webhooks.
|
|
2492
2742
|
|
|
@@ -2583,7 +2833,7 @@ python webhook_receiver.py
|
|
|
2583
2833
|
|
|
2584
2834
|
Open your browser and visit `http://127.0.0.1:3000` to see the status page confirming your webhook receiver is running:
|
|
2585
2835
|
|
|
2586
|
-
<img src="file:
|
|
2836
|
+
<img src="file:6e602847-1e91-47d2-8aa0-c4d8ca72fed4" alt="Webhook receiver status page" />
|
|
2587
2837
|
|
|
2588
2838
|
## Testing Your Setup
|
|
2589
2839
|
|
|
@@ -2705,7 +2955,7 @@ How you send your emails is just as important as what you send. If you're sendin
|
|
|
2705
2955
|
more natural to email providers. AgentMail's ability to create inboxes at
|
|
2706
2956
|
scale makes this strategy easy to implement.
|
|
2707
2957
|
|
|
2708
|
-
<img src="file:
|
|
2958
|
+
<img src="file:d79176d8-08fb-4eba-b880-66bfcf164f59" alt="Diagram comparing one inbox sending 1000 emails vs. five inboxes sending 200 each." />
|
|
2709
2959
|
</Step>
|
|
2710
2960
|
|
|
2711
2961
|
<Step title="Protect Your Reputation with Multiple Domains">
|
|
@@ -3293,6 +3543,7 @@ Create a file named `agent.py` and paste the following code:
|
|
|
3293
3543
|
from flask import Flask, request, Response
|
|
3294
3544
|
import ngrok
|
|
3295
3545
|
from agentmail import AgentMail
|
|
3546
|
+
import threading
|
|
3296
3547
|
|
|
3297
3548
|
# Configuration
|
|
3298
3549
|
PORT = 8080
|
|
@@ -3302,6 +3553,7 @@ Create a file named `agent.py` and paste the following code:
|
|
|
3302
3553
|
# Initialize Flask app and AgentMail client
|
|
3303
3554
|
app = Flask(__name__)
|
|
3304
3555
|
client = AgentMail()
|
|
3556
|
+
processed_messages = set() # Track processed message IDs to prevent duplicates
|
|
3305
3557
|
|
|
3306
3558
|
|
|
3307
3559
|
def setup_agentmail():
|
|
@@ -3334,6 +3586,7 @@ Create a file named `agent.py` and paste the following code:
|
|
|
3334
3586
|
webhook = client.webhooks.create(
|
|
3335
3587
|
url=f"{listener.url()}/webhook/agentmail",
|
|
3336
3588
|
event_types=["message.received"],
|
|
3589
|
+
inbox_ids=[inbox.inbox_id],
|
|
3337
3590
|
client_id=f"{INBOX_USERNAME}-webhook"
|
|
3338
3591
|
)
|
|
3339
3592
|
print(f"✓ Webhook created")
|
|
@@ -3361,25 +3614,8 @@ Create a file named `agent.py` and paste the following code:
|
|
|
3361
3614
|
)
|
|
3362
3615
|
|
|
3363
3616
|
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
"""Webhook endpoint to receive incoming email notifications."""
|
|
3367
|
-
payload = request.json
|
|
3368
|
-
event_type = payload.get('type') or payload.get('event_type')
|
|
3369
|
-
|
|
3370
|
-
# Ignore outgoing messages
|
|
3371
|
-
if event_type == 'message.sent':
|
|
3372
|
-
return Response(status=200)
|
|
3373
|
-
|
|
3374
|
-
message = payload.get('message', {})
|
|
3375
|
-
message_id = message.get('message_id')
|
|
3376
|
-
inbox_id = message.get('inbox_id')
|
|
3377
|
-
from_field = message.get('from_', '') or message.get('from', '')
|
|
3378
|
-
|
|
3379
|
-
# Validate required fields
|
|
3380
|
-
if not message_id or not inbox_id or not from_field:
|
|
3381
|
-
return Response(status=200)
|
|
3382
|
-
|
|
3617
|
+
def process_and_reply(message_id, inbox_id, from_field, subject, message):
|
|
3618
|
+
"""Process incoming message and send reply in background."""
|
|
3383
3619
|
# Extract sender email and name
|
|
3384
3620
|
if '<' in from_field and '>' in from_field:
|
|
3385
3621
|
sender_email = from_field.split('<')[1].split('>')[0].strip()
|
|
@@ -3390,10 +3626,8 @@ Create a file named `agent.py` and paste the following code:
|
|
|
3390
3626
|
sender_email = from_field.strip()
|
|
3391
3627
|
sender_name = sender_email.split('@')[0].title() if '@' in sender_email else 'Friend'
|
|
3392
3628
|
|
|
3393
|
-
subject = message.get('subject', '(no subject)')
|
|
3394
|
-
|
|
3395
3629
|
# Log incoming email
|
|
3396
|
-
print(f"
|
|
3630
|
+
print(f"Processing email from {sender_email}: {subject}")
|
|
3397
3631
|
|
|
3398
3632
|
# Generate and send auto-reply
|
|
3399
3633
|
try:
|
|
@@ -3408,6 +3642,41 @@ Create a file named `agent.py` and paste the following code:
|
|
|
3408
3642
|
except Exception as e:
|
|
3409
3643
|
print(f"Error: {e}\n")
|
|
3410
3644
|
|
|
3645
|
+
|
|
3646
|
+
@app.route('/webhook/agentmail', methods=['POST'])
|
|
3647
|
+
def receive_webhook():
|
|
3648
|
+
"""Webhook endpoint to receive incoming email notifications."""
|
|
3649
|
+
payload = request.json
|
|
3650
|
+
event_type = payload.get('type') or payload.get('event_type')
|
|
3651
|
+
|
|
3652
|
+
# Ignore outgoing messages
|
|
3653
|
+
if event_type == 'message.sent':
|
|
3654
|
+
return Response(status=200)
|
|
3655
|
+
|
|
3656
|
+
message = payload.get('message', {})
|
|
3657
|
+
message_id = message.get('message_id')
|
|
3658
|
+
inbox_id = message.get('inbox_id')
|
|
3659
|
+
from_field = message.get('from_', '') or message.get('from', '')
|
|
3660
|
+
|
|
3661
|
+
# Validate required fields
|
|
3662
|
+
if not message_id or not inbox_id or not from_field:
|
|
3663
|
+
return Response(status=200)
|
|
3664
|
+
|
|
3665
|
+
# prevent duplicate
|
|
3666
|
+
if message_id in processed_messages:
|
|
3667
|
+
return Response(status=200)
|
|
3668
|
+
processed_messages.add(message_id)
|
|
3669
|
+
|
|
3670
|
+
subject = message.get('subject', '(no subject)')
|
|
3671
|
+
|
|
3672
|
+
# Process in background thread and return immediately
|
|
3673
|
+
thread = threading.Thread(
|
|
3674
|
+
target=process_and_reply,
|
|
3675
|
+
args=(message_id, inbox_id, from_field, subject, message)
|
|
3676
|
+
)
|
|
3677
|
+
thread.daemon = True
|
|
3678
|
+
thread.start()
|
|
3679
|
+
|
|
3411
3680
|
return Response(status=200)
|
|
3412
3681
|
|
|
3413
3682
|
|
|
@@ -4705,7 +4974,7 @@ Done
|
|
|
4705
4974
|
|
|
4706
4975
|
Go to your AgentMail inbox and filter by labels to organize your emails:
|
|
4707
4976
|
|
|
4708
|
-
<img src="file:
|
|
4977
|
+
<img src="file:19536629-9971-42f0-b8c1-ffa1f9849fd5" alt="Test image" />
|
|
4709
4978
|
|
|
4710
4979
|
**Filter by sentiment:**
|
|
4711
4980
|
|
|
@@ -4875,12 +5144,545 @@ Ready to build your own intelligent email agent? Check out our [quickstart guide
|
|
|
4875
5144
|
</AccordionGroup>
|
|
4876
5145
|
|
|
4877
5146
|
|
|
5147
|
+
# Email Reply Extraction with Talon
|
|
5148
|
+
|
|
5149
|
+
> Learn how to use Talon to extract new content from email replies, removing quoted text with 93.8% accuracy.
|
|
5150
|
+
|
|
5151
|
+
## Why Talon?
|
|
5152
|
+
|
|
5153
|
+
Email threads accumulate quoted replies that clutter the actual content. When processing emails programmatically, you need just the new message, not the entire conversation history.
|
|
5154
|
+
|
|
5155
|
+
**Talon solves this problem** by extracting clean reply content through sophisticated pattern matching and structural analysis.
|
|
5156
|
+
|
|
5157
|
+
### Use Cases
|
|
5158
|
+
|
|
5159
|
+
* **AI Email Agents**: Extract new user messages without processing entire thread history
|
|
5160
|
+
* **Email Automation**: Parse replies to identify actionable content
|
|
5161
|
+
* **Thread Analysis**: Build conversation flows by isolating individual contributions
|
|
5162
|
+
* **Inbox Management**: Process only new information from replies
|
|
5163
|
+
|
|
5164
|
+
### Why Choose Talon?
|
|
5165
|
+
|
|
5166
|
+
<CardGroup cols={2}>
|
|
5167
|
+
<Card title="HTML Email Support" icon="fa-regular fa-file-code">
|
|
5168
|
+
Handles Gmail, Outlook, Apple Mail, Thunderbird HTML structures
|
|
5169
|
+
</Card>
|
|
5170
|
+
|
|
5171
|
+
<Card title="High Accuracy" icon="fa-regular fa-bullseye">
|
|
5172
|
+
93.8% success rate across 64 real-world test cases
|
|
5173
|
+
</Card>
|
|
5174
|
+
|
|
5175
|
+
<Card title="Multi-language" icon="fa-regular fa-globe">
|
|
5176
|
+
Supports English, Japanese, Swedish, Polish, Dutch, German
|
|
5177
|
+
</Card>
|
|
5178
|
+
|
|
5179
|
+
<Card title="Fast Performance" icon="fa-regular fa-gauge-high">
|
|
5180
|
+
1.92ms average processing time, 488 emails/second
|
|
5181
|
+
</Card>
|
|
5182
|
+
</CardGroup>
|
|
5183
|
+
|
|
5184
|
+
***
|
|
5185
|
+
|
|
5186
|
+
## How Talon Works
|
|
5187
|
+
|
|
5188
|
+
Talon uses two complementary approaches depending on email format:
|
|
5189
|
+
|
|
5190
|
+
### Plain Text Processing (6-Stage Pipeline)
|
|
5191
|
+
|
|
5192
|
+
1. **Line Classification**: Assigns markers to each line ('t'=text, 'm'=quote marker, 's'=splitter, 'e'=empty)
|
|
5193
|
+
2. **Pattern Matching**: Applies regex to marker sequences to identify quoted blocks
|
|
5194
|
+
3. **Content Extraction**: Removes quoted lines and returns clean text
|
|
5195
|
+
|
|
5196
|
+
Recognizes patterns like:
|
|
5197
|
+
|
|
5198
|
+
* Standard quote markers (`>`)
|
|
5199
|
+
* Reply headers ("On \[date] \[name] wrote:")
|
|
5200
|
+
* Forward indicators ("-----Original Message-----")
|
|
5201
|
+
|
|
5202
|
+
### HTML Processing (8-Stage Pipeline)
|
|
5203
|
+
|
|
5204
|
+
1. **Structural Removal**: Directly removes known quotation elements (Gmail divs, blockquotes, Outlook markup)
|
|
5205
|
+
2. **Checkpoint Fallback**: For non-standard HTML, maps elements to text lines, applies text patterns, removes corresponding HTML
|
|
5206
|
+
|
|
5207
|
+
### Processing Systems
|
|
5208
|
+
|
|
5209
|
+
**Quotation Removal** (Primary)
|
|
5210
|
+
|
|
5211
|
+
* Removes quoted replies from thread
|
|
5212
|
+
* No initialization required
|
|
5213
|
+
* Rule-based pattern matching
|
|
5214
|
+
|
|
5215
|
+
***
|
|
5216
|
+
|
|
5217
|
+
## Getting Started
|
|
5218
|
+
|
|
5219
|
+
<Steps>
|
|
5220
|
+
<Step title="Install Talon">
|
|
5221
|
+
Install via pip with required workaround for Python 3.11+:
|
|
5222
|
+
|
|
5223
|
+
<CodeBlocks>
|
|
5224
|
+
```bash
|
|
5225
|
+
pip install talon
|
|
5226
|
+
```
|
|
5227
|
+
</CodeBlocks>
|
|
5228
|
+
</Step>
|
|
5229
|
+
|
|
5230
|
+
<Step title="Apply Python 3.11+ Workaround">
|
|
5231
|
+
Required fix for cchardet dependency:
|
|
5232
|
+
|
|
5233
|
+
<CodeBlocks>
|
|
5234
|
+
```python
|
|
5235
|
+
# Import workaround BEFORE importing talon
|
|
5236
|
+
import sys
|
|
5237
|
+
import chardet
|
|
5238
|
+
sys.modules['cchardet'] = chardet
|
|
5239
|
+
|
|
5240
|
+
# Now safe to import talon
|
|
5241
|
+
import talon
|
|
5242
|
+
from talon import quotations
|
|
5243
|
+
```
|
|
5244
|
+
</CodeBlocks>
|
|
5245
|
+
|
|
5246
|
+
<Callout intent="warn">
|
|
5247
|
+
This workaround is **required** for Python 3.11+.
|
|
5248
|
+
</Callout>
|
|
5249
|
+
</Step>
|
|
5250
|
+
|
|
5251
|
+
<Step title="Extract Reply Content">
|
|
5252
|
+
Basic usage for plain text and HTML:
|
|
5253
|
+
|
|
5254
|
+
<CodeBlocks>
|
|
5255
|
+
```python title="Plain Text"
|
|
5256
|
+
from talon import quotations
|
|
5257
|
+
|
|
5258
|
+
email = """Great work on the project!
|
|
5259
|
+
|
|
5260
|
+
On Mon, Apr 11, 2011 at 6:54 PM, Bob wrote:
|
|
5261
|
+
> Can you review the document?
|
|
5262
|
+
> Need feedback by Friday.
|
|
5263
|
+
"""
|
|
5264
|
+
|
|
5265
|
+
clean_reply = quotations.extract_from_plain(email)
|
|
5266
|
+
# Result: "Great work on the project!"
|
|
5267
|
+
```
|
|
5268
|
+
|
|
5269
|
+
```python title="HTML"
|
|
5270
|
+
from talon import quotations
|
|
5271
|
+
|
|
5272
|
+
html_email = """
|
|
5273
|
+
<html><body>
|
|
5274
|
+
<div>Thanks for the update!</div>
|
|
5275
|
+
<div class="gmail_quote">
|
|
5276
|
+
<div>On Mon, Alice wrote:</div>
|
|
5277
|
+
<blockquote>Original message here</blockquote>
|
|
5278
|
+
</div>
|
|
5279
|
+
</body></html>
|
|
5280
|
+
"""
|
|
5281
|
+
|
|
5282
|
+
clean_html = quotations.extract_from_html(html_email)
|
|
5283
|
+
# Returns: <html><body><div>Thanks for the update!</div></body></html>
|
|
5284
|
+
```
|
|
5285
|
+
</CodeBlocks>
|
|
5286
|
+
</Step>
|
|
5287
|
+
</Steps>
|
|
5288
|
+
|
|
5289
|
+
***
|
|
5290
|
+
|
|
5291
|
+
## Performance & Accuracy
|
|
5292
|
+
|
|
5293
|
+
Talon has been tested on 64 real-world emails from various clients and languages.
|
|
5294
|
+
|
|
5295
|
+
### Test Results Summary
|
|
5296
|
+
|
|
5297
|
+
| Metric | Value |
|
|
5298
|
+
| ----------------------- | ------------------- |
|
|
5299
|
+
| **Total Tests** | 64 emails |
|
|
5300
|
+
| **Passed** | 60 (93.8%) |
|
|
5301
|
+
| **Failed** | 4 (6.2%) |
|
|
5302
|
+
| **Avg Processing Time** | 1.92ms |
|
|
5303
|
+
| **Throughput** | 488.6 emails/second |
|
|
5304
|
+
| **Min/Max Time** | 0.13ms - 21.55ms |
|
|
5305
|
+
|
|
5306
|
+
### Test Coverage
|
|
5307
|
+
|
|
5308
|
+
* **22 HTML emails**: Gmail, Outlook, Apple Mail, Thunderbird, Mail.ru, Hotmail
|
|
5309
|
+
* **42 plain text emails**: Various formats and reply styles
|
|
5310
|
+
* **6+ languages**: English, Japanese, Swedish, Polish, Dutch, German
|
|
5311
|
+
* **Mobile clients**: iPhone, Android "Sent from" signatures
|
|
5312
|
+
|
|
5313
|
+
### Processing Time by Complexity
|
|
5314
|
+
|
|
5315
|
+
| Email Type | Avg Time | Complexity |
|
|
5316
|
+
| ------------------ | --------- | ---------- |
|
|
5317
|
+
| Simple text reply | 0.2-0.5ms | Low |
|
|
5318
|
+
| HTML Gmail/Outlook | 2-4ms | Medium |
|
|
5319
|
+
| Complex threads | 4-22ms | High |
|
|
5320
|
+
|
|
5321
|
+
### Speed vs Accuracy Tradeoff
|
|
5322
|
+
|
|
5323
|
+
| Library | Avg Processing Time | Accuracy | Best For |
|
|
5324
|
+
| ------------ | ------------------- | -------- | --------------------------------------- |
|
|
5325
|
+
| **Talon** | 1.92ms | 93.8% | Production systems needing HTML support |
|
|
5326
|
+
| qutoequail | 0.96ms | \~85% | Moderate accuracy requirements |
|
|
5327
|
+
| Custom regex | 0.1ms | \~70% | Simple plain text, speed critical |
|
|
5328
|
+
|
|
5329
|
+
**Insight**: For production systems, 1.92ms average is negligible. Even at worst case (21.55ms), Talon is faster than most network requests.
|
|
5330
|
+
|
|
5331
|
+
***
|
|
5332
|
+
|
|
5333
|
+
## Known Limitations
|
|
5334
|
+
|
|
5335
|
+
Talon failed 4 out of 64 test cases. Here's what didn't work:
|
|
5336
|
+
|
|
5337
|
+
<AccordionGroup>
|
|
5338
|
+
<Accordion title="Failed Test Cases (4 total)">
|
|
5339
|
+
### Test Case 1: Complex Email Thread with Mixed Content
|
|
5340
|
+
|
|
5341
|
+
**Input**:
|
|
5342
|
+
|
|
5343
|
+
```text
|
|
5344
|
+
Thank you, Sonya Johnson.
|
|
5345
|
+
|
|
5346
|
+
I have sent an invite for 10:30am Monday PDT (today). I
|
|
5347
|
+
hope you can join.
|
|
5348
|
+
|
|
5349
|
+
Regards,
|
|
5350
|
+
|
|
5351
|
+
Christopher Edwards
|
|
5352
|
+
|
|
5353
|
+
|
|
5354
|
+
On Mon, Jun 3, 2024 at 12:53 AM Cody Hart <omerritt@example.com> wrote:
|
|
5355
|
+
|
|
5356
|
+
> Hi Christopher Edwards,
|
|
5357
|
+
>
|
|
5358
|
+
> 10.30 AM pacific is good for me.
|
|
5359
|
+
>
|
|
5360
|
+
> Thanks & Regards,
|
|
5361
|
+
>
|
|
5362
|
+
> Cody Hart
|
|
5363
|
+
```
|
|
5364
|
+
|
|
5365
|
+
**Expected Output**: First 5 lines only (up to `Christopher Edwards`)
|
|
5366
|
+
|
|
5367
|
+
**Talon's Output**: Returns entire email including quoted text starting with "On Mon, Jun 3..." and all "> quoted text"
|
|
5368
|
+
|
|
5369
|
+
**Processing Time**: 2.55ms
|
|
5370
|
+
|
|
5371
|
+
**Issue**: Signature placement before quotes confuses detection logic
|
|
5372
|
+
|
|
5373
|
+
***
|
|
5374
|
+
|
|
5375
|
+
### Test Case 2: Inline Responses
|
|
5376
|
+
|
|
5377
|
+
**Input**:
|
|
5378
|
+
|
|
5379
|
+
```text
|
|
5380
|
+
On Tue, Apr 29, 2014 at 4:22 PM, Example Dev <sugar@example.com> wrote:
|
|
5381
|
+
|
|
5382
|
+
> okay. Well, here's some stuff I can write.
|
|
5383
|
+
>
|
|
5384
|
+
> And if I write a 2 second line you and maybe reply under this?
|
|
5385
|
+
>
|
|
5386
|
+
> Or if you didn't really feel like it, you could reply under this line.
|
|
5387
|
+
|
|
5388
|
+
I will reply under this one
|
|
5389
|
+
|
|
5390
|
+
>
|
|
5391
|
+
> okay?
|
|
5392
|
+
>
|
|
5393
|
+
|
|
5394
|
+
and under this.
|
|
5395
|
+
|
|
5396
|
+
>
|
|
5397
|
+
> -- Tim
|
|
5398
|
+
```
|
|
5399
|
+
|
|
5400
|
+
**Expected Output**: Just the inline responses (`I will reply under this one` and `and under this.`)
|
|
5401
|
+
|
|
5402
|
+
**Talon's Output**: Returns everything including "On Tue, Apr 29..." header and all quoted lines
|
|
5403
|
+
|
|
5404
|
+
**Processing Time**: 0.48ms
|
|
5405
|
+
|
|
5406
|
+
**Issue**: Interleaved inline responses not recognized as the reply pattern
|
|
5407
|
+
|
|
5408
|
+
***
|
|
5409
|
+
|
|
5410
|
+
### Test Case 3: Gmail Forward HTML
|
|
5411
|
+
|
|
5412
|
+
**Input**:
|
|
5413
|
+
|
|
5414
|
+
```html
|
|
5415
|
+
<html><head></head><body><div dir="ltr">test<div><br /></div><div>blah</div>
|
|
5416
|
+
<div><br /><div class="gmail_quote">---------- Forwarded message ----------<br />
|
|
5417
|
+
From: <b class="gmail_sendername">Foo Bar</b>
|
|
5418
|
+
<span dir="ltr"><<a href="mailto:foo@bar.example">foo@bar.example</a>></span><br />
|
|
5419
|
+
Date: Thu, Mar 24, 2016 at 5:17 PM<br />
|
|
5420
|
+
Subject: The Subject<br />
|
|
5421
|
+
To: John Doe <<a href="mailto:john@doe.example">john@doe.example</a>><br />
|
|
5422
|
+
<br /><br /><div dir="ltr">Some text<div><br /></div><div><br /></div></div>
|
|
5423
|
+
</div><br /></div></div></body></html>
|
|
5424
|
+
```
|
|
5425
|
+
|
|
5426
|
+
**Expected Output**: Just `testblah` (before the forward marker)
|
|
5427
|
+
|
|
5428
|
+
**Talon's Output**: Includes "---------- Forwarded message ----------" and forwarded content
|
|
5429
|
+
|
|
5430
|
+
**Processing Time**: 3.41ms
|
|
5431
|
+
|
|
5432
|
+
**Issue**: HTML forward headers not removed by Gmail quote detection
|
|
5433
|
+
|
|
5434
|
+
***
|
|
5435
|
+
|
|
5436
|
+
### Test Case 4: Thunderbird Forward HTML
|
|
5437
|
+
|
|
5438
|
+
**Input**:
|
|
5439
|
+
|
|
5440
|
+
```html
|
|
5441
|
+
<html><body bgcolor="#FFFFFF" text="#000000">
|
|
5442
|
+
<p><br /></p>
|
|
5443
|
+
<div class="moz-forward-container"><br /><br />
|
|
5444
|
+
-------- Forwarded Message --------
|
|
5445
|
+
<table class="moz-email-headers-table">
|
|
5446
|
+
<tbody>
|
|
5447
|
+
<tr><th>Subject:</th><td>Re: Example subject</td></tr>
|
|
5448
|
+
<tr><th>Date:</th><td>Tue, 3 May 2016 14:54:27 +0200 (CEST)</td></tr>
|
|
5449
|
+
<tr><th>From:</th><td>John Doe <johndoe@example.com></td></tr>
|
|
5450
|
+
</tbody>
|
|
5451
|
+
</table>
|
|
5452
|
+
<br /><br />
|
|
5453
|
+
<div>Dear John,</div>
|
|
5454
|
+
<div><br /></div>
|
|
5455
|
+
<div>This is a test.</div>
|
|
5456
|
+
</div></body></html>
|
|
5457
|
+
```
|
|
5458
|
+
|
|
5459
|
+
**Expected Output**: Empty (no new content, just forward)
|
|
5460
|
+
|
|
5461
|
+
**Talon's Output**: Includes "-------- Forwarded Message --------" and forwarded content
|
|
5462
|
+
|
|
5463
|
+
**Processing Time**: 4.34ms
|
|
5464
|
+
|
|
5465
|
+
**Issue**: Thunderbird's `moz-forward-container` class not recognized
|
|
5466
|
+
|
|
5467
|
+
***
|
|
5468
|
+
|
|
5469
|
+
**Summary**: 3 of 4 failures are forwarded messages. Regular replies work with 98%+ accuracy.
|
|
5470
|
+
</Accordion>
|
|
5471
|
+
|
|
5472
|
+
<Accordion title="Success Examples">
|
|
5473
|
+
### Example 1: Simple Gmail Reply
|
|
5474
|
+
|
|
5475
|
+
**Input**:
|
|
5476
|
+
|
|
5477
|
+
```text
|
|
5478
|
+
Awesome! I haven't had another problem with it.
|
|
5479
|
+
|
|
5480
|
+
On Aug 22, 2011, at 7:37 PM, defunkt<reply@reply.github.com> wrote:
|
|
5481
|
+
|
|
5482
|
+
|
|
5483
|
+
|
|
5484
|
+
|
|
5485
|
+
> Loader seems to be working well.
|
|
5486
|
+
```
|
|
5487
|
+
|
|
5488
|
+
**Talon's Output**: `Awesome! I haven't had another problem with it.`
|
|
5489
|
+
|
|
5490
|
+
**Processing Time**: 0.2ms
|
|
5491
|
+
|
|
5492
|
+
**What Worked**: Standard "On \[date] \[name] wrote:" pattern detected, quote marker (>) recognized
|
|
5493
|
+
|
|
5494
|
+
***
|
|
5495
|
+
|
|
5496
|
+
### Example 2: Outlook Reply with Separator
|
|
5497
|
+
|
|
5498
|
+
**Input**:
|
|
5499
|
+
|
|
5500
|
+
```text
|
|
5501
|
+
Outlook with a reply directly above line
|
|
5502
|
+
________________________________________
|
|
5503
|
+
From: CRM Comments [crm-comment@example.com]
|
|
5504
|
+
Sent: Friday, 23 March 2012 5:08 p.m.
|
|
5505
|
+
To: John S. Greene
|
|
5506
|
+
Subject: [contact:106] John Greene
|
|
5507
|
+
|
|
5508
|
+
A new comment has been added to the Contact named 'John Greene':
|
|
5509
|
+
|
|
5510
|
+
I am replying to a comment.
|
|
5511
|
+
```
|
|
5512
|
+
|
|
5513
|
+
**Talon's Output**: `Outlook with a reply directly above line`
|
|
5514
|
+
|
|
5515
|
+
**Processing Time**: 0.51ms
|
|
5516
|
+
|
|
5517
|
+
**What Worked**: Outlook separator line (underscores) and "From:"/"Sent:" headers detected as splitter
|
|
5518
|
+
|
|
5519
|
+
***
|
|
5520
|
+
|
|
5521
|
+
### Example 3: HTML Outlook Reply
|
|
5522
|
+
|
|
5523
|
+
**Input**:
|
|
5524
|
+
|
|
5525
|
+
```html
|
|
5526
|
+
<html>
|
|
5527
|
+
<body>
|
|
5528
|
+
<div>Reply</div>
|
|
5529
|
+
<span id="OLK_SRC_BODY_SECTION">
|
|
5530
|
+
<div>
|
|
5531
|
+
<span>From: </span>Bob <<a href="mailto:bob@example.com">bob@example.com</a>><br />
|
|
5532
|
+
<span>Date: </span>Tue, 01 Nov 2011 18:54:39 -0700<br />
|
|
5533
|
+
<span>To: </span>Rob <<a href="mailto:rob@example.com">rob@example.com</a>><br />
|
|
5534
|
+
<span>Subject: </span>Test<br />
|
|
5535
|
+
</div>
|
|
5536
|
+
<div>Hi</div>
|
|
5537
|
+
</span>
|
|
5538
|
+
</body>
|
|
5539
|
+
</html>
|
|
5540
|
+
```
|
|
5541
|
+
|
|
5542
|
+
**Talon's Output**: `Reply`
|
|
5543
|
+
|
|
5544
|
+
**Processing Time**: 4.02ms
|
|
5545
|
+
|
|
5546
|
+
**What Worked**: Outlook's `OLK_SRC_BODY_SECTION` span ID detected and removed structurally
|
|
5547
|
+
</Accordion>
|
|
5548
|
+
|
|
5549
|
+
<Accordion title="Performance vs Simpler Alternatives">
|
|
5550
|
+
**Tradeoff**: Talon is more comprehensive but slower than plain-text-only libraries
|
|
5551
|
+
|
|
5552
|
+
* Talon: 1.92ms average (with HTML support)
|
|
5553
|
+
* email-reply-parser: 0.03ms average (plain text only)
|
|
5554
|
+
|
|
5555
|
+
For production systems, 1.92ms average is negligible. Even at worst case (21.55ms), Talon is faster than most network requests.
|
|
5556
|
+
</Accordion>
|
|
5557
|
+
|
|
5558
|
+
<Accordion title="Forwarded Messages">
|
|
5559
|
+
As shown in test results, forwarded messages (especially HTML) are challenging:
|
|
5560
|
+
|
|
5561
|
+
* Plain text forwards: Generally work well
|
|
5562
|
+
* HTML forwards: May retain forward headers
|
|
5563
|
+
* Workaround: Use plain text extraction or post-process to remove forward markers
|
|
5564
|
+
</Accordion>
|
|
5565
|
+
</AccordionGroup>
|
|
5566
|
+
|
|
5567
|
+
***
|
|
5568
|
+
|
|
5569
|
+
### Error Handling
|
|
5570
|
+
|
|
5571
|
+
Always handle potential parsing failures:
|
|
5572
|
+
|
|
5573
|
+
```python
|
|
5574
|
+
from talon import quotations
|
|
5575
|
+
|
|
5576
|
+
def safe_extract(email_body, is_html=False):
|
|
5577
|
+
try:
|
|
5578
|
+
if is_html:
|
|
5579
|
+
return quotations.extract_from_html(email_body)
|
|
5580
|
+
else:
|
|
5581
|
+
return quotations.extract_from_plain(email_body)
|
|
5582
|
+
except Exception as e:
|
|
5583
|
+
# Fallback to original message if extraction fails
|
|
5584
|
+
print(f"Talon extraction failed: {e}")
|
|
5585
|
+
return email_body
|
|
5586
|
+
```
|
|
5587
|
+
|
|
5588
|
+
### Testing Recommendations
|
|
5589
|
+
|
|
5590
|
+
Always test with your specific email formats:
|
|
5591
|
+
|
|
5592
|
+
```python
|
|
5593
|
+
# Create a test suite with your actual email patterns (Gmail, Outlook, Apple Mail)
|
|
5594
|
+
test_emails = [
|
|
5595
|
+
"path/to/gmail_reply.html",
|
|
5596
|
+
"path/to/outlook_reply.txt",
|
|
5597
|
+
"path/to/forward.html"
|
|
5598
|
+
]
|
|
5599
|
+
|
|
5600
|
+
for email_file in test_emails:
|
|
5601
|
+
with open(email_file) as f:
|
|
5602
|
+
content = f.read()
|
|
5603
|
+
result = quotations.extract_from(content)
|
|
5604
|
+
print(f"{email_file}: {len(result)} chars extracted")
|
|
5605
|
+
```
|
|
5606
|
+
|
|
5607
|
+
<Tip>
|
|
5608
|
+
Test with real emails from your users' actual email clients. Talon's accuracy is based on diverse real-world samples, but your specific use case may have unique patterns.
|
|
5609
|
+
</Tip>
|
|
5610
|
+
|
|
5611
|
+
***
|
|
5612
|
+
|
|
5613
|
+
## JavaScript Version
|
|
5614
|
+
|
|
5615
|
+
For TypeScript/JavaScript projects, use **[TalonJS](https://github.com/quentez/talonjs)** - a JavaScript port of Talon with similar functionality.
|
|
5616
|
+
|
|
5617
|
+
### Performance Comparison
|
|
5618
|
+
|
|
5619
|
+
| Solution | Accuracy | Speed | Best For |
|
|
5620
|
+
| ---------------- | -------- | ------ | --------------------------- |
|
|
5621
|
+
| **Python Talon** | 93.8% | 1.92ms | Highest accuracy |
|
|
5622
|
+
| **TalonJS** | 90.6% | 1.88ms | TypeScript/Node.js projects |
|
|
5623
|
+
|
|
5624
|
+
TalonJS provides 90.6% accuracy with slightly faster performance (1.88ms), making it ideal for JavaScript/TypeScript environments without needing Python dependencies.
|
|
5625
|
+
|
|
5626
|
+
### Quick Start
|
|
5627
|
+
|
|
5628
|
+
<Steps>
|
|
5629
|
+
<Step title="Install TalonJS">
|
|
5630
|
+
```bash
|
|
5631
|
+
npm install talonjs
|
|
5632
|
+
```
|
|
5633
|
+
</Step>
|
|
5634
|
+
|
|
5635
|
+
<Step title="Extract Replies">
|
|
5636
|
+
<CodeBlocks>
|
|
5637
|
+
```typescript title="Plain Text"
|
|
5638
|
+
import * as talon from 'talonjs';
|
|
5639
|
+
|
|
5640
|
+
const email = `Great work on the project!
|
|
5641
|
+
|
|
5642
|
+
On Mon, Apr 11, 2011 at 6:54 PM, Bob wrote:
|
|
5643
|
+
> Can you review the document?
|
|
5644
|
+
> Need feedback by Friday.
|
|
5645
|
+
`;
|
|
5646
|
+
|
|
5647
|
+
const result = talon.quotations.extractFromPlain(email);
|
|
5648
|
+
const cleanReply = result.body.trim();
|
|
5649
|
+
// Output: "Great work on the project!"
|
|
5650
|
+
```
|
|
5651
|
+
|
|
5652
|
+
```typescript title="HTML"
|
|
5653
|
+
import * as talon from 'talonjs';
|
|
5654
|
+
|
|
5655
|
+
const htmlEmail = `
|
|
5656
|
+
<div>Thanks for the update!</div>
|
|
5657
|
+
<div class="gmail_quote">
|
|
5658
|
+
On Mon, Alice wrote: <blockquote>Original</blockquote>
|
|
5659
|
+
</div>
|
|
5660
|
+
`;
|
|
5661
|
+
|
|
5662
|
+
const result = talon.quotations.extractFromHtml(htmlEmail);
|
|
5663
|
+
const cleanReply = result.body.trim();
|
|
5664
|
+
// Returns: "<div>Thanks for the update!</div>"
|
|
5665
|
+
// Note: TalonJS returns clean HTML, not plain text
|
|
5666
|
+
```
|
|
5667
|
+
</CodeBlocks>
|
|
5668
|
+
</Step>
|
|
5669
|
+
</Steps>
|
|
5670
|
+
|
|
5671
|
+
<Tip>
|
|
5672
|
+
**When to use TalonJS vs Python Talon:**
|
|
5673
|
+
|
|
5674
|
+
* Use **TalonJS** if you're building in TypeScript/JavaScript and 90.6% accuracy is sufficient
|
|
5675
|
+
* Use **Python Talon** if you need the highest accuracy (93.8%) or are in a Python environment
|
|
5676
|
+
* The 3.2% accuracy difference is acceptable for most use cases
|
|
5677
|
+
</Tip>
|
|
5678
|
+
|
|
5679
|
+
|
|
4878
5680
|
# Join the AgentMail Community
|
|
4879
5681
|
|
|
4880
5682
|
> Connect with the AgentMail team and developers, share what you're building, and get support.
|
|
4881
5683
|
|
|
4882
5684
|
<CardGroup>
|
|
4883
|
-
<Card title="Join our Discord Server" href="https://discord.
|
|
5685
|
+
<Card title="Join our Discord Server" href="https://discord.com/invite/hTYatWYWBc" icon="fa-brands fa-discord">
|
|
4884
5686
|
The best place for real-time conversation, getting help with your code, and
|
|
4885
5687
|
sharing what you're building with AgentMail.
|
|
4886
5688
|
</Card>
|
|
@@ -5084,6 +5886,8 @@ components:
|
|
|
5084
5886
|
type: string
|
|
5085
5887
|
type_:Count:
|
|
5086
5888
|
type: integer
|
|
5889
|
+
type_pods:PodId:
|
|
5890
|
+
type: string
|
|
5087
5891
|
type_inboxes:InboxId:
|
|
5088
5892
|
type: string
|
|
5089
5893
|
type_inboxes:DisplayName:
|
|
@@ -5093,6 +5897,8 @@ components:
|
|
|
5093
5897
|
type_inboxes:Inbox:
|
|
5094
5898
|
type: object
|
|
5095
5899
|
properties:
|
|
5900
|
+
pod_id:
|
|
5901
|
+
$ref: '#/components/schemas/type_pods:PodId'
|
|
5096
5902
|
inbox_id:
|
|
5097
5903
|
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
5098
5904
|
display_name:
|
|
@@ -5106,6 +5912,7 @@ components:
|
|
|
5106
5912
|
type: string
|
|
5107
5913
|
format: date-time
|
|
5108
5914
|
required:
|
|
5915
|
+
- pod_id
|
|
5109
5916
|
- inbox_id
|
|
5110
5917
|
- updated_at
|
|
5111
5918
|
- created_at
|
|
@@ -5299,6 +6106,8 @@ components:
|
|
|
5299
6106
|
schemas:
|
|
5300
6107
|
type_inboxes:InboxId:
|
|
5301
6108
|
type: string
|
|
6109
|
+
type_pods:PodId:
|
|
6110
|
+
type: string
|
|
5302
6111
|
type_inboxes:DisplayName:
|
|
5303
6112
|
type: string
|
|
5304
6113
|
type_inboxes:ClientId:
|
|
@@ -5306,6 +6115,8 @@ components:
|
|
|
5306
6115
|
type_inboxes:Inbox:
|
|
5307
6116
|
type: object
|
|
5308
6117
|
properties:
|
|
6118
|
+
pod_id:
|
|
6119
|
+
$ref: '#/components/schemas/type_pods:PodId'
|
|
5309
6120
|
inbox_id:
|
|
5310
6121
|
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
5311
6122
|
display_name:
|
|
@@ -5319,6 +6130,7 @@ components:
|
|
|
5319
6130
|
type: string
|
|
5320
6131
|
format: date-time
|
|
5321
6132
|
required:
|
|
6133
|
+
- pod_id
|
|
5322
6134
|
- inbox_id
|
|
5323
6135
|
- updated_at
|
|
5324
6136
|
- created_at
|
|
@@ -5512,11 +6324,15 @@ components:
|
|
|
5512
6324
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
5513
6325
|
client_id:
|
|
5514
6326
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
6327
|
+
type_pods:PodId:
|
|
6328
|
+
type: string
|
|
5515
6329
|
type_inboxes:InboxId:
|
|
5516
6330
|
type: string
|
|
5517
6331
|
type_inboxes:Inbox:
|
|
5518
6332
|
type: object
|
|
5519
6333
|
properties:
|
|
6334
|
+
pod_id:
|
|
6335
|
+
$ref: '#/components/schemas/type_pods:PodId'
|
|
5520
6336
|
inbox_id:
|
|
5521
6337
|
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
5522
6338
|
display_name:
|
|
@@ -5530,6 +6346,7 @@ components:
|
|
|
5530
6346
|
type: string
|
|
5531
6347
|
format: date-time
|
|
5532
6348
|
required:
|
|
6349
|
+
- pod_id
|
|
5533
6350
|
- inbox_id
|
|
5534
6351
|
- updated_at
|
|
5535
6352
|
- created_at
|
|
@@ -5741,11 +6558,15 @@ components:
|
|
|
5741
6558
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
5742
6559
|
required:
|
|
5743
6560
|
- display_name
|
|
6561
|
+
type_pods:PodId:
|
|
6562
|
+
type: string
|
|
5744
6563
|
type_inboxes:ClientId:
|
|
5745
6564
|
type: string
|
|
5746
6565
|
type_inboxes:Inbox:
|
|
5747
6566
|
type: object
|
|
5748
6567
|
properties:
|
|
6568
|
+
pod_id:
|
|
6569
|
+
$ref: '#/components/schemas/type_pods:PodId'
|
|
5749
6570
|
inbox_id:
|
|
5750
6571
|
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
5751
6572
|
display_name:
|
|
@@ -5759,6 +6580,7 @@ components:
|
|
|
5759
6580
|
type: string
|
|
5760
6581
|
format: date-time
|
|
5761
6582
|
required:
|
|
6583
|
+
- pod_id
|
|
5762
6584
|
- inbox_id
|
|
5763
6585
|
- updated_at
|
|
5764
6586
|
- created_at
|
|
@@ -8399,6 +9221,10 @@ components:
|
|
|
8399
9221
|
type: array
|
|
8400
9222
|
items:
|
|
8401
9223
|
$ref: '#/components/schemas/type_attachments:SendAttachment'
|
|
9224
|
+
type_messages:SendMessageHeaders:
|
|
9225
|
+
type: object
|
|
9226
|
+
additionalProperties:
|
|
9227
|
+
type: string
|
|
8402
9228
|
type_messages:SendMessageRequest:
|
|
8403
9229
|
type: object
|
|
8404
9230
|
properties:
|
|
@@ -8420,6 +9246,8 @@ components:
|
|
|
8420
9246
|
$ref: '#/components/schemas/type_messages:MessageHtml'
|
|
8421
9247
|
attachments:
|
|
8422
9248
|
$ref: '#/components/schemas/type_messages:SendMessageAttachments'
|
|
9249
|
+
headers:
|
|
9250
|
+
$ref: '#/components/schemas/type_messages:SendMessageHeaders'
|
|
8423
9251
|
type_messages:MessageId:
|
|
8424
9252
|
type: string
|
|
8425
9253
|
type_threads:ThreadId:
|
|
@@ -8692,6 +9520,10 @@ components:
|
|
|
8692
9520
|
type: array
|
|
8693
9521
|
items:
|
|
8694
9522
|
$ref: '#/components/schemas/type_attachments:SendAttachment'
|
|
9523
|
+
type_messages:SendMessageHeaders:
|
|
9524
|
+
type: object
|
|
9525
|
+
additionalProperties:
|
|
9526
|
+
type: string
|
|
8695
9527
|
type_messages:ReplyToMessageRequest:
|
|
8696
9528
|
type: object
|
|
8697
9529
|
properties:
|
|
@@ -8711,6 +9543,8 @@ components:
|
|
|
8711
9543
|
$ref: '#/components/schemas/type_messages:MessageHtml'
|
|
8712
9544
|
attachments:
|
|
8713
9545
|
$ref: '#/components/schemas/type_messages:SendMessageAttachments'
|
|
9546
|
+
headers:
|
|
9547
|
+
$ref: '#/components/schemas/type_messages:SendMessageHeaders'
|
|
8714
9548
|
type_threads:ThreadId:
|
|
8715
9549
|
type: string
|
|
8716
9550
|
type_messages:SendMessageResponse:
|
|
@@ -12924,6 +13758,8 @@ components:
|
|
|
12924
13758
|
type: string
|
|
12925
13759
|
type_:Count:
|
|
12926
13760
|
type: integer
|
|
13761
|
+
type_pods:PodId:
|
|
13762
|
+
type: string
|
|
12927
13763
|
type_domains:DomainId:
|
|
12928
13764
|
type: string
|
|
12929
13765
|
type_domains:FeedbackEnabled:
|
|
@@ -12933,6 +13769,8 @@ components:
|
|
|
12933
13769
|
type_domains:DomainItem:
|
|
12934
13770
|
type: object
|
|
12935
13771
|
properties:
|
|
13772
|
+
pod_id:
|
|
13773
|
+
$ref: '#/components/schemas/type_pods:PodId'
|
|
12936
13774
|
domain_id:
|
|
12937
13775
|
$ref: '#/components/schemas/type_domains:DomainId'
|
|
12938
13776
|
feedback_enabled:
|
|
@@ -13140,6 +13978,8 @@ components:
|
|
|
13140
13978
|
schemas:
|
|
13141
13979
|
type_domains:DomainId:
|
|
13142
13980
|
type: string
|
|
13981
|
+
type_pods:PodId:
|
|
13982
|
+
type: string
|
|
13143
13983
|
type_domains:VerificationStatus:
|
|
13144
13984
|
type: string
|
|
13145
13985
|
enum:
|
|
@@ -13182,6 +14022,8 @@ components:
|
|
|
13182
14022
|
type_domains:Domain:
|
|
13183
14023
|
type: object
|
|
13184
14024
|
properties:
|
|
14025
|
+
pod_id:
|
|
14026
|
+
$ref: '#/components/schemas/type_pods:PodId'
|
|
13185
14027
|
domain_id:
|
|
13186
14028
|
$ref: '#/components/schemas/type_domains:DomainId'
|
|
13187
14029
|
status:
|
|
@@ -13573,6 +14415,8 @@ components:
|
|
|
13573
14415
|
required:
|
|
13574
14416
|
- domain
|
|
13575
14417
|
- feedback_enabled
|
|
14418
|
+
type_pods:PodId:
|
|
14419
|
+
type: string
|
|
13576
14420
|
type_domains:DomainId:
|
|
13577
14421
|
type: string
|
|
13578
14422
|
type_domains:VerificationStatus:
|
|
@@ -13615,6 +14459,8 @@ components:
|
|
|
13615
14459
|
type_domains:Domain:
|
|
13616
14460
|
type: object
|
|
13617
14461
|
properties:
|
|
14462
|
+
pod_id:
|
|
14463
|
+
$ref: '#/components/schemas/type_pods:PodId'
|
|
13618
14464
|
domain_id:
|
|
13619
14465
|
$ref: '#/components/schemas/type_domains:DomainId'
|
|
13620
14466
|
status:
|
|
@@ -14199,7 +15045,7 @@ components:
|
|
|
14199
15045
|
type: string
|
|
14200
15046
|
type_webhooks:Url:
|
|
14201
15047
|
type: string
|
|
14202
|
-
|
|
15048
|
+
type_events:EventType:
|
|
14203
15049
|
type: string
|
|
14204
15050
|
enum:
|
|
14205
15051
|
- value: message.received
|
|
@@ -14208,10 +15054,11 @@ components:
|
|
|
14208
15054
|
- value: message.bounced
|
|
14209
15055
|
- value: message.complained
|
|
14210
15056
|
- value: message.rejected
|
|
14211
|
-
|
|
15057
|
+
- value: domain.verified
|
|
15058
|
+
type_events:EventTypes:
|
|
14212
15059
|
type: array
|
|
14213
15060
|
items:
|
|
14214
|
-
$ref: '#/components/schemas/
|
|
15061
|
+
$ref: '#/components/schemas/type_events:EventType'
|
|
14215
15062
|
type_webhooks:InboxIds:
|
|
14216
15063
|
type: array
|
|
14217
15064
|
items:
|
|
@@ -14226,7 +15073,7 @@ components:
|
|
|
14226
15073
|
url:
|
|
14227
15074
|
$ref: '#/components/schemas/type_webhooks:Url'
|
|
14228
15075
|
event_types:
|
|
14229
|
-
$ref: '#/components/schemas/
|
|
15076
|
+
$ref: '#/components/schemas/type_events:EventTypes'
|
|
14230
15077
|
inbox_ids:
|
|
14231
15078
|
$ref: '#/components/schemas/type_webhooks:InboxIds'
|
|
14232
15079
|
secret:
|
|
@@ -14440,7 +15287,7 @@ components:
|
|
|
14440
15287
|
type: string
|
|
14441
15288
|
type_webhooks:Url:
|
|
14442
15289
|
type: string
|
|
14443
|
-
|
|
15290
|
+
type_events:EventType:
|
|
14444
15291
|
type: string
|
|
14445
15292
|
enum:
|
|
14446
15293
|
- value: message.received
|
|
@@ -14449,10 +15296,11 @@ components:
|
|
|
14449
15296
|
- value: message.bounced
|
|
14450
15297
|
- value: message.complained
|
|
14451
15298
|
- value: message.rejected
|
|
14452
|
-
|
|
15299
|
+
- value: domain.verified
|
|
15300
|
+
type_events:EventTypes:
|
|
14453
15301
|
type: array
|
|
14454
15302
|
items:
|
|
14455
|
-
$ref: '#/components/schemas/
|
|
15303
|
+
$ref: '#/components/schemas/type_events:EventType'
|
|
14456
15304
|
type_webhooks:InboxIds:
|
|
14457
15305
|
type: array
|
|
14458
15306
|
items:
|
|
@@ -14467,7 +15315,7 @@ components:
|
|
|
14467
15315
|
url:
|
|
14468
15316
|
$ref: '#/components/schemas/type_webhooks:Url'
|
|
14469
15317
|
event_types:
|
|
14470
|
-
$ref: '#/components/schemas/
|
|
15318
|
+
$ref: '#/components/schemas/type_events:EventTypes'
|
|
14471
15319
|
inbox_ids:
|
|
14472
15320
|
$ref: '#/components/schemas/type_webhooks:InboxIds'
|
|
14473
15321
|
secret:
|
|
@@ -14666,7 +15514,7 @@ components:
|
|
|
14666
15514
|
schemas:
|
|
14667
15515
|
type_webhooks:Url:
|
|
14668
15516
|
type: string
|
|
14669
|
-
|
|
15517
|
+
type_events:EventType:
|
|
14670
15518
|
type: string
|
|
14671
15519
|
enum:
|
|
14672
15520
|
- value: message.received
|
|
@@ -14675,10 +15523,11 @@ components:
|
|
|
14675
15523
|
- value: message.bounced
|
|
14676
15524
|
- value: message.complained
|
|
14677
15525
|
- value: message.rejected
|
|
14678
|
-
|
|
15526
|
+
- value: domain.verified
|
|
15527
|
+
type_events:EventTypes:
|
|
14679
15528
|
type: array
|
|
14680
15529
|
items:
|
|
14681
|
-
$ref: '#/components/schemas/
|
|
15530
|
+
$ref: '#/components/schemas/type_events:EventType'
|
|
14682
15531
|
type_webhooks:InboxIds:
|
|
14683
15532
|
type: array
|
|
14684
15533
|
items:
|
|
@@ -14691,7 +15540,7 @@ components:
|
|
|
14691
15540
|
url:
|
|
14692
15541
|
$ref: '#/components/schemas/type_webhooks:Url'
|
|
14693
15542
|
event_types:
|
|
14694
|
-
$ref: '#/components/schemas/
|
|
15543
|
+
$ref: '#/components/schemas/type_events:EventTypes'
|
|
14695
15544
|
inbox_ids:
|
|
14696
15545
|
$ref: '#/components/schemas/type_webhooks:InboxIds'
|
|
14697
15546
|
client_id:
|
|
@@ -14709,7 +15558,7 @@ components:
|
|
|
14709
15558
|
url:
|
|
14710
15559
|
$ref: '#/components/schemas/type_webhooks:Url'
|
|
14711
15560
|
event_types:
|
|
14712
|
-
$ref: '#/components/schemas/
|
|
15561
|
+
$ref: '#/components/schemas/type_events:EventTypes'
|
|
14713
15562
|
inbox_ids:
|
|
14714
15563
|
$ref: '#/components/schemas/type_webhooks:InboxIds'
|
|
14715
15564
|
secret:
|
|
@@ -15710,19 +16559,127 @@ components:
|
|
|
15710
16559
|
type: string
|
|
15711
16560
|
sub_type:
|
|
15712
16561
|
type: string
|
|
15713
|
-
recipients:
|
|
15714
|
-
type: array
|
|
15715
|
-
items:
|
|
15716
|
-
type: string
|
|
16562
|
+
recipients:
|
|
16563
|
+
type: array
|
|
16564
|
+
items:
|
|
16565
|
+
type: string
|
|
16566
|
+
required:
|
|
16567
|
+
- inbox_id
|
|
16568
|
+
- thread_id
|
|
16569
|
+
- message_id
|
|
16570
|
+
- timestamp
|
|
16571
|
+
- type
|
|
16572
|
+
- sub_type
|
|
16573
|
+
- recipients
|
|
16574
|
+
type_events:MessageComplainedEvent:
|
|
16575
|
+
type: object
|
|
16576
|
+
properties:
|
|
16577
|
+
type:
|
|
16578
|
+
type: string
|
|
16579
|
+
enum:
|
|
16580
|
+
- type: stringLiteral
|
|
16581
|
+
value: event
|
|
16582
|
+
event_type:
|
|
16583
|
+
type: string
|
|
16584
|
+
enum:
|
|
16585
|
+
- type: stringLiteral
|
|
16586
|
+
value: message.complained
|
|
16587
|
+
event_id:
|
|
16588
|
+
$ref: '#/components/schemas/type_events:EventId'
|
|
16589
|
+
complaint:
|
|
16590
|
+
$ref: '#/components/schemas/type_events:Complaint'
|
|
16591
|
+
required:
|
|
16592
|
+
- type
|
|
16593
|
+
- event_type
|
|
16594
|
+
- event_id
|
|
16595
|
+
- complaint
|
|
16596
|
+
|
|
16597
|
+
```
|
|
16598
|
+
|
|
16599
|
+
# Message Rejected
|
|
16600
|
+
|
|
16601
|
+
POST
|
|
16602
|
+
|
|
16603
|
+
Reference: https://docs.agentmail.to/api-reference/webhooks/events/message-rejected
|
|
16604
|
+
|
|
16605
|
+
## OpenAPI 3.1 Webhook Specification
|
|
16606
|
+
|
|
16607
|
+
```yaml
|
|
16608
|
+
openapi: 3.1.1
|
|
16609
|
+
info:
|
|
16610
|
+
title: Message Rejected
|
|
16611
|
+
version: subpackage_webhooks/events.messageRejected
|
|
16612
|
+
webhooks:
|
|
16613
|
+
message-rejected:
|
|
16614
|
+
post:
|
|
16615
|
+
operationId: message-rejected
|
|
16616
|
+
summary: Message Rejected
|
|
16617
|
+
tags:
|
|
16618
|
+
- subpackage_webhooks,subpackage_webhooks/events
|
|
16619
|
+
parameters:
|
|
16620
|
+
- name: svix-id
|
|
16621
|
+
in: header
|
|
16622
|
+
required: true
|
|
16623
|
+
schema:
|
|
16624
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixId'
|
|
16625
|
+
- name: svix-signature
|
|
16626
|
+
in: header
|
|
16627
|
+
required: true
|
|
16628
|
+
schema:
|
|
16629
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixSignature'
|
|
16630
|
+
- name: svix-timestamp
|
|
16631
|
+
in: header
|
|
16632
|
+
required: true
|
|
16633
|
+
schema:
|
|
16634
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixTimestamp'
|
|
16635
|
+
responses:
|
|
16636
|
+
'200':
|
|
16637
|
+
description: Webhook received successfully
|
|
16638
|
+
requestBody:
|
|
16639
|
+
content:
|
|
16640
|
+
application/json:
|
|
16641
|
+
schema:
|
|
16642
|
+
$ref: '#/components/schemas/type_events:MessageRejectedEvent'
|
|
16643
|
+
components:
|
|
16644
|
+
schemas:
|
|
16645
|
+
type_webhooks/events:SvixId:
|
|
16646
|
+
type: string
|
|
16647
|
+
type_webhooks/events:SvixSignature:
|
|
16648
|
+
type: string
|
|
16649
|
+
type_webhooks/events:SvixTimestamp:
|
|
16650
|
+
type: string
|
|
16651
|
+
format: date-time
|
|
16652
|
+
type_events:EventId:
|
|
16653
|
+
type: string
|
|
16654
|
+
type_inboxes:InboxId:
|
|
16655
|
+
type: string
|
|
16656
|
+
type_threads:ThreadId:
|
|
16657
|
+
type: string
|
|
16658
|
+
type_messages:MessageId:
|
|
16659
|
+
type: string
|
|
16660
|
+
type_events:Timestamp:
|
|
16661
|
+
type: string
|
|
16662
|
+
format: date-time
|
|
16663
|
+
type_events:Reject:
|
|
16664
|
+
type: object
|
|
16665
|
+
properties:
|
|
16666
|
+
inbox_id:
|
|
16667
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
16668
|
+
thread_id:
|
|
16669
|
+
$ref: '#/components/schemas/type_threads:ThreadId'
|
|
16670
|
+
message_id:
|
|
16671
|
+
$ref: '#/components/schemas/type_messages:MessageId'
|
|
16672
|
+
timestamp:
|
|
16673
|
+
$ref: '#/components/schemas/type_events:Timestamp'
|
|
16674
|
+
reason:
|
|
16675
|
+
type: string
|
|
15717
16676
|
required:
|
|
15718
16677
|
- inbox_id
|
|
15719
16678
|
- thread_id
|
|
15720
16679
|
- message_id
|
|
15721
16680
|
- timestamp
|
|
15722
|
-
-
|
|
15723
|
-
|
|
15724
|
-
- recipients
|
|
15725
|
-
type_events:MessageComplainedEvent:
|
|
16681
|
+
- reason
|
|
16682
|
+
type_events:MessageRejectedEvent:
|
|
15726
16683
|
type: object
|
|
15727
16684
|
properties:
|
|
15728
16685
|
type:
|
|
@@ -15734,37 +16691,37 @@ components:
|
|
|
15734
16691
|
type: string
|
|
15735
16692
|
enum:
|
|
15736
16693
|
- type: stringLiteral
|
|
15737
|
-
value: message.
|
|
16694
|
+
value: message.rejected
|
|
15738
16695
|
event_id:
|
|
15739
16696
|
$ref: '#/components/schemas/type_events:EventId'
|
|
15740
|
-
|
|
15741
|
-
$ref: '#/components/schemas/type_events:
|
|
16697
|
+
reject:
|
|
16698
|
+
$ref: '#/components/schemas/type_events:Reject'
|
|
15742
16699
|
required:
|
|
15743
16700
|
- type
|
|
15744
16701
|
- event_type
|
|
15745
16702
|
- event_id
|
|
15746
|
-
-
|
|
16703
|
+
- reject
|
|
15747
16704
|
|
|
15748
16705
|
```
|
|
15749
16706
|
|
|
15750
|
-
#
|
|
16707
|
+
# Domain Verified
|
|
15751
16708
|
|
|
15752
16709
|
POST
|
|
15753
16710
|
|
|
15754
|
-
Reference: https://docs.agentmail.to/api-reference/webhooks/events/
|
|
16711
|
+
Reference: https://docs.agentmail.to/api-reference/webhooks/events/domain-verified
|
|
15755
16712
|
|
|
15756
16713
|
## OpenAPI 3.1 Webhook Specification
|
|
15757
16714
|
|
|
15758
16715
|
```yaml
|
|
15759
16716
|
openapi: 3.1.1
|
|
15760
16717
|
info:
|
|
15761
|
-
title:
|
|
15762
|
-
version: subpackage_webhooks/events.
|
|
16718
|
+
title: Domain Verified
|
|
16719
|
+
version: subpackage_webhooks/events.domainVerified
|
|
15763
16720
|
webhooks:
|
|
15764
|
-
|
|
16721
|
+
domain-verified:
|
|
15765
16722
|
post:
|
|
15766
|
-
operationId:
|
|
15767
|
-
summary:
|
|
16723
|
+
operationId: domain-verified
|
|
16724
|
+
summary: Domain Verified
|
|
15768
16725
|
tags:
|
|
15769
16726
|
- subpackage_webhooks,subpackage_webhooks/events
|
|
15770
16727
|
parameters:
|
|
@@ -15790,7 +16747,7 @@ webhooks:
|
|
|
15790
16747
|
content:
|
|
15791
16748
|
application/json:
|
|
15792
16749
|
schema:
|
|
15793
|
-
$ref: '#/components/schemas/type_events:
|
|
16750
|
+
$ref: '#/components/schemas/type_events:DomainVerifiedEvent'
|
|
15794
16751
|
components:
|
|
15795
16752
|
schemas:
|
|
15796
16753
|
type_webhooks/events:SvixId:
|
|
@@ -15802,35 +16759,80 @@ components:
|
|
|
15802
16759
|
format: date-time
|
|
15803
16760
|
type_events:EventId:
|
|
15804
16761
|
type: string
|
|
15805
|
-
|
|
16762
|
+
type_pods:PodId:
|
|
15806
16763
|
type: string
|
|
15807
|
-
|
|
16764
|
+
type_domains:DomainId:
|
|
15808
16765
|
type: string
|
|
15809
|
-
|
|
16766
|
+
type_domains:VerificationStatus:
|
|
15810
16767
|
type: string
|
|
15811
|
-
|
|
16768
|
+
enum:
|
|
16769
|
+
- value: PENDING
|
|
16770
|
+
- value: VERIFYING
|
|
16771
|
+
- value: READY
|
|
16772
|
+
type_domains:FeedbackEnabled:
|
|
16773
|
+
type: boolean
|
|
16774
|
+
type_domains:RecordType:
|
|
15812
16775
|
type: string
|
|
15813
|
-
|
|
15814
|
-
|
|
16776
|
+
enum:
|
|
16777
|
+
- value: TXT
|
|
16778
|
+
- value: CNAME
|
|
16779
|
+
- value: MX
|
|
16780
|
+
type_domains:RecordStatus:
|
|
16781
|
+
type: string
|
|
16782
|
+
enum:
|
|
16783
|
+
- value: MISSING
|
|
16784
|
+
- value: VERIFIED
|
|
16785
|
+
type_domains:VerificationRecord:
|
|
15815
16786
|
type: object
|
|
15816
16787
|
properties:
|
|
15817
|
-
|
|
15818
|
-
$ref: '#/components/schemas/
|
|
15819
|
-
|
|
15820
|
-
|
|
15821
|
-
|
|
15822
|
-
$ref: '#/components/schemas/type_messages:MessageId'
|
|
15823
|
-
timestamp:
|
|
15824
|
-
$ref: '#/components/schemas/type_events:Timestamp'
|
|
15825
|
-
reason:
|
|
16788
|
+
type:
|
|
16789
|
+
$ref: '#/components/schemas/type_domains:RecordType'
|
|
16790
|
+
name:
|
|
16791
|
+
type: string
|
|
16792
|
+
value:
|
|
15826
16793
|
type: string
|
|
16794
|
+
status:
|
|
16795
|
+
$ref: '#/components/schemas/type_domains:RecordStatus'
|
|
16796
|
+
priority:
|
|
16797
|
+
type: integer
|
|
15827
16798
|
required:
|
|
15828
|
-
-
|
|
15829
|
-
-
|
|
15830
|
-
-
|
|
15831
|
-
-
|
|
15832
|
-
|
|
15833
|
-
|
|
16799
|
+
- type
|
|
16800
|
+
- name
|
|
16801
|
+
- value
|
|
16802
|
+
- status
|
|
16803
|
+
type_domains:ClientId:
|
|
16804
|
+
type: string
|
|
16805
|
+
type_domains:Domain:
|
|
16806
|
+
type: object
|
|
16807
|
+
properties:
|
|
16808
|
+
pod_id:
|
|
16809
|
+
$ref: '#/components/schemas/type_pods:PodId'
|
|
16810
|
+
domain_id:
|
|
16811
|
+
$ref: '#/components/schemas/type_domains:DomainId'
|
|
16812
|
+
status:
|
|
16813
|
+
$ref: '#/components/schemas/type_domains:VerificationStatus'
|
|
16814
|
+
feedback_enabled:
|
|
16815
|
+
$ref: '#/components/schemas/type_domains:FeedbackEnabled'
|
|
16816
|
+
records:
|
|
16817
|
+
type: array
|
|
16818
|
+
items:
|
|
16819
|
+
$ref: '#/components/schemas/type_domains:VerificationRecord'
|
|
16820
|
+
client_id:
|
|
16821
|
+
$ref: '#/components/schemas/type_domains:ClientId'
|
|
16822
|
+
updated_at:
|
|
16823
|
+
type: string
|
|
16824
|
+
format: date-time
|
|
16825
|
+
created_at:
|
|
16826
|
+
type: string
|
|
16827
|
+
format: date-time
|
|
16828
|
+
required:
|
|
16829
|
+
- domain_id
|
|
16830
|
+
- status
|
|
16831
|
+
- feedback_enabled
|
|
16832
|
+
- records
|
|
16833
|
+
- updated_at
|
|
16834
|
+
- created_at
|
|
16835
|
+
type_events:DomainVerifiedEvent:
|
|
15834
16836
|
type: object
|
|
15835
16837
|
properties:
|
|
15836
16838
|
type:
|
|
@@ -15842,16 +16844,16 @@ components:
|
|
|
15842
16844
|
type: string
|
|
15843
16845
|
enum:
|
|
15844
16846
|
- type: stringLiteral
|
|
15845
|
-
value:
|
|
16847
|
+
value: domain.verified
|
|
15846
16848
|
event_id:
|
|
15847
16849
|
$ref: '#/components/schemas/type_events:EventId'
|
|
15848
|
-
|
|
15849
|
-
$ref: '#/components/schemas/
|
|
16850
|
+
domain:
|
|
16851
|
+
$ref: '#/components/schemas/type_domains:Domain'
|
|
15850
16852
|
required:
|
|
15851
16853
|
- type
|
|
15852
16854
|
- event_type
|
|
15853
16855
|
- event_id
|
|
15854
|
-
-
|
|
16856
|
+
- domain
|
|
15855
16857
|
|
|
15856
16858
|
```
|
|
15857
16859
|
|
|
@@ -15896,6 +16898,8 @@ channels:
|
|
|
15896
16898
|
#/components/messages/subpackage_websockets.websockets-server-5-message_complained
|
|
15897
16899
|
- $ref: >-
|
|
15898
16900
|
#/components/messages/subpackage_websockets.websockets-server-6-message_rejected
|
|
16901
|
+
- $ref: >-
|
|
16902
|
+
#/components/messages/subpackage_websockets.websockets-server-7-domain_verified
|
|
15899
16903
|
subscribe:
|
|
15900
16904
|
operationId: websockets-subscribe
|
|
15901
16905
|
summary: Client message
|
|
@@ -15941,7 +16945,25 @@ components:
|
|
|
15941
16945
|
name: message_rejected
|
|
15942
16946
|
payload:
|
|
15943
16947
|
$ref: '#/components/schemas/type_events:MessageRejectedEvent'
|
|
16948
|
+
subpackage_websockets.websockets-server-7-domain_verified:
|
|
16949
|
+
name: domain_verified
|
|
16950
|
+
payload:
|
|
16951
|
+
$ref: '#/components/schemas/type_events:DomainVerifiedEvent'
|
|
15944
16952
|
schemas:
|
|
16953
|
+
type_events:EventType:
|
|
16954
|
+
type: string
|
|
16955
|
+
enum:
|
|
16956
|
+
- value: message.received
|
|
16957
|
+
- value: message.sent
|
|
16958
|
+
- value: message.delivered
|
|
16959
|
+
- value: message.bounced
|
|
16960
|
+
- value: message.complained
|
|
16961
|
+
- value: message.rejected
|
|
16962
|
+
- value: domain.verified
|
|
16963
|
+
type_events:EventTypes:
|
|
16964
|
+
type: array
|
|
16965
|
+
items:
|
|
16966
|
+
$ref: '#/components/schemas/type_events:EventType'
|
|
15945
16967
|
type_websockets:Subscribed:
|
|
15946
16968
|
type: object
|
|
15947
16969
|
properties:
|
|
@@ -15950,13 +16972,18 @@ components:
|
|
|
15950
16972
|
enum:
|
|
15951
16973
|
- type: stringLiteral
|
|
15952
16974
|
value: subscribed
|
|
16975
|
+
event_types:
|
|
16976
|
+
$ref: '#/components/schemas/type_events:EventTypes'
|
|
15953
16977
|
inbox_ids:
|
|
15954
16978
|
type: array
|
|
15955
16979
|
items:
|
|
15956
16980
|
type: string
|
|
16981
|
+
pod_ids:
|
|
16982
|
+
type: array
|
|
16983
|
+
items:
|
|
16984
|
+
type: string
|
|
15957
16985
|
required:
|
|
15958
16986
|
- type
|
|
15959
|
-
- inbox_ids
|
|
15960
16987
|
type_events:EventId:
|
|
15961
16988
|
type: string
|
|
15962
16989
|
type_inboxes:InboxId:
|
|
@@ -16355,6 +17382,101 @@ components:
|
|
|
16355
17382
|
- event_type
|
|
16356
17383
|
- event_id
|
|
16357
17384
|
- reject
|
|
17385
|
+
type_pods:PodId:
|
|
17386
|
+
type: string
|
|
17387
|
+
type_domains:DomainId:
|
|
17388
|
+
type: string
|
|
17389
|
+
type_domains:VerificationStatus:
|
|
17390
|
+
type: string
|
|
17391
|
+
enum:
|
|
17392
|
+
- value: PENDING
|
|
17393
|
+
- value: VERIFYING
|
|
17394
|
+
- value: READY
|
|
17395
|
+
type_domains:FeedbackEnabled:
|
|
17396
|
+
type: boolean
|
|
17397
|
+
type_domains:RecordType:
|
|
17398
|
+
type: string
|
|
17399
|
+
enum:
|
|
17400
|
+
- value: TXT
|
|
17401
|
+
- value: CNAME
|
|
17402
|
+
- value: MX
|
|
17403
|
+
type_domains:RecordStatus:
|
|
17404
|
+
type: string
|
|
17405
|
+
enum:
|
|
17406
|
+
- value: MISSING
|
|
17407
|
+
- value: VERIFIED
|
|
17408
|
+
type_domains:VerificationRecord:
|
|
17409
|
+
type: object
|
|
17410
|
+
properties:
|
|
17411
|
+
type:
|
|
17412
|
+
$ref: '#/components/schemas/type_domains:RecordType'
|
|
17413
|
+
name:
|
|
17414
|
+
type: string
|
|
17415
|
+
value:
|
|
17416
|
+
type: string
|
|
17417
|
+
status:
|
|
17418
|
+
$ref: '#/components/schemas/type_domains:RecordStatus'
|
|
17419
|
+
priority:
|
|
17420
|
+
type: integer
|
|
17421
|
+
required:
|
|
17422
|
+
- type
|
|
17423
|
+
- name
|
|
17424
|
+
- value
|
|
17425
|
+
- status
|
|
17426
|
+
type_domains:ClientId:
|
|
17427
|
+
type: string
|
|
17428
|
+
type_domains:Domain:
|
|
17429
|
+
type: object
|
|
17430
|
+
properties:
|
|
17431
|
+
pod_id:
|
|
17432
|
+
$ref: '#/components/schemas/type_pods:PodId'
|
|
17433
|
+
domain_id:
|
|
17434
|
+
$ref: '#/components/schemas/type_domains:DomainId'
|
|
17435
|
+
status:
|
|
17436
|
+
$ref: '#/components/schemas/type_domains:VerificationStatus'
|
|
17437
|
+
feedback_enabled:
|
|
17438
|
+
$ref: '#/components/schemas/type_domains:FeedbackEnabled'
|
|
17439
|
+
records:
|
|
17440
|
+
type: array
|
|
17441
|
+
items:
|
|
17442
|
+
$ref: '#/components/schemas/type_domains:VerificationRecord'
|
|
17443
|
+
client_id:
|
|
17444
|
+
$ref: '#/components/schemas/type_domains:ClientId'
|
|
17445
|
+
updated_at:
|
|
17446
|
+
type: string
|
|
17447
|
+
format: date-time
|
|
17448
|
+
created_at:
|
|
17449
|
+
type: string
|
|
17450
|
+
format: date-time
|
|
17451
|
+
required:
|
|
17452
|
+
- domain_id
|
|
17453
|
+
- status
|
|
17454
|
+
- feedback_enabled
|
|
17455
|
+
- records
|
|
17456
|
+
- updated_at
|
|
17457
|
+
- created_at
|
|
17458
|
+
type_events:DomainVerifiedEvent:
|
|
17459
|
+
type: object
|
|
17460
|
+
properties:
|
|
17461
|
+
type:
|
|
17462
|
+
type: string
|
|
17463
|
+
enum:
|
|
17464
|
+
- type: stringLiteral
|
|
17465
|
+
value: event
|
|
17466
|
+
event_type:
|
|
17467
|
+
type: string
|
|
17468
|
+
enum:
|
|
17469
|
+
- type: stringLiteral
|
|
17470
|
+
value: domain.verified
|
|
17471
|
+
event_id:
|
|
17472
|
+
$ref: '#/components/schemas/type_events:EventId'
|
|
17473
|
+
domain:
|
|
17474
|
+
$ref: '#/components/schemas/type_domains:Domain'
|
|
17475
|
+
required:
|
|
17476
|
+
- type
|
|
17477
|
+
- event_type
|
|
17478
|
+
- event_id
|
|
17479
|
+
- domain
|
|
16358
17480
|
type_websockets:Subscribe:
|
|
16359
17481
|
type: object
|
|
16360
17482
|
properties:
|
|
@@ -16363,13 +17485,18 @@ components:
|
|
|
16363
17485
|
enum:
|
|
16364
17486
|
- type: stringLiteral
|
|
16365
17487
|
value: subscribe
|
|
17488
|
+
event_types:
|
|
17489
|
+
$ref: '#/components/schemas/type_events:EventTypes'
|
|
16366
17490
|
inbox_ids:
|
|
16367
17491
|
type: array
|
|
16368
17492
|
items:
|
|
16369
17493
|
type: string
|
|
17494
|
+
pod_ids:
|
|
17495
|
+
type: array
|
|
17496
|
+
items:
|
|
17497
|
+
type: string
|
|
16370
17498
|
required:
|
|
16371
17499
|
- type
|
|
16372
|
-
- inbox_ids
|
|
16373
17500
|
|
|
16374
17501
|
```
|
|
16375
17502
|
|
|
@@ -18173,6 +19300,8 @@ components:
|
|
|
18173
19300
|
type_inboxes:Inbox:
|
|
18174
19301
|
type: object
|
|
18175
19302
|
properties:
|
|
19303
|
+
pod_id:
|
|
19304
|
+
$ref: '#/components/schemas/type_pods:PodId'
|
|
18176
19305
|
inbox_id:
|
|
18177
19306
|
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
18178
19307
|
display_name:
|
|
@@ -18186,6 +19315,7 @@ components:
|
|
|
18186
19315
|
type: string
|
|
18187
19316
|
format: date-time
|
|
18188
19317
|
required:
|
|
19318
|
+
- pod_id
|
|
18189
19319
|
- inbox_id
|
|
18190
19320
|
- updated_at
|
|
18191
19321
|
- created_at
|
|
@@ -18396,6 +19526,8 @@ components:
|
|
|
18396
19526
|
type_inboxes:Inbox:
|
|
18397
19527
|
type: object
|
|
18398
19528
|
properties:
|
|
19529
|
+
pod_id:
|
|
19530
|
+
$ref: '#/components/schemas/type_pods:PodId'
|
|
18399
19531
|
inbox_id:
|
|
18400
19532
|
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
18401
19533
|
display_name:
|
|
@@ -18409,6 +19541,7 @@ components:
|
|
|
18409
19541
|
type: string
|
|
18410
19542
|
format: date-time
|
|
18411
19543
|
required:
|
|
19544
|
+
- pod_id
|
|
18412
19545
|
- inbox_id
|
|
18413
19546
|
- updated_at
|
|
18414
19547
|
- created_at
|
|
@@ -18616,6 +19749,8 @@ components:
|
|
|
18616
19749
|
type_inboxes:Inbox:
|
|
18617
19750
|
type: object
|
|
18618
19751
|
properties:
|
|
19752
|
+
pod_id:
|
|
19753
|
+
$ref: '#/components/schemas/type_pods:PodId'
|
|
18619
19754
|
inbox_id:
|
|
18620
19755
|
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
18621
19756
|
display_name:
|
|
@@ -18629,6 +19764,7 @@ components:
|
|
|
18629
19764
|
type: string
|
|
18630
19765
|
format: date-time
|
|
18631
19766
|
required:
|
|
19767
|
+
- pod_id
|
|
18632
19768
|
- inbox_id
|
|
18633
19769
|
- updated_at
|
|
18634
19770
|
- created_at
|
|
@@ -20698,6 +21834,8 @@ components:
|
|
|
20698
21834
|
type_domains:DomainItem:
|
|
20699
21835
|
type: object
|
|
20700
21836
|
properties:
|
|
21837
|
+
pod_id:
|
|
21838
|
+
$ref: '#/components/schemas/type_pods:PodId'
|
|
20701
21839
|
domain_id:
|
|
20702
21840
|
$ref: '#/components/schemas/type_domains:DomainId'
|
|
20703
21841
|
feedback_enabled:
|
|
@@ -20970,6 +22108,8 @@ components:
|
|
|
20970
22108
|
type_domains:Domain:
|
|
20971
22109
|
type: object
|
|
20972
22110
|
properties:
|
|
22111
|
+
pod_id:
|
|
22112
|
+
$ref: '#/components/schemas/type_pods:PodId'
|
|
20973
22113
|
domain_id:
|
|
20974
22114
|
$ref: '#/components/schemas/type_domains:DomainId'
|
|
20975
22115
|
status:
|
|
@@ -21334,25 +22474,3 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
21334
22474
|
dataTask.resume()
|
|
21335
22475
|
```
|
|
21336
22476
|
|
|
21337
|
-
# August 13, 2025
|
|
21338
|
-
|
|
21339
|
-
## Summary
|
|
21340
|
-
|
|
21341
|
-
We're excited to introduce **Metrics Endpoints** - two new powerful endpoints that give you deep insights into your email deliverability and agent performance. Track critical events like bounces, deliveries, rejections, and complaints with detailed timestamps.
|
|
21342
|
-
|
|
21343
|
-
### What's new?
|
|
21344
|
-
|
|
21345
|
-
New endpoints:
|
|
21346
|
-
|
|
21347
|
-
* `GET /metrics` - Get comprehensive metrics across all your inboxes
|
|
21348
|
-
* `GET /inboxes/{inbox_id}/metrics` - Get metrics for a specific inbox
|
|
21349
|
-
|
|
21350
|
-
Build smarter agents that monitor their own bounce rates, optimize send timing, and automatically adjust behavior based on deliverability metrics. This unlocks exciting possibilities for self-optimizing agents that can pause campaigns when performance drops or implement intelligent retry strategies.
|
|
21351
|
-
|
|
21352
|
-
<Note>
|
|
21353
|
-
Ready to build smarter agents? Check out our [metrics
|
|
21354
|
-
documentation](https://docs.agentmail.to/api-reference/metrics) to get
|
|
21355
|
-
started.
|
|
21356
|
-
</Note>
|
|
21357
|
-
|
|
21358
|
-
|