agentmail 0.0.74 → 0.0.75
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 +21 -21
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/domains/client/Client.d.ts +5 -0
- package/dist/cjs/api/resources/domains/client/Client.js +58 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/domains/client/Client.d.mts +5 -0
- package/dist/esm/api/resources/domains/client/Client.mjs +58 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +1589 -98
- package/dist/llms.txt +8 -7
- package/package.json +1 -1
- package/reference.md +48 -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:fa5e559e-fca8-4272-861d-c360f7919946" alt="AgentMail Organizational Hierarchy" />
|
|
316
316
|
|
|
317
317
|
<Steps>
|
|
318
318
|
<Step title="Organization">
|
|
@@ -737,7 +737,7 @@ Here is an example of a well-structured and styled HTML header:
|
|
|
737
737
|
</CodeBlocks>
|
|
738
738
|
|
|
739
739
|
<Frame caption="Look how pretty this message looks!">
|
|
740
|
-
<img src="file:
|
|
740
|
+
<img src="file:910e614f-d48b-401c-bb37-5c9f52fa2d3d" alt="rendered css" />
|
|
741
741
|
</Frame>
|
|
742
742
|
|
|
743
743
|
## Receiving `Messages`
|
|
@@ -1274,6 +1274,244 @@ Similarly, you can retrieve an `Attachment` if you know the `Thread` it's in, wh
|
|
|
1274
1274
|
</CodeBlocks>
|
|
1275
1275
|
|
|
1276
1276
|
|
|
1277
|
+
# Pods
|
|
1278
|
+
|
|
1279
|
+
> Learn how to use pods for multi-tenant email management
|
|
1280
|
+
|
|
1281
|
+
## What are Pods?
|
|
1282
|
+
|
|
1283
|
+
Pods are an isolated abstraction that sits between your **organization** and your **inboxes**, providing a method to segment and organize email infrastructure for multi-tenant applications. If you're building a service that offers email functionality to your customers, pods are your key to ensure customer resource isolation.
|
|
1284
|
+
|
|
1285
|
+
### The Hierarchy
|
|
1286
|
+
|
|
1287
|
+
```
|
|
1288
|
+
Organization (Your Business)
|
|
1289
|
+
└── Pod (Your Customer A)
|
|
1290
|
+
├── Inbox 1
|
|
1291
|
+
├── Inbox 2
|
|
1292
|
+
└── Domain 1
|
|
1293
|
+
└── Pod (Your Customer B)
|
|
1294
|
+
├── Inbox 3
|
|
1295
|
+
├── Inbox 4
|
|
1296
|
+
└── Domain 2
|
|
1297
|
+
```
|
|
1298
|
+
|
|
1299
|
+
**Organization**: Your company's AgentMail account
|
|
1300
|
+
|
|
1301
|
+
* You have one organization that represents your business
|
|
1302
|
+
|
|
1303
|
+
**Pod**: Each of your customers
|
|
1304
|
+
|
|
1305
|
+
* Create one pod per customer/tenant in your system
|
|
1306
|
+
* Pods provide complete isolation between your customers' data
|
|
1307
|
+
* All resources (inboxes, domains, threads, drafts) can be scoped to a pod
|
|
1308
|
+
|
|
1309
|
+
**Inbox**: Individual email accounts within a pod
|
|
1310
|
+
|
|
1311
|
+
* Your customers can have multiple inboxes within their pod
|
|
1312
|
+
* It is on you to provision resources for each of your customers
|
|
1313
|
+
|
|
1314
|
+
## Why Use Pods?
|
|
1315
|
+
|
|
1316
|
+
### Multi-Tenancy
|
|
1317
|
+
|
|
1318
|
+
Pods enable you to offer AgentMail's email infrastructure to your own customers while maintaining strict data isolation. Here's how our customers use pods:
|
|
1319
|
+
|
|
1320
|
+
**SaaS/Agency Platforms**: Create a pod for each customer account. Each customer gets their own isolated email workspace.
|
|
1321
|
+
|
|
1322
|
+
**White-Label Email**: Offer email services under your own brand. Each end-user gets their own pod with complete data isolation.
|
|
1323
|
+
|
|
1324
|
+
**AI Agent Platforms**: Give each AI agent with its own purpose its own pod with dedicated inboxes and domains.
|
|
1325
|
+
|
|
1326
|
+
## How Pods Work
|
|
1327
|
+
|
|
1328
|
+
### Pod Lifecycle
|
|
1329
|
+
|
|
1330
|
+
As a basis, here are a couple of logistical stuff that happens on the API side when you create resources.
|
|
1331
|
+
|
|
1332
|
+
* When you sign up, you are automatically created a `Default Pod`, and all resources created whether its `Inboxes` or `Domains` all are associated with this `Default Pod`.
|
|
1333
|
+
* You cannot delete a `Pod` that has existing children resources. Make sure to delete any existing `Inboxes` or `Domains` before deleting a `Pod`.
|
|
1334
|
+
|
|
1335
|
+
### What You Can Do With Pods
|
|
1336
|
+
|
|
1337
|
+
#### Creating Resources
|
|
1338
|
+
|
|
1339
|
+
You can create the following resources **within** a pod:
|
|
1340
|
+
|
|
1341
|
+
* **Inboxes**
|
|
1342
|
+
* **Domains**
|
|
1343
|
+
|
|
1344
|
+
<Callout>
|
|
1345
|
+
NOTE: as of now domains can only be either scoped to one pod, or all pods. I.E
|
|
1346
|
+
it is not possible to create a domain scoped to more than one but not all
|
|
1347
|
+
pods.
|
|
1348
|
+
</Callout>
|
|
1349
|
+
|
|
1350
|
+
<Tip>
|
|
1351
|
+
TIP: specify a `client_id` when creating a `Pod` so that you can decide how to
|
|
1352
|
+
uniquely identify pods. That way you don't need to create a table mapping your
|
|
1353
|
+
`organization_id`'s for your customers or segment of your business to our
|
|
1354
|
+
`pod_id`'s you can just set the `client_id` as your internal id so you can
|
|
1355
|
+
access the resource using a unique identifier determined by you!
|
|
1356
|
+
</Tip>
|
|
1357
|
+
|
|
1358
|
+
These resources are automatically associated with the pod and inherit its isolation guarantees.
|
|
1359
|
+
|
|
1360
|
+
#### Listing Resources
|
|
1361
|
+
|
|
1362
|
+
You can list the following resources **scoped to** a pod:
|
|
1363
|
+
|
|
1364
|
+
* **Inboxes** (`GET /pods/{pod_id}/inboxes`) - View all inboxes in a pod
|
|
1365
|
+
* **Threads** (`GET /pods/{pod_id}/threads`) - View all email conversations across all inboxes in the pod
|
|
1366
|
+
* **Drafts** (`GET /pods/{pod_id}/drafts`) - View all draft emails across all inboxes in the pod
|
|
1367
|
+
* **Domains** (`GET /pods/{pod_id}/domains`) - View all custom domains in the pod
|
|
1368
|
+
|
|
1369
|
+
This gives you a unified view of all activity within a customer's workspace, making it easy to build features like:
|
|
1370
|
+
|
|
1371
|
+
* "Show me all unread emails for Customer X" (use labels here too!)
|
|
1372
|
+
* "List all threads across all of Customer Y's team inboxes"
|
|
1373
|
+
* "Display all pending drafts for Customer Z"
|
|
1374
|
+
|
|
1375
|
+
## Important Considerations
|
|
1376
|
+
|
|
1377
|
+
### Pod Deletion Constraints
|
|
1378
|
+
|
|
1379
|
+
<Warning>
|
|
1380
|
+
**Critical**: You cannot delete a pod that has resources still attached to it.
|
|
1381
|
+
You must delete all inboxes and domains within the pod before you can delete
|
|
1382
|
+
the pod itself.
|
|
1383
|
+
</Warning>
|
|
1384
|
+
|
|
1385
|
+
This is a safety mechanism to prevent accidental data loss. Here's the correct deletion sequence:
|
|
1386
|
+
|
|
1387
|
+
```typescript
|
|
1388
|
+
// This will FAIL if the pod has any resources
|
|
1389
|
+
await client.pods.delete(podId);
|
|
1390
|
+
|
|
1391
|
+
// Correct approach: Clean up resources first
|
|
1392
|
+
async function offboardCustomer(podId: string) {
|
|
1393
|
+
// 1. Delete all inboxes
|
|
1394
|
+
const inboxes = await client.inboxes.list(podId);
|
|
1395
|
+
for (const inbox of inboxes.items) {
|
|
1396
|
+
await client.inboxes.delete(inbox.inbox_id);
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
// 2. Delete all domains
|
|
1400
|
+
const domains = await client.domains.list({ podId });
|
|
1401
|
+
for (const domain of domains.items) {
|
|
1402
|
+
await client.domains.delete(domain.domain_id);
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
// 3. Now you can delete the pod
|
|
1406
|
+
await client.pods.delete(podId);
|
|
1407
|
+
}
|
|
1408
|
+
```
|
|
1409
|
+
|
|
1410
|
+
<Info>
|
|
1411
|
+
When you delete an inbox or domain, all associated data (messages, threads,
|
|
1412
|
+
drafts) is automatically cleaned up. You don't need to manually delete
|
|
1413
|
+
individual threads or messages.
|
|
1414
|
+
</Info>
|
|
1415
|
+
|
|
1416
|
+
**What's NOT Isolated to a Pod:**
|
|
1417
|
+
|
|
1418
|
+
* API keys (these are organization-level and can access any resources in any pod)
|
|
1419
|
+
|
|
1420
|
+
## Common Patterns and Use Cases
|
|
1421
|
+
|
|
1422
|
+
### Pattern 1: Multi-Tenant SaaS
|
|
1423
|
+
|
|
1424
|
+
Each company using your platform gets their own pod:
|
|
1425
|
+
|
|
1426
|
+
```typescript
|
|
1427
|
+
// Customer A's workspace
|
|
1428
|
+
Pod: "Acme Corp"
|
|
1429
|
+
├── Inbox: support@acme.com
|
|
1430
|
+
├── Inbox: sales@acme.com
|
|
1431
|
+
└── Domain: acme.com
|
|
1432
|
+
|
|
1433
|
+
// Customer B's workspace
|
|
1434
|
+
Pod: "TechStart Inc"
|
|
1435
|
+
├── Inbox: hello@techstart.io
|
|
1436
|
+
├── Inbox: team@techstart.io
|
|
1437
|
+
└── Domain: techstart.io
|
|
1438
|
+
```
|
|
1439
|
+
|
|
1440
|
+
### Pattern 2: Agency Client Management
|
|
1441
|
+
|
|
1442
|
+
Each client gets their own isolated pod:
|
|
1443
|
+
|
|
1444
|
+
```typescript
|
|
1445
|
+
// Client 1
|
|
1446
|
+
Pod: "Client - Retail Co"
|
|
1447
|
+
├── Inbox: info@retailco.com
|
|
1448
|
+
└── Domain: retailco.com
|
|
1449
|
+
|
|
1450
|
+
// Client 2
|
|
1451
|
+
Pod: "Client - FinTech"
|
|
1452
|
+
├── Inbox: support@fintech.ai
|
|
1453
|
+
└── Domain: fintech.ai
|
|
1454
|
+
```
|
|
1455
|
+
|
|
1456
|
+
### Pattern 3: AI Agent Platform
|
|
1457
|
+
|
|
1458
|
+
Each AI agent gets its own pod with dedicated email infrastructure:
|
|
1459
|
+
|
|
1460
|
+
```typescript
|
|
1461
|
+
// Agent 1: Customer Support Agent
|
|
1462
|
+
Pod: "Support-Agent"
|
|
1463
|
+
├── Inbox: support@mycompany.com
|
|
1464
|
+
├── Inbox: help@mycompany.com
|
|
1465
|
+
└── Inbox: tickets@mycompany.com
|
|
1466
|
+
|
|
1467
|
+
// Agent 2: Sales Outreach Agent
|
|
1468
|
+
Pod: "Sales-Agent"
|
|
1469
|
+
├── Inbox: sales@mycompany.com
|
|
1470
|
+
├── Inbox: outreach@mycompany.com
|
|
1471
|
+
└── Inbox: leads@mycompany.com
|
|
1472
|
+
|
|
1473
|
+
// Agent 3: Marketing Agent
|
|
1474
|
+
Pod: "Marketing-Agent"
|
|
1475
|
+
├── Inbox: newsletter@mycompany.com
|
|
1476
|
+
├── Inbox: campaigns@mycompany.com
|
|
1477
|
+
└── Inbox: events@mycompany.com
|
|
1478
|
+
```
|
|
1479
|
+
|
|
1480
|
+
## FAQ
|
|
1481
|
+
|
|
1482
|
+
<Accordion title="Can inboxes communicate between pods?">
|
|
1483
|
+
Yes! Inboxes in different pods can send and receive emails from each other
|
|
1484
|
+
just like any other email addresses. Pods only provide organizational
|
|
1485
|
+
isolation, not network isolation.
|
|
1486
|
+
</Accordion>
|
|
1487
|
+
|
|
1488
|
+
<Accordion title="Can I move an inbox from one pod to another?">
|
|
1489
|
+
No, inboxes cannot be moved between pods. You will need to create a new inbox
|
|
1490
|
+
in the pod you want.
|
|
1491
|
+
</Accordion>
|
|
1492
|
+
|
|
1493
|
+
<Accordion title="How many pods can I create?">
|
|
1494
|
+
There's no hard limit on the number of pods. You can create as many as you
|
|
1495
|
+
need for your customers.
|
|
1496
|
+
</Accordion>
|
|
1497
|
+
|
|
1498
|
+
<Accordion title="Do I need to use pods?">
|
|
1499
|
+
Pods are optional but highly recommended for multi-tenant applications. If
|
|
1500
|
+
you're only managing email for your own organization, you can work directly
|
|
1501
|
+
with inboxes without creating pods.
|
|
1502
|
+
</Accordion>
|
|
1503
|
+
|
|
1504
|
+
<Accordion title="Can I set custom permissions per pod?">
|
|
1505
|
+
Pod isolation is upon the caller (you). As of now we don't support pod-scoped
|
|
1506
|
+
API keys so it will be on you to make the calls to AgentMail.
|
|
1507
|
+
</Accordion>
|
|
1508
|
+
|
|
1509
|
+
## Next Steps
|
|
1510
|
+
|
|
1511
|
+
* Learn about [Inboxes](/inboxes) and how to create email accounts within pods
|
|
1512
|
+
* Explore [Domains](/custom-domains) to set up custom email domains for your pods
|
|
1513
|
+
|
|
1514
|
+
|
|
1277
1515
|
# Guide: Sending & Receiving Email
|
|
1278
1516
|
|
|
1279
1517
|
> A step-by-step guide to the practical workflow of sending initial emails and handling replies to have a full conversation.
|
|
@@ -1526,7 +1764,7 @@ Configuring your domain is a three-step process: add the domain via API, copy th
|
|
|
1526
1764
|
After creating your domain in the AgentMail Console, click the "Download BIND Zone File" button to get the complete zone file.
|
|
1527
1765
|
|
|
1528
1766
|
<Frame caption="Downloading BIND zone file from AgentMail Console">
|
|
1529
|
-
<img src="file:
|
|
1767
|
+
<img src="file:75f060dd-3273-4cf3-a310-6fd55b3bd02b" alt="Download BIND Zone File from Console" />
|
|
1530
1768
|
</Frame>
|
|
1531
1769
|
|
|
1532
1770
|
<Tabs>
|
|
@@ -1537,13 +1775,13 @@ Configuring your domain is a three-step process: add the domain via API, copy th
|
|
|
1537
1775
|
2. Click **"Import zone file"** in the top right corner
|
|
1538
1776
|
|
|
1539
1777
|
<Frame caption="Importing BIND zone file in AWS Route 53">
|
|
1540
|
-
<img src="file:
|
|
1778
|
+
<img src="file:1943061e-7e23-4e64-8fda-5337c9a6c0c2" alt="AWS Route 53 BIND Import" />
|
|
1541
1779
|
</Frame>
|
|
1542
1780
|
|
|
1543
1781
|
3. Paste the CONTENTS of downloaded BIND zone file
|
|
1544
1782
|
|
|
1545
1783
|
<Frame caption="Open the file with text editor and paste the contents. It should look similar to what we have in this image.">
|
|
1546
|
-
<img src="file:
|
|
1784
|
+
<img src="file:6fefb292-915e-4282-ad94-156693ed8fb7" alt="AWS Route 53 BIND Import" />
|
|
1547
1785
|
</Frame>
|
|
1548
1786
|
|
|
1549
1787
|
4. Review the records and click **"Import"**
|
|
@@ -1556,13 +1794,13 @@ Configuring your domain is a three-step process: add the domain via API, copy th
|
|
|
1556
1794
|
2. Navigate to **DNS > Records**
|
|
1557
1795
|
|
|
1558
1796
|
<Frame caption="This is what the page looks like">
|
|
1559
|
-
<img src="file:
|
|
1797
|
+
<img src="file:52d94562-142b-4883-a9ea-2455f6439c3e" alt="Cloudflare BIND Import" />
|
|
1560
1798
|
</Frame>
|
|
1561
1799
|
|
|
1562
1800
|
3. Click **"Import and Export"**
|
|
1563
1801
|
|
|
1564
1802
|
<Frame caption="You should be able to just drop the file in">
|
|
1565
|
-
<img src="file:
|
|
1803
|
+
<img src="file:f5f6e4ab-8dcb-4c59-afe5-bc869012e2ed" alt="Cloudflare BIND Import" />
|
|
1566
1804
|
</Frame>
|
|
1567
1805
|
|
|
1568
1806
|
4. Upload the downloaded BIND zone file as is
|
|
@@ -1575,13 +1813,13 @@ Configuring your domain is a three-step process: add the domain via API, copy th
|
|
|
1575
1813
|
2. Navigate to the **DNS** subtab of the domain you want to send from
|
|
1576
1814
|
|
|
1577
1815
|
<Frame caption="Click on this button!">
|
|
1578
|
-
<img src="file:
|
|
1816
|
+
<img src="file:978afc32-618c-4178-8c06-657227921a94" alt="Porkbun DNS Management" />
|
|
1579
1817
|
</Frame>
|
|
1580
1818
|
|
|
1581
1819
|
3. Scroll down to the quick upload section
|
|
1582
1820
|
|
|
1583
1821
|
<Frame caption="Upload your BIND zone file here">
|
|
1584
|
-
<img src="file:
|
|
1822
|
+
<img src="file:f5f600d9-1dbf-4dd5-ae22-1169b5c8f7db" alt="Porkbun Zone File Import" />
|
|
1585
1823
|
</Frame>
|
|
1586
1824
|
|
|
1587
1825
|
4. Upload the downloaded BIND zone file as is
|
|
@@ -1665,7 +1903,7 @@ Configuring your domain is a three-step process: add the domain via API, copy th
|
|
|
1665
1903
|
* **Value:** Can directly copy paste the `value` from the API response (e.g., `{random_letters_numbers}.dkim.amazonses.com`).
|
|
1666
1904
|
|
|
1667
1905
|
<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!">
|
|
1668
|
-
<img src="file:
|
|
1906
|
+
<img src="file:72b2da60-69c0-4e3e-9840-916833c19dcf" alt="AWS Route 53 Record Configuration" />
|
|
1669
1907
|
</Frame>
|
|
1670
1908
|
|
|
1671
1909
|
* **TXT (DMARC/SPF):**
|
|
@@ -2224,7 +2462,7 @@ How you send your emails is just as important as what you send. If you're sendin
|
|
|
2224
2462
|
more natural to email providers. AgentMail's ability to create inboxes at
|
|
2225
2463
|
scale makes this strategy easy to implement.
|
|
2226
2464
|
|
|
2227
|
-
<img src="file:
|
|
2465
|
+
<img src="file:a59d7929-c6e0-4ba5-bfeb-523ab850700b" alt="Diagram comparing one inbox sending 1000 emails vs. five inboxes sending 200 each." />
|
|
2228
2466
|
</Step>
|
|
2229
2467
|
|
|
2230
2468
|
<Step title="Protect Your Reputation with Multiple Domains">
|
|
@@ -10860,8 +11098,6 @@ components:
|
|
|
10860
11098
|
schemas:
|
|
10861
11099
|
type_domains:DomainId:
|
|
10862
11100
|
type: string
|
|
10863
|
-
type_domains:DomainName:
|
|
10864
|
-
type: string
|
|
10865
11101
|
type_domains:VerificationStatus:
|
|
10866
11102
|
type: string
|
|
10867
11103
|
enum:
|
|
@@ -10906,8 +11142,6 @@ components:
|
|
|
10906
11142
|
properties:
|
|
10907
11143
|
domain_id:
|
|
10908
11144
|
$ref: '#/components/schemas/type_domains:DomainId'
|
|
10909
|
-
domain:
|
|
10910
|
-
$ref: '#/components/schemas/type_domains:DomainName'
|
|
10911
11145
|
status:
|
|
10912
11146
|
$ref: '#/components/schemas/type_domains:VerificationStatus'
|
|
10913
11147
|
feedback_enabled:
|
|
@@ -10926,7 +11160,6 @@ components:
|
|
|
10926
11160
|
format: date-time
|
|
10927
11161
|
required:
|
|
10928
11162
|
- domain_id
|
|
10929
|
-
- domain
|
|
10930
11163
|
- status
|
|
10931
11164
|
- feedback_enabled
|
|
10932
11165
|
- records
|
|
@@ -11165,8 +11398,6 @@ components:
|
|
|
11165
11398
|
properties:
|
|
11166
11399
|
domain_id:
|
|
11167
11400
|
$ref: '#/components/schemas/type_domains:DomainId'
|
|
11168
|
-
domain:
|
|
11169
|
-
$ref: '#/components/schemas/type_domains:DomainName'
|
|
11170
11401
|
status:
|
|
11171
11402
|
$ref: '#/components/schemas/type_domains:VerificationStatus'
|
|
11172
11403
|
feedback_enabled:
|
|
@@ -11185,7 +11416,6 @@ components:
|
|
|
11185
11416
|
format: date-time
|
|
11186
11417
|
required:
|
|
11187
11418
|
- domain_id
|
|
11188
|
-
- domain
|
|
11189
11419
|
- status
|
|
11190
11420
|
- feedback_enabled
|
|
11191
11421
|
- records
|
|
@@ -12620,114 +12850,1378 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
|
|
|
12620
12850
|
dataTask.resume()
|
|
12621
12851
|
```
|
|
12622
12852
|
|
|
12623
|
-
#
|
|
12853
|
+
# Message Received
|
|
12624
12854
|
|
|
12625
|
-
|
|
12855
|
+
POST
|
|
12626
12856
|
|
|
12627
|
-
Reference: https://docs.agentmail.to/api-reference/
|
|
12857
|
+
Reference: https://docs.agentmail.to/api-reference/webhooks/events/message-received
|
|
12628
12858
|
|
|
12629
|
-
## OpenAPI Specification
|
|
12859
|
+
## OpenAPI 3.1 Webhook Specification
|
|
12630
12860
|
|
|
12631
12861
|
```yaml
|
|
12632
12862
|
openapi: 3.1.1
|
|
12633
12863
|
info:
|
|
12634
|
-
title:
|
|
12635
|
-
version:
|
|
12636
|
-
|
|
12637
|
-
|
|
12638
|
-
|
|
12639
|
-
operationId:
|
|
12640
|
-
summary:
|
|
12864
|
+
title: Message Received
|
|
12865
|
+
version: subpackage_webhooks/events.messageReceived
|
|
12866
|
+
webhooks:
|
|
12867
|
+
message-received:
|
|
12868
|
+
post:
|
|
12869
|
+
operationId: message-received
|
|
12870
|
+
summary: Message Received
|
|
12641
12871
|
tags:
|
|
12642
|
-
-
|
|
12872
|
+
- subpackage_webhooks,subpackage_webhooks/events
|
|
12643
12873
|
parameters:
|
|
12644
|
-
- name:
|
|
12645
|
-
in:
|
|
12646
|
-
required: false
|
|
12647
|
-
schema:
|
|
12648
|
-
$ref: '#/components/schemas/type_metrics:MetricEventTypes'
|
|
12649
|
-
- name: start_timestamp
|
|
12650
|
-
in: query
|
|
12874
|
+
- name: svix-id
|
|
12875
|
+
in: header
|
|
12651
12876
|
required: true
|
|
12652
12877
|
schema:
|
|
12653
|
-
$ref: '#/components/schemas/
|
|
12654
|
-
- name:
|
|
12655
|
-
in:
|
|
12878
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixId'
|
|
12879
|
+
- name: svix-signature
|
|
12880
|
+
in: header
|
|
12656
12881
|
required: true
|
|
12657
12882
|
schema:
|
|
12658
|
-
$ref: '#/components/schemas/
|
|
12659
|
-
- name:
|
|
12883
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixSignature'
|
|
12884
|
+
- name: svix-timestamp
|
|
12660
12885
|
in: header
|
|
12661
|
-
description: >-
|
|
12662
|
-
Bearer authentication of the form `Bearer <token>`, where token is
|
|
12663
|
-
your auth token.
|
|
12664
12886
|
required: true
|
|
12665
12887
|
schema:
|
|
12666
|
-
|
|
12888
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixTimestamp'
|
|
12667
12889
|
responses:
|
|
12668
12890
|
'200':
|
|
12669
|
-
description:
|
|
12670
|
-
|
|
12671
|
-
|
|
12672
|
-
|
|
12673
|
-
|
|
12674
|
-
|
|
12675
|
-
description: Error response with status 404
|
|
12676
|
-
content: {}
|
|
12891
|
+
description: Webhook received successfully
|
|
12892
|
+
requestBody:
|
|
12893
|
+
content:
|
|
12894
|
+
application/json:
|
|
12895
|
+
schema:
|
|
12896
|
+
$ref: '#/components/schemas/type_events:MessageReceivedEvent'
|
|
12677
12897
|
components:
|
|
12678
12898
|
schemas:
|
|
12679
|
-
|
|
12899
|
+
type_webhooks/events:SvixId:
|
|
12680
12900
|
type: string
|
|
12681
|
-
|
|
12682
|
-
|
|
12683
|
-
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12901
|
+
type_webhooks/events:SvixSignature:
|
|
12902
|
+
type: string
|
|
12903
|
+
type_webhooks/events:SvixTimestamp:
|
|
12904
|
+
type: string
|
|
12905
|
+
format: date-time
|
|
12906
|
+
type_events:EventId:
|
|
12907
|
+
type: string
|
|
12908
|
+
type_inboxes:InboxId:
|
|
12909
|
+
type: string
|
|
12910
|
+
type_threads:ThreadId:
|
|
12911
|
+
type: string
|
|
12912
|
+
type_messages:MessageId:
|
|
12913
|
+
type: string
|
|
12914
|
+
type_messages:MessageLabels:
|
|
12690
12915
|
type: array
|
|
12691
12916
|
items:
|
|
12692
|
-
|
|
12693
|
-
|
|
12917
|
+
type: string
|
|
12918
|
+
type_messages:MessageTimestamp:
|
|
12694
12919
|
type: string
|
|
12695
12920
|
format: date-time
|
|
12696
|
-
|
|
12921
|
+
type_messages:MessageFrom:
|
|
12922
|
+
type: string
|
|
12923
|
+
type_messages:MessageTo:
|
|
12924
|
+
type: array
|
|
12925
|
+
items:
|
|
12926
|
+
type: string
|
|
12927
|
+
type_messages:MessageCc:
|
|
12928
|
+
type: array
|
|
12929
|
+
items:
|
|
12930
|
+
type: string
|
|
12931
|
+
type_messages:MessageBcc:
|
|
12932
|
+
type: array
|
|
12933
|
+
items:
|
|
12934
|
+
type: string
|
|
12935
|
+
type_messages:MessageSubject:
|
|
12936
|
+
type: string
|
|
12937
|
+
type_messages:MessagePreview:
|
|
12938
|
+
type: string
|
|
12939
|
+
type_messages:MessageText:
|
|
12940
|
+
type: string
|
|
12941
|
+
type_messages:MessageHtml:
|
|
12942
|
+
type: string
|
|
12943
|
+
type_attachments:AttachmentId:
|
|
12944
|
+
type: string
|
|
12945
|
+
type_attachments:AttachmentFilename:
|
|
12946
|
+
type: string
|
|
12947
|
+
type_attachments:AttachmentContentType:
|
|
12948
|
+
type: string
|
|
12949
|
+
type_attachments:AttachmentSize:
|
|
12950
|
+
type: integer
|
|
12951
|
+
type_attachments:AttachmentInline:
|
|
12952
|
+
type: boolean
|
|
12953
|
+
type_attachments:Attachment:
|
|
12954
|
+
type: object
|
|
12955
|
+
properties:
|
|
12956
|
+
attachment_id:
|
|
12957
|
+
$ref: '#/components/schemas/type_attachments:AttachmentId'
|
|
12958
|
+
filename:
|
|
12959
|
+
$ref: '#/components/schemas/type_attachments:AttachmentFilename'
|
|
12960
|
+
content_type:
|
|
12961
|
+
$ref: '#/components/schemas/type_attachments:AttachmentContentType'
|
|
12962
|
+
size:
|
|
12963
|
+
$ref: '#/components/schemas/type_attachments:AttachmentSize'
|
|
12964
|
+
inline:
|
|
12965
|
+
$ref: '#/components/schemas/type_attachments:AttachmentInline'
|
|
12966
|
+
required:
|
|
12967
|
+
- attachment_id
|
|
12968
|
+
- size
|
|
12969
|
+
- inline
|
|
12970
|
+
type_messages:MessageAttachments:
|
|
12971
|
+
type: array
|
|
12972
|
+
items:
|
|
12973
|
+
$ref: '#/components/schemas/type_attachments:Attachment'
|
|
12974
|
+
type_messages:MessageInReplyTo:
|
|
12975
|
+
type: string
|
|
12976
|
+
type_messages:MessageReferences:
|
|
12977
|
+
type: array
|
|
12978
|
+
items:
|
|
12979
|
+
type: string
|
|
12980
|
+
type_messages:MessageSize:
|
|
12981
|
+
type: integer
|
|
12982
|
+
type_messages:MessageUpdatedAt:
|
|
12697
12983
|
type: string
|
|
12698
12984
|
format: date-time
|
|
12699
|
-
|
|
12985
|
+
type_messages:MessageCreatedAt:
|
|
12700
12986
|
type: string
|
|
12701
12987
|
format: date-time
|
|
12702
|
-
|
|
12988
|
+
type_messages:Message:
|
|
12703
12989
|
type: object
|
|
12704
12990
|
properties:
|
|
12705
|
-
|
|
12706
|
-
|
|
12707
|
-
|
|
12708
|
-
|
|
12709
|
-
|
|
12710
|
-
|
|
12711
|
-
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
|
|
12717
|
-
|
|
12718
|
-
type: array
|
|
12719
|
-
items:
|
|
12720
|
-
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
12721
|
-
rejected:
|
|
12722
|
-
type: array
|
|
12723
|
-
items:
|
|
12724
|
-
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
12725
|
-
complained:
|
|
12991
|
+
inbox_id:
|
|
12992
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
12993
|
+
thread_id:
|
|
12994
|
+
$ref: '#/components/schemas/type_threads:ThreadId'
|
|
12995
|
+
message_id:
|
|
12996
|
+
$ref: '#/components/schemas/type_messages:MessageId'
|
|
12997
|
+
labels:
|
|
12998
|
+
$ref: '#/components/schemas/type_messages:MessageLabels'
|
|
12999
|
+
timestamp:
|
|
13000
|
+
$ref: '#/components/schemas/type_messages:MessageTimestamp'
|
|
13001
|
+
from:
|
|
13002
|
+
$ref: '#/components/schemas/type_messages:MessageFrom'
|
|
13003
|
+
reply_to:
|
|
12726
13004
|
type: array
|
|
12727
13005
|
items:
|
|
12728
|
-
|
|
12729
|
-
|
|
12730
|
-
|
|
13006
|
+
type: string
|
|
13007
|
+
to:
|
|
13008
|
+
$ref: '#/components/schemas/type_messages:MessageTo'
|
|
13009
|
+
cc:
|
|
13010
|
+
$ref: '#/components/schemas/type_messages:MessageCc'
|
|
13011
|
+
bcc:
|
|
13012
|
+
$ref: '#/components/schemas/type_messages:MessageBcc'
|
|
13013
|
+
subject:
|
|
13014
|
+
$ref: '#/components/schemas/type_messages:MessageSubject'
|
|
13015
|
+
preview:
|
|
13016
|
+
$ref: '#/components/schemas/type_messages:MessagePreview'
|
|
13017
|
+
text:
|
|
13018
|
+
$ref: '#/components/schemas/type_messages:MessageText'
|
|
13019
|
+
html:
|
|
13020
|
+
$ref: '#/components/schemas/type_messages:MessageHtml'
|
|
13021
|
+
attachments:
|
|
13022
|
+
$ref: '#/components/schemas/type_messages:MessageAttachments'
|
|
13023
|
+
in_reply_to:
|
|
13024
|
+
$ref: '#/components/schemas/type_messages:MessageInReplyTo'
|
|
13025
|
+
references:
|
|
13026
|
+
$ref: '#/components/schemas/type_messages:MessageReferences'
|
|
13027
|
+
size:
|
|
13028
|
+
$ref: '#/components/schemas/type_messages:MessageSize'
|
|
13029
|
+
updated_at:
|
|
13030
|
+
$ref: '#/components/schemas/type_messages:MessageUpdatedAt'
|
|
13031
|
+
created_at:
|
|
13032
|
+
$ref: '#/components/schemas/type_messages:MessageCreatedAt'
|
|
13033
|
+
required:
|
|
13034
|
+
- inbox_id
|
|
13035
|
+
- thread_id
|
|
13036
|
+
- message_id
|
|
13037
|
+
- labels
|
|
13038
|
+
- timestamp
|
|
13039
|
+
- from
|
|
13040
|
+
- to
|
|
13041
|
+
- size
|
|
13042
|
+
- updated_at
|
|
13043
|
+
- created_at
|
|
13044
|
+
type_events:MessageReceivedEvent:
|
|
13045
|
+
type: object
|
|
13046
|
+
properties:
|
|
13047
|
+
type:
|
|
13048
|
+
type: string
|
|
13049
|
+
enum:
|
|
13050
|
+
- type: stringLiteral
|
|
13051
|
+
value: event
|
|
13052
|
+
event_type:
|
|
13053
|
+
type: string
|
|
13054
|
+
enum:
|
|
13055
|
+
- type: stringLiteral
|
|
13056
|
+
value: message.received
|
|
13057
|
+
event_id:
|
|
13058
|
+
$ref: '#/components/schemas/type_events:EventId'
|
|
13059
|
+
message:
|
|
13060
|
+
$ref: '#/components/schemas/type_messages:Message'
|
|
13061
|
+
required:
|
|
13062
|
+
- type
|
|
13063
|
+
- event_type
|
|
13064
|
+
- event_id
|
|
13065
|
+
- message
|
|
13066
|
+
|
|
13067
|
+
```
|
|
13068
|
+
|
|
13069
|
+
# Message Sent
|
|
13070
|
+
|
|
13071
|
+
POST
|
|
13072
|
+
|
|
13073
|
+
Reference: https://docs.agentmail.to/api-reference/webhooks/events/message-sent
|
|
13074
|
+
|
|
13075
|
+
## OpenAPI 3.1 Webhook Specification
|
|
13076
|
+
|
|
13077
|
+
```yaml
|
|
13078
|
+
openapi: 3.1.1
|
|
13079
|
+
info:
|
|
13080
|
+
title: Message Sent
|
|
13081
|
+
version: subpackage_webhooks/events.messageSent
|
|
13082
|
+
webhooks:
|
|
13083
|
+
message-sent:
|
|
13084
|
+
post:
|
|
13085
|
+
operationId: message-sent
|
|
13086
|
+
summary: Message Sent
|
|
13087
|
+
tags:
|
|
13088
|
+
- subpackage_webhooks,subpackage_webhooks/events
|
|
13089
|
+
parameters:
|
|
13090
|
+
- name: svix-id
|
|
13091
|
+
in: header
|
|
13092
|
+
required: true
|
|
13093
|
+
schema:
|
|
13094
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixId'
|
|
13095
|
+
- name: svix-signature
|
|
13096
|
+
in: header
|
|
13097
|
+
required: true
|
|
13098
|
+
schema:
|
|
13099
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixSignature'
|
|
13100
|
+
- name: svix-timestamp
|
|
13101
|
+
in: header
|
|
13102
|
+
required: true
|
|
13103
|
+
schema:
|
|
13104
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixTimestamp'
|
|
13105
|
+
responses:
|
|
13106
|
+
'200':
|
|
13107
|
+
description: Webhook received successfully
|
|
13108
|
+
requestBody:
|
|
13109
|
+
content:
|
|
13110
|
+
application/json:
|
|
13111
|
+
schema:
|
|
13112
|
+
$ref: '#/components/schemas/type_events:MessageSentEvent'
|
|
13113
|
+
components:
|
|
13114
|
+
schemas:
|
|
13115
|
+
type_webhooks/events:SvixId:
|
|
13116
|
+
type: string
|
|
13117
|
+
type_webhooks/events:SvixSignature:
|
|
13118
|
+
type: string
|
|
13119
|
+
type_webhooks/events:SvixTimestamp:
|
|
13120
|
+
type: string
|
|
13121
|
+
format: date-time
|
|
13122
|
+
type_events:EventId:
|
|
13123
|
+
type: string
|
|
13124
|
+
type_inboxes:InboxId:
|
|
13125
|
+
type: string
|
|
13126
|
+
type_messages:MessageId:
|
|
13127
|
+
type: string
|
|
13128
|
+
type_events:Timestamp:
|
|
13129
|
+
type: string
|
|
13130
|
+
format: date-time
|
|
13131
|
+
type_events:Send:
|
|
13132
|
+
type: object
|
|
13133
|
+
properties:
|
|
13134
|
+
inbox_id:
|
|
13135
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
13136
|
+
message_id:
|
|
13137
|
+
$ref: '#/components/schemas/type_messages:MessageId'
|
|
13138
|
+
timestamp:
|
|
13139
|
+
$ref: '#/components/schemas/type_events:Timestamp'
|
|
13140
|
+
recipients:
|
|
13141
|
+
type: array
|
|
13142
|
+
items:
|
|
13143
|
+
type: string
|
|
13144
|
+
required:
|
|
13145
|
+
- inbox_id
|
|
13146
|
+
- message_id
|
|
13147
|
+
- timestamp
|
|
13148
|
+
- recipients
|
|
13149
|
+
type_events:MessageSentEvent:
|
|
13150
|
+
type: object
|
|
13151
|
+
properties:
|
|
13152
|
+
type:
|
|
13153
|
+
type: string
|
|
13154
|
+
enum:
|
|
13155
|
+
- type: stringLiteral
|
|
13156
|
+
value: event
|
|
13157
|
+
event_type:
|
|
13158
|
+
type: string
|
|
13159
|
+
enum:
|
|
13160
|
+
- type: stringLiteral
|
|
13161
|
+
value: message.sent
|
|
13162
|
+
event_id:
|
|
13163
|
+
$ref: '#/components/schemas/type_events:EventId'
|
|
13164
|
+
send:
|
|
13165
|
+
$ref: '#/components/schemas/type_events:Send'
|
|
13166
|
+
required:
|
|
13167
|
+
- type
|
|
13168
|
+
- event_type
|
|
13169
|
+
- event_id
|
|
13170
|
+
- send
|
|
13171
|
+
|
|
13172
|
+
```
|
|
13173
|
+
|
|
13174
|
+
# Message Delivered
|
|
13175
|
+
|
|
13176
|
+
POST
|
|
13177
|
+
|
|
13178
|
+
Reference: https://docs.agentmail.to/api-reference/webhooks/events/message-delivered
|
|
13179
|
+
|
|
13180
|
+
## OpenAPI 3.1 Webhook Specification
|
|
13181
|
+
|
|
13182
|
+
```yaml
|
|
13183
|
+
openapi: 3.1.1
|
|
13184
|
+
info:
|
|
13185
|
+
title: Message Delivered
|
|
13186
|
+
version: subpackage_webhooks/events.messageDelivered
|
|
13187
|
+
webhooks:
|
|
13188
|
+
message-delivered:
|
|
13189
|
+
post:
|
|
13190
|
+
operationId: message-delivered
|
|
13191
|
+
summary: Message Delivered
|
|
13192
|
+
tags:
|
|
13193
|
+
- subpackage_webhooks,subpackage_webhooks/events
|
|
13194
|
+
parameters:
|
|
13195
|
+
- name: svix-id
|
|
13196
|
+
in: header
|
|
13197
|
+
required: true
|
|
13198
|
+
schema:
|
|
13199
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixId'
|
|
13200
|
+
- name: svix-signature
|
|
13201
|
+
in: header
|
|
13202
|
+
required: true
|
|
13203
|
+
schema:
|
|
13204
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixSignature'
|
|
13205
|
+
- name: svix-timestamp
|
|
13206
|
+
in: header
|
|
13207
|
+
required: true
|
|
13208
|
+
schema:
|
|
13209
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixTimestamp'
|
|
13210
|
+
responses:
|
|
13211
|
+
'200':
|
|
13212
|
+
description: Webhook received successfully
|
|
13213
|
+
requestBody:
|
|
13214
|
+
content:
|
|
13215
|
+
application/json:
|
|
13216
|
+
schema:
|
|
13217
|
+
$ref: '#/components/schemas/type_events:MessageDeliveredEvent'
|
|
13218
|
+
components:
|
|
13219
|
+
schemas:
|
|
13220
|
+
type_webhooks/events:SvixId:
|
|
13221
|
+
type: string
|
|
13222
|
+
type_webhooks/events:SvixSignature:
|
|
13223
|
+
type: string
|
|
13224
|
+
type_webhooks/events:SvixTimestamp:
|
|
13225
|
+
type: string
|
|
13226
|
+
format: date-time
|
|
13227
|
+
type_events:EventId:
|
|
13228
|
+
type: string
|
|
13229
|
+
type_inboxes:InboxId:
|
|
13230
|
+
type: string
|
|
13231
|
+
type_messages:MessageId:
|
|
13232
|
+
type: string
|
|
13233
|
+
type_events:Timestamp:
|
|
13234
|
+
type: string
|
|
13235
|
+
format: date-time
|
|
13236
|
+
type_events:Delivery:
|
|
13237
|
+
type: object
|
|
13238
|
+
properties:
|
|
13239
|
+
inbox_id:
|
|
13240
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
13241
|
+
message_id:
|
|
13242
|
+
$ref: '#/components/schemas/type_messages:MessageId'
|
|
13243
|
+
timestamp:
|
|
13244
|
+
$ref: '#/components/schemas/type_events:Timestamp'
|
|
13245
|
+
recipients:
|
|
13246
|
+
type: array
|
|
13247
|
+
items:
|
|
13248
|
+
type: string
|
|
13249
|
+
required:
|
|
13250
|
+
- inbox_id
|
|
13251
|
+
- message_id
|
|
13252
|
+
- timestamp
|
|
13253
|
+
- recipients
|
|
13254
|
+
type_events:MessageDeliveredEvent:
|
|
13255
|
+
type: object
|
|
13256
|
+
properties:
|
|
13257
|
+
type:
|
|
13258
|
+
type: string
|
|
13259
|
+
enum:
|
|
13260
|
+
- type: stringLiteral
|
|
13261
|
+
value: event
|
|
13262
|
+
event_type:
|
|
13263
|
+
type: string
|
|
13264
|
+
enum:
|
|
13265
|
+
- type: stringLiteral
|
|
13266
|
+
value: message.delivered
|
|
13267
|
+
event_id:
|
|
13268
|
+
$ref: '#/components/schemas/type_events:EventId'
|
|
13269
|
+
delivery:
|
|
13270
|
+
$ref: '#/components/schemas/type_events:Delivery'
|
|
13271
|
+
required:
|
|
13272
|
+
- type
|
|
13273
|
+
- event_type
|
|
13274
|
+
- event_id
|
|
13275
|
+
- delivery
|
|
13276
|
+
|
|
13277
|
+
```
|
|
13278
|
+
|
|
13279
|
+
# Message Bounced
|
|
13280
|
+
|
|
13281
|
+
POST
|
|
13282
|
+
|
|
13283
|
+
Reference: https://docs.agentmail.to/api-reference/webhooks/events/message-bounced
|
|
13284
|
+
|
|
13285
|
+
## OpenAPI 3.1 Webhook Specification
|
|
13286
|
+
|
|
13287
|
+
```yaml
|
|
13288
|
+
openapi: 3.1.1
|
|
13289
|
+
info:
|
|
13290
|
+
title: Message Bounced
|
|
13291
|
+
version: subpackage_webhooks/events.messageBounced
|
|
13292
|
+
webhooks:
|
|
13293
|
+
message-bounced:
|
|
13294
|
+
post:
|
|
13295
|
+
operationId: message-bounced
|
|
13296
|
+
summary: Message Bounced
|
|
13297
|
+
tags:
|
|
13298
|
+
- subpackage_webhooks,subpackage_webhooks/events
|
|
13299
|
+
parameters:
|
|
13300
|
+
- name: svix-id
|
|
13301
|
+
in: header
|
|
13302
|
+
required: true
|
|
13303
|
+
schema:
|
|
13304
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixId'
|
|
13305
|
+
- name: svix-signature
|
|
13306
|
+
in: header
|
|
13307
|
+
required: true
|
|
13308
|
+
schema:
|
|
13309
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixSignature'
|
|
13310
|
+
- name: svix-timestamp
|
|
13311
|
+
in: header
|
|
13312
|
+
required: true
|
|
13313
|
+
schema:
|
|
13314
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixTimestamp'
|
|
13315
|
+
responses:
|
|
13316
|
+
'200':
|
|
13317
|
+
description: Webhook received successfully
|
|
13318
|
+
requestBody:
|
|
13319
|
+
content:
|
|
13320
|
+
application/json:
|
|
13321
|
+
schema:
|
|
13322
|
+
$ref: '#/components/schemas/type_events:MessageBouncedEvent'
|
|
13323
|
+
components:
|
|
13324
|
+
schemas:
|
|
13325
|
+
type_webhooks/events:SvixId:
|
|
13326
|
+
type: string
|
|
13327
|
+
type_webhooks/events:SvixSignature:
|
|
13328
|
+
type: string
|
|
13329
|
+
type_webhooks/events:SvixTimestamp:
|
|
13330
|
+
type: string
|
|
13331
|
+
format: date-time
|
|
13332
|
+
type_events:EventId:
|
|
13333
|
+
type: string
|
|
13334
|
+
type_inboxes:InboxId:
|
|
13335
|
+
type: string
|
|
13336
|
+
type_messages:MessageId:
|
|
13337
|
+
type: string
|
|
13338
|
+
type_events:Timestamp:
|
|
13339
|
+
type: string
|
|
13340
|
+
format: date-time
|
|
13341
|
+
type_events:Recipient:
|
|
13342
|
+
type: object
|
|
13343
|
+
properties:
|
|
13344
|
+
address:
|
|
13345
|
+
type: string
|
|
13346
|
+
status:
|
|
13347
|
+
type: string
|
|
13348
|
+
required:
|
|
13349
|
+
- address
|
|
13350
|
+
- status
|
|
13351
|
+
type_events:Bounce:
|
|
13352
|
+
type: object
|
|
13353
|
+
properties:
|
|
13354
|
+
inbox_id:
|
|
13355
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
13356
|
+
message_id:
|
|
13357
|
+
$ref: '#/components/schemas/type_messages:MessageId'
|
|
13358
|
+
timestamp:
|
|
13359
|
+
$ref: '#/components/schemas/type_events:Timestamp'
|
|
13360
|
+
type:
|
|
13361
|
+
type: string
|
|
13362
|
+
sub_type:
|
|
13363
|
+
type: string
|
|
13364
|
+
recipients:
|
|
13365
|
+
type: array
|
|
13366
|
+
items:
|
|
13367
|
+
$ref: '#/components/schemas/type_events:Recipient'
|
|
13368
|
+
required:
|
|
13369
|
+
- inbox_id
|
|
13370
|
+
- message_id
|
|
13371
|
+
- timestamp
|
|
13372
|
+
- type
|
|
13373
|
+
- sub_type
|
|
13374
|
+
- recipients
|
|
13375
|
+
type_events:MessageBouncedEvent:
|
|
13376
|
+
type: object
|
|
13377
|
+
properties:
|
|
13378
|
+
type:
|
|
13379
|
+
type: string
|
|
13380
|
+
enum:
|
|
13381
|
+
- type: stringLiteral
|
|
13382
|
+
value: event
|
|
13383
|
+
event_type:
|
|
13384
|
+
type: string
|
|
13385
|
+
enum:
|
|
13386
|
+
- type: stringLiteral
|
|
13387
|
+
value: message.bounced
|
|
13388
|
+
event_id:
|
|
13389
|
+
$ref: '#/components/schemas/type_events:EventId'
|
|
13390
|
+
bounce:
|
|
13391
|
+
$ref: '#/components/schemas/type_events:Bounce'
|
|
13392
|
+
required:
|
|
13393
|
+
- type
|
|
13394
|
+
- event_type
|
|
13395
|
+
- event_id
|
|
13396
|
+
- bounce
|
|
13397
|
+
|
|
13398
|
+
```
|
|
13399
|
+
|
|
13400
|
+
# Message Complained
|
|
13401
|
+
|
|
13402
|
+
POST
|
|
13403
|
+
|
|
13404
|
+
Reference: https://docs.agentmail.to/api-reference/webhooks/events/message-complained
|
|
13405
|
+
|
|
13406
|
+
## OpenAPI 3.1 Webhook Specification
|
|
13407
|
+
|
|
13408
|
+
```yaml
|
|
13409
|
+
openapi: 3.1.1
|
|
13410
|
+
info:
|
|
13411
|
+
title: Message Complained
|
|
13412
|
+
version: subpackage_webhooks/events.messageComplained
|
|
13413
|
+
webhooks:
|
|
13414
|
+
message-complained:
|
|
13415
|
+
post:
|
|
13416
|
+
operationId: message-complained
|
|
13417
|
+
summary: Message Complained
|
|
13418
|
+
tags:
|
|
13419
|
+
- subpackage_webhooks,subpackage_webhooks/events
|
|
13420
|
+
parameters:
|
|
13421
|
+
- name: svix-id
|
|
13422
|
+
in: header
|
|
13423
|
+
required: true
|
|
13424
|
+
schema:
|
|
13425
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixId'
|
|
13426
|
+
- name: svix-signature
|
|
13427
|
+
in: header
|
|
13428
|
+
required: true
|
|
13429
|
+
schema:
|
|
13430
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixSignature'
|
|
13431
|
+
- name: svix-timestamp
|
|
13432
|
+
in: header
|
|
13433
|
+
required: true
|
|
13434
|
+
schema:
|
|
13435
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixTimestamp'
|
|
13436
|
+
responses:
|
|
13437
|
+
'200':
|
|
13438
|
+
description: Webhook received successfully
|
|
13439
|
+
requestBody:
|
|
13440
|
+
content:
|
|
13441
|
+
application/json:
|
|
13442
|
+
schema:
|
|
13443
|
+
$ref: '#/components/schemas/type_events:MessageComplainedEvent'
|
|
13444
|
+
components:
|
|
13445
|
+
schemas:
|
|
13446
|
+
type_webhooks/events:SvixId:
|
|
13447
|
+
type: string
|
|
13448
|
+
type_webhooks/events:SvixSignature:
|
|
13449
|
+
type: string
|
|
13450
|
+
type_webhooks/events:SvixTimestamp:
|
|
13451
|
+
type: string
|
|
13452
|
+
format: date-time
|
|
13453
|
+
type_events:EventId:
|
|
13454
|
+
type: string
|
|
13455
|
+
type_inboxes:InboxId:
|
|
13456
|
+
type: string
|
|
13457
|
+
type_messages:MessageId:
|
|
13458
|
+
type: string
|
|
13459
|
+
type_events:Timestamp:
|
|
13460
|
+
type: string
|
|
13461
|
+
format: date-time
|
|
13462
|
+
type_events:Complaint:
|
|
13463
|
+
type: object
|
|
13464
|
+
properties:
|
|
13465
|
+
inbox_id:
|
|
13466
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
13467
|
+
message_id:
|
|
13468
|
+
$ref: '#/components/schemas/type_messages:MessageId'
|
|
13469
|
+
timestamp:
|
|
13470
|
+
$ref: '#/components/schemas/type_events:Timestamp'
|
|
13471
|
+
type:
|
|
13472
|
+
type: string
|
|
13473
|
+
sub_type:
|
|
13474
|
+
type: string
|
|
13475
|
+
recipients:
|
|
13476
|
+
type: array
|
|
13477
|
+
items:
|
|
13478
|
+
type: string
|
|
13479
|
+
required:
|
|
13480
|
+
- inbox_id
|
|
13481
|
+
- message_id
|
|
13482
|
+
- timestamp
|
|
13483
|
+
- type
|
|
13484
|
+
- sub_type
|
|
13485
|
+
- recipients
|
|
13486
|
+
type_events:MessageComplainedEvent:
|
|
13487
|
+
type: object
|
|
13488
|
+
properties:
|
|
13489
|
+
type:
|
|
13490
|
+
type: string
|
|
13491
|
+
enum:
|
|
13492
|
+
- type: stringLiteral
|
|
13493
|
+
value: event
|
|
13494
|
+
event_type:
|
|
13495
|
+
type: string
|
|
13496
|
+
enum:
|
|
13497
|
+
- type: stringLiteral
|
|
13498
|
+
value: message.complained
|
|
13499
|
+
event_id:
|
|
13500
|
+
$ref: '#/components/schemas/type_events:EventId'
|
|
13501
|
+
complaint:
|
|
13502
|
+
$ref: '#/components/schemas/type_events:Complaint'
|
|
13503
|
+
required:
|
|
13504
|
+
- type
|
|
13505
|
+
- event_type
|
|
13506
|
+
- event_id
|
|
13507
|
+
- complaint
|
|
13508
|
+
|
|
13509
|
+
```
|
|
13510
|
+
|
|
13511
|
+
# Message Rejected
|
|
13512
|
+
|
|
13513
|
+
POST
|
|
13514
|
+
|
|
13515
|
+
Reference: https://docs.agentmail.to/api-reference/webhooks/events/message-rejected
|
|
13516
|
+
|
|
13517
|
+
## OpenAPI 3.1 Webhook Specification
|
|
13518
|
+
|
|
13519
|
+
```yaml
|
|
13520
|
+
openapi: 3.1.1
|
|
13521
|
+
info:
|
|
13522
|
+
title: Message Rejected
|
|
13523
|
+
version: subpackage_webhooks/events.messageRejected
|
|
13524
|
+
webhooks:
|
|
13525
|
+
message-rejected:
|
|
13526
|
+
post:
|
|
13527
|
+
operationId: message-rejected
|
|
13528
|
+
summary: Message Rejected
|
|
13529
|
+
tags:
|
|
13530
|
+
- subpackage_webhooks,subpackage_webhooks/events
|
|
13531
|
+
parameters:
|
|
13532
|
+
- name: svix-id
|
|
13533
|
+
in: header
|
|
13534
|
+
required: true
|
|
13535
|
+
schema:
|
|
13536
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixId'
|
|
13537
|
+
- name: svix-signature
|
|
13538
|
+
in: header
|
|
13539
|
+
required: true
|
|
13540
|
+
schema:
|
|
13541
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixSignature'
|
|
13542
|
+
- name: svix-timestamp
|
|
13543
|
+
in: header
|
|
13544
|
+
required: true
|
|
13545
|
+
schema:
|
|
13546
|
+
$ref: '#/components/schemas/type_webhooks/events:SvixTimestamp'
|
|
13547
|
+
responses:
|
|
13548
|
+
'200':
|
|
13549
|
+
description: Webhook received successfully
|
|
13550
|
+
requestBody:
|
|
13551
|
+
content:
|
|
13552
|
+
application/json:
|
|
13553
|
+
schema:
|
|
13554
|
+
$ref: '#/components/schemas/type_events:MessageRejectedEvent'
|
|
13555
|
+
components:
|
|
13556
|
+
schemas:
|
|
13557
|
+
type_webhooks/events:SvixId:
|
|
13558
|
+
type: string
|
|
13559
|
+
type_webhooks/events:SvixSignature:
|
|
13560
|
+
type: string
|
|
13561
|
+
type_webhooks/events:SvixTimestamp:
|
|
13562
|
+
type: string
|
|
13563
|
+
format: date-time
|
|
13564
|
+
type_events:EventId:
|
|
13565
|
+
type: string
|
|
13566
|
+
type_inboxes:InboxId:
|
|
13567
|
+
type: string
|
|
13568
|
+
type_messages:MessageId:
|
|
13569
|
+
type: string
|
|
13570
|
+
type_events:Timestamp:
|
|
13571
|
+
type: string
|
|
13572
|
+
format: date-time
|
|
13573
|
+
type_events:Reject:
|
|
13574
|
+
type: object
|
|
13575
|
+
properties:
|
|
13576
|
+
inbox_id:
|
|
13577
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
13578
|
+
message_id:
|
|
13579
|
+
$ref: '#/components/schemas/type_messages:MessageId'
|
|
13580
|
+
timestamp:
|
|
13581
|
+
$ref: '#/components/schemas/type_events:Timestamp'
|
|
13582
|
+
reason:
|
|
13583
|
+
type: string
|
|
13584
|
+
required:
|
|
13585
|
+
- inbox_id
|
|
13586
|
+
- message_id
|
|
13587
|
+
- timestamp
|
|
13588
|
+
- reason
|
|
13589
|
+
type_events:MessageRejectedEvent:
|
|
13590
|
+
type: object
|
|
13591
|
+
properties:
|
|
13592
|
+
type:
|
|
13593
|
+
type: string
|
|
13594
|
+
enum:
|
|
13595
|
+
- type: stringLiteral
|
|
13596
|
+
value: event
|
|
13597
|
+
event_type:
|
|
13598
|
+
type: string
|
|
13599
|
+
enum:
|
|
13600
|
+
- type: stringLiteral
|
|
13601
|
+
value: message.rejected
|
|
13602
|
+
event_id:
|
|
13603
|
+
$ref: '#/components/schemas/type_events:EventId'
|
|
13604
|
+
reject:
|
|
13605
|
+
$ref: '#/components/schemas/type_events:Reject'
|
|
13606
|
+
required:
|
|
13607
|
+
- type
|
|
13608
|
+
- event_type
|
|
13609
|
+
- event_id
|
|
13610
|
+
- reject
|
|
13611
|
+
|
|
13612
|
+
```
|
|
13613
|
+
|
|
13614
|
+
# Connect
|
|
13615
|
+
|
|
13616
|
+
GET /v0
|
|
13617
|
+
|
|
13618
|
+
Reference: https://docs.agentmail.to/api-reference/websockets/websockets
|
|
13619
|
+
|
|
13620
|
+
## AsyncAPI Specification
|
|
13621
|
+
|
|
13622
|
+
```yaml
|
|
13623
|
+
asyncapi: 2.6.0
|
|
13624
|
+
info:
|
|
13625
|
+
title: Connect
|
|
13626
|
+
version: subpackage_websockets.websockets
|
|
13627
|
+
channels:
|
|
13628
|
+
/v0:
|
|
13629
|
+
bindings:
|
|
13630
|
+
ws:
|
|
13631
|
+
query:
|
|
13632
|
+
type: object
|
|
13633
|
+
properties:
|
|
13634
|
+
auth_token:
|
|
13635
|
+
type: string
|
|
13636
|
+
publish:
|
|
13637
|
+
operationId: websockets-publish
|
|
13638
|
+
summary: Server messages
|
|
13639
|
+
message:
|
|
13640
|
+
oneOf:
|
|
13641
|
+
- $ref: >-
|
|
13642
|
+
#/components/messages/subpackage_websockets.websockets-server-0-subscribed
|
|
13643
|
+
- $ref: >-
|
|
13644
|
+
#/components/messages/subpackage_websockets.websockets-server-1-message_received
|
|
13645
|
+
- $ref: >-
|
|
13646
|
+
#/components/messages/subpackage_websockets.websockets-server-2-message_sent
|
|
13647
|
+
- $ref: >-
|
|
13648
|
+
#/components/messages/subpackage_websockets.websockets-server-3-message_delivered
|
|
13649
|
+
- $ref: >-
|
|
13650
|
+
#/components/messages/subpackage_websockets.websockets-server-4-message_bounced
|
|
13651
|
+
- $ref: >-
|
|
13652
|
+
#/components/messages/subpackage_websockets.websockets-server-5-message_complained
|
|
13653
|
+
- $ref: >-
|
|
13654
|
+
#/components/messages/subpackage_websockets.websockets-server-6-message_rejected
|
|
13655
|
+
subscribe:
|
|
13656
|
+
operationId: websockets-subscribe
|
|
13657
|
+
summary: Client message
|
|
13658
|
+
message:
|
|
13659
|
+
name: subscribe
|
|
13660
|
+
payload:
|
|
13661
|
+
$ref: '#/components/schemas/type_websockets:Subscribe'
|
|
13662
|
+
servers:
|
|
13663
|
+
Production:
|
|
13664
|
+
url: wss://ws.agentmail.to/
|
|
13665
|
+
protocol: wss
|
|
13666
|
+
x-default: true
|
|
13667
|
+
Development:
|
|
13668
|
+
url: wss://ws.agentmail.dev/
|
|
13669
|
+
protocol: wss
|
|
13670
|
+
components:
|
|
13671
|
+
messages:
|
|
13672
|
+
subpackage_websockets.websockets-server-0-subscribed:
|
|
13673
|
+
name: subscribed
|
|
13674
|
+
payload:
|
|
13675
|
+
$ref: '#/components/schemas/type_websockets:Subscribed'
|
|
13676
|
+
subpackage_websockets.websockets-server-1-message_received:
|
|
13677
|
+
name: message_received
|
|
13678
|
+
payload:
|
|
13679
|
+
$ref: '#/components/schemas/type_events:MessageReceivedEvent'
|
|
13680
|
+
subpackage_websockets.websockets-server-2-message_sent:
|
|
13681
|
+
name: message_sent
|
|
13682
|
+
payload:
|
|
13683
|
+
$ref: '#/components/schemas/type_events:MessageSentEvent'
|
|
13684
|
+
subpackage_websockets.websockets-server-3-message_delivered:
|
|
13685
|
+
name: message_delivered
|
|
13686
|
+
payload:
|
|
13687
|
+
$ref: '#/components/schemas/type_events:MessageDeliveredEvent'
|
|
13688
|
+
subpackage_websockets.websockets-server-4-message_bounced:
|
|
13689
|
+
name: message_bounced
|
|
13690
|
+
payload:
|
|
13691
|
+
$ref: '#/components/schemas/type_events:MessageBouncedEvent'
|
|
13692
|
+
subpackage_websockets.websockets-server-5-message_complained:
|
|
13693
|
+
name: message_complained
|
|
13694
|
+
payload:
|
|
13695
|
+
$ref: '#/components/schemas/type_events:MessageComplainedEvent'
|
|
13696
|
+
subpackage_websockets.websockets-server-6-message_rejected:
|
|
13697
|
+
name: message_rejected
|
|
13698
|
+
payload:
|
|
13699
|
+
$ref: '#/components/schemas/type_events:MessageRejectedEvent'
|
|
13700
|
+
schemas:
|
|
13701
|
+
type_websockets:Subscribed:
|
|
13702
|
+
type: object
|
|
13703
|
+
properties:
|
|
13704
|
+
type:
|
|
13705
|
+
type: string
|
|
13706
|
+
enum:
|
|
13707
|
+
- type: stringLiteral
|
|
13708
|
+
value: subscribed
|
|
13709
|
+
inbox_ids:
|
|
13710
|
+
type: array
|
|
13711
|
+
items:
|
|
13712
|
+
type: string
|
|
13713
|
+
required:
|
|
13714
|
+
- type
|
|
13715
|
+
- inbox_ids
|
|
13716
|
+
type_events:EventId:
|
|
13717
|
+
type: string
|
|
13718
|
+
type_inboxes:InboxId:
|
|
13719
|
+
type: string
|
|
13720
|
+
type_threads:ThreadId:
|
|
13721
|
+
type: string
|
|
13722
|
+
type_messages:MessageId:
|
|
13723
|
+
type: string
|
|
13724
|
+
type_messages:MessageLabels:
|
|
13725
|
+
type: array
|
|
13726
|
+
items:
|
|
13727
|
+
type: string
|
|
13728
|
+
type_messages:MessageTimestamp:
|
|
13729
|
+
type: string
|
|
13730
|
+
format: date-time
|
|
13731
|
+
type_messages:MessageFrom:
|
|
13732
|
+
type: string
|
|
13733
|
+
type_messages:MessageTo:
|
|
13734
|
+
type: array
|
|
13735
|
+
items:
|
|
13736
|
+
type: string
|
|
13737
|
+
type_messages:MessageCc:
|
|
13738
|
+
type: array
|
|
13739
|
+
items:
|
|
13740
|
+
type: string
|
|
13741
|
+
type_messages:MessageBcc:
|
|
13742
|
+
type: array
|
|
13743
|
+
items:
|
|
13744
|
+
type: string
|
|
13745
|
+
type_messages:MessageSubject:
|
|
13746
|
+
type: string
|
|
13747
|
+
type_messages:MessagePreview:
|
|
13748
|
+
type: string
|
|
13749
|
+
type_messages:MessageText:
|
|
13750
|
+
type: string
|
|
13751
|
+
type_messages:MessageHtml:
|
|
13752
|
+
type: string
|
|
13753
|
+
type_attachments:AttachmentId:
|
|
13754
|
+
type: string
|
|
13755
|
+
type_attachments:AttachmentFilename:
|
|
13756
|
+
type: string
|
|
13757
|
+
type_attachments:AttachmentContentType:
|
|
13758
|
+
type: string
|
|
13759
|
+
type_attachments:AttachmentSize:
|
|
13760
|
+
type: integer
|
|
13761
|
+
type_attachments:AttachmentInline:
|
|
13762
|
+
type: boolean
|
|
13763
|
+
type_attachments:Attachment:
|
|
13764
|
+
type: object
|
|
13765
|
+
properties:
|
|
13766
|
+
attachment_id:
|
|
13767
|
+
$ref: '#/components/schemas/type_attachments:AttachmentId'
|
|
13768
|
+
filename:
|
|
13769
|
+
$ref: '#/components/schemas/type_attachments:AttachmentFilename'
|
|
13770
|
+
content_type:
|
|
13771
|
+
$ref: '#/components/schemas/type_attachments:AttachmentContentType'
|
|
13772
|
+
size:
|
|
13773
|
+
$ref: '#/components/schemas/type_attachments:AttachmentSize'
|
|
13774
|
+
inline:
|
|
13775
|
+
$ref: '#/components/schemas/type_attachments:AttachmentInline'
|
|
13776
|
+
required:
|
|
13777
|
+
- attachment_id
|
|
13778
|
+
- size
|
|
13779
|
+
- inline
|
|
13780
|
+
type_messages:MessageAttachments:
|
|
13781
|
+
type: array
|
|
13782
|
+
items:
|
|
13783
|
+
$ref: '#/components/schemas/type_attachments:Attachment'
|
|
13784
|
+
type_messages:MessageInReplyTo:
|
|
13785
|
+
type: string
|
|
13786
|
+
type_messages:MessageReferences:
|
|
13787
|
+
type: array
|
|
13788
|
+
items:
|
|
13789
|
+
type: string
|
|
13790
|
+
type_messages:MessageSize:
|
|
13791
|
+
type: integer
|
|
13792
|
+
type_messages:MessageUpdatedAt:
|
|
13793
|
+
type: string
|
|
13794
|
+
format: date-time
|
|
13795
|
+
type_messages:MessageCreatedAt:
|
|
13796
|
+
type: string
|
|
13797
|
+
format: date-time
|
|
13798
|
+
type_messages:Message:
|
|
13799
|
+
type: object
|
|
13800
|
+
properties:
|
|
13801
|
+
inbox_id:
|
|
13802
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
13803
|
+
thread_id:
|
|
13804
|
+
$ref: '#/components/schemas/type_threads:ThreadId'
|
|
13805
|
+
message_id:
|
|
13806
|
+
$ref: '#/components/schemas/type_messages:MessageId'
|
|
13807
|
+
labels:
|
|
13808
|
+
$ref: '#/components/schemas/type_messages:MessageLabels'
|
|
13809
|
+
timestamp:
|
|
13810
|
+
$ref: '#/components/schemas/type_messages:MessageTimestamp'
|
|
13811
|
+
from:
|
|
13812
|
+
$ref: '#/components/schemas/type_messages:MessageFrom'
|
|
13813
|
+
reply_to:
|
|
13814
|
+
type: array
|
|
13815
|
+
items:
|
|
13816
|
+
type: string
|
|
13817
|
+
to:
|
|
13818
|
+
$ref: '#/components/schemas/type_messages:MessageTo'
|
|
13819
|
+
cc:
|
|
13820
|
+
$ref: '#/components/schemas/type_messages:MessageCc'
|
|
13821
|
+
bcc:
|
|
13822
|
+
$ref: '#/components/schemas/type_messages:MessageBcc'
|
|
13823
|
+
subject:
|
|
13824
|
+
$ref: '#/components/schemas/type_messages:MessageSubject'
|
|
13825
|
+
preview:
|
|
13826
|
+
$ref: '#/components/schemas/type_messages:MessagePreview'
|
|
13827
|
+
text:
|
|
13828
|
+
$ref: '#/components/schemas/type_messages:MessageText'
|
|
13829
|
+
html:
|
|
13830
|
+
$ref: '#/components/schemas/type_messages:MessageHtml'
|
|
13831
|
+
attachments:
|
|
13832
|
+
$ref: '#/components/schemas/type_messages:MessageAttachments'
|
|
13833
|
+
in_reply_to:
|
|
13834
|
+
$ref: '#/components/schemas/type_messages:MessageInReplyTo'
|
|
13835
|
+
references:
|
|
13836
|
+
$ref: '#/components/schemas/type_messages:MessageReferences'
|
|
13837
|
+
size:
|
|
13838
|
+
$ref: '#/components/schemas/type_messages:MessageSize'
|
|
13839
|
+
updated_at:
|
|
13840
|
+
$ref: '#/components/schemas/type_messages:MessageUpdatedAt'
|
|
13841
|
+
created_at:
|
|
13842
|
+
$ref: '#/components/schemas/type_messages:MessageCreatedAt'
|
|
13843
|
+
required:
|
|
13844
|
+
- inbox_id
|
|
13845
|
+
- thread_id
|
|
13846
|
+
- message_id
|
|
13847
|
+
- labels
|
|
13848
|
+
- timestamp
|
|
13849
|
+
- from
|
|
13850
|
+
- to
|
|
13851
|
+
- size
|
|
13852
|
+
- updated_at
|
|
13853
|
+
- created_at
|
|
13854
|
+
type_events:MessageReceivedEvent:
|
|
13855
|
+
type: object
|
|
13856
|
+
properties:
|
|
13857
|
+
type:
|
|
13858
|
+
type: string
|
|
13859
|
+
enum:
|
|
13860
|
+
- type: stringLiteral
|
|
13861
|
+
value: event
|
|
13862
|
+
event_type:
|
|
13863
|
+
type: string
|
|
13864
|
+
enum:
|
|
13865
|
+
- type: stringLiteral
|
|
13866
|
+
value: message.received
|
|
13867
|
+
event_id:
|
|
13868
|
+
$ref: '#/components/schemas/type_events:EventId'
|
|
13869
|
+
message:
|
|
13870
|
+
$ref: '#/components/schemas/type_messages:Message'
|
|
13871
|
+
required:
|
|
13872
|
+
- type
|
|
13873
|
+
- event_type
|
|
13874
|
+
- event_id
|
|
13875
|
+
- message
|
|
13876
|
+
type_events:Timestamp:
|
|
13877
|
+
type: string
|
|
13878
|
+
format: date-time
|
|
13879
|
+
type_events:Send:
|
|
13880
|
+
type: object
|
|
13881
|
+
properties:
|
|
13882
|
+
inbox_id:
|
|
13883
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
13884
|
+
message_id:
|
|
13885
|
+
$ref: '#/components/schemas/type_messages:MessageId'
|
|
13886
|
+
timestamp:
|
|
13887
|
+
$ref: '#/components/schemas/type_events:Timestamp'
|
|
13888
|
+
recipients:
|
|
13889
|
+
type: array
|
|
13890
|
+
items:
|
|
13891
|
+
type: string
|
|
13892
|
+
required:
|
|
13893
|
+
- inbox_id
|
|
13894
|
+
- message_id
|
|
13895
|
+
- timestamp
|
|
13896
|
+
- recipients
|
|
13897
|
+
type_events:MessageSentEvent:
|
|
13898
|
+
type: object
|
|
13899
|
+
properties:
|
|
13900
|
+
type:
|
|
13901
|
+
type: string
|
|
13902
|
+
enum:
|
|
13903
|
+
- type: stringLiteral
|
|
13904
|
+
value: event
|
|
13905
|
+
event_type:
|
|
13906
|
+
type: string
|
|
13907
|
+
enum:
|
|
13908
|
+
- type: stringLiteral
|
|
13909
|
+
value: message.sent
|
|
13910
|
+
event_id:
|
|
13911
|
+
$ref: '#/components/schemas/type_events:EventId'
|
|
13912
|
+
send:
|
|
13913
|
+
$ref: '#/components/schemas/type_events:Send'
|
|
13914
|
+
required:
|
|
13915
|
+
- type
|
|
13916
|
+
- event_type
|
|
13917
|
+
- event_id
|
|
13918
|
+
- send
|
|
13919
|
+
type_events:Delivery:
|
|
13920
|
+
type: object
|
|
13921
|
+
properties:
|
|
13922
|
+
inbox_id:
|
|
13923
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
13924
|
+
message_id:
|
|
13925
|
+
$ref: '#/components/schemas/type_messages:MessageId'
|
|
13926
|
+
timestamp:
|
|
13927
|
+
$ref: '#/components/schemas/type_events:Timestamp'
|
|
13928
|
+
recipients:
|
|
13929
|
+
type: array
|
|
13930
|
+
items:
|
|
13931
|
+
type: string
|
|
13932
|
+
required:
|
|
13933
|
+
- inbox_id
|
|
13934
|
+
- message_id
|
|
13935
|
+
- timestamp
|
|
13936
|
+
- recipients
|
|
13937
|
+
type_events:MessageDeliveredEvent:
|
|
13938
|
+
type: object
|
|
13939
|
+
properties:
|
|
13940
|
+
type:
|
|
13941
|
+
type: string
|
|
13942
|
+
enum:
|
|
13943
|
+
- type: stringLiteral
|
|
13944
|
+
value: event
|
|
13945
|
+
event_type:
|
|
13946
|
+
type: string
|
|
13947
|
+
enum:
|
|
13948
|
+
- type: stringLiteral
|
|
13949
|
+
value: message.delivered
|
|
13950
|
+
event_id:
|
|
13951
|
+
$ref: '#/components/schemas/type_events:EventId'
|
|
13952
|
+
delivery:
|
|
13953
|
+
$ref: '#/components/schemas/type_events:Delivery'
|
|
13954
|
+
required:
|
|
13955
|
+
- type
|
|
13956
|
+
- event_type
|
|
13957
|
+
- event_id
|
|
13958
|
+
- delivery
|
|
13959
|
+
type_events:Recipient:
|
|
13960
|
+
type: object
|
|
13961
|
+
properties:
|
|
13962
|
+
address:
|
|
13963
|
+
type: string
|
|
13964
|
+
status:
|
|
13965
|
+
type: string
|
|
13966
|
+
required:
|
|
13967
|
+
- address
|
|
13968
|
+
- status
|
|
13969
|
+
type_events:Bounce:
|
|
13970
|
+
type: object
|
|
13971
|
+
properties:
|
|
13972
|
+
inbox_id:
|
|
13973
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
13974
|
+
message_id:
|
|
13975
|
+
$ref: '#/components/schemas/type_messages:MessageId'
|
|
13976
|
+
timestamp:
|
|
13977
|
+
$ref: '#/components/schemas/type_events:Timestamp'
|
|
13978
|
+
type:
|
|
13979
|
+
type: string
|
|
13980
|
+
sub_type:
|
|
13981
|
+
type: string
|
|
13982
|
+
recipients:
|
|
13983
|
+
type: array
|
|
13984
|
+
items:
|
|
13985
|
+
$ref: '#/components/schemas/type_events:Recipient'
|
|
13986
|
+
required:
|
|
13987
|
+
- inbox_id
|
|
13988
|
+
- message_id
|
|
13989
|
+
- timestamp
|
|
13990
|
+
- type
|
|
13991
|
+
- sub_type
|
|
13992
|
+
- recipients
|
|
13993
|
+
type_events:MessageBouncedEvent:
|
|
13994
|
+
type: object
|
|
13995
|
+
properties:
|
|
13996
|
+
type:
|
|
13997
|
+
type: string
|
|
13998
|
+
enum:
|
|
13999
|
+
- type: stringLiteral
|
|
14000
|
+
value: event
|
|
14001
|
+
event_type:
|
|
14002
|
+
type: string
|
|
14003
|
+
enum:
|
|
14004
|
+
- type: stringLiteral
|
|
14005
|
+
value: message.bounced
|
|
14006
|
+
event_id:
|
|
14007
|
+
$ref: '#/components/schemas/type_events:EventId'
|
|
14008
|
+
bounce:
|
|
14009
|
+
$ref: '#/components/schemas/type_events:Bounce'
|
|
14010
|
+
required:
|
|
14011
|
+
- type
|
|
14012
|
+
- event_type
|
|
14013
|
+
- event_id
|
|
14014
|
+
- bounce
|
|
14015
|
+
type_events:Complaint:
|
|
14016
|
+
type: object
|
|
14017
|
+
properties:
|
|
14018
|
+
inbox_id:
|
|
14019
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
14020
|
+
message_id:
|
|
14021
|
+
$ref: '#/components/schemas/type_messages:MessageId'
|
|
14022
|
+
timestamp:
|
|
14023
|
+
$ref: '#/components/schemas/type_events:Timestamp'
|
|
14024
|
+
type:
|
|
14025
|
+
type: string
|
|
14026
|
+
sub_type:
|
|
14027
|
+
type: string
|
|
14028
|
+
recipients:
|
|
14029
|
+
type: array
|
|
14030
|
+
items:
|
|
14031
|
+
type: string
|
|
14032
|
+
required:
|
|
14033
|
+
- inbox_id
|
|
14034
|
+
- message_id
|
|
14035
|
+
- timestamp
|
|
14036
|
+
- type
|
|
14037
|
+
- sub_type
|
|
14038
|
+
- recipients
|
|
14039
|
+
type_events:MessageComplainedEvent:
|
|
14040
|
+
type: object
|
|
14041
|
+
properties:
|
|
14042
|
+
type:
|
|
14043
|
+
type: string
|
|
14044
|
+
enum:
|
|
14045
|
+
- type: stringLiteral
|
|
14046
|
+
value: event
|
|
14047
|
+
event_type:
|
|
14048
|
+
type: string
|
|
14049
|
+
enum:
|
|
14050
|
+
- type: stringLiteral
|
|
14051
|
+
value: message.complained
|
|
14052
|
+
event_id:
|
|
14053
|
+
$ref: '#/components/schemas/type_events:EventId'
|
|
14054
|
+
complaint:
|
|
14055
|
+
$ref: '#/components/schemas/type_events:Complaint'
|
|
14056
|
+
required:
|
|
14057
|
+
- type
|
|
14058
|
+
- event_type
|
|
14059
|
+
- event_id
|
|
14060
|
+
- complaint
|
|
14061
|
+
type_events:Reject:
|
|
14062
|
+
type: object
|
|
14063
|
+
properties:
|
|
14064
|
+
inbox_id:
|
|
14065
|
+
$ref: '#/components/schemas/type_inboxes:InboxId'
|
|
14066
|
+
message_id:
|
|
14067
|
+
$ref: '#/components/schemas/type_messages:MessageId'
|
|
14068
|
+
timestamp:
|
|
14069
|
+
$ref: '#/components/schemas/type_events:Timestamp'
|
|
14070
|
+
reason:
|
|
14071
|
+
type: string
|
|
14072
|
+
required:
|
|
14073
|
+
- inbox_id
|
|
14074
|
+
- message_id
|
|
14075
|
+
- timestamp
|
|
14076
|
+
- reason
|
|
14077
|
+
type_events:MessageRejectedEvent:
|
|
14078
|
+
type: object
|
|
14079
|
+
properties:
|
|
14080
|
+
type:
|
|
14081
|
+
type: string
|
|
14082
|
+
enum:
|
|
14083
|
+
- type: stringLiteral
|
|
14084
|
+
value: event
|
|
14085
|
+
event_type:
|
|
14086
|
+
type: string
|
|
14087
|
+
enum:
|
|
14088
|
+
- type: stringLiteral
|
|
14089
|
+
value: message.rejected
|
|
14090
|
+
event_id:
|
|
14091
|
+
$ref: '#/components/schemas/type_events:EventId'
|
|
14092
|
+
reject:
|
|
14093
|
+
$ref: '#/components/schemas/type_events:Reject'
|
|
14094
|
+
required:
|
|
14095
|
+
- type
|
|
14096
|
+
- event_type
|
|
14097
|
+
- event_id
|
|
14098
|
+
- reject
|
|
14099
|
+
type_websockets:Subscribe:
|
|
14100
|
+
type: object
|
|
14101
|
+
properties:
|
|
14102
|
+
type:
|
|
14103
|
+
type: string
|
|
14104
|
+
enum:
|
|
14105
|
+
- type: stringLiteral
|
|
14106
|
+
value: subscribe
|
|
14107
|
+
inbox_ids:
|
|
14108
|
+
type: array
|
|
14109
|
+
items:
|
|
14110
|
+
type: string
|
|
14111
|
+
required:
|
|
14112
|
+
- type
|
|
14113
|
+
- inbox_ids
|
|
14114
|
+
|
|
14115
|
+
```
|
|
14116
|
+
|
|
14117
|
+
# List Metrics
|
|
14118
|
+
|
|
14119
|
+
GET https://api.agentmail.to/v0/metrics
|
|
14120
|
+
|
|
14121
|
+
Reference: https://docs.agentmail.to/api-reference/metrics/list
|
|
14122
|
+
|
|
14123
|
+
## OpenAPI Specification
|
|
14124
|
+
|
|
14125
|
+
```yaml
|
|
14126
|
+
openapi: 3.1.1
|
|
14127
|
+
info:
|
|
14128
|
+
title: List Metrics
|
|
14129
|
+
version: endpoint_metrics.list
|
|
14130
|
+
paths:
|
|
14131
|
+
/v0/metrics:
|
|
14132
|
+
get:
|
|
14133
|
+
operationId: list
|
|
14134
|
+
summary: List Metrics
|
|
14135
|
+
tags:
|
|
14136
|
+
- - subpackage_metrics
|
|
14137
|
+
parameters:
|
|
14138
|
+
- name: event_types
|
|
14139
|
+
in: query
|
|
14140
|
+
required: false
|
|
14141
|
+
schema:
|
|
14142
|
+
$ref: '#/components/schemas/type_metrics:MetricEventTypes'
|
|
14143
|
+
- name: start_timestamp
|
|
14144
|
+
in: query
|
|
14145
|
+
required: true
|
|
14146
|
+
schema:
|
|
14147
|
+
$ref: '#/components/schemas/type_metrics:MetricStartTimestamp'
|
|
14148
|
+
- name: end_timestamp
|
|
14149
|
+
in: query
|
|
14150
|
+
required: true
|
|
14151
|
+
schema:
|
|
14152
|
+
$ref: '#/components/schemas/type_metrics:MetricEndTimestamp'
|
|
14153
|
+
- name: Authorization
|
|
14154
|
+
in: header
|
|
14155
|
+
description: >-
|
|
14156
|
+
Bearer authentication of the form `Bearer <token>`, where token is
|
|
14157
|
+
your auth token.
|
|
14158
|
+
required: true
|
|
14159
|
+
schema:
|
|
14160
|
+
type: string
|
|
14161
|
+
responses:
|
|
14162
|
+
'200':
|
|
14163
|
+
description: Response with status 200
|
|
14164
|
+
content:
|
|
14165
|
+
application/json:
|
|
14166
|
+
schema:
|
|
14167
|
+
$ref: '#/components/schemas/type_metrics:ListMetricsResponse'
|
|
14168
|
+
'404':
|
|
14169
|
+
description: Error response with status 404
|
|
14170
|
+
content: {}
|
|
14171
|
+
components:
|
|
14172
|
+
schemas:
|
|
14173
|
+
type_metrics:MetricEventType:
|
|
14174
|
+
type: string
|
|
14175
|
+
enum:
|
|
14176
|
+
- value: message.sent
|
|
14177
|
+
- value: message.delivered
|
|
14178
|
+
- value: message.bounced
|
|
14179
|
+
- value: message.delayed
|
|
14180
|
+
- value: message.rejected
|
|
14181
|
+
- value: message.complained
|
|
14182
|
+
- value: message.received
|
|
14183
|
+
type_metrics:MetricEventTypes:
|
|
14184
|
+
type: array
|
|
14185
|
+
items:
|
|
14186
|
+
$ref: '#/components/schemas/type_metrics:MetricEventType'
|
|
14187
|
+
type_metrics:MetricStartTimestamp:
|
|
14188
|
+
type: string
|
|
14189
|
+
format: date-time
|
|
14190
|
+
type_metrics:MetricEndTimestamp:
|
|
14191
|
+
type: string
|
|
14192
|
+
format: date-time
|
|
14193
|
+
type_metrics:MetricTimestamp:
|
|
14194
|
+
type: string
|
|
14195
|
+
format: date-time
|
|
14196
|
+
type_metrics:MessageMetrics:
|
|
14197
|
+
type: object
|
|
14198
|
+
properties:
|
|
14199
|
+
sent:
|
|
14200
|
+
type: array
|
|
14201
|
+
items:
|
|
14202
|
+
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
14203
|
+
delivered:
|
|
14204
|
+
type: array
|
|
14205
|
+
items:
|
|
14206
|
+
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
14207
|
+
bounced:
|
|
14208
|
+
type: array
|
|
14209
|
+
items:
|
|
14210
|
+
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
14211
|
+
delayed:
|
|
14212
|
+
type: array
|
|
14213
|
+
items:
|
|
14214
|
+
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
14215
|
+
rejected:
|
|
14216
|
+
type: array
|
|
14217
|
+
items:
|
|
14218
|
+
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
14219
|
+
complained:
|
|
14220
|
+
type: array
|
|
14221
|
+
items:
|
|
14222
|
+
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
14223
|
+
received:
|
|
14224
|
+
type: array
|
|
12731
14225
|
items:
|
|
12732
14226
|
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
12733
14227
|
type_metrics:ListMetricsResponse:
|
|
@@ -17217,8 +18711,6 @@ components:
|
|
|
17217
18711
|
properties:
|
|
17218
18712
|
domain_id:
|
|
17219
18713
|
$ref: '#/components/schemas/type_domains:DomainId'
|
|
17220
|
-
domain:
|
|
17221
|
-
$ref: '#/components/schemas/type_domains:DomainName'
|
|
17222
18714
|
status:
|
|
17223
18715
|
$ref: '#/components/schemas/type_domains:VerificationStatus'
|
|
17224
18716
|
feedback_enabled:
|
|
@@ -17237,7 +18729,6 @@ components:
|
|
|
17237
18729
|
format: date-time
|
|
17238
18730
|
required:
|
|
17239
18731
|
- domain_id
|
|
17240
|
-
- domain
|
|
17241
18732
|
- status
|
|
17242
18733
|
- feedback_enabled
|
|
17243
18734
|
- records
|