agentmail 0.4.7 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/apiKeys/types/ApiKey.d.ts +2 -0
- package/dist/cjs/api/resources/apiKeys/types/CreateApiKeyResponse.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +6 -0
- package/dist/cjs/api/resources/inboxes/client/Client.js +18 -8
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/Client.d.ts +52 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/Client.js +262 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/index.js +17 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/requests/ListApiKeysRequest.d.ts +9 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/requests/ListApiKeysRequest.js +3 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/apiKeys/index.js +17 -0
- package/dist/cjs/api/resources/inboxes/resources/index.d.ts +4 -0
- package/dist/cjs/api/resources/inboxes/resources/index.js +5 -1
- package/dist/cjs/api/resources/inboxes/resources/lists/client/Client.d.ts +69 -0
- package/dist/cjs/api/resources/inboxes/resources/lists/client/Client.js +311 -0
- package/dist/cjs/api/resources/inboxes/resources/lists/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/lists/client/index.js +17 -0
- package/dist/cjs/api/resources/inboxes/resources/lists/client/requests/InboxListListEntriesRequest.d.ts +9 -0
- package/dist/cjs/api/resources/inboxes/resources/lists/client/requests/InboxListListEntriesRequest.js +3 -0
- package/dist/cjs/api/resources/inboxes/resources/lists/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/lists/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/inboxes/resources/lists/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/lists/index.js +17 -0
- package/dist/cjs/api/resources/lists/types/Direction.d.ts +1 -0
- package/dist/cjs/api/resources/lists/types/Direction.js +1 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKey.d.ts +1 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKey.js +1 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyResponse.d.ts +1 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyResponse.js +1 -0
- package/dist/cjs/serialization/resources/lists/types/Direction.d.ts +1 -1
- package/dist/cjs/serialization/resources/lists/types/Direction.js +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/apiKeys/types/ApiKey.d.mts +2 -0
- package/dist/esm/api/resources/apiKeys/types/CreateApiKeyResponse.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/client/Client.d.mts +6 -0
- package/dist/esm/api/resources/inboxes/client/Client.mjs +10 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/client/Client.d.mts +52 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/client/Client.mjs +225 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/client/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/client/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/client/requests/ListApiKeysRequest.d.mts +9 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/client/requests/ListApiKeysRequest.mjs +2 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/apiKeys/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/index.d.mts +4 -0
- package/dist/esm/api/resources/inboxes/resources/index.mjs +4 -0
- package/dist/esm/api/resources/inboxes/resources/lists/client/Client.d.mts +69 -0
- package/dist/esm/api/resources/inboxes/resources/lists/client/Client.mjs +274 -0
- package/dist/esm/api/resources/inboxes/resources/lists/client/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/lists/client/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/lists/client/requests/InboxListListEntriesRequest.d.mts +9 -0
- package/dist/esm/api/resources/inboxes/resources/lists/client/requests/InboxListListEntriesRequest.mjs +2 -0
- package/dist/esm/api/resources/inboxes/resources/lists/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/lists/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/lists/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/lists/index.mjs +1 -0
- package/dist/esm/api/resources/lists/types/Direction.d.mts +1 -0
- package/dist/esm/api/resources/lists/types/Direction.mjs +1 -0
- package/dist/esm/serialization/resources/apiKeys/types/ApiKey.d.mts +1 -0
- package/dist/esm/serialization/resources/apiKeys/types/ApiKey.mjs +1 -0
- package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyResponse.d.mts +1 -0
- package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyResponse.mjs +1 -0
- package/dist/esm/serialization/resources/lists/types/Direction.d.mts +1 -1
- package/dist/esm/serialization/resources/lists/types/Direction.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +1365 -57
- package/dist/llms.txt +5 -1
- package/package.json +1 -1
- package/reference.md +469 -0
package/dist/llms-full.txt
CHANGED
|
@@ -2057,20 +2057,41 @@ agents can send to or receive from.
|
|
|
2057
2057
|
|
|
2058
2058
|
## What are Lists?
|
|
2059
2059
|
|
|
2060
|
-
`Lists` allow you to filter emails by allowing or blocking specific email addresses or domains. There are
|
|
2060
|
+
`Lists` allow you to filter emails by allowing or blocking specific email addresses or domains. There are six list types based on two dimensions:
|
|
2061
2061
|
|
|
2062
|
-
* **Direction**: `send` or `
|
|
2062
|
+
* **Direction**: `send`, `receive`, or `reply`
|
|
2063
2063
|
* **Type**: `allow` or `block`
|
|
2064
2064
|
|
|
2065
|
-
| List | Description
|
|
2066
|
-
| ------------- |
|
|
2067
|
-
| Receive allow | Only accept emails from these addresses or domains
|
|
2068
|
-
| Receive block | Reject emails from these addresses or domains
|
|
2069
|
-
| Send allow | Only send emails to these addresses or domains
|
|
2070
|
-
| Send block | Prevent sending emails to these addresses or domains
|
|
2065
|
+
| List | Description |
|
|
2066
|
+
| ------------- | -------------------------------------------------------- |
|
|
2067
|
+
| Receive allow | Only accept emails from these addresses or domains |
|
|
2068
|
+
| Receive block | Reject emails from these addresses or domains |
|
|
2069
|
+
| Send allow | Only send emails to these addresses or domains |
|
|
2070
|
+
| Send block | Prevent sending emails to these addresses or domains |
|
|
2071
|
+
| Reply allow | Only accept reply emails from these addresses or domains |
|
|
2072
|
+
| Reply block | Reject reply emails from these addresses or domains |
|
|
2071
2073
|
|
|
2072
2074
|
Each entry can be either a full email address (e.g., `partner@example.com`) or an entire domain (e.g., `example.com`).
|
|
2073
2075
|
|
|
2076
|
+
## Scoping
|
|
2077
|
+
|
|
2078
|
+
Lists can be scoped at three levels. A narrower scope overrides a broader one:
|
|
2079
|
+
|
|
2080
|
+
* **Organization**: Applies to all pods and inboxes in your org. Manage with `client.lists`.
|
|
2081
|
+
* **Pod**: Applies to all inboxes in a pod. Manage with `client.pods.lists`.
|
|
2082
|
+
* **Inbox**: Applies to a single inbox. Manage with `client.inboxes.lists`.
|
|
2083
|
+
|
|
2084
|
+
When evaluating whether to allow or block a message, AgentMail checks the most specific scope first. If an inbox-level list has a match, pod and org lists are not checked.
|
|
2085
|
+
|
|
2086
|
+
## Reply lists
|
|
2087
|
+
|
|
2088
|
+
The `reply` direction handles inbound emails that are replies to previous outbound messages. When an inbound email arrives, AgentMail checks the `In-Reply-To` header to determine whether it is a reply:
|
|
2089
|
+
|
|
2090
|
+
* **If the email is a reply** to a previous outbound message, only the reply lists are checked. The receive lists are skipped entirely.
|
|
2091
|
+
* **If the email is not a reply**, only the receive lists are checked. The reply lists are skipped entirely.
|
|
2092
|
+
|
|
2093
|
+
The two branches are completely separate. By default, when reply lists are empty, all replies are allowed. You can restrict replies by populating reply allow or reply block lists.
|
|
2094
|
+
|
|
2074
2095
|
## SDK examples
|
|
2075
2096
|
|
|
2076
2097
|
### List entries
|
|
@@ -2137,6 +2158,48 @@ Remove an entry from a list.
|
|
|
2137
2158
|
```
|
|
2138
2159
|
</CodeBlocks>
|
|
2139
2160
|
|
|
2161
|
+
### Inbox-scoped lists
|
|
2162
|
+
|
|
2163
|
+
Manage lists for a specific inbox. The same operations are available at the inbox level.
|
|
2164
|
+
|
|
2165
|
+
<CodeBlocks>
|
|
2166
|
+
```python title="Python"
|
|
2167
|
+
# Add to an inbox-level receive allowlist
|
|
2168
|
+
client.inboxes.lists.create(
|
|
2169
|
+
"inbox_id", "receive", "allow", entry="vip@example.com"
|
|
2170
|
+
)
|
|
2171
|
+
|
|
2172
|
+
# List inbox-level entries
|
|
2173
|
+
entries = client.inboxes.lists.list("inbox_id", "receive", "allow")
|
|
2174
|
+
```
|
|
2175
|
+
|
|
2176
|
+
```typescript title="TypeScript"
|
|
2177
|
+
// Add to an inbox-level receive allowlist
|
|
2178
|
+
await client.inboxes.lists.create("inbox_id", "receive", "allow", {
|
|
2179
|
+
entry: "vip@example.com",
|
|
2180
|
+
});
|
|
2181
|
+
|
|
2182
|
+
// List inbox-level entries
|
|
2183
|
+
const entries = await client.inboxes.lists.list("inbox_id", "receive", "allow");
|
|
2184
|
+
```
|
|
2185
|
+
</CodeBlocks>
|
|
2186
|
+
|
|
2187
|
+
### Reply lists
|
|
2188
|
+
|
|
2189
|
+
Control which addresses can send replies to an inbox's outbound messages.
|
|
2190
|
+
|
|
2191
|
+
<CodeBlocks>
|
|
2192
|
+
```python title="Python"
|
|
2193
|
+
# Only allow replies from a specific domain
|
|
2194
|
+
client.lists.create("reply", "allow", entry="nobu.com")
|
|
2195
|
+
```
|
|
2196
|
+
|
|
2197
|
+
```typescript title="TypeScript"
|
|
2198
|
+
// Only allow replies from a specific domain
|
|
2199
|
+
await client.lists.create("reply", "allow", { entry: "nobu.com" });
|
|
2200
|
+
```
|
|
2201
|
+
</CodeBlocks>
|
|
2202
|
+
|
|
2140
2203
|
## Copy for Cursor / Claude
|
|
2141
2204
|
|
|
2142
2205
|
Copy one of the blocks below into Cursor or Claude for complete Lists API knowledge in one shot.
|
|
@@ -2144,53 +2207,85 @@ Copy one of the blocks below into Cursor or Claude for complete Lists API knowle
|
|
|
2144
2207
|
<CodeBlocks>
|
|
2145
2208
|
```python title="Python"
|
|
2146
2209
|
"""
|
|
2147
|
-
AgentMail Lists
|
|
2210
|
+
AgentMail Lists, copy into Cursor/Claude.
|
|
2148
2211
|
|
|
2149
|
-
Filter emails by allow/block for send/receive.
|
|
2212
|
+
Filter emails by allow/block for send/receive/reply. 6 types: receive|send|reply x allow|block.
|
|
2213
|
+
Lists can be scoped to org, pod, or inbox level.
|
|
2150
2214
|
|
|
2151
|
-
API reference:
|
|
2215
|
+
API reference (org-level):
|
|
2152
2216
|
- lists.list(direction, type, limit?, page_token?)
|
|
2153
|
-
- lists.create(direction, type, entry, reason?)
|
|
2217
|
+
- lists.create(direction, type, entry, reason?), reason only for block lists
|
|
2154
2218
|
- lists.get(direction, type, entry)
|
|
2155
2219
|
- lists.delete(direction, type, entry)
|
|
2156
2220
|
|
|
2221
|
+
Pod-level: pods.lists.list(pod_id, direction, type, ...) and same for create/get/delete.
|
|
2222
|
+
Inbox-level: inboxes.lists.list(inbox_id, direction, type, ...) and same for create/get/delete.
|
|
2223
|
+
|
|
2157
2224
|
Entry: full email (user@domain.com) or domain (example.com).
|
|
2225
|
+
Cascade: inbox > pod > org (most specific scope wins).
|
|
2226
|
+
Reply lists: inbound replies (detected via In-Reply-To) check reply lists, not receive lists.
|
|
2158
2227
|
"""
|
|
2159
2228
|
from agentmail import AgentMail
|
|
2160
2229
|
|
|
2161
2230
|
client = AgentMail(api_key="YOUR_API_KEY")
|
|
2162
2231
|
|
|
2232
|
+
# Org-level lists
|
|
2163
2233
|
entries = client.lists.list("receive", "allow", limit=10)
|
|
2164
2234
|
client.lists.create("receive", "allow", entry="partner@example.com")
|
|
2165
2235
|
client.lists.create("receive", "block", entry="spam@example.com", reason="spam")
|
|
2166
2236
|
e = client.lists.get("receive", "allow", entry="partner@example.com")
|
|
2167
2237
|
client.lists.delete("receive", "allow", entry="partner@example.com")
|
|
2238
|
+
|
|
2239
|
+
# Reply lists
|
|
2240
|
+
client.lists.create("reply", "allow", entry="nobu.com")
|
|
2241
|
+
|
|
2242
|
+
# Inbox-level lists
|
|
2243
|
+
client.inboxes.lists.create("inbox_id", "receive", "allow", entry="vip@example.com")
|
|
2244
|
+
inbox_entries = client.inboxes.lists.list("inbox_id", "receive", "allow")
|
|
2168
2245
|
```
|
|
2169
2246
|
|
|
2170
2247
|
```typescript title="TypeScript"
|
|
2171
2248
|
/**
|
|
2172
|
-
* AgentMail Lists
|
|
2249
|
+
* AgentMail Lists, copy into Cursor/Claude.
|
|
2173
2250
|
*
|
|
2174
|
-
* Filter emails by allow/block for send/receive.
|
|
2251
|
+
* Filter emails by allow/block for send/receive/reply. 6 types: receive|send|reply x allow|block.
|
|
2252
|
+
* Lists can be scoped to org, pod, or inbox level.
|
|
2175
2253
|
*
|
|
2176
|
-
* API reference:
|
|
2254
|
+
* API reference (org-level):
|
|
2177
2255
|
* - lists.list(direction, type, { limit?, pageToken? })
|
|
2178
2256
|
* - lists.create(direction, type, { entry, reason? }) — reason only for block
|
|
2179
2257
|
* - lists.get(direction, type, entry)
|
|
2180
2258
|
* - lists.delete(direction, type, entry)
|
|
2181
2259
|
*
|
|
2260
|
+
* Pod-level: pods.lists.list(podId, direction, type, ...) and same for create/get/delete.
|
|
2261
|
+
* Inbox-level: inboxes.lists.list(inboxId, direction, type, ...) and same for create/get/delete.
|
|
2262
|
+
*
|
|
2182
2263
|
* Entry: full email or domain.
|
|
2264
|
+
* Cascade: inbox > pod > org (most specific scope wins).
|
|
2265
|
+
* Reply lists: inbound replies (detected via In-Reply-To) check reply lists, not receive lists.
|
|
2183
2266
|
*/
|
|
2184
2267
|
import { AgentMailClient } from "agentmail";
|
|
2185
2268
|
|
|
2186
2269
|
const client = new AgentMailClient({ apiKey: "YOUR_API_KEY" });
|
|
2187
2270
|
|
|
2188
2271
|
async function main() {
|
|
2272
|
+
// Org-level lists
|
|
2189
2273
|
const entries = await client.lists.list("receive", "allow", { limit: 10 });
|
|
2190
2274
|
await client.lists.create("receive", "allow", { entry: "partner@example.com" });
|
|
2191
2275
|
await client.lists.create("receive", "block", { entry: "spam@example.com", reason: "spam" });
|
|
2192
2276
|
const e = await client.lists.get("receive", "allow", "partner@example.com");
|
|
2193
2277
|
await client.lists.delete("receive", "allow", "partner@example.com");
|
|
2278
|
+
|
|
2279
|
+
// Reply lists
|
|
2280
|
+
await client.lists.create("reply", "allow", { entry: "nobu.com" });
|
|
2281
|
+
|
|
2282
|
+
// Inbox-level lists
|
|
2283
|
+
await client.inboxes.lists.create("inbox_id", "receive", "allow", {
|
|
2284
|
+
entry: "vip@example.com",
|
|
2285
|
+
});
|
|
2286
|
+
const inboxEntries = await client.inboxes.lists.list(
|
|
2287
|
+
"inbox_id", "receive", "allow"
|
|
2288
|
+
);
|
|
2194
2289
|
}
|
|
2195
2290
|
main();
|
|
2196
2291
|
```
|
|
@@ -3131,7 +3226,7 @@ The Model Context Protocol (MCP) is an open standard that enables AI application
|
|
|
3131
3226
|
Install with:
|
|
3132
3227
|
|
|
3133
3228
|
```bash
|
|
3134
|
-
npx
|
|
3229
|
+
npx add-mcp https://mcp.agentmail.to
|
|
3135
3230
|
```
|
|
3136
3231
|
|
|
3137
3232
|
Configure your API key when prompted. Get your key from the [AgentMail Console](https://console.agentmail.to). For more details, visit [mcp.agentmail.to](https://mcp.agentmail.to).
|
|
@@ -10784,12 +10879,12 @@ We hope this provides a clear and transparent look into why these DNS records ar
|
|
|
10784
10879
|
***
|
|
10785
10880
|
|
|
10786
10881
|
title: SOC 2 Compliance
|
|
10787
|
-
description: AgentMail's SOC 2 Type I
|
|
10882
|
+
description: AgentMail's SOC 2 Type I and Type II compliance.
|
|
10788
10883
|
sidebar\_position: 40
|
|
10789
|
-
lastUpdated: '
|
|
10884
|
+
lastUpdated: '2026-03-17'
|
|
10790
10885
|
-------------------------
|
|
10791
10886
|
|
|
10792
|
-
> AgentMail has
|
|
10887
|
+
> AgentMail has achieved **SOC 2 Type I** (July 2025) and **Type II** (Q1 2026) compliance.
|
|
10793
10888
|
|
|
10794
10889
|
***
|
|
10795
10890
|
|
|
@@ -10800,19 +10895,19 @@ lastUpdated: '2025-11-02'
|
|
|
10800
10895
|
**Completed July 2025** - Controls properly designed and in place
|
|
10801
10896
|
</Card>
|
|
10802
10897
|
|
|
10803
|
-
<Card title="Type II
|
|
10804
|
-
**
|
|
10898
|
+
<Card title="Type II Achieved" icon="check-circle">
|
|
10899
|
+
**Completed Q1 2026** - Operational effectiveness validated over time
|
|
10805
10900
|
</Card>
|
|
10806
10901
|
</CardGroup>
|
|
10807
10902
|
|
|
10808
10903
|
### Compliance Timeline
|
|
10809
10904
|
|
|
10810
|
-
| Phase | Period | Status
|
|
10811
|
-
| ------------------------------ | ------------------- |
|
|
10812
|
-
| **Type I Preparation** | June 2025 | Completed
|
|
10813
|
-
| **Type I Assessment** | July 2025 | Completed
|
|
10814
|
-
| **Type II Observation Period** | Aug 2025 - Dec 2025 |
|
|
10815
|
-
| **Type II Certification** | Q1 2026 |
|
|
10905
|
+
| Phase | Period | Status |
|
|
10906
|
+
| ------------------------------ | ------------------- | --------- |
|
|
10907
|
+
| **Type I Preparation** | June 2025 | Completed |
|
|
10908
|
+
| **Type I Assessment** | July 2025 | Completed |
|
|
10909
|
+
| **Type II Observation Period** | Aug 2025 - Dec 2025 | Completed |
|
|
10910
|
+
| **Type II Certification** | Q1 2026 | Completed |
|
|
10816
10911
|
|
|
10817
10912
|
***
|
|
10818
10913
|
|
|
@@ -10832,14 +10927,14 @@ lastUpdated: '2025-11-02'
|
|
|
10832
10927
|
* **Type II**: Validates that controls **operate effectively** over a period (typically 6–12 months).
|
|
10833
10928
|
|
|
10834
10929
|
<Callout intent="success">
|
|
10835
|
-
AgentMail's SOC 2 Type I
|
|
10930
|
+
AgentMail's SOC 2 Type I and Type II reports confirm that our security infrastructure is properly designed, implemented, and operates effectively over time.
|
|
10836
10931
|
</Callout>
|
|
10837
10932
|
|
|
10838
10933
|
***
|
|
10839
10934
|
|
|
10840
10935
|
## Security Controls Implemented
|
|
10841
10936
|
|
|
10842
|
-
The following controls have been audited and verified as part of our SOC 2 Type I compliance:
|
|
10937
|
+
The following controls have been audited and verified as part of our SOC 2 Type I & Type II compliance:
|
|
10843
10938
|
|
|
10844
10939
|
### Access Control
|
|
10845
10940
|
|
|
@@ -10890,26 +10985,22 @@ See [Email Protocols](https://docs.agentmail.to/email-protocols) for technical d
|
|
|
10890
10985
|
| Incident Response | Runbooks, post-mortems, disclosure program | CC7.4–CC7.5 |
|
|
10891
10986
|
| Workforce Security | Security training, NDAs, background checks | CC5.3–CC5.4 |
|
|
10892
10987
|
|
|
10893
|
-
> The above mappings reflect our audited Type I
|
|
10988
|
+
> The above mappings reflect our audited Type I and Type II controls.
|
|
10894
10989
|
|
|
10895
10990
|
***
|
|
10896
10991
|
|
|
10897
|
-
## Type II Certification
|
|
10992
|
+
## Type II Certification
|
|
10898
10993
|
|
|
10899
|
-
AgentMail
|
|
10994
|
+
AgentMail completed the **Type II observation period** (August 2025 - December 2025) and received full **SOC 2 Type II certification** in Q1 2026 from an independent CPA firm.
|
|
10900
10995
|
|
|
10901
|
-
### What
|
|
10996
|
+
### What Was Validated
|
|
10902
10997
|
|
|
10903
|
-
* **Continuous Operation**: Controls
|
|
10998
|
+
* **Continuous Operation**: Controls functioned consistently without gaps
|
|
10904
10999
|
* **Change Management**: Security maintained through system updates and changes
|
|
10905
11000
|
* **Evidence Collection**: Logs, tickets, training records, access reviews
|
|
10906
|
-
* **Incident Handling**: Real-world response to security events
|
|
10907
|
-
|
|
10908
|
-
### Expected Completion
|
|
10909
|
-
|
|
10910
|
-
**Q1 2026** - Full SOC 2 Type II certification report from independent CPA firm
|
|
11001
|
+
* **Incident Handling**: Real-world response to security events
|
|
10911
11002
|
|
|
10912
|
-
Type II certification provides the highest level of assurance that AgentMail's security controls are not only well-designed but also operate effectively over time.
|
|
11003
|
+
SOC 2 Type II certification provides the highest level of assurance that AgentMail's security controls are not only well-designed but also operate effectively over time.
|
|
10913
11004
|
|
|
10914
11005
|
***
|
|
10915
11006
|
|
|
@@ -19857,7 +19948,920 @@ func main() {
|
|
|
19857
19948
|
require 'uri'
|
|
19858
19949
|
require 'net/http'
|
|
19859
19950
|
|
|
19860
|
-
url = URI("https://api.agentmail.to/v0/inboxes/inbox_id/drafts/draft_id/send")
|
|
19951
|
+
url = URI("https://api.agentmail.to/v0/inboxes/inbox_id/drafts/draft_id/send")
|
|
19952
|
+
|
|
19953
|
+
http = Net::HTTP.new(url.host, url.port)
|
|
19954
|
+
http.use_ssl = true
|
|
19955
|
+
|
|
19956
|
+
request = Net::HTTP::Post.new(url)
|
|
19957
|
+
request["Authorization"] = 'Bearer <api_key>'
|
|
19958
|
+
request["Content-Type"] = 'application/json'
|
|
19959
|
+
request.body = "{}"
|
|
19960
|
+
|
|
19961
|
+
response = http.request(request)
|
|
19962
|
+
puts response.read_body
|
|
19963
|
+
```
|
|
19964
|
+
|
|
19965
|
+
```java
|
|
19966
|
+
import com.mashape.unirest.http.HttpResponse;
|
|
19967
|
+
import com.mashape.unirest.http.Unirest;
|
|
19968
|
+
|
|
19969
|
+
HttpResponse<String> response = Unirest.post("https://api.agentmail.to/v0/inboxes/inbox_id/drafts/draft_id/send")
|
|
19970
|
+
.header("Authorization", "Bearer <api_key>")
|
|
19971
|
+
.header("Content-Type", "application/json")
|
|
19972
|
+
.body("{}")
|
|
19973
|
+
.asString();
|
|
19974
|
+
```
|
|
19975
|
+
|
|
19976
|
+
```php
|
|
19977
|
+
<?php
|
|
19978
|
+
require_once('vendor/autoload.php');
|
|
19979
|
+
|
|
19980
|
+
$client = new \GuzzleHttp\Client();
|
|
19981
|
+
|
|
19982
|
+
$response = $client->request('POST', 'https://api.agentmail.to/v0/inboxes/inbox_id/drafts/draft_id/send', [
|
|
19983
|
+
'body' => '{}',
|
|
19984
|
+
'headers' => [
|
|
19985
|
+
'Authorization' => 'Bearer <api_key>',
|
|
19986
|
+
'Content-Type' => 'application/json',
|
|
19987
|
+
],
|
|
19988
|
+
]);
|
|
19989
|
+
|
|
19990
|
+
echo $response->getBody();
|
|
19991
|
+
```
|
|
19992
|
+
|
|
19993
|
+
```csharp
|
|
19994
|
+
using RestSharp;
|
|
19995
|
+
|
|
19996
|
+
var client = new RestClient("https://api.agentmail.to/v0/inboxes/inbox_id/drafts/draft_id/send");
|
|
19997
|
+
var request = new RestRequest(Method.POST);
|
|
19998
|
+
request.AddHeader("Authorization", "Bearer <api_key>");
|
|
19999
|
+
request.AddHeader("Content-Type", "application/json");
|
|
20000
|
+
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
|
|
20001
|
+
IRestResponse response = client.Execute(request);
|
|
20002
|
+
```
|
|
20003
|
+
|
|
20004
|
+
```swift
|
|
20005
|
+
import Foundation
|
|
20006
|
+
|
|
20007
|
+
let headers = [
|
|
20008
|
+
"Authorization": "Bearer <api_key>",
|
|
20009
|
+
"Content-Type": "application/json"
|
|
20010
|
+
]
|
|
20011
|
+
let parameters = [] as [String : Any]
|
|
20012
|
+
|
|
20013
|
+
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
|
|
20014
|
+
|
|
20015
|
+
let request = NSMutableURLRequest(url: NSURL(string: "https://api.agentmail.to/v0/inboxes/inbox_id/drafts/draft_id/send")! as URL,
|
|
20016
|
+
cachePolicy: .useProtocolCachePolicy,
|
|
20017
|
+
timeoutInterval: 10.0)
|
|
20018
|
+
request.httpMethod = "POST"
|
|
20019
|
+
request.allHTTPHeaderFields = headers
|
|
20020
|
+
request.httpBody = postData as Data
|
|
20021
|
+
|
|
20022
|
+
let session = URLSession.shared
|
|
20023
|
+
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
|
|
20024
|
+
if (error != nil) {
|
|
20025
|
+
print(error as Any)
|
|
20026
|
+
} else {
|
|
20027
|
+
let httpResponse = response as? HTTPURLResponse
|
|
20028
|
+
print(httpResponse)
|
|
20029
|
+
}
|
|
20030
|
+
})
|
|
20031
|
+
|
|
20032
|
+
dataTask.resume()
|
|
20033
|
+
```
|
|
20034
|
+
|
|
20035
|
+
# List Entries
|
|
20036
|
+
|
|
20037
|
+
GET https://api.agentmail.to/v0/inboxes/{inbox_id}/lists/{direction}/{type}
|
|
20038
|
+
|
|
20039
|
+
Reference: https://docs.agentmail.to/api-reference/inboxes/lists/list
|
|
20040
|
+
|
|
20041
|
+
## OpenAPI Specification
|
|
20042
|
+
|
|
20043
|
+
```yaml
|
|
20044
|
+
openapi: 3.1.0
|
|
20045
|
+
info:
|
|
20046
|
+
title: api
|
|
20047
|
+
version: 1.0.0
|
|
20048
|
+
paths:
|
|
20049
|
+
/v0/inboxes/{inbox_id}/lists/{direction}/{type}:
|
|
20050
|
+
get:
|
|
20051
|
+
operationId: list
|
|
20052
|
+
summary: List Entries
|
|
20053
|
+
tags:
|
|
20054
|
+
- subpackage_inboxes.subpackage_inboxes/lists
|
|
20055
|
+
parameters:
|
|
20056
|
+
- name: inbox_id
|
|
20057
|
+
in: path
|
|
20058
|
+
required: true
|
|
20059
|
+
schema:
|
|
20060
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
20061
|
+
- name: direction
|
|
20062
|
+
in: path
|
|
20063
|
+
required: true
|
|
20064
|
+
schema:
|
|
20065
|
+
$ref: '#/components/schemas/type_lists:Direction'
|
|
20066
|
+
- name: type
|
|
20067
|
+
in: path
|
|
20068
|
+
required: true
|
|
20069
|
+
schema:
|
|
20070
|
+
$ref: '#/components/schemas/type_lists:ListType'
|
|
20071
|
+
- name: limit
|
|
20072
|
+
in: query
|
|
20073
|
+
required: false
|
|
20074
|
+
schema:
|
|
20075
|
+
$ref: '#/components/schemas/type_:Limit'
|
|
20076
|
+
- name: page_token
|
|
20077
|
+
in: query
|
|
20078
|
+
required: false
|
|
20079
|
+
schema:
|
|
20080
|
+
$ref: '#/components/schemas/type_:PageToken'
|
|
20081
|
+
- name: Authorization
|
|
20082
|
+
in: header
|
|
20083
|
+
description: Bearer authentication
|
|
20084
|
+
required: true
|
|
20085
|
+
schema:
|
|
20086
|
+
type: string
|
|
20087
|
+
responses:
|
|
20088
|
+
'200':
|
|
20089
|
+
description: Response with status 200
|
|
20090
|
+
content:
|
|
20091
|
+
application/json:
|
|
20092
|
+
schema:
|
|
20093
|
+
$ref: '#/components/schemas/type_lists:PodListListEntriesResponse'
|
|
20094
|
+
servers:
|
|
20095
|
+
- url: https://api.agentmail.to
|
|
20096
|
+
- url: https://x402.api.agentmail.to
|
|
20097
|
+
- url: https://mpp.api.agentmail.to
|
|
20098
|
+
- url: https://api.agentmail.eu
|
|
20099
|
+
components:
|
|
20100
|
+
schemas:
|
|
20101
|
+
type_inboxes:InboxId:
|
|
20102
|
+
type: string
|
|
20103
|
+
description: The ID of the inbox.
|
|
20104
|
+
title: InboxId
|
|
20105
|
+
type_lists:Direction:
|
|
20106
|
+
type: string
|
|
20107
|
+
enum:
|
|
20108
|
+
- send
|
|
20109
|
+
- receive
|
|
20110
|
+
- reply
|
|
20111
|
+
description: Direction of list entry.
|
|
20112
|
+
title: Direction
|
|
20113
|
+
type_lists:ListType:
|
|
20114
|
+
type: string
|
|
20115
|
+
enum:
|
|
20116
|
+
- allow
|
|
20117
|
+
- block
|
|
20118
|
+
description: Type of list entry.
|
|
20119
|
+
title: ListType
|
|
20120
|
+
type_:Limit:
|
|
20121
|
+
type: integer
|
|
20122
|
+
description: Limit of number of items returned.
|
|
20123
|
+
title: Limit
|
|
20124
|
+
type_:PageToken:
|
|
20125
|
+
type: string
|
|
20126
|
+
description: Page token for pagination.
|
|
20127
|
+
title: PageToken
|
|
20128
|
+
type_:Count:
|
|
20129
|
+
type: integer
|
|
20130
|
+
description: Number of items returned.
|
|
20131
|
+
title: Count
|
|
20132
|
+
type_:OrganizationId:
|
|
20133
|
+
type: string
|
|
20134
|
+
description: ID of organization.
|
|
20135
|
+
title: OrganizationId
|
|
20136
|
+
type_lists:EntryType:
|
|
20137
|
+
type: string
|
|
20138
|
+
enum:
|
|
20139
|
+
- email
|
|
20140
|
+
- domain
|
|
20141
|
+
description: Whether the entry is an email address or domain.
|
|
20142
|
+
title: EntryType
|
|
20143
|
+
type_lists:PodListEntry:
|
|
20144
|
+
type: object
|
|
20145
|
+
properties:
|
|
20146
|
+
entry:
|
|
20147
|
+
type: string
|
|
20148
|
+
description: Email address or domain of list entry.
|
|
20149
|
+
organization_id:
|
|
20150
|
+
$ref: '#/components/schemas/type_:OrganizationId'
|
|
20151
|
+
reason:
|
|
20152
|
+
type: string
|
|
20153
|
+
description: Reason for adding the entry.
|
|
20154
|
+
direction:
|
|
20155
|
+
$ref: '#/components/schemas/type_lists:Direction'
|
|
20156
|
+
list_type:
|
|
20157
|
+
$ref: '#/components/schemas/type_lists:ListType'
|
|
20158
|
+
entry_type:
|
|
20159
|
+
$ref: '#/components/schemas/type_lists:EntryType'
|
|
20160
|
+
created_at:
|
|
20161
|
+
type: string
|
|
20162
|
+
format: date-time
|
|
20163
|
+
description: Time at which entry was created.
|
|
20164
|
+
pod_id:
|
|
20165
|
+
type: string
|
|
20166
|
+
description: ID of pod.
|
|
20167
|
+
inbox_id:
|
|
20168
|
+
type: string
|
|
20169
|
+
description: ID of inbox, if entry is inbox-scoped.
|
|
20170
|
+
required:
|
|
20171
|
+
- entry
|
|
20172
|
+
- organization_id
|
|
20173
|
+
- direction
|
|
20174
|
+
- list_type
|
|
20175
|
+
- entry_type
|
|
20176
|
+
- created_at
|
|
20177
|
+
- pod_id
|
|
20178
|
+
title: PodListEntry
|
|
20179
|
+
type_lists:PodListListEntriesResponse:
|
|
20180
|
+
type: object
|
|
20181
|
+
properties:
|
|
20182
|
+
count:
|
|
20183
|
+
$ref: '#/components/schemas/type_:Count'
|
|
20184
|
+
limit:
|
|
20185
|
+
$ref: '#/components/schemas/type_:Limit'
|
|
20186
|
+
next_page_token:
|
|
20187
|
+
$ref: '#/components/schemas/type_:PageToken'
|
|
20188
|
+
entries:
|
|
20189
|
+
type: array
|
|
20190
|
+
items:
|
|
20191
|
+
$ref: '#/components/schemas/type_lists:PodListEntry'
|
|
20192
|
+
description: Ordered by entry ascending.
|
|
20193
|
+
required:
|
|
20194
|
+
- count
|
|
20195
|
+
- entries
|
|
20196
|
+
title: PodListListEntriesResponse
|
|
20197
|
+
securitySchemes:
|
|
20198
|
+
Bearer:
|
|
20199
|
+
type: http
|
|
20200
|
+
scheme: bearer
|
|
20201
|
+
|
|
20202
|
+
```
|
|
20203
|
+
|
|
20204
|
+
## SDK Code Examples
|
|
20205
|
+
|
|
20206
|
+
```typescript
|
|
20207
|
+
import { AgentMailClient } from "agentmail";
|
|
20208
|
+
|
|
20209
|
+
async function main() {
|
|
20210
|
+
const client = new AgentMailClient({
|
|
20211
|
+
apiKey: "YOUR_TOKEN_HERE",
|
|
20212
|
+
});
|
|
20213
|
+
await client.inboxes.lists.list("inbox_id", "send", "allow", {});
|
|
20214
|
+
}
|
|
20215
|
+
main();
|
|
20216
|
+
|
|
20217
|
+
```
|
|
20218
|
+
|
|
20219
|
+
```python
|
|
20220
|
+
from agentmail import AgentMail
|
|
20221
|
+
|
|
20222
|
+
client = AgentMail(
|
|
20223
|
+
api_key="YOUR_TOKEN_HERE",
|
|
20224
|
+
)
|
|
20225
|
+
|
|
20226
|
+
client.inboxes.lists.list(
|
|
20227
|
+
inbox_id="inbox_id",
|
|
20228
|
+
direction="send",
|
|
20229
|
+
type="allow",
|
|
20230
|
+
)
|
|
20231
|
+
|
|
20232
|
+
```
|
|
20233
|
+
|
|
20234
|
+
```go
|
|
20235
|
+
package main
|
|
20236
|
+
|
|
20237
|
+
import (
|
|
20238
|
+
"fmt"
|
|
20239
|
+
"net/http"
|
|
20240
|
+
"io"
|
|
20241
|
+
)
|
|
20242
|
+
|
|
20243
|
+
func main() {
|
|
20244
|
+
|
|
20245
|
+
url := "https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow"
|
|
20246
|
+
|
|
20247
|
+
req, _ := http.NewRequest("GET", url, nil)
|
|
20248
|
+
|
|
20249
|
+
req.Header.Add("Authorization", "Bearer <api_key>")
|
|
20250
|
+
|
|
20251
|
+
res, _ := http.DefaultClient.Do(req)
|
|
20252
|
+
|
|
20253
|
+
defer res.Body.Close()
|
|
20254
|
+
body, _ := io.ReadAll(res.Body)
|
|
20255
|
+
|
|
20256
|
+
fmt.Println(res)
|
|
20257
|
+
fmt.Println(string(body))
|
|
20258
|
+
|
|
20259
|
+
}
|
|
20260
|
+
```
|
|
20261
|
+
|
|
20262
|
+
```ruby
|
|
20263
|
+
require 'uri'
|
|
20264
|
+
require 'net/http'
|
|
20265
|
+
|
|
20266
|
+
url = URI("https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow")
|
|
20267
|
+
|
|
20268
|
+
http = Net::HTTP.new(url.host, url.port)
|
|
20269
|
+
http.use_ssl = true
|
|
20270
|
+
|
|
20271
|
+
request = Net::HTTP::Get.new(url)
|
|
20272
|
+
request["Authorization"] = 'Bearer <api_key>'
|
|
20273
|
+
|
|
20274
|
+
response = http.request(request)
|
|
20275
|
+
puts response.read_body
|
|
20276
|
+
```
|
|
20277
|
+
|
|
20278
|
+
```java
|
|
20279
|
+
import com.mashape.unirest.http.HttpResponse;
|
|
20280
|
+
import com.mashape.unirest.http.Unirest;
|
|
20281
|
+
|
|
20282
|
+
HttpResponse<String> response = Unirest.get("https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow")
|
|
20283
|
+
.header("Authorization", "Bearer <api_key>")
|
|
20284
|
+
.asString();
|
|
20285
|
+
```
|
|
20286
|
+
|
|
20287
|
+
```php
|
|
20288
|
+
<?php
|
|
20289
|
+
require_once('vendor/autoload.php');
|
|
20290
|
+
|
|
20291
|
+
$client = new \GuzzleHttp\Client();
|
|
20292
|
+
|
|
20293
|
+
$response = $client->request('GET', 'https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow', [
|
|
20294
|
+
'headers' => [
|
|
20295
|
+
'Authorization' => 'Bearer <api_key>',
|
|
20296
|
+
],
|
|
20297
|
+
]);
|
|
20298
|
+
|
|
20299
|
+
echo $response->getBody();
|
|
20300
|
+
```
|
|
20301
|
+
|
|
20302
|
+
```csharp
|
|
20303
|
+
using RestSharp;
|
|
20304
|
+
|
|
20305
|
+
var client = new RestClient("https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow");
|
|
20306
|
+
var request = new RestRequest(Method.GET);
|
|
20307
|
+
request.AddHeader("Authorization", "Bearer <api_key>");
|
|
20308
|
+
IRestResponse response = client.Execute(request);
|
|
20309
|
+
```
|
|
20310
|
+
|
|
20311
|
+
```swift
|
|
20312
|
+
import Foundation
|
|
20313
|
+
|
|
20314
|
+
let headers = ["Authorization": "Bearer <api_key>"]
|
|
20315
|
+
|
|
20316
|
+
let request = NSMutableURLRequest(url: NSURL(string: "https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow")! as URL,
|
|
20317
|
+
cachePolicy: .useProtocolCachePolicy,
|
|
20318
|
+
timeoutInterval: 10.0)
|
|
20319
|
+
request.httpMethod = "GET"
|
|
20320
|
+
request.allHTTPHeaderFields = headers
|
|
20321
|
+
|
|
20322
|
+
let session = URLSession.shared
|
|
20323
|
+
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
|
|
20324
|
+
if (error != nil) {
|
|
20325
|
+
print(error as Any)
|
|
20326
|
+
} else {
|
|
20327
|
+
let httpResponse = response as? HTTPURLResponse
|
|
20328
|
+
print(httpResponse)
|
|
20329
|
+
}
|
|
20330
|
+
})
|
|
20331
|
+
|
|
20332
|
+
dataTask.resume()
|
|
20333
|
+
```
|
|
20334
|
+
|
|
20335
|
+
# Get List Entry
|
|
20336
|
+
|
|
20337
|
+
GET https://api.agentmail.to/v0/inboxes/{inbox_id}/lists/{direction}/{type}/{entry}
|
|
20338
|
+
|
|
20339
|
+
Reference: https://docs.agentmail.to/api-reference/inboxes/lists/get
|
|
20340
|
+
|
|
20341
|
+
## OpenAPI Specification
|
|
20342
|
+
|
|
20343
|
+
```yaml
|
|
20344
|
+
openapi: 3.1.0
|
|
20345
|
+
info:
|
|
20346
|
+
title: api
|
|
20347
|
+
version: 1.0.0
|
|
20348
|
+
paths:
|
|
20349
|
+
/v0/inboxes/{inbox_id}/lists/{direction}/{type}/{entry}:
|
|
20350
|
+
get:
|
|
20351
|
+
operationId: get
|
|
20352
|
+
summary: Get List Entry
|
|
20353
|
+
tags:
|
|
20354
|
+
- subpackage_inboxes.subpackage_inboxes/lists
|
|
20355
|
+
parameters:
|
|
20356
|
+
- name: inbox_id
|
|
20357
|
+
in: path
|
|
20358
|
+
required: true
|
|
20359
|
+
schema:
|
|
20360
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
20361
|
+
- name: direction
|
|
20362
|
+
in: path
|
|
20363
|
+
required: true
|
|
20364
|
+
schema:
|
|
20365
|
+
$ref: '#/components/schemas/type_lists:Direction'
|
|
20366
|
+
- name: type
|
|
20367
|
+
in: path
|
|
20368
|
+
required: true
|
|
20369
|
+
schema:
|
|
20370
|
+
$ref: '#/components/schemas/type_lists:ListType'
|
|
20371
|
+
- name: entry
|
|
20372
|
+
in: path
|
|
20373
|
+
description: Email address or domain.
|
|
20374
|
+
required: true
|
|
20375
|
+
schema:
|
|
20376
|
+
type: string
|
|
20377
|
+
- name: Authorization
|
|
20378
|
+
in: header
|
|
20379
|
+
description: Bearer authentication
|
|
20380
|
+
required: true
|
|
20381
|
+
schema:
|
|
20382
|
+
type: string
|
|
20383
|
+
responses:
|
|
20384
|
+
'200':
|
|
20385
|
+
description: Response with status 200
|
|
20386
|
+
content:
|
|
20387
|
+
application/json:
|
|
20388
|
+
schema:
|
|
20389
|
+
$ref: '#/components/schemas/type_lists:PodListEntry'
|
|
20390
|
+
'404':
|
|
20391
|
+
description: Error response with status 404
|
|
20392
|
+
content:
|
|
20393
|
+
application/json:
|
|
20394
|
+
schema:
|
|
20395
|
+
$ref: '#/components/schemas/type_:ErrorResponse'
|
|
20396
|
+
servers:
|
|
20397
|
+
- url: https://api.agentmail.to
|
|
20398
|
+
- url: https://x402.api.agentmail.to
|
|
20399
|
+
- url: https://mpp.api.agentmail.to
|
|
20400
|
+
- url: https://api.agentmail.eu
|
|
20401
|
+
components:
|
|
20402
|
+
schemas:
|
|
20403
|
+
type_inboxes:InboxId:
|
|
20404
|
+
type: string
|
|
20405
|
+
description: The ID of the inbox.
|
|
20406
|
+
title: InboxId
|
|
20407
|
+
type_lists:Direction:
|
|
20408
|
+
type: string
|
|
20409
|
+
enum:
|
|
20410
|
+
- send
|
|
20411
|
+
- receive
|
|
20412
|
+
- reply
|
|
20413
|
+
description: Direction of list entry.
|
|
20414
|
+
title: Direction
|
|
20415
|
+
type_lists:ListType:
|
|
20416
|
+
type: string
|
|
20417
|
+
enum:
|
|
20418
|
+
- allow
|
|
20419
|
+
- block
|
|
20420
|
+
description: Type of list entry.
|
|
20421
|
+
title: ListType
|
|
20422
|
+
type_:OrganizationId:
|
|
20423
|
+
type: string
|
|
20424
|
+
description: ID of organization.
|
|
20425
|
+
title: OrganizationId
|
|
20426
|
+
type_lists:EntryType:
|
|
20427
|
+
type: string
|
|
20428
|
+
enum:
|
|
20429
|
+
- email
|
|
20430
|
+
- domain
|
|
20431
|
+
description: Whether the entry is an email address or domain.
|
|
20432
|
+
title: EntryType
|
|
20433
|
+
type_lists:PodListEntry:
|
|
20434
|
+
type: object
|
|
20435
|
+
properties:
|
|
20436
|
+
entry:
|
|
20437
|
+
type: string
|
|
20438
|
+
description: Email address or domain of list entry.
|
|
20439
|
+
organization_id:
|
|
20440
|
+
$ref: '#/components/schemas/type_:OrganizationId'
|
|
20441
|
+
reason:
|
|
20442
|
+
type: string
|
|
20443
|
+
description: Reason for adding the entry.
|
|
20444
|
+
direction:
|
|
20445
|
+
$ref: '#/components/schemas/type_lists:Direction'
|
|
20446
|
+
list_type:
|
|
20447
|
+
$ref: '#/components/schemas/type_lists:ListType'
|
|
20448
|
+
entry_type:
|
|
20449
|
+
$ref: '#/components/schemas/type_lists:EntryType'
|
|
20450
|
+
created_at:
|
|
20451
|
+
type: string
|
|
20452
|
+
format: date-time
|
|
20453
|
+
description: Time at which entry was created.
|
|
20454
|
+
pod_id:
|
|
20455
|
+
type: string
|
|
20456
|
+
description: ID of pod.
|
|
20457
|
+
inbox_id:
|
|
20458
|
+
type: string
|
|
20459
|
+
description: ID of inbox, if entry is inbox-scoped.
|
|
20460
|
+
required:
|
|
20461
|
+
- entry
|
|
20462
|
+
- organization_id
|
|
20463
|
+
- direction
|
|
20464
|
+
- list_type
|
|
20465
|
+
- entry_type
|
|
20466
|
+
- created_at
|
|
20467
|
+
- pod_id
|
|
20468
|
+
title: PodListEntry
|
|
20469
|
+
type_:ErrorName:
|
|
20470
|
+
type: string
|
|
20471
|
+
description: Name of error.
|
|
20472
|
+
title: ErrorName
|
|
20473
|
+
type_:ErrorMessage:
|
|
20474
|
+
type: string
|
|
20475
|
+
description: Error message.
|
|
20476
|
+
title: ErrorMessage
|
|
20477
|
+
type_:ErrorResponse:
|
|
20478
|
+
type: object
|
|
20479
|
+
properties:
|
|
20480
|
+
name:
|
|
20481
|
+
$ref: '#/components/schemas/type_:ErrorName'
|
|
20482
|
+
message:
|
|
20483
|
+
$ref: '#/components/schemas/type_:ErrorMessage'
|
|
20484
|
+
required:
|
|
20485
|
+
- name
|
|
20486
|
+
- message
|
|
20487
|
+
title: ErrorResponse
|
|
20488
|
+
securitySchemes:
|
|
20489
|
+
Bearer:
|
|
20490
|
+
type: http
|
|
20491
|
+
scheme: bearer
|
|
20492
|
+
|
|
20493
|
+
```
|
|
20494
|
+
|
|
20495
|
+
## SDK Code Examples
|
|
20496
|
+
|
|
20497
|
+
```typescript
|
|
20498
|
+
import { AgentMailClient } from "agentmail";
|
|
20499
|
+
|
|
20500
|
+
async function main() {
|
|
20501
|
+
const client = new AgentMailClient({
|
|
20502
|
+
apiKey: "YOUR_TOKEN_HERE",
|
|
20503
|
+
});
|
|
20504
|
+
await client.inboxes.lists.get("inbox_id", "send", "allow", "entry");
|
|
20505
|
+
}
|
|
20506
|
+
main();
|
|
20507
|
+
|
|
20508
|
+
```
|
|
20509
|
+
|
|
20510
|
+
```python
|
|
20511
|
+
from agentmail import AgentMail
|
|
20512
|
+
|
|
20513
|
+
client = AgentMail(
|
|
20514
|
+
api_key="YOUR_TOKEN_HERE",
|
|
20515
|
+
)
|
|
20516
|
+
|
|
20517
|
+
client.inboxes.lists.get(
|
|
20518
|
+
inbox_id="inbox_id",
|
|
20519
|
+
direction="send",
|
|
20520
|
+
type="allow",
|
|
20521
|
+
entry="entry",
|
|
20522
|
+
)
|
|
20523
|
+
|
|
20524
|
+
```
|
|
20525
|
+
|
|
20526
|
+
```go
|
|
20527
|
+
package main
|
|
20528
|
+
|
|
20529
|
+
import (
|
|
20530
|
+
"fmt"
|
|
20531
|
+
"net/http"
|
|
20532
|
+
"io"
|
|
20533
|
+
)
|
|
20534
|
+
|
|
20535
|
+
func main() {
|
|
20536
|
+
|
|
20537
|
+
url := "https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow/entry"
|
|
20538
|
+
|
|
20539
|
+
req, _ := http.NewRequest("GET", url, nil)
|
|
20540
|
+
|
|
20541
|
+
req.Header.Add("Authorization", "Bearer <api_key>")
|
|
20542
|
+
|
|
20543
|
+
res, _ := http.DefaultClient.Do(req)
|
|
20544
|
+
|
|
20545
|
+
defer res.Body.Close()
|
|
20546
|
+
body, _ := io.ReadAll(res.Body)
|
|
20547
|
+
|
|
20548
|
+
fmt.Println(res)
|
|
20549
|
+
fmt.Println(string(body))
|
|
20550
|
+
|
|
20551
|
+
}
|
|
20552
|
+
```
|
|
20553
|
+
|
|
20554
|
+
```ruby
|
|
20555
|
+
require 'uri'
|
|
20556
|
+
require 'net/http'
|
|
20557
|
+
|
|
20558
|
+
url = URI("https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow/entry")
|
|
20559
|
+
|
|
20560
|
+
http = Net::HTTP.new(url.host, url.port)
|
|
20561
|
+
http.use_ssl = true
|
|
20562
|
+
|
|
20563
|
+
request = Net::HTTP::Get.new(url)
|
|
20564
|
+
request["Authorization"] = 'Bearer <api_key>'
|
|
20565
|
+
|
|
20566
|
+
response = http.request(request)
|
|
20567
|
+
puts response.read_body
|
|
20568
|
+
```
|
|
20569
|
+
|
|
20570
|
+
```java
|
|
20571
|
+
import com.mashape.unirest.http.HttpResponse;
|
|
20572
|
+
import com.mashape.unirest.http.Unirest;
|
|
20573
|
+
|
|
20574
|
+
HttpResponse<String> response = Unirest.get("https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow/entry")
|
|
20575
|
+
.header("Authorization", "Bearer <api_key>")
|
|
20576
|
+
.asString();
|
|
20577
|
+
```
|
|
20578
|
+
|
|
20579
|
+
```php
|
|
20580
|
+
<?php
|
|
20581
|
+
require_once('vendor/autoload.php');
|
|
20582
|
+
|
|
20583
|
+
$client = new \GuzzleHttp\Client();
|
|
20584
|
+
|
|
20585
|
+
$response = $client->request('GET', 'https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow/entry', [
|
|
20586
|
+
'headers' => [
|
|
20587
|
+
'Authorization' => 'Bearer <api_key>',
|
|
20588
|
+
],
|
|
20589
|
+
]);
|
|
20590
|
+
|
|
20591
|
+
echo $response->getBody();
|
|
20592
|
+
```
|
|
20593
|
+
|
|
20594
|
+
```csharp
|
|
20595
|
+
using RestSharp;
|
|
20596
|
+
|
|
20597
|
+
var client = new RestClient("https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow/entry");
|
|
20598
|
+
var request = new RestRequest(Method.GET);
|
|
20599
|
+
request.AddHeader("Authorization", "Bearer <api_key>");
|
|
20600
|
+
IRestResponse response = client.Execute(request);
|
|
20601
|
+
```
|
|
20602
|
+
|
|
20603
|
+
```swift
|
|
20604
|
+
import Foundation
|
|
20605
|
+
|
|
20606
|
+
let headers = ["Authorization": "Bearer <api_key>"]
|
|
20607
|
+
|
|
20608
|
+
let request = NSMutableURLRequest(url: NSURL(string: "https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow/entry")! as URL,
|
|
20609
|
+
cachePolicy: .useProtocolCachePolicy,
|
|
20610
|
+
timeoutInterval: 10.0)
|
|
20611
|
+
request.httpMethod = "GET"
|
|
20612
|
+
request.allHTTPHeaderFields = headers
|
|
20613
|
+
|
|
20614
|
+
let session = URLSession.shared
|
|
20615
|
+
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
|
|
20616
|
+
if (error != nil) {
|
|
20617
|
+
print(error as Any)
|
|
20618
|
+
} else {
|
|
20619
|
+
let httpResponse = response as? HTTPURLResponse
|
|
20620
|
+
print(httpResponse)
|
|
20621
|
+
}
|
|
20622
|
+
})
|
|
20623
|
+
|
|
20624
|
+
dataTask.resume()
|
|
20625
|
+
```
|
|
20626
|
+
|
|
20627
|
+
# Create List Entry
|
|
20628
|
+
|
|
20629
|
+
POST https://api.agentmail.to/v0/inboxes/{inbox_id}/lists/{direction}/{type}
|
|
20630
|
+
Content-Type: application/json
|
|
20631
|
+
|
|
20632
|
+
Reference: https://docs.agentmail.to/api-reference/inboxes/lists/create
|
|
20633
|
+
|
|
20634
|
+
## OpenAPI Specification
|
|
20635
|
+
|
|
20636
|
+
```yaml
|
|
20637
|
+
openapi: 3.1.0
|
|
20638
|
+
info:
|
|
20639
|
+
title: api
|
|
20640
|
+
version: 1.0.0
|
|
20641
|
+
paths:
|
|
20642
|
+
/v0/inboxes/{inbox_id}/lists/{direction}/{type}:
|
|
20643
|
+
post:
|
|
20644
|
+
operationId: create
|
|
20645
|
+
summary: Create List Entry
|
|
20646
|
+
tags:
|
|
20647
|
+
- subpackage_inboxes.subpackage_inboxes/lists
|
|
20648
|
+
parameters:
|
|
20649
|
+
- name: inbox_id
|
|
20650
|
+
in: path
|
|
20651
|
+
required: true
|
|
20652
|
+
schema:
|
|
20653
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
20654
|
+
- name: direction
|
|
20655
|
+
in: path
|
|
20656
|
+
required: true
|
|
20657
|
+
schema:
|
|
20658
|
+
$ref: '#/components/schemas/type_lists:Direction'
|
|
20659
|
+
- name: type
|
|
20660
|
+
in: path
|
|
20661
|
+
required: true
|
|
20662
|
+
schema:
|
|
20663
|
+
$ref: '#/components/schemas/type_lists:ListType'
|
|
20664
|
+
- name: Authorization
|
|
20665
|
+
in: header
|
|
20666
|
+
description: Bearer authentication
|
|
20667
|
+
required: true
|
|
20668
|
+
schema:
|
|
20669
|
+
type: string
|
|
20670
|
+
responses:
|
|
20671
|
+
'200':
|
|
20672
|
+
description: Response with status 200
|
|
20673
|
+
content:
|
|
20674
|
+
application/json:
|
|
20675
|
+
schema:
|
|
20676
|
+
$ref: '#/components/schemas/type_lists:PodListEntry'
|
|
20677
|
+
'400':
|
|
20678
|
+
description: Error response with status 400
|
|
20679
|
+
content:
|
|
20680
|
+
application/json:
|
|
20681
|
+
schema:
|
|
20682
|
+
$ref: '#/components/schemas/type_:ValidationErrorResponse'
|
|
20683
|
+
requestBody:
|
|
20684
|
+
content:
|
|
20685
|
+
application/json:
|
|
20686
|
+
schema:
|
|
20687
|
+
$ref: '#/components/schemas/type_lists:CreateListEntryRequest'
|
|
20688
|
+
servers:
|
|
20689
|
+
- url: https://api.agentmail.to
|
|
20690
|
+
- url: https://x402.api.agentmail.to
|
|
20691
|
+
- url: https://mpp.api.agentmail.to
|
|
20692
|
+
- url: https://api.agentmail.eu
|
|
20693
|
+
components:
|
|
20694
|
+
schemas:
|
|
20695
|
+
type_inboxes:InboxId:
|
|
20696
|
+
type: string
|
|
20697
|
+
description: The ID of the inbox.
|
|
20698
|
+
title: InboxId
|
|
20699
|
+
type_lists:Direction:
|
|
20700
|
+
type: string
|
|
20701
|
+
enum:
|
|
20702
|
+
- send
|
|
20703
|
+
- receive
|
|
20704
|
+
- reply
|
|
20705
|
+
description: Direction of list entry.
|
|
20706
|
+
title: Direction
|
|
20707
|
+
type_lists:ListType:
|
|
20708
|
+
type: string
|
|
20709
|
+
enum:
|
|
20710
|
+
- allow
|
|
20711
|
+
- block
|
|
20712
|
+
description: Type of list entry.
|
|
20713
|
+
title: ListType
|
|
20714
|
+
type_lists:CreateListEntryRequest:
|
|
20715
|
+
type: object
|
|
20716
|
+
properties:
|
|
20717
|
+
entry:
|
|
20718
|
+
type: string
|
|
20719
|
+
description: Email address or domain to add.
|
|
20720
|
+
reason:
|
|
20721
|
+
type: string
|
|
20722
|
+
description: Reason for adding the entry.
|
|
20723
|
+
required:
|
|
20724
|
+
- entry
|
|
20725
|
+
title: CreateListEntryRequest
|
|
20726
|
+
type_:OrganizationId:
|
|
20727
|
+
type: string
|
|
20728
|
+
description: ID of organization.
|
|
20729
|
+
title: OrganizationId
|
|
20730
|
+
type_lists:EntryType:
|
|
20731
|
+
type: string
|
|
20732
|
+
enum:
|
|
20733
|
+
- email
|
|
20734
|
+
- domain
|
|
20735
|
+
description: Whether the entry is an email address or domain.
|
|
20736
|
+
title: EntryType
|
|
20737
|
+
type_lists:PodListEntry:
|
|
20738
|
+
type: object
|
|
20739
|
+
properties:
|
|
20740
|
+
entry:
|
|
20741
|
+
type: string
|
|
20742
|
+
description: Email address or domain of list entry.
|
|
20743
|
+
organization_id:
|
|
20744
|
+
$ref: '#/components/schemas/type_:OrganizationId'
|
|
20745
|
+
reason:
|
|
20746
|
+
type: string
|
|
20747
|
+
description: Reason for adding the entry.
|
|
20748
|
+
direction:
|
|
20749
|
+
$ref: '#/components/schemas/type_lists:Direction'
|
|
20750
|
+
list_type:
|
|
20751
|
+
$ref: '#/components/schemas/type_lists:ListType'
|
|
20752
|
+
entry_type:
|
|
20753
|
+
$ref: '#/components/schemas/type_lists:EntryType'
|
|
20754
|
+
created_at:
|
|
20755
|
+
type: string
|
|
20756
|
+
format: date-time
|
|
20757
|
+
description: Time at which entry was created.
|
|
20758
|
+
pod_id:
|
|
20759
|
+
type: string
|
|
20760
|
+
description: ID of pod.
|
|
20761
|
+
inbox_id:
|
|
20762
|
+
type: string
|
|
20763
|
+
description: ID of inbox, if entry is inbox-scoped.
|
|
20764
|
+
required:
|
|
20765
|
+
- entry
|
|
20766
|
+
- organization_id
|
|
20767
|
+
- direction
|
|
20768
|
+
- list_type
|
|
20769
|
+
- entry_type
|
|
20770
|
+
- created_at
|
|
20771
|
+
- pod_id
|
|
20772
|
+
title: PodListEntry
|
|
20773
|
+
type_:ErrorName:
|
|
20774
|
+
type: string
|
|
20775
|
+
description: Name of error.
|
|
20776
|
+
title: ErrorName
|
|
20777
|
+
type_:ValidationErrorResponse:
|
|
20778
|
+
type: object
|
|
20779
|
+
properties:
|
|
20780
|
+
name:
|
|
20781
|
+
$ref: '#/components/schemas/type_:ErrorName'
|
|
20782
|
+
errors:
|
|
20783
|
+
description: Validation errors.
|
|
20784
|
+
required:
|
|
20785
|
+
- name
|
|
20786
|
+
- errors
|
|
20787
|
+
title: ValidationErrorResponse
|
|
20788
|
+
securitySchemes:
|
|
20789
|
+
Bearer:
|
|
20790
|
+
type: http
|
|
20791
|
+
scheme: bearer
|
|
20792
|
+
|
|
20793
|
+
```
|
|
20794
|
+
|
|
20795
|
+
## SDK Code Examples
|
|
20796
|
+
|
|
20797
|
+
```typescript
|
|
20798
|
+
import { AgentMailClient } from "agentmail";
|
|
20799
|
+
|
|
20800
|
+
async function main() {
|
|
20801
|
+
const client = new AgentMailClient({
|
|
20802
|
+
apiKey: "YOUR_TOKEN_HERE",
|
|
20803
|
+
});
|
|
20804
|
+
await client.inboxes.lists.create("inbox_id", "send", "allow", {
|
|
20805
|
+
entry: "entry",
|
|
20806
|
+
});
|
|
20807
|
+
}
|
|
20808
|
+
main();
|
|
20809
|
+
|
|
20810
|
+
```
|
|
20811
|
+
|
|
20812
|
+
```python
|
|
20813
|
+
from agentmail import AgentMail
|
|
20814
|
+
|
|
20815
|
+
client = AgentMail(
|
|
20816
|
+
api_key="YOUR_TOKEN_HERE",
|
|
20817
|
+
)
|
|
20818
|
+
|
|
20819
|
+
client.inboxes.lists.create(
|
|
20820
|
+
inbox_id="inbox_id",
|
|
20821
|
+
direction="send",
|
|
20822
|
+
type="allow",
|
|
20823
|
+
entry="entry",
|
|
20824
|
+
)
|
|
20825
|
+
|
|
20826
|
+
```
|
|
20827
|
+
|
|
20828
|
+
```go
|
|
20829
|
+
package main
|
|
20830
|
+
|
|
20831
|
+
import (
|
|
20832
|
+
"fmt"
|
|
20833
|
+
"strings"
|
|
20834
|
+
"net/http"
|
|
20835
|
+
"io"
|
|
20836
|
+
)
|
|
20837
|
+
|
|
20838
|
+
func main() {
|
|
20839
|
+
|
|
20840
|
+
url := "https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow"
|
|
20841
|
+
|
|
20842
|
+
payload := strings.NewReader("{\n \"entry\": \"entry\"\n}")
|
|
20843
|
+
|
|
20844
|
+
req, _ := http.NewRequest("POST", url, payload)
|
|
20845
|
+
|
|
20846
|
+
req.Header.Add("Authorization", "Bearer <api_key>")
|
|
20847
|
+
req.Header.Add("Content-Type", "application/json")
|
|
20848
|
+
|
|
20849
|
+
res, _ := http.DefaultClient.Do(req)
|
|
20850
|
+
|
|
20851
|
+
defer res.Body.Close()
|
|
20852
|
+
body, _ := io.ReadAll(res.Body)
|
|
20853
|
+
|
|
20854
|
+
fmt.Println(res)
|
|
20855
|
+
fmt.Println(string(body))
|
|
20856
|
+
|
|
20857
|
+
}
|
|
20858
|
+
```
|
|
20859
|
+
|
|
20860
|
+
```ruby
|
|
20861
|
+
require 'uri'
|
|
20862
|
+
require 'net/http'
|
|
20863
|
+
|
|
20864
|
+
url = URI("https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow")
|
|
19861
20865
|
|
|
19862
20866
|
http = Net::HTTP.new(url.host, url.port)
|
|
19863
20867
|
http.use_ssl = true
|
|
@@ -19865,7 +20869,7 @@ http.use_ssl = true
|
|
|
19865
20869
|
request = Net::HTTP::Post.new(url)
|
|
19866
20870
|
request["Authorization"] = 'Bearer <api_key>'
|
|
19867
20871
|
request["Content-Type"] = 'application/json'
|
|
19868
|
-
request.body = "{}"
|
|
20872
|
+
request.body = "{\n \"entry\": \"entry\"\n}"
|
|
19869
20873
|
|
|
19870
20874
|
response = http.request(request)
|
|
19871
20875
|
puts response.read_body
|
|
@@ -19875,10 +20879,10 @@ puts response.read_body
|
|
|
19875
20879
|
import com.mashape.unirest.http.HttpResponse;
|
|
19876
20880
|
import com.mashape.unirest.http.Unirest;
|
|
19877
20881
|
|
|
19878
|
-
HttpResponse<String> response = Unirest.post("https://api.agentmail.to/v0/inboxes/inbox_id/
|
|
20882
|
+
HttpResponse<String> response = Unirest.post("https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow")
|
|
19879
20883
|
.header("Authorization", "Bearer <api_key>")
|
|
19880
20884
|
.header("Content-Type", "application/json")
|
|
19881
|
-
.body("{}")
|
|
20885
|
+
.body("{\n \"entry\": \"entry\"\n}")
|
|
19882
20886
|
.asString();
|
|
19883
20887
|
```
|
|
19884
20888
|
|
|
@@ -19888,8 +20892,10 @@ require_once('vendor/autoload.php');
|
|
|
19888
20892
|
|
|
19889
20893
|
$client = new \GuzzleHttp\Client();
|
|
19890
20894
|
|
|
19891
|
-
$response = $client->request('POST', 'https://api.agentmail.to/v0/inboxes/inbox_id/
|
|
19892
|
-
'body' => '{
|
|
20895
|
+
$response = $client->request('POST', 'https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow', [
|
|
20896
|
+
'body' => '{
|
|
20897
|
+
"entry": "entry"
|
|
20898
|
+
}',
|
|
19893
20899
|
'headers' => [
|
|
19894
20900
|
'Authorization' => 'Bearer <api_key>',
|
|
19895
20901
|
'Content-Type' => 'application/json',
|
|
@@ -19902,11 +20908,11 @@ echo $response->getBody();
|
|
|
19902
20908
|
```csharp
|
|
19903
20909
|
using RestSharp;
|
|
19904
20910
|
|
|
19905
|
-
var client = new RestClient("https://api.agentmail.to/v0/inboxes/inbox_id/
|
|
20911
|
+
var client = new RestClient("https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow");
|
|
19906
20912
|
var request = new RestRequest(Method.POST);
|
|
19907
20913
|
request.AddHeader("Authorization", "Bearer <api_key>");
|
|
19908
20914
|
request.AddHeader("Content-Type", "application/json");
|
|
19909
|
-
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
|
|
20915
|
+
request.AddParameter("application/json", "{\n \"entry\": \"entry\"\n}", ParameterType.RequestBody);
|
|
19910
20916
|
IRestResponse response = client.Execute(request);
|
|
19911
20917
|
```
|
|
19912
20918
|
|
|
@@ -19917,11 +20923,11 @@ let headers = [
|
|
|
19917
20923
|
"Authorization": "Bearer <api_key>",
|
|
19918
20924
|
"Content-Type": "application/json"
|
|
19919
20925
|
]
|
|
19920
|
-
let parameters = [] as [String : Any]
|
|
20926
|
+
let parameters = ["entry": "entry"] as [String : Any]
|
|
19921
20927
|
|
|
19922
20928
|
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
|
|
19923
20929
|
|
|
19924
|
-
let request = NSMutableURLRequest(url: NSURL(string: "https://api.agentmail.to/v0/inboxes/inbox_id/
|
|
20930
|
+
let request = NSMutableURLRequest(url: NSURL(string: "https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow")! as URL,
|
|
19925
20931
|
cachePolicy: .useProtocolCachePolicy,
|
|
19926
20932
|
timeoutInterval: 10.0)
|
|
19927
20933
|
request.httpMethod = "POST"
|
|
@@ -19941,6 +20947,247 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
19941
20947
|
dataTask.resume()
|
|
19942
20948
|
```
|
|
19943
20949
|
|
|
20950
|
+
# Delete List Entry
|
|
20951
|
+
|
|
20952
|
+
DELETE https://api.agentmail.to/v0/inboxes/{inbox_id}/lists/{direction}/{type}/{entry}
|
|
20953
|
+
|
|
20954
|
+
Reference: https://docs.agentmail.to/api-reference/inboxes/lists/delete
|
|
20955
|
+
|
|
20956
|
+
## OpenAPI Specification
|
|
20957
|
+
|
|
20958
|
+
```yaml
|
|
20959
|
+
openapi: 3.1.0
|
|
20960
|
+
info:
|
|
20961
|
+
title: api
|
|
20962
|
+
version: 1.0.0
|
|
20963
|
+
paths:
|
|
20964
|
+
/v0/inboxes/{inbox_id}/lists/{direction}/{type}/{entry}:
|
|
20965
|
+
delete:
|
|
20966
|
+
operationId: delete
|
|
20967
|
+
summary: Delete List Entry
|
|
20968
|
+
tags:
|
|
20969
|
+
- subpackage_inboxes.subpackage_inboxes/lists
|
|
20970
|
+
parameters:
|
|
20971
|
+
- name: inbox_id
|
|
20972
|
+
in: path
|
|
20973
|
+
required: true
|
|
20974
|
+
schema:
|
|
20975
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
20976
|
+
- name: direction
|
|
20977
|
+
in: path
|
|
20978
|
+
required: true
|
|
20979
|
+
schema:
|
|
20980
|
+
$ref: '#/components/schemas/type_lists:Direction'
|
|
20981
|
+
- name: type
|
|
20982
|
+
in: path
|
|
20983
|
+
required: true
|
|
20984
|
+
schema:
|
|
20985
|
+
$ref: '#/components/schemas/type_lists:ListType'
|
|
20986
|
+
- name: entry
|
|
20987
|
+
in: path
|
|
20988
|
+
description: Email address or domain.
|
|
20989
|
+
required: true
|
|
20990
|
+
schema:
|
|
20991
|
+
type: string
|
|
20992
|
+
- name: Authorization
|
|
20993
|
+
in: header
|
|
20994
|
+
description: Bearer authentication
|
|
20995
|
+
required: true
|
|
20996
|
+
schema:
|
|
20997
|
+
type: string
|
|
20998
|
+
responses:
|
|
20999
|
+
'200':
|
|
21000
|
+
description: Successful response
|
|
21001
|
+
'404':
|
|
21002
|
+
description: Error response with status 404
|
|
21003
|
+
content:
|
|
21004
|
+
application/json:
|
|
21005
|
+
schema:
|
|
21006
|
+
$ref: '#/components/schemas/type_:ErrorResponse'
|
|
21007
|
+
servers:
|
|
21008
|
+
- url: https://api.agentmail.to
|
|
21009
|
+
- url: https://x402.api.agentmail.to
|
|
21010
|
+
- url: https://mpp.api.agentmail.to
|
|
21011
|
+
- url: https://api.agentmail.eu
|
|
21012
|
+
components:
|
|
21013
|
+
schemas:
|
|
21014
|
+
type_inboxes:InboxId:
|
|
21015
|
+
type: string
|
|
21016
|
+
description: The ID of the inbox.
|
|
21017
|
+
title: InboxId
|
|
21018
|
+
type_lists:Direction:
|
|
21019
|
+
type: string
|
|
21020
|
+
enum:
|
|
21021
|
+
- send
|
|
21022
|
+
- receive
|
|
21023
|
+
- reply
|
|
21024
|
+
description: Direction of list entry.
|
|
21025
|
+
title: Direction
|
|
21026
|
+
type_lists:ListType:
|
|
21027
|
+
type: string
|
|
21028
|
+
enum:
|
|
21029
|
+
- allow
|
|
21030
|
+
- block
|
|
21031
|
+
description: Type of list entry.
|
|
21032
|
+
title: ListType
|
|
21033
|
+
type_:ErrorName:
|
|
21034
|
+
type: string
|
|
21035
|
+
description: Name of error.
|
|
21036
|
+
title: ErrorName
|
|
21037
|
+
type_:ErrorMessage:
|
|
21038
|
+
type: string
|
|
21039
|
+
description: Error message.
|
|
21040
|
+
title: ErrorMessage
|
|
21041
|
+
type_:ErrorResponse:
|
|
21042
|
+
type: object
|
|
21043
|
+
properties:
|
|
21044
|
+
name:
|
|
21045
|
+
$ref: '#/components/schemas/type_:ErrorName'
|
|
21046
|
+
message:
|
|
21047
|
+
$ref: '#/components/schemas/type_:ErrorMessage'
|
|
21048
|
+
required:
|
|
21049
|
+
- name
|
|
21050
|
+
- message
|
|
21051
|
+
title: ErrorResponse
|
|
21052
|
+
securitySchemes:
|
|
21053
|
+
Bearer:
|
|
21054
|
+
type: http
|
|
21055
|
+
scheme: bearer
|
|
21056
|
+
|
|
21057
|
+
```
|
|
21058
|
+
|
|
21059
|
+
## SDK Code Examples
|
|
21060
|
+
|
|
21061
|
+
```typescript
|
|
21062
|
+
import { AgentMailClient } from "agentmail";
|
|
21063
|
+
|
|
21064
|
+
async function main() {
|
|
21065
|
+
const client = new AgentMailClient({
|
|
21066
|
+
apiKey: "YOUR_TOKEN_HERE",
|
|
21067
|
+
});
|
|
21068
|
+
await client.inboxes.lists.delete("inbox_id", "send", "allow", "entry");
|
|
21069
|
+
}
|
|
21070
|
+
main();
|
|
21071
|
+
|
|
21072
|
+
```
|
|
21073
|
+
|
|
21074
|
+
```python
|
|
21075
|
+
from agentmail import AgentMail
|
|
21076
|
+
|
|
21077
|
+
client = AgentMail(
|
|
21078
|
+
api_key="YOUR_TOKEN_HERE",
|
|
21079
|
+
)
|
|
21080
|
+
|
|
21081
|
+
client.inboxes.lists.delete(
|
|
21082
|
+
inbox_id="inbox_id",
|
|
21083
|
+
direction="send",
|
|
21084
|
+
type="allow",
|
|
21085
|
+
entry="entry",
|
|
21086
|
+
)
|
|
21087
|
+
|
|
21088
|
+
```
|
|
21089
|
+
|
|
21090
|
+
```go
|
|
21091
|
+
package main
|
|
21092
|
+
|
|
21093
|
+
import (
|
|
21094
|
+
"fmt"
|
|
21095
|
+
"net/http"
|
|
21096
|
+
"io"
|
|
21097
|
+
)
|
|
21098
|
+
|
|
21099
|
+
func main() {
|
|
21100
|
+
|
|
21101
|
+
url := "https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow/entry"
|
|
21102
|
+
|
|
21103
|
+
req, _ := http.NewRequest("DELETE", url, nil)
|
|
21104
|
+
|
|
21105
|
+
req.Header.Add("Authorization", "Bearer <api_key>")
|
|
21106
|
+
|
|
21107
|
+
res, _ := http.DefaultClient.Do(req)
|
|
21108
|
+
|
|
21109
|
+
defer res.Body.Close()
|
|
21110
|
+
body, _ := io.ReadAll(res.Body)
|
|
21111
|
+
|
|
21112
|
+
fmt.Println(res)
|
|
21113
|
+
fmt.Println(string(body))
|
|
21114
|
+
|
|
21115
|
+
}
|
|
21116
|
+
```
|
|
21117
|
+
|
|
21118
|
+
```ruby
|
|
21119
|
+
require 'uri'
|
|
21120
|
+
require 'net/http'
|
|
21121
|
+
|
|
21122
|
+
url = URI("https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow/entry")
|
|
21123
|
+
|
|
21124
|
+
http = Net::HTTP.new(url.host, url.port)
|
|
21125
|
+
http.use_ssl = true
|
|
21126
|
+
|
|
21127
|
+
request = Net::HTTP::Delete.new(url)
|
|
21128
|
+
request["Authorization"] = 'Bearer <api_key>'
|
|
21129
|
+
|
|
21130
|
+
response = http.request(request)
|
|
21131
|
+
puts response.read_body
|
|
21132
|
+
```
|
|
21133
|
+
|
|
21134
|
+
```java
|
|
21135
|
+
import com.mashape.unirest.http.HttpResponse;
|
|
21136
|
+
import com.mashape.unirest.http.Unirest;
|
|
21137
|
+
|
|
21138
|
+
HttpResponse<String> response = Unirest.delete("https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow/entry")
|
|
21139
|
+
.header("Authorization", "Bearer <api_key>")
|
|
21140
|
+
.asString();
|
|
21141
|
+
```
|
|
21142
|
+
|
|
21143
|
+
```php
|
|
21144
|
+
<?php
|
|
21145
|
+
require_once('vendor/autoload.php');
|
|
21146
|
+
|
|
21147
|
+
$client = new \GuzzleHttp\Client();
|
|
21148
|
+
|
|
21149
|
+
$response = $client->request('DELETE', 'https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow/entry', [
|
|
21150
|
+
'headers' => [
|
|
21151
|
+
'Authorization' => 'Bearer <api_key>',
|
|
21152
|
+
],
|
|
21153
|
+
]);
|
|
21154
|
+
|
|
21155
|
+
echo $response->getBody();
|
|
21156
|
+
```
|
|
21157
|
+
|
|
21158
|
+
```csharp
|
|
21159
|
+
using RestSharp;
|
|
21160
|
+
|
|
21161
|
+
var client = new RestClient("https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow/entry");
|
|
21162
|
+
var request = new RestRequest(Method.DELETE);
|
|
21163
|
+
request.AddHeader("Authorization", "Bearer <api_key>");
|
|
21164
|
+
IRestResponse response = client.Execute(request);
|
|
21165
|
+
```
|
|
21166
|
+
|
|
21167
|
+
```swift
|
|
21168
|
+
import Foundation
|
|
21169
|
+
|
|
21170
|
+
let headers = ["Authorization": "Bearer <api_key>"]
|
|
21171
|
+
|
|
21172
|
+
let request = NSMutableURLRequest(url: NSURL(string: "https://api.agentmail.to/v0/inboxes/inbox_id/lists/send/allow/entry")! as URL,
|
|
21173
|
+
cachePolicy: .useProtocolCachePolicy,
|
|
21174
|
+
timeoutInterval: 10.0)
|
|
21175
|
+
request.httpMethod = "DELETE"
|
|
21176
|
+
request.allHTTPHeaderFields = headers
|
|
21177
|
+
|
|
21178
|
+
let session = URLSession.shared
|
|
21179
|
+
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
|
|
21180
|
+
if (error != nil) {
|
|
21181
|
+
print(error as Any)
|
|
21182
|
+
} else {
|
|
21183
|
+
let httpResponse = response as? HTTPURLResponse
|
|
21184
|
+
print(httpResponse)
|
|
21185
|
+
}
|
|
21186
|
+
})
|
|
21187
|
+
|
|
21188
|
+
dataTask.resume()
|
|
21189
|
+
```
|
|
21190
|
+
|
|
19944
21191
|
# Query Metrics
|
|
19945
21192
|
|
|
19946
21193
|
GET https://api.agentmail.to/v0/inboxes/{inbox_id}/metrics
|
|
@@ -28498,6 +29745,7 @@ components:
|
|
|
28498
29745
|
enum:
|
|
28499
29746
|
- send
|
|
28500
29747
|
- receive
|
|
29748
|
+
- reply
|
|
28501
29749
|
description: Direction of list entry.
|
|
28502
29750
|
title: Direction
|
|
28503
29751
|
type_lists:ListType:
|
|
@@ -28782,6 +30030,7 @@ components:
|
|
|
28782
30030
|
enum:
|
|
28783
30031
|
- send
|
|
28784
30032
|
- receive
|
|
30033
|
+
- reply
|
|
28785
30034
|
description: Direction of list entry.
|
|
28786
30035
|
title: Direction
|
|
28787
30036
|
type_lists:ListType:
|
|
@@ -29056,6 +30305,7 @@ components:
|
|
|
29056
30305
|
enum:
|
|
29057
30306
|
- send
|
|
29058
30307
|
- receive
|
|
30308
|
+
- reply
|
|
29059
30309
|
description: Direction of list entry.
|
|
29060
30310
|
title: Direction
|
|
29061
30311
|
type_lists:ListType:
|
|
@@ -29357,6 +30607,7 @@ components:
|
|
|
29357
30607
|
enum:
|
|
29358
30608
|
- send
|
|
29359
30609
|
- receive
|
|
30610
|
+
- reply
|
|
29360
30611
|
description: Direction of list entry.
|
|
29361
30612
|
title: Direction
|
|
29362
30613
|
type_lists:ListType:
|
|
@@ -37617,6 +38868,7 @@ components:
|
|
|
37617
38868
|
enum:
|
|
37618
38869
|
- send
|
|
37619
38870
|
- receive
|
|
38871
|
+
- reply
|
|
37620
38872
|
description: Direction of list entry.
|
|
37621
38873
|
title: Direction
|
|
37622
38874
|
type_lists:ListType:
|
|
@@ -37918,6 +39170,7 @@ components:
|
|
|
37918
39170
|
enum:
|
|
37919
39171
|
- send
|
|
37920
39172
|
- receive
|
|
39173
|
+
- reply
|
|
37921
39174
|
description: Direction of list entry.
|
|
37922
39175
|
title: Direction
|
|
37923
39176
|
type_lists:ListType:
|
|
@@ -38209,6 +39462,7 @@ components:
|
|
|
38209
39462
|
enum:
|
|
38210
39463
|
- send
|
|
38211
39464
|
- receive
|
|
39465
|
+
- reply
|
|
38212
39466
|
description: Direction of list entry.
|
|
38213
39467
|
title: Direction
|
|
38214
39468
|
type_lists:ListType:
|
|
@@ -38527,6 +39781,7 @@ components:
|
|
|
38527
39781
|
enum:
|
|
38528
39782
|
- send
|
|
38529
39783
|
- receive
|
|
39784
|
+
- reply
|
|
38530
39785
|
description: Direction of list entry.
|
|
38531
39786
|
title: Direction
|
|
38532
39787
|
type_lists:ListType:
|
|
@@ -40579,14 +41834,16 @@ Allowlists and blocklists let you control who your AI agent can communicate with
|
|
|
40579
41834
|
|
|
40580
41835
|
## How Lists work
|
|
40581
41836
|
|
|
40582
|
-
AgentMail provides
|
|
41837
|
+
AgentMail provides six list types based on two dimensions, **direction** (send, receive, or reply) and **type** (allow or block):
|
|
40583
41838
|
|
|
40584
|
-
| List | What it does
|
|
40585
|
-
| ------------- |
|
|
40586
|
-
| Receive allow | Only accept emails from these addresses or domains
|
|
40587
|
-
| Receive block | Reject emails from these addresses or domains
|
|
40588
|
-
| Send allow | Only send emails to these addresses or domains
|
|
40589
|
-
| Send block | Prevent sending emails to these addresses or domains
|
|
41839
|
+
| List | What it does |
|
|
41840
|
+
| ------------- | -------------------------------------------------------- |
|
|
41841
|
+
| Receive allow | Only accept emails from these addresses or domains |
|
|
41842
|
+
| Receive block | Reject emails from these addresses or domains |
|
|
41843
|
+
| Send allow | Only send emails to these addresses or domains |
|
|
41844
|
+
| Send block | Prevent sending emails to these addresses or domains |
|
|
41845
|
+
| Reply allow | Only accept reply emails from these addresses or domains |
|
|
41846
|
+
| Reply block | Reject reply emails from these addresses or domains |
|
|
40590
41847
|
|
|
40591
41848
|
Each entry can be either a full email address (e.g., `partner@example.com`) or an entire domain (e.g., `example.com`).
|
|
40592
41849
|
|
|
@@ -40625,6 +41882,40 @@ entries = client.lists.list("receive", "allow")
|
|
|
40625
41882
|
client.lists.delete("receive", "block", entry="spam@example.com")
|
|
40626
41883
|
```
|
|
40627
41884
|
|
|
41885
|
+
### Inbox-scoped lists
|
|
41886
|
+
|
|
41887
|
+
Lists can be applied at the inbox level for per-inbox filtering. For example, one inbox might only accept emails from `meta.com`, while another inbox in the same pod accepts from `partner.com`.
|
|
41888
|
+
|
|
41889
|
+
```python title="Python"
|
|
41890
|
+
# This inbox only accepts emails from meta.com
|
|
41891
|
+
client.inboxes.lists.create(
|
|
41892
|
+
"support@yourdomain.com", "receive", "allow", entry="meta.com"
|
|
41893
|
+
)
|
|
41894
|
+
|
|
41895
|
+
# A different inbox accepts from partner.com
|
|
41896
|
+
client.inboxes.lists.create(
|
|
41897
|
+
"sales@yourdomain.com", "receive", "allow", entry="partner.com"
|
|
41898
|
+
)
|
|
41899
|
+
```
|
|
41900
|
+
|
|
41901
|
+
Inbox-level lists override pod-level and org-level lists. If the inbox-level list has a match, pod and org lists are not checked.
|
|
41902
|
+
|
|
41903
|
+
### Reply lists
|
|
41904
|
+
|
|
41905
|
+
Reply lists control filtering for inbound emails that are replies to previous outbound messages. When an inbound email arrives, AgentMail checks the `In-Reply-To` header:
|
|
41906
|
+
|
|
41907
|
+
* If the email **is a reply** to a previous outbound message, only the reply lists are checked. Receive lists are skipped.
|
|
41908
|
+
* If the email **is not a reply**, only the receive lists are checked. Reply lists are skipped.
|
|
41909
|
+
|
|
41910
|
+
By default, when reply lists are empty, all replies are allowed. This is useful for agents that initiate outbound emails (such as making reservations or sending inquiries) and need to receive the responses.
|
|
41911
|
+
|
|
41912
|
+
```python title="Python"
|
|
41913
|
+
# Block replies from a specific sender
|
|
41914
|
+
client.inboxes.lists.create(
|
|
41915
|
+
"agent@yourdomain.com", "reply", "block", entry="spam-restaurant.com"
|
|
41916
|
+
)
|
|
41917
|
+
```
|
|
41918
|
+
|
|
40628
41919
|
## Common patterns for agents
|
|
40629
41920
|
|
|
40630
41921
|
**Outreach agent:** Use a send allowlist to restrict your agent to only email verified prospects. This prevents the agent from accidentally emailing the wrong people.
|
|
@@ -40650,6 +41941,22 @@ client.lists.create("receive", "allow", entry="trusted-partner.com")
|
|
|
40650
41941
|
client.lists.create("receive", "block", entry="spam-domain.com", reason="spam")
|
|
40651
41942
|
```
|
|
40652
41943
|
|
|
41944
|
+
**Task-oriented agent (making reservations, bookings, etc.):** Use a receive allowlist to restrict inbound to your organization's domain, but leave reply lists open (default) so replies to agent-initiated outbound emails come through.
|
|
41945
|
+
|
|
41946
|
+
```python title="Python"
|
|
41947
|
+
# Only accept unsolicited emails from your org
|
|
41948
|
+
client.inboxes.lists.create(
|
|
41949
|
+
"agent@yourdomain.com", "receive", "allow", entry="yourdomain.com"
|
|
41950
|
+
)
|
|
41951
|
+
|
|
41952
|
+
# Replies to emails the agent sends (e.g., restaurant reservations)
|
|
41953
|
+
# are allowed by default, no reply list configuration needed.
|
|
41954
|
+
# Optionally block specific reply senders:
|
|
41955
|
+
client.inboxes.lists.create(
|
|
41956
|
+
"agent@yourdomain.com", "reply", "block", entry="spam-restaurant.com"
|
|
41957
|
+
)
|
|
41958
|
+
```
|
|
41959
|
+
|
|
40653
41960
|
## Why this matters for agents
|
|
40654
41961
|
|
|
40655
41962
|
Without guardrails, an autonomous agent could email the wrong people, respond to phishing attempts, or get caught in infinite email loops with another bot. Lists are your safety rails. They are especially important for:
|
|
@@ -40657,6 +41964,7 @@ Without guardrails, an autonomous agent could email the wrong people, respond to
|
|
|
40657
41964
|
* **Production agents** operating with minimal human oversight
|
|
40658
41965
|
* **Outreach agents** that should only contact approved recipients
|
|
40659
41966
|
* **Support agents** that should only respond to known customers
|
|
41967
|
+
* **Task-oriented agents** that send outbound emails and need replies to come through
|
|
40660
41968
|
* **Any agent** that needs protection from spam, phishing, or abuse
|
|
40661
41969
|
|
|
40662
41970
|
For more details on the Lists API, see the [Lists core concept](/lists) documentation.
|