@flowmails/flowmails-sdk 2.0.0 → 2.1.0
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/CHANGELOG.md +16 -0
- package/README.md +45 -1
- package/dist/index.cjs +172 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +341 -12
- package/dist/index.d.ts +341 -12
- package/dist/index.js +172 -3
- package/dist/index.js.map +1 -1
- package/openapi.json +1245 -249
- package/package.json +1 -1
package/openapi.json
CHANGED
|
@@ -482,7 +482,7 @@
|
|
|
482
482
|
],
|
|
483
483
|
"get": {
|
|
484
484
|
"operationId": "listEvents",
|
|
485
|
-
"summary": "Read the
|
|
485
|
+
"summary": "Read the event log. One row per received message (routing facts plus the subject line — never a body), plus one row per delivery-status report for a message this account sent.",
|
|
486
486
|
"tags": [
|
|
487
487
|
"listen"
|
|
488
488
|
],
|
|
@@ -524,8 +524,11 @@
|
|
|
524
524
|
"event": {
|
|
525
525
|
"type": "string",
|
|
526
526
|
"enum": [
|
|
527
|
-
"inbound.received"
|
|
528
|
-
|
|
527
|
+
"inbound.received",
|
|
528
|
+
"message.delivered",
|
|
529
|
+
"message.bounced"
|
|
530
|
+
],
|
|
531
|
+
"description": "What happened. `inbound.received` is an inbound message; `message.delivered` / `message.bounced` are delivery-status reports for a message this account sent, arriving through their own internal door (`POST /internal/delivery-events`). A deferred bounce (`4.x.x`) is a lifecycle state, not an event."
|
|
529
532
|
},
|
|
530
533
|
"recipient": {
|
|
531
534
|
"type": "string"
|
|
@@ -1075,7 +1078,7 @@
|
|
|
1075
1078
|
],
|
|
1076
1079
|
"get": {
|
|
1077
1080
|
"operationId": "getEmail",
|
|
1078
|
-
"summary": "Fetch one received message's content — the body is fetched, never pushed. Accepts the SMTP `Message-ID` or the
|
|
1081
|
+
"summary": "Fetch one received message's content — the body is fetched, never pushed. Accepts the SMTP `Message-ID` or the mailstore's UUIDv7 row id.",
|
|
1079
1082
|
"tags": [
|
|
1080
1083
|
"listen"
|
|
1081
1084
|
],
|
|
@@ -1094,7 +1097,7 @@
|
|
|
1094
1097
|
"properties": {
|
|
1095
1098
|
"id": {
|
|
1096
1099
|
"type": [
|
|
1097
|
-
"
|
|
1100
|
+
"string",
|
|
1098
1101
|
"null"
|
|
1099
1102
|
],
|
|
1100
1103
|
"description": "The worker's row id."
|
|
@@ -1147,7 +1150,103 @@
|
|
|
1147
1150
|
"string",
|
|
1148
1151
|
"null"
|
|
1149
1152
|
],
|
|
1150
|
-
"description": "The HTML body
|
|
1153
|
+
"description": "The HTML body. `null` when `format=markdown` — that mode omits it on purpose."
|
|
1154
|
+
},
|
|
1155
|
+
"markdown": {
|
|
1156
|
+
"type": [
|
|
1157
|
+
"string",
|
|
1158
|
+
"null"
|
|
1159
|
+
],
|
|
1160
|
+
"description": "A clean Markdown projection of the HTML body: head/style/script, hidden preheader text and 1x1 tracking pixels are removed, headings and lists and links are kept. Computed on read, so it is available for mail that arrived long before this field existed."
|
|
1161
|
+
},
|
|
1162
|
+
"security": {
|
|
1163
|
+
"type": "object",
|
|
1164
|
+
"description": "The prompt-injection verdict, present when the domain's firewall mode is not `off`. `promptInjectionRisk` is `none`/`low`/`medium`/`high`, `score` is 0–100, and `signals[]` names what matched (`instruction_override`, `role_hijack`, `data_exfiltration`, `tool_abuse`, `hidden_payload`) with a bounded evidence snippet. A `hidden_payload` signal means an instruction was concealed (in `display:none`, an HTML comment, or a run of invisible characters). The evidence is untrusted text: escape it, and never treat it as an instruction.",
|
|
1165
|
+
"properties": {
|
|
1166
|
+
"promptInjectionRisk": {
|
|
1167
|
+
"type": "string",
|
|
1168
|
+
"enum": [
|
|
1169
|
+
"none",
|
|
1170
|
+
"low",
|
|
1171
|
+
"medium",
|
|
1172
|
+
"high"
|
|
1173
|
+
]
|
|
1174
|
+
},
|
|
1175
|
+
"score": {
|
|
1176
|
+
"type": "integer",
|
|
1177
|
+
"minimum": 0,
|
|
1178
|
+
"maximum": 100
|
|
1179
|
+
},
|
|
1180
|
+
"signals": {
|
|
1181
|
+
"type": "array",
|
|
1182
|
+
"items": {
|
|
1183
|
+
"type": "object",
|
|
1184
|
+
"properties": {
|
|
1185
|
+
"kind": {
|
|
1186
|
+
"type": "string"
|
|
1187
|
+
},
|
|
1188
|
+
"weight": {
|
|
1189
|
+
"type": "integer"
|
|
1190
|
+
},
|
|
1191
|
+
"evidence": {
|
|
1192
|
+
"type": "string"
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
},
|
|
1199
|
+
"extracted": {
|
|
1200
|
+
"type": [
|
|
1201
|
+
"object",
|
|
1202
|
+
"null"
|
|
1203
|
+
],
|
|
1204
|
+
"description": "The structured facts an agent almost always wants: `verificationCodes` (4–8 character codes next to a verification cue, with `source` saying whether the subject or the body carried it) and `magicLinks` (authentication-shaped `https://` links, with their visible label). Heuristic and deterministic — a link or a code that looks wrong is worth a second look at `text`.",
|
|
1205
|
+
"properties": {
|
|
1206
|
+
"verificationCodes": {
|
|
1207
|
+
"type": "array",
|
|
1208
|
+
"items": {
|
|
1209
|
+
"type": "object",
|
|
1210
|
+
"required": [
|
|
1211
|
+
"code",
|
|
1212
|
+
"source"
|
|
1213
|
+
],
|
|
1214
|
+
"properties": {
|
|
1215
|
+
"code": {
|
|
1216
|
+
"type": "string"
|
|
1217
|
+
},
|
|
1218
|
+
"source": {
|
|
1219
|
+
"type": "string",
|
|
1220
|
+
"enum": [
|
|
1221
|
+
"subject",
|
|
1222
|
+
"body"
|
|
1223
|
+
]
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
},
|
|
1228
|
+
"magicLinks": {
|
|
1229
|
+
"type": "array",
|
|
1230
|
+
"items": {
|
|
1231
|
+
"type": "object",
|
|
1232
|
+
"required": [
|
|
1233
|
+
"url"
|
|
1234
|
+
],
|
|
1235
|
+
"properties": {
|
|
1236
|
+
"url": {
|
|
1237
|
+
"type": "string",
|
|
1238
|
+
"format": "uri"
|
|
1239
|
+
},
|
|
1240
|
+
"label": {
|
|
1241
|
+
"type": [
|
|
1242
|
+
"string",
|
|
1243
|
+
"null"
|
|
1244
|
+
]
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1151
1250
|
},
|
|
1152
1251
|
"receivedAt": {
|
|
1153
1252
|
"type": [
|
|
@@ -1160,6 +1259,13 @@
|
|
|
1160
1259
|
"items": {
|
|
1161
1260
|
"type": "object",
|
|
1162
1261
|
"properties": {
|
|
1262
|
+
"id": {
|
|
1263
|
+
"type": [
|
|
1264
|
+
"string",
|
|
1265
|
+
"null"
|
|
1266
|
+
],
|
|
1267
|
+
"description": "The attachment id — what `GET /api/agent/messages/{messageId}/attachments/{attachmentId}/text` takes."
|
|
1268
|
+
},
|
|
1163
1269
|
"filename": {
|
|
1164
1270
|
"type": [
|
|
1165
1271
|
"string",
|
|
@@ -1193,7 +1299,7 @@
|
|
|
1193
1299
|
}
|
|
1194
1300
|
},
|
|
1195
1301
|
"400": {
|
|
1196
|
-
"description": "A blank `messageId`.",
|
|
1302
|
+
"description": "A blank `messageId`, or a `format` that is neither `full` nor `markdown`.",
|
|
1197
1303
|
"content": {
|
|
1198
1304
|
"application/json": {
|
|
1199
1305
|
"schema": {
|
|
@@ -1295,7 +1401,7 @@
|
|
|
1295
1401
|
"name": "messageId",
|
|
1296
1402
|
"in": "path",
|
|
1297
1403
|
"required": true,
|
|
1298
|
-
"description": "The SMTP `Message-ID` from an event row, or the
|
|
1404
|
+
"description": "The SMTP `Message-ID` from an event row, or the mailstore UUIDv7 row id.",
|
|
1299
1405
|
"schema": {
|
|
1300
1406
|
"type": "string"
|
|
1301
1407
|
}
|
|
@@ -1308,19 +1414,33 @@
|
|
|
1308
1414
|
"schema": {
|
|
1309
1415
|
"type": "string"
|
|
1310
1416
|
}
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
"name": "format",
|
|
1420
|
+
"in": "query",
|
|
1421
|
+
"required": false,
|
|
1422
|
+
"description": "`full` (the default) returns the raw HTML alongside the plain text. `markdown` omits `html` and returns the clean `markdown` projection instead — the same content for a fraction of the tokens. Both modes include `markdown` and `extracted` when the message has them.",
|
|
1423
|
+
"schema": {
|
|
1424
|
+
"type": "string",
|
|
1425
|
+
"enum": [
|
|
1426
|
+
"full",
|
|
1427
|
+
"markdown"
|
|
1428
|
+
],
|
|
1429
|
+
"default": "full"
|
|
1430
|
+
}
|
|
1311
1431
|
}
|
|
1312
1432
|
]
|
|
1313
1433
|
}
|
|
1314
1434
|
},
|
|
1315
|
-
"/api/agent/
|
|
1435
|
+
"/api/agent/messages/{messageId}/attachments/{attachmentId}/text": {
|
|
1316
1436
|
"servers": [
|
|
1317
1437
|
{
|
|
1318
1438
|
"url": "https://sdk.flowmails.net"
|
|
1319
1439
|
}
|
|
1320
1440
|
],
|
|
1321
1441
|
"get": {
|
|
1322
|
-
"operationId": "
|
|
1323
|
-
"summary": "
|
|
1442
|
+
"operationId": "getAttachmentText",
|
|
1443
|
+
"summary": "Read one attachment as text. Plain text, CSV, Markdown, HTML, JSON, XML, `.docx` and PDF are supported; anything else answers `supported: false` with a reason instead of an error.",
|
|
1324
1444
|
"tags": [
|
|
1325
1445
|
"listen"
|
|
1326
1446
|
],
|
|
@@ -1337,68 +1457,46 @@
|
|
|
1337
1457
|
"schema": {
|
|
1338
1458
|
"type": "object",
|
|
1339
1459
|
"required": [
|
|
1340
|
-
"
|
|
1341
|
-
"
|
|
1460
|
+
"supported",
|
|
1461
|
+
"truncated"
|
|
1342
1462
|
],
|
|
1343
1463
|
"properties": {
|
|
1344
|
-
"
|
|
1345
|
-
"type": "
|
|
1346
|
-
"
|
|
1347
|
-
"type": "object",
|
|
1348
|
-
"properties": {
|
|
1349
|
-
"id": {
|
|
1350
|
-
"type": [
|
|
1351
|
-
"integer",
|
|
1352
|
-
"null"
|
|
1353
|
-
]
|
|
1354
|
-
},
|
|
1355
|
-
"messageId": {
|
|
1356
|
-
"type": "string"
|
|
1357
|
-
},
|
|
1358
|
-
"from": {
|
|
1359
|
-
"type": [
|
|
1360
|
-
"string",
|
|
1361
|
-
"null"
|
|
1362
|
-
]
|
|
1363
|
-
},
|
|
1364
|
-
"fromName": {
|
|
1365
|
-
"type": [
|
|
1366
|
-
"string",
|
|
1367
|
-
"null"
|
|
1368
|
-
]
|
|
1369
|
-
},
|
|
1370
|
-
"to": {
|
|
1371
|
-
"type": [
|
|
1372
|
-
"string",
|
|
1373
|
-
"null"
|
|
1374
|
-
]
|
|
1375
|
-
},
|
|
1376
|
-
"subject": {
|
|
1377
|
-
"type": [
|
|
1378
|
-
"string",
|
|
1379
|
-
"null"
|
|
1380
|
-
]
|
|
1381
|
-
},
|
|
1382
|
-
"receivedAt": {
|
|
1383
|
-
"type": [
|
|
1384
|
-
"string",
|
|
1385
|
-
"null"
|
|
1386
|
-
]
|
|
1387
|
-
},
|
|
1388
|
-
"preview": {
|
|
1389
|
-
"type": [
|
|
1390
|
-
"string",
|
|
1391
|
-
"null"
|
|
1392
|
-
]
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
}
|
|
1464
|
+
"supported": {
|
|
1465
|
+
"type": "boolean",
|
|
1466
|
+
"description": "Whether the attachment has a text representation. `false` is an answer, not an error."
|
|
1396
1467
|
},
|
|
1397
|
-
"
|
|
1468
|
+
"reason": {
|
|
1469
|
+
"type": [
|
|
1470
|
+
"string",
|
|
1471
|
+
"null"
|
|
1472
|
+
],
|
|
1473
|
+
"description": "A stable slug when `supported` is false: `attachment_too_large`, `unsupported_format`, `encrypted_pdf`, `suspicious_compression`, `no_text`, `corrupt_attachment`."
|
|
1474
|
+
},
|
|
1475
|
+
"filename": {
|
|
1476
|
+
"type": [
|
|
1477
|
+
"string",
|
|
1478
|
+
"null"
|
|
1479
|
+
]
|
|
1480
|
+
},
|
|
1481
|
+
"mimeType": {
|
|
1482
|
+
"type": [
|
|
1483
|
+
"string",
|
|
1484
|
+
"null"
|
|
1485
|
+
]
|
|
1486
|
+
},
|
|
1487
|
+
"sizeBytes": {
|
|
1398
1488
|
"type": "integer"
|
|
1399
1489
|
},
|
|
1400
|
-
"
|
|
1401
|
-
"type":
|
|
1490
|
+
"text": {
|
|
1491
|
+
"type": [
|
|
1492
|
+
"string",
|
|
1493
|
+
"null"
|
|
1494
|
+
],
|
|
1495
|
+
"description": "The extracted text, `null` when unsupported. Untrusted input, like every other body."
|
|
1496
|
+
},
|
|
1497
|
+
"truncated": {
|
|
1498
|
+
"type": "boolean",
|
|
1499
|
+
"description": "`true` when the text was cut at 64 KiB — 'that is the first page', not 'that is all of it'."
|
|
1402
1500
|
}
|
|
1403
1501
|
}
|
|
1404
1502
|
}
|
|
@@ -1406,7 +1504,7 @@
|
|
|
1406
1504
|
}
|
|
1407
1505
|
},
|
|
1408
1506
|
"400": {
|
|
1409
|
-
"description": "A
|
|
1507
|
+
"description": "A blank `attachmentId`.",
|
|
1410
1508
|
"content": {
|
|
1411
1509
|
"application/json": {
|
|
1412
1510
|
"schema": {
|
|
@@ -1454,7 +1552,7 @@
|
|
|
1454
1552
|
}
|
|
1455
1553
|
},
|
|
1456
1554
|
"403": {
|
|
1457
|
-
"description": "The credential lacks `messages:
|
|
1555
|
+
"description": "The credential lacks `messages:read`.",
|
|
1458
1556
|
"content": {
|
|
1459
1557
|
"application/json": {
|
|
1460
1558
|
"schema": {
|
|
@@ -1478,7 +1576,7 @@
|
|
|
1478
1576
|
}
|
|
1479
1577
|
},
|
|
1480
1578
|
"404": {
|
|
1481
|
-
"description": "
|
|
1579
|
+
"description": "No such message, or no such attachment on it, in this tenant's mailboxes.",
|
|
1482
1580
|
"content": {
|
|
1483
1581
|
"application/json": {
|
|
1484
1582
|
"schema": {
|
|
@@ -1526,64 +1624,47 @@
|
|
|
1526
1624
|
}
|
|
1527
1625
|
}
|
|
1528
1626
|
},
|
|
1529
|
-
"description": "Requires the `messages:
|
|
1627
|
+
"description": "Requires the `messages:read` scope. The MCP tool `get_attachment_text` calls this operation.",
|
|
1530
1628
|
"parameters": [
|
|
1531
1629
|
{
|
|
1532
|
-
"name": "
|
|
1533
|
-
"in": "
|
|
1630
|
+
"name": "messageId",
|
|
1631
|
+
"in": "path",
|
|
1534
1632
|
"required": true,
|
|
1535
|
-
"description": "The
|
|
1633
|
+
"description": "The message the attachment belongs to — the same id the message read accepts (SMTP `Message-ID` or mailstore row id).",
|
|
1536
1634
|
"schema": {
|
|
1537
1635
|
"type": "string"
|
|
1538
1636
|
}
|
|
1539
1637
|
},
|
|
1540
1638
|
{
|
|
1541
|
-
"name": "
|
|
1542
|
-
"in": "
|
|
1639
|
+
"name": "attachmentId",
|
|
1640
|
+
"in": "path",
|
|
1543
1641
|
"required": true,
|
|
1544
|
-
"description": "The
|
|
1642
|
+
"description": "The attachment's id, from the `attachments[].id` of a message read.",
|
|
1545
1643
|
"schema": {
|
|
1546
1644
|
"type": "string"
|
|
1547
1645
|
}
|
|
1548
1646
|
},
|
|
1549
1647
|
{
|
|
1550
|
-
"name": "
|
|
1551
|
-
"in": "query",
|
|
1552
|
-
"required": false,
|
|
1553
|
-
"description": "Maximum number of hits to return (default 20).",
|
|
1554
|
-
"schema": {
|
|
1555
|
-
"type": "integer",
|
|
1556
|
-
"minimum": 1
|
|
1557
|
-
}
|
|
1558
|
-
},
|
|
1559
|
-
{
|
|
1560
|
-
"name": "field",
|
|
1648
|
+
"name": "domainId",
|
|
1561
1649
|
"in": "query",
|
|
1562
1650
|
"required": false,
|
|
1563
|
-
"description": "Which
|
|
1651
|
+
"description": "Which of the account's domains to look in. Optional — the platform searches the account's domains in order.",
|
|
1564
1652
|
"schema": {
|
|
1565
|
-
"type": "string"
|
|
1566
|
-
"enum": [
|
|
1567
|
-
"all",
|
|
1568
|
-
"from",
|
|
1569
|
-
"to",
|
|
1570
|
-
"subject",
|
|
1571
|
-
"body"
|
|
1572
|
-
]
|
|
1653
|
+
"type": "string"
|
|
1573
1654
|
}
|
|
1574
1655
|
}
|
|
1575
1656
|
]
|
|
1576
1657
|
}
|
|
1577
1658
|
},
|
|
1578
|
-
"/api/agent/
|
|
1659
|
+
"/api/agent/emails/search": {
|
|
1579
1660
|
"servers": [
|
|
1580
1661
|
{
|
|
1581
1662
|
"url": "https://sdk.flowmails.net"
|
|
1582
1663
|
}
|
|
1583
1664
|
],
|
|
1584
1665
|
"get": {
|
|
1585
|
-
"operationId": "
|
|
1586
|
-
"summary": "
|
|
1666
|
+
"operationId": "searchEmails",
|
|
1667
|
+
"summary": "Search one domain's mailbox — the history path. A hit carries addressing, the subject and a preview; the body is fetched per message.",
|
|
1587
1668
|
"tags": [
|
|
1588
1669
|
"listen"
|
|
1589
1670
|
],
|
|
@@ -1600,34 +1681,10 @@
|
|
|
1600
1681
|
"schema": {
|
|
1601
1682
|
"type": "object",
|
|
1602
1683
|
"required": [
|
|
1603
|
-
"
|
|
1604
|
-
"
|
|
1684
|
+
"messages",
|
|
1685
|
+
"total"
|
|
1605
1686
|
],
|
|
1606
1687
|
"properties": {
|
|
1607
|
-
"threadId": {
|
|
1608
|
-
"type": "string"
|
|
1609
|
-
},
|
|
1610
|
-
"domainId": {
|
|
1611
|
-
"type": [
|
|
1612
|
-
"string",
|
|
1613
|
-
"null"
|
|
1614
|
-
]
|
|
1615
|
-
},
|
|
1616
|
-
"domain": {
|
|
1617
|
-
"type": [
|
|
1618
|
-
"string",
|
|
1619
|
-
"null"
|
|
1620
|
-
]
|
|
1621
|
-
},
|
|
1622
|
-
"total": {
|
|
1623
|
-
"type": "integer"
|
|
1624
|
-
},
|
|
1625
|
-
"hasMoreOlder": {
|
|
1626
|
-
"type": "boolean"
|
|
1627
|
-
},
|
|
1628
|
-
"hasMoreNewer": {
|
|
1629
|
-
"type": "boolean"
|
|
1630
|
-
},
|
|
1631
1688
|
"messages": {
|
|
1632
1689
|
"type": "array",
|
|
1633
1690
|
"items": {
|
|
@@ -1640,10 +1697,7 @@
|
|
|
1640
1697
|
]
|
|
1641
1698
|
},
|
|
1642
1699
|
"messageId": {
|
|
1643
|
-
"type":
|
|
1644
|
-
"string",
|
|
1645
|
-
"null"
|
|
1646
|
-
]
|
|
1700
|
+
"type": "string"
|
|
1647
1701
|
},
|
|
1648
1702
|
"from": {
|
|
1649
1703
|
"type": [
|
|
@@ -1651,31 +1705,31 @@
|
|
|
1651
1705
|
"null"
|
|
1652
1706
|
]
|
|
1653
1707
|
},
|
|
1654
|
-
"
|
|
1708
|
+
"fromName": {
|
|
1655
1709
|
"type": [
|
|
1656
1710
|
"string",
|
|
1657
1711
|
"null"
|
|
1658
1712
|
]
|
|
1659
1713
|
},
|
|
1660
|
-
"
|
|
1714
|
+
"to": {
|
|
1661
1715
|
"type": [
|
|
1662
1716
|
"string",
|
|
1663
1717
|
"null"
|
|
1664
1718
|
]
|
|
1665
1719
|
},
|
|
1666
|
-
"
|
|
1720
|
+
"subject": {
|
|
1667
1721
|
"type": [
|
|
1668
1722
|
"string",
|
|
1669
1723
|
"null"
|
|
1670
1724
|
]
|
|
1671
1725
|
},
|
|
1672
|
-
"
|
|
1726
|
+
"receivedAt": {
|
|
1673
1727
|
"type": [
|
|
1674
1728
|
"string",
|
|
1675
1729
|
"null"
|
|
1676
1730
|
]
|
|
1677
1731
|
},
|
|
1678
|
-
"
|
|
1732
|
+
"preview": {
|
|
1679
1733
|
"type": [
|
|
1680
1734
|
"string",
|
|
1681
1735
|
"null"
|
|
@@ -1683,6 +1737,12 @@
|
|
|
1683
1737
|
}
|
|
1684
1738
|
}
|
|
1685
1739
|
}
|
|
1740
|
+
},
|
|
1741
|
+
"total": {
|
|
1742
|
+
"type": "integer"
|
|
1743
|
+
},
|
|
1744
|
+
"domainId": {
|
|
1745
|
+
"type": "string"
|
|
1686
1746
|
}
|
|
1687
1747
|
}
|
|
1688
1748
|
}
|
|
@@ -1690,7 +1750,7 @@
|
|
|
1690
1750
|
}
|
|
1691
1751
|
},
|
|
1692
1752
|
"400": {
|
|
1693
|
-
"description": "A
|
|
1753
|
+
"description": "A missing `domainId`, a short `q`, or a bad `limit`.",
|
|
1694
1754
|
"content": {
|
|
1695
1755
|
"application/json": {
|
|
1696
1756
|
"schema": {
|
|
@@ -1738,7 +1798,7 @@
|
|
|
1738
1798
|
}
|
|
1739
1799
|
},
|
|
1740
1800
|
"403": {
|
|
1741
|
-
"description": "The credential lacks `messages:
|
|
1801
|
+
"description": "The credential lacks `messages:search`.",
|
|
1742
1802
|
"content": {
|
|
1743
1803
|
"application/json": {
|
|
1744
1804
|
"schema": {
|
|
@@ -1762,7 +1822,7 @@
|
|
|
1762
1822
|
}
|
|
1763
1823
|
},
|
|
1764
1824
|
"404": {
|
|
1765
|
-
"description": "
|
|
1825
|
+
"description": "The domain does not exist, or is not this tenant's.",
|
|
1766
1826
|
"content": {
|
|
1767
1827
|
"application/json": {
|
|
1768
1828
|
"schema": {
|
|
@@ -1810,40 +1870,66 @@
|
|
|
1810
1870
|
}
|
|
1811
1871
|
}
|
|
1812
1872
|
},
|
|
1813
|
-
"description": "Requires the `messages:
|
|
1873
|
+
"description": "Requires the `messages:search` scope. The MCP tool `search_emails` calls this operation.",
|
|
1814
1874
|
"parameters": [
|
|
1815
1875
|
{
|
|
1816
|
-
"name": "
|
|
1817
|
-
"in": "
|
|
1876
|
+
"name": "domainId",
|
|
1877
|
+
"in": "query",
|
|
1818
1878
|
"required": true,
|
|
1819
|
-
"description": "The
|
|
1879
|
+
"description": "The domain to search. Required.",
|
|
1820
1880
|
"schema": {
|
|
1821
1881
|
"type": "string"
|
|
1822
1882
|
}
|
|
1823
1883
|
},
|
|
1824
1884
|
{
|
|
1825
|
-
"name": "
|
|
1885
|
+
"name": "q",
|
|
1826
1886
|
"in": "query",
|
|
1827
|
-
"required":
|
|
1828
|
-
"description": "
|
|
1887
|
+
"required": true,
|
|
1888
|
+
"description": "The search text.",
|
|
1829
1889
|
"schema": {
|
|
1830
1890
|
"type": "string"
|
|
1831
1891
|
}
|
|
1832
|
-
}
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1892
|
+
},
|
|
1893
|
+
{
|
|
1894
|
+
"name": "limit",
|
|
1895
|
+
"in": "query",
|
|
1896
|
+
"required": false,
|
|
1897
|
+
"description": "Maximum number of hits to return (default 20).",
|
|
1898
|
+
"schema": {
|
|
1899
|
+
"type": "integer",
|
|
1900
|
+
"minimum": 1
|
|
1901
|
+
}
|
|
1902
|
+
},
|
|
1903
|
+
{
|
|
1904
|
+
"name": "field",
|
|
1905
|
+
"in": "query",
|
|
1906
|
+
"required": false,
|
|
1907
|
+
"description": "Which field to search. Defaults to the whole message.",
|
|
1908
|
+
"schema": {
|
|
1909
|
+
"type": "string",
|
|
1910
|
+
"enum": [
|
|
1911
|
+
"all",
|
|
1912
|
+
"from",
|
|
1913
|
+
"to",
|
|
1914
|
+
"subject",
|
|
1915
|
+
"body"
|
|
1916
|
+
]
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
]
|
|
1920
|
+
}
|
|
1921
|
+
},
|
|
1922
|
+
"/api/agent/threads/{threadId}": {
|
|
1923
|
+
"servers": [
|
|
1924
|
+
{
|
|
1925
|
+
"url": "https://sdk.flowmails.net"
|
|
1926
|
+
}
|
|
1927
|
+
],
|
|
1928
|
+
"get": {
|
|
1929
|
+
"operationId": "getThread",
|
|
1930
|
+
"summary": "Read one conversation, anchored on the root message's SMTP `Message-ID`. The same projection the single-message read uses.",
|
|
1845
1931
|
"tags": [
|
|
1846
|
-
"
|
|
1932
|
+
"listen"
|
|
1847
1933
|
],
|
|
1848
1934
|
"security": [
|
|
1849
1935
|
{
|
|
@@ -1857,8 +1943,12 @@
|
|
|
1857
1943
|
"application/json": {
|
|
1858
1944
|
"schema": {
|
|
1859
1945
|
"type": "object",
|
|
1946
|
+
"required": [
|
|
1947
|
+
"threadId",
|
|
1948
|
+
"messages"
|
|
1949
|
+
],
|
|
1860
1950
|
"properties": {
|
|
1861
|
-
"
|
|
1951
|
+
"threadId": {
|
|
1862
1952
|
"type": "string"
|
|
1863
1953
|
},
|
|
1864
1954
|
"domainId": {
|
|
@@ -1867,44 +1957,92 @@
|
|
|
1867
1957
|
"null"
|
|
1868
1958
|
]
|
|
1869
1959
|
},
|
|
1870
|
-
"
|
|
1871
|
-
"type": "string",
|
|
1872
|
-
"enum": [
|
|
1873
|
-
"pending",
|
|
1874
|
-
"processing",
|
|
1875
|
-
"done",
|
|
1876
|
-
"failed"
|
|
1877
|
-
]
|
|
1878
|
-
},
|
|
1879
|
-
"labels": {
|
|
1880
|
-
"type": "array",
|
|
1881
|
-
"items": {
|
|
1882
|
-
"type": "string"
|
|
1883
|
-
}
|
|
1884
|
-
},
|
|
1885
|
-
"note": {
|
|
1960
|
+
"domain": {
|
|
1886
1961
|
"type": [
|
|
1887
1962
|
"string",
|
|
1888
1963
|
"null"
|
|
1889
1964
|
]
|
|
1890
1965
|
},
|
|
1891
|
-
"
|
|
1892
|
-
"type":
|
|
1893
|
-
"string",
|
|
1894
|
-
"null"
|
|
1895
|
-
]
|
|
1966
|
+
"total": {
|
|
1967
|
+
"type": "integer"
|
|
1896
1968
|
},
|
|
1897
|
-
"
|
|
1898
|
-
"type":
|
|
1899
|
-
"integer",
|
|
1900
|
-
"null"
|
|
1901
|
-
]
|
|
1969
|
+
"hasMoreOlder": {
|
|
1970
|
+
"type": "boolean"
|
|
1902
1971
|
},
|
|
1903
|
-
"
|
|
1904
|
-
"type": "
|
|
1972
|
+
"hasMoreNewer": {
|
|
1973
|
+
"type": "boolean"
|
|
1905
1974
|
},
|
|
1906
|
-
"
|
|
1907
|
-
"type": "
|
|
1975
|
+
"messages": {
|
|
1976
|
+
"type": "array",
|
|
1977
|
+
"items": {
|
|
1978
|
+
"type": "object",
|
|
1979
|
+
"properties": {
|
|
1980
|
+
"id": {
|
|
1981
|
+
"type": [
|
|
1982
|
+
"integer",
|
|
1983
|
+
"null"
|
|
1984
|
+
]
|
|
1985
|
+
},
|
|
1986
|
+
"messageId": {
|
|
1987
|
+
"type": [
|
|
1988
|
+
"string",
|
|
1989
|
+
"null"
|
|
1990
|
+
]
|
|
1991
|
+
},
|
|
1992
|
+
"from": {
|
|
1993
|
+
"type": [
|
|
1994
|
+
"string",
|
|
1995
|
+
"null"
|
|
1996
|
+
]
|
|
1997
|
+
},
|
|
1998
|
+
"to": {
|
|
1999
|
+
"type": [
|
|
2000
|
+
"string",
|
|
2001
|
+
"null"
|
|
2002
|
+
]
|
|
2003
|
+
},
|
|
2004
|
+
"subject": {
|
|
2005
|
+
"type": [
|
|
2006
|
+
"string",
|
|
2007
|
+
"null"
|
|
2008
|
+
]
|
|
2009
|
+
},
|
|
2010
|
+
"text": {
|
|
2011
|
+
"type": [
|
|
2012
|
+
"string",
|
|
2013
|
+
"null"
|
|
2014
|
+
]
|
|
2015
|
+
},
|
|
2016
|
+
"html": {
|
|
2017
|
+
"type": [
|
|
2018
|
+
"string",
|
|
2019
|
+
"null"
|
|
2020
|
+
]
|
|
2021
|
+
},
|
|
2022
|
+
"markdown": {
|
|
2023
|
+
"type": [
|
|
2024
|
+
"string",
|
|
2025
|
+
"null"
|
|
2026
|
+
]
|
|
2027
|
+
},
|
|
2028
|
+
"extracted": {
|
|
2029
|
+
"type": [
|
|
2030
|
+
"object",
|
|
2031
|
+
"null"
|
|
2032
|
+
]
|
|
2033
|
+
},
|
|
2034
|
+
"receivedAt": {
|
|
2035
|
+
"type": [
|
|
2036
|
+
"string",
|
|
2037
|
+
"null"
|
|
2038
|
+
]
|
|
2039
|
+
},
|
|
2040
|
+
"bodyTruncated": {
|
|
2041
|
+
"type": "integer",
|
|
2042
|
+
"description": "`1` when the worker shortened this member's body — the chain is a bounded window. `0` on the message that anchored the read."
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
1908
2046
|
}
|
|
1909
2047
|
}
|
|
1910
2048
|
}
|
|
@@ -1912,7 +2050,7 @@
|
|
|
1912
2050
|
}
|
|
1913
2051
|
},
|
|
1914
2052
|
"400": {
|
|
1915
|
-
"description": "
|
|
2053
|
+
"description": "A blank `threadId`.",
|
|
1916
2054
|
"content": {
|
|
1917
2055
|
"application/json": {
|
|
1918
2056
|
"schema": {
|
|
@@ -1960,7 +2098,7 @@
|
|
|
1960
2098
|
}
|
|
1961
2099
|
},
|
|
1962
2100
|
"403": {
|
|
1963
|
-
"description": "The credential lacks `messages:
|
|
2101
|
+
"description": "The credential lacks `messages:read`.",
|
|
1964
2102
|
"content": {
|
|
1965
2103
|
"application/json": {
|
|
1966
2104
|
"schema": {
|
|
@@ -1983,8 +2121,32 @@
|
|
|
1983
2121
|
}
|
|
1984
2122
|
}
|
|
1985
2123
|
},
|
|
1986
|
-
"
|
|
1987
|
-
"description": "
|
|
2124
|
+
"404": {
|
|
2125
|
+
"description": "No such conversation in this tenant's mailboxes.",
|
|
2126
|
+
"content": {
|
|
2127
|
+
"application/json": {
|
|
2128
|
+
"schema": {
|
|
2129
|
+
"type": "object",
|
|
2130
|
+
"required": [
|
|
2131
|
+
"error"
|
|
2132
|
+
],
|
|
2133
|
+
"properties": {
|
|
2134
|
+
"error": {
|
|
2135
|
+
"type": "string",
|
|
2136
|
+
"description": "A typed slug, never prose."
|
|
2137
|
+
},
|
|
2138
|
+
"required": {
|
|
2139
|
+
"type": "string",
|
|
2140
|
+
"description": "The scope the call needed — present on a 403 `scope_denied`."
|
|
2141
|
+
}
|
|
2142
|
+
},
|
|
2143
|
+
"additionalProperties": true
|
|
2144
|
+
}
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
},
|
|
2148
|
+
"502": {
|
|
2149
|
+
"description": "The mailbox could not be reached.",
|
|
1988
2150
|
"content": {
|
|
1989
2151
|
"application/json": {
|
|
1990
2152
|
"schema": {
|
|
@@ -2008,45 +2170,38 @@
|
|
|
2008
2170
|
}
|
|
2009
2171
|
}
|
|
2010
2172
|
},
|
|
2011
|
-
"description": "Requires the `messages:
|
|
2173
|
+
"description": "Requires the `messages:read` scope. The MCP tool `get_thread` calls this operation.",
|
|
2012
2174
|
"parameters": [
|
|
2013
2175
|
{
|
|
2014
|
-
"name": "
|
|
2176
|
+
"name": "threadId",
|
|
2015
2177
|
"in": "path",
|
|
2016
2178
|
"required": true,
|
|
2017
|
-
"description": "The
|
|
2179
|
+
"description": "The conversation root's SMTP `Message-ID`.",
|
|
2018
2180
|
"schema": {
|
|
2019
2181
|
"type": "string"
|
|
2020
2182
|
}
|
|
2021
|
-
}
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
"
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
"properties": {
|
|
2030
|
-
"domainId": {
|
|
2031
|
-
"type": "string",
|
|
2032
|
-
"description": "Which of the account's domains the message is on."
|
|
2033
|
-
}
|
|
2034
|
-
}
|
|
2035
|
-
}
|
|
2183
|
+
},
|
|
2184
|
+
{
|
|
2185
|
+
"name": "domainId",
|
|
2186
|
+
"in": "query",
|
|
2187
|
+
"required": false,
|
|
2188
|
+
"description": "Which of the account's domains to look in.",
|
|
2189
|
+
"schema": {
|
|
2190
|
+
"type": "string"
|
|
2036
2191
|
}
|
|
2037
2192
|
}
|
|
2038
|
-
|
|
2193
|
+
]
|
|
2039
2194
|
}
|
|
2040
2195
|
},
|
|
2041
|
-
"/api/agent/messages/{messageId}/
|
|
2196
|
+
"/api/agent/messages/{messageId}/claim": {
|
|
2042
2197
|
"servers": [
|
|
2043
2198
|
{
|
|
2044
2199
|
"url": "https://sdk.flowmails.net"
|
|
2045
2200
|
}
|
|
2046
2201
|
],
|
|
2047
2202
|
"post": {
|
|
2048
|
-
"operationId": "
|
|
2049
|
-
"summary": "
|
|
2203
|
+
"operationId": "claimMessage",
|
|
2204
|
+
"summary": "Claim a message for processing. The claim is a mutex with an expiry: a second live claim by another credential is refused.",
|
|
2050
2205
|
"tags": [
|
|
2051
2206
|
"state"
|
|
2052
2207
|
],
|
|
@@ -2188,8 +2343,8 @@
|
|
|
2188
2343
|
}
|
|
2189
2344
|
}
|
|
2190
2345
|
},
|
|
2191
|
-
"
|
|
2192
|
-
"description": "
|
|
2346
|
+
"409": {
|
|
2347
|
+
"description": "Another credential holds a live claim.",
|
|
2193
2348
|
"content": {
|
|
2194
2349
|
"application/json": {
|
|
2195
2350
|
"schema": {
|
|
@@ -2213,13 +2368,13 @@
|
|
|
2213
2368
|
}
|
|
2214
2369
|
}
|
|
2215
2370
|
},
|
|
2216
|
-
"description": "Requires the `messages:claim` scope. The MCP tool `
|
|
2371
|
+
"description": "Requires the `messages:claim` scope. The MCP tool `claim_message` calls this operation.",
|
|
2217
2372
|
"parameters": [
|
|
2218
2373
|
{
|
|
2219
2374
|
"name": "messageId",
|
|
2220
2375
|
"in": "path",
|
|
2221
2376
|
"required": true,
|
|
2222
|
-
"description": "The message id the agent
|
|
2377
|
+
"description": "The message id the agent is claiming.",
|
|
2223
2378
|
"schema": {
|
|
2224
2379
|
"type": "string"
|
|
2225
2380
|
}
|
|
@@ -2233,24 +2388,8 @@
|
|
|
2233
2388
|
"type": "object",
|
|
2234
2389
|
"properties": {
|
|
2235
2390
|
"domainId": {
|
|
2236
|
-
"type": "string"
|
|
2237
|
-
},
|
|
2238
|
-
"state": {
|
|
2239
2391
|
"type": "string",
|
|
2240
|
-
"
|
|
2241
|
-
"done",
|
|
2242
|
-
"failed"
|
|
2243
|
-
],
|
|
2244
|
-
"description": "How the agent finished with it."
|
|
2245
|
-
},
|
|
2246
|
-
"note": {
|
|
2247
|
-
"type": "string"
|
|
2248
|
-
},
|
|
2249
|
-
"labels": {
|
|
2250
|
-
"type": "array",
|
|
2251
|
-
"items": {
|
|
2252
|
-
"type": "string"
|
|
2253
|
-
}
|
|
2392
|
+
"description": "Which of the account's domains the message is on."
|
|
2254
2393
|
}
|
|
2255
2394
|
}
|
|
2256
2395
|
}
|
|
@@ -2259,15 +2398,15 @@
|
|
|
2259
2398
|
}
|
|
2260
2399
|
}
|
|
2261
2400
|
},
|
|
2262
|
-
"/api/agent/
|
|
2401
|
+
"/api/agent/messages/{messageId}/complete": {
|
|
2263
2402
|
"servers": [
|
|
2264
2403
|
{
|
|
2265
2404
|
"url": "https://sdk.flowmails.net"
|
|
2266
2405
|
}
|
|
2267
2406
|
],
|
|
2268
|
-
"
|
|
2269
|
-
"operationId": "
|
|
2270
|
-
"summary": "
|
|
2407
|
+
"post": {
|
|
2408
|
+
"operationId": "completeMessage",
|
|
2409
|
+
"summary": "Record that the agent has finished with a message. The platform records and nothing more — it never advances a state on its own.",
|
|
2271
2410
|
"tags": [
|
|
2272
2411
|
"state"
|
|
2273
2412
|
],
|
|
@@ -2284,11 +2423,232 @@
|
|
|
2284
2423
|
"schema": {
|
|
2285
2424
|
"type": "object",
|
|
2286
2425
|
"properties": {
|
|
2287
|
-
"
|
|
2288
|
-
"type": "
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2426
|
+
"messageId": {
|
|
2427
|
+
"type": "string"
|
|
2428
|
+
},
|
|
2429
|
+
"domainId": {
|
|
2430
|
+
"type": [
|
|
2431
|
+
"string",
|
|
2432
|
+
"null"
|
|
2433
|
+
]
|
|
2434
|
+
},
|
|
2435
|
+
"state": {
|
|
2436
|
+
"type": "string",
|
|
2437
|
+
"enum": [
|
|
2438
|
+
"pending",
|
|
2439
|
+
"processing",
|
|
2440
|
+
"done",
|
|
2441
|
+
"failed"
|
|
2442
|
+
]
|
|
2443
|
+
},
|
|
2444
|
+
"labels": {
|
|
2445
|
+
"type": "array",
|
|
2446
|
+
"items": {
|
|
2447
|
+
"type": "string"
|
|
2448
|
+
}
|
|
2449
|
+
},
|
|
2450
|
+
"note": {
|
|
2451
|
+
"type": [
|
|
2452
|
+
"string",
|
|
2453
|
+
"null"
|
|
2454
|
+
]
|
|
2455
|
+
},
|
|
2456
|
+
"claimedBy": {
|
|
2457
|
+
"type": [
|
|
2458
|
+
"string",
|
|
2459
|
+
"null"
|
|
2460
|
+
]
|
|
2461
|
+
},
|
|
2462
|
+
"claimedAt": {
|
|
2463
|
+
"type": [
|
|
2464
|
+
"integer",
|
|
2465
|
+
"null"
|
|
2466
|
+
]
|
|
2467
|
+
},
|
|
2468
|
+
"createdAt": {
|
|
2469
|
+
"type": "integer"
|
|
2470
|
+
},
|
|
2471
|
+
"updatedAt": {
|
|
2472
|
+
"type": "integer"
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
}
|
|
2478
|
+
},
|
|
2479
|
+
"400": {
|
|
2480
|
+
"description": "Invalid JSON, or a missing `messageId`.",
|
|
2481
|
+
"content": {
|
|
2482
|
+
"application/json": {
|
|
2483
|
+
"schema": {
|
|
2484
|
+
"type": "object",
|
|
2485
|
+
"required": [
|
|
2486
|
+
"error"
|
|
2487
|
+
],
|
|
2488
|
+
"properties": {
|
|
2489
|
+
"error": {
|
|
2490
|
+
"type": "string",
|
|
2491
|
+
"description": "A typed slug, never prose."
|
|
2492
|
+
},
|
|
2493
|
+
"required": {
|
|
2494
|
+
"type": "string",
|
|
2495
|
+
"description": "The scope the call needed — present on a 403 `scope_denied`."
|
|
2496
|
+
}
|
|
2497
|
+
},
|
|
2498
|
+
"additionalProperties": true
|
|
2499
|
+
}
|
|
2500
|
+
}
|
|
2501
|
+
}
|
|
2502
|
+
},
|
|
2503
|
+
"401": {
|
|
2504
|
+
"description": "Missing, malformed or revoked bearer.",
|
|
2505
|
+
"content": {
|
|
2506
|
+
"application/json": {
|
|
2507
|
+
"schema": {
|
|
2508
|
+
"type": "object",
|
|
2509
|
+
"required": [
|
|
2510
|
+
"error"
|
|
2511
|
+
],
|
|
2512
|
+
"properties": {
|
|
2513
|
+
"error": {
|
|
2514
|
+
"type": "string",
|
|
2515
|
+
"description": "A typed slug, never prose."
|
|
2516
|
+
},
|
|
2517
|
+
"required": {
|
|
2518
|
+
"type": "string",
|
|
2519
|
+
"description": "The scope the call needed — present on a 403 `scope_denied`."
|
|
2520
|
+
}
|
|
2521
|
+
},
|
|
2522
|
+
"additionalProperties": true
|
|
2523
|
+
}
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
},
|
|
2527
|
+
"403": {
|
|
2528
|
+
"description": "The credential lacks `messages:claim`.",
|
|
2529
|
+
"content": {
|
|
2530
|
+
"application/json": {
|
|
2531
|
+
"schema": {
|
|
2532
|
+
"type": "object",
|
|
2533
|
+
"required": [
|
|
2534
|
+
"error"
|
|
2535
|
+
],
|
|
2536
|
+
"properties": {
|
|
2537
|
+
"error": {
|
|
2538
|
+
"type": "string",
|
|
2539
|
+
"description": "A typed slug, never prose."
|
|
2540
|
+
},
|
|
2541
|
+
"required": {
|
|
2542
|
+
"type": "string",
|
|
2543
|
+
"description": "The scope the call needed — present on a 403 `scope_denied`."
|
|
2544
|
+
}
|
|
2545
|
+
},
|
|
2546
|
+
"additionalProperties": true
|
|
2547
|
+
}
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
},
|
|
2551
|
+
"404": {
|
|
2552
|
+
"description": "No such message state row.",
|
|
2553
|
+
"content": {
|
|
2554
|
+
"application/json": {
|
|
2555
|
+
"schema": {
|
|
2556
|
+
"type": "object",
|
|
2557
|
+
"required": [
|
|
2558
|
+
"error"
|
|
2559
|
+
],
|
|
2560
|
+
"properties": {
|
|
2561
|
+
"error": {
|
|
2562
|
+
"type": "string",
|
|
2563
|
+
"description": "A typed slug, never prose."
|
|
2564
|
+
},
|
|
2565
|
+
"required": {
|
|
2566
|
+
"type": "string",
|
|
2567
|
+
"description": "The scope the call needed — present on a 403 `scope_denied`."
|
|
2568
|
+
}
|
|
2569
|
+
},
|
|
2570
|
+
"additionalProperties": true
|
|
2571
|
+
}
|
|
2572
|
+
}
|
|
2573
|
+
}
|
|
2574
|
+
}
|
|
2575
|
+
},
|
|
2576
|
+
"description": "Requires the `messages:claim` scope. The MCP tool `complete_message` calls this operation.",
|
|
2577
|
+
"parameters": [
|
|
2578
|
+
{
|
|
2579
|
+
"name": "messageId",
|
|
2580
|
+
"in": "path",
|
|
2581
|
+
"required": true,
|
|
2582
|
+
"description": "The message id the agent has finished with.",
|
|
2583
|
+
"schema": {
|
|
2584
|
+
"type": "string"
|
|
2585
|
+
}
|
|
2586
|
+
}
|
|
2587
|
+
],
|
|
2588
|
+
"requestBody": {
|
|
2589
|
+
"required": false,
|
|
2590
|
+
"content": {
|
|
2591
|
+
"application/json": {
|
|
2592
|
+
"schema": {
|
|
2593
|
+
"type": "object",
|
|
2594
|
+
"properties": {
|
|
2595
|
+
"domainId": {
|
|
2596
|
+
"type": "string"
|
|
2597
|
+
},
|
|
2598
|
+
"state": {
|
|
2599
|
+
"type": "string",
|
|
2600
|
+
"enum": [
|
|
2601
|
+
"done",
|
|
2602
|
+
"failed"
|
|
2603
|
+
],
|
|
2604
|
+
"description": "How the agent finished with it."
|
|
2605
|
+
},
|
|
2606
|
+
"note": {
|
|
2607
|
+
"type": "string"
|
|
2608
|
+
},
|
|
2609
|
+
"labels": {
|
|
2610
|
+
"type": "array",
|
|
2611
|
+
"items": {
|
|
2612
|
+
"type": "string"
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
}
|
|
2620
|
+
}
|
|
2621
|
+
},
|
|
2622
|
+
"/api/agent/message-states": {
|
|
2623
|
+
"servers": [
|
|
2624
|
+
{
|
|
2625
|
+
"url": "https://sdk.flowmails.net"
|
|
2626
|
+
}
|
|
2627
|
+
],
|
|
2628
|
+
"get": {
|
|
2629
|
+
"operationId": "listMessageStates",
|
|
2630
|
+
"summary": "Read back the agent's own per-message state.",
|
|
2631
|
+
"tags": [
|
|
2632
|
+
"state"
|
|
2633
|
+
],
|
|
2634
|
+
"security": [
|
|
2635
|
+
{
|
|
2636
|
+
"bearerAuth": []
|
|
2637
|
+
}
|
|
2638
|
+
],
|
|
2639
|
+
"responses": {
|
|
2640
|
+
"200": {
|
|
2641
|
+
"description": "Success.",
|
|
2642
|
+
"content": {
|
|
2643
|
+
"application/json": {
|
|
2644
|
+
"schema": {
|
|
2645
|
+
"type": "object",
|
|
2646
|
+
"properties": {
|
|
2647
|
+
"states": {
|
|
2648
|
+
"type": "array",
|
|
2649
|
+
"items": {
|
|
2650
|
+
"type": "object",
|
|
2651
|
+
"properties": {
|
|
2292
2652
|
"messageId": {
|
|
2293
2653
|
"type": "string"
|
|
2294
2654
|
},
|
|
@@ -2394,7 +2754,7 @@
|
|
|
2394
2754
|
}
|
|
2395
2755
|
}
|
|
2396
2756
|
},
|
|
2397
|
-
"description": "Requires the `messages:claim` scope.",
|
|
2757
|
+
"description": "Requires the `messages:claim` scope. The MCP tool `list_message_states` calls this operation.",
|
|
2398
2758
|
"parameters": [
|
|
2399
2759
|
{
|
|
2400
2760
|
"name": "domainId",
|
|
@@ -2408,6 +2768,642 @@
|
|
|
2408
2768
|
]
|
|
2409
2769
|
}
|
|
2410
2770
|
},
|
|
2771
|
+
"/api/agent/drafts": {
|
|
2772
|
+
"servers": [
|
|
2773
|
+
{
|
|
2774
|
+
"url": "https://sdk.flowmails.net"
|
|
2775
|
+
}
|
|
2776
|
+
],
|
|
2777
|
+
"post": {
|
|
2778
|
+
"operationId": "createDraft",
|
|
2779
|
+
"summary": "Write a draft for a human to review. Sends nothing: the row waits in `pending_review` until a person approves it from the dashboard, and the approval is what dispatches. Requires `drafts:write` and never `messages:send`.",
|
|
2780
|
+
"tags": [
|
|
2781
|
+
"drafts"
|
|
2782
|
+
],
|
|
2783
|
+
"security": [
|
|
2784
|
+
{
|
|
2785
|
+
"bearerAuth": []
|
|
2786
|
+
}
|
|
2787
|
+
],
|
|
2788
|
+
"responses": {
|
|
2789
|
+
"200": {
|
|
2790
|
+
"description": "Success.",
|
|
2791
|
+
"content": {
|
|
2792
|
+
"application/json": {
|
|
2793
|
+
"schema": {
|
|
2794
|
+
"type": "object",
|
|
2795
|
+
"required": [
|
|
2796
|
+
"id",
|
|
2797
|
+
"domainId",
|
|
2798
|
+
"from",
|
|
2799
|
+
"to",
|
|
2800
|
+
"subject",
|
|
2801
|
+
"status"
|
|
2802
|
+
],
|
|
2803
|
+
"properties": {
|
|
2804
|
+
"id": {
|
|
2805
|
+
"type": "string",
|
|
2806
|
+
"description": "The draft id — the review handle."
|
|
2807
|
+
},
|
|
2808
|
+
"domainId": {
|
|
2809
|
+
"type": "string"
|
|
2810
|
+
},
|
|
2811
|
+
"from": {
|
|
2812
|
+
"type": "string"
|
|
2813
|
+
},
|
|
2814
|
+
"fromName": {
|
|
2815
|
+
"type": [
|
|
2816
|
+
"string",
|
|
2817
|
+
"null"
|
|
2818
|
+
]
|
|
2819
|
+
},
|
|
2820
|
+
"to": {
|
|
2821
|
+
"type": "array",
|
|
2822
|
+
"items": {
|
|
2823
|
+
"type": "string"
|
|
2824
|
+
}
|
|
2825
|
+
},
|
|
2826
|
+
"replyTo": {
|
|
2827
|
+
"type": [
|
|
2828
|
+
"string",
|
|
2829
|
+
"null"
|
|
2830
|
+
]
|
|
2831
|
+
},
|
|
2832
|
+
"replyToMessageId": {
|
|
2833
|
+
"type": [
|
|
2834
|
+
"string",
|
|
2835
|
+
"null"
|
|
2836
|
+
]
|
|
2837
|
+
},
|
|
2838
|
+
"subject": {
|
|
2839
|
+
"type": "string"
|
|
2840
|
+
},
|
|
2841
|
+
"text": {
|
|
2842
|
+
"type": [
|
|
2843
|
+
"string",
|
|
2844
|
+
"null"
|
|
2845
|
+
]
|
|
2846
|
+
},
|
|
2847
|
+
"html": {
|
|
2848
|
+
"type": [
|
|
2849
|
+
"string",
|
|
2850
|
+
"null"
|
|
2851
|
+
]
|
|
2852
|
+
},
|
|
2853
|
+
"status": {
|
|
2854
|
+
"type": "string",
|
|
2855
|
+
"enum": [
|
|
2856
|
+
"pending_review",
|
|
2857
|
+
"approved",
|
|
2858
|
+
"rejected",
|
|
2859
|
+
"sent"
|
|
2860
|
+
]
|
|
2861
|
+
},
|
|
2862
|
+
"source": {
|
|
2863
|
+
"type": "string",
|
|
2864
|
+
"enum": [
|
|
2865
|
+
"agent",
|
|
2866
|
+
"human"
|
|
2867
|
+
]
|
|
2868
|
+
},
|
|
2869
|
+
"useAiContext": {
|
|
2870
|
+
"type": "boolean"
|
|
2871
|
+
},
|
|
2872
|
+
"aiRoleName": {
|
|
2873
|
+
"type": [
|
|
2874
|
+
"string",
|
|
2875
|
+
"null"
|
|
2876
|
+
]
|
|
2877
|
+
},
|
|
2878
|
+
"reviewNote": {
|
|
2879
|
+
"type": [
|
|
2880
|
+
"string",
|
|
2881
|
+
"null"
|
|
2882
|
+
]
|
|
2883
|
+
},
|
|
2884
|
+
"sentMessageId": {
|
|
2885
|
+
"type": [
|
|
2886
|
+
"string",
|
|
2887
|
+
"null"
|
|
2888
|
+
]
|
|
2889
|
+
},
|
|
2890
|
+
"createdAt": {
|
|
2891
|
+
"type": "integer"
|
|
2892
|
+
},
|
|
2893
|
+
"updatedAt": {
|
|
2894
|
+
"type": "integer"
|
|
2895
|
+
},
|
|
2896
|
+
"reviewedAt": {
|
|
2897
|
+
"type": [
|
|
2898
|
+
"integer",
|
|
2899
|
+
"null"
|
|
2900
|
+
]
|
|
2901
|
+
}
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
}
|
|
2905
|
+
}
|
|
2906
|
+
},
|
|
2907
|
+
"400": {
|
|
2908
|
+
"description": "Invalid JSON, or a payload the validator refuses.",
|
|
2909
|
+
"content": {
|
|
2910
|
+
"application/json": {
|
|
2911
|
+
"schema": {
|
|
2912
|
+
"type": "object",
|
|
2913
|
+
"required": [
|
|
2914
|
+
"error"
|
|
2915
|
+
],
|
|
2916
|
+
"properties": {
|
|
2917
|
+
"error": {
|
|
2918
|
+
"type": "string",
|
|
2919
|
+
"description": "A typed slug, never prose."
|
|
2920
|
+
},
|
|
2921
|
+
"required": {
|
|
2922
|
+
"type": "string",
|
|
2923
|
+
"description": "The scope the call needed — present on a 403 `scope_denied`."
|
|
2924
|
+
}
|
|
2925
|
+
},
|
|
2926
|
+
"additionalProperties": true
|
|
2927
|
+
}
|
|
2928
|
+
}
|
|
2929
|
+
}
|
|
2930
|
+
},
|
|
2931
|
+
"401": {
|
|
2932
|
+
"description": "Missing, malformed or revoked bearer.",
|
|
2933
|
+
"content": {
|
|
2934
|
+
"application/json": {
|
|
2935
|
+
"schema": {
|
|
2936
|
+
"type": "object",
|
|
2937
|
+
"required": [
|
|
2938
|
+
"error"
|
|
2939
|
+
],
|
|
2940
|
+
"properties": {
|
|
2941
|
+
"error": {
|
|
2942
|
+
"type": "string",
|
|
2943
|
+
"description": "A typed slug, never prose."
|
|
2944
|
+
},
|
|
2945
|
+
"required": {
|
|
2946
|
+
"type": "string",
|
|
2947
|
+
"description": "The scope the call needed — present on a 403 `scope_denied`."
|
|
2948
|
+
}
|
|
2949
|
+
},
|
|
2950
|
+
"additionalProperties": true
|
|
2951
|
+
}
|
|
2952
|
+
}
|
|
2953
|
+
}
|
|
2954
|
+
},
|
|
2955
|
+
"402": {
|
|
2956
|
+
"description": "`useAiContext` was asked for and the plan does not include AI context.",
|
|
2957
|
+
"content": {
|
|
2958
|
+
"application/json": {
|
|
2959
|
+
"schema": {
|
|
2960
|
+
"type": "object",
|
|
2961
|
+
"required": [
|
|
2962
|
+
"error"
|
|
2963
|
+
],
|
|
2964
|
+
"properties": {
|
|
2965
|
+
"error": {
|
|
2966
|
+
"type": "string",
|
|
2967
|
+
"description": "A typed slug, never prose."
|
|
2968
|
+
},
|
|
2969
|
+
"required": {
|
|
2970
|
+
"type": "string",
|
|
2971
|
+
"description": "The scope the call needed — present on a 403 `scope_denied`."
|
|
2972
|
+
}
|
|
2973
|
+
},
|
|
2974
|
+
"additionalProperties": true
|
|
2975
|
+
}
|
|
2976
|
+
}
|
|
2977
|
+
}
|
|
2978
|
+
},
|
|
2979
|
+
"403": {
|
|
2980
|
+
"description": "The credential lacks `drafts:write`, or the `from` domain is outside its bound set.",
|
|
2981
|
+
"content": {
|
|
2982
|
+
"application/json": {
|
|
2983
|
+
"schema": {
|
|
2984
|
+
"type": "object",
|
|
2985
|
+
"required": [
|
|
2986
|
+
"error"
|
|
2987
|
+
],
|
|
2988
|
+
"properties": {
|
|
2989
|
+
"error": {
|
|
2990
|
+
"type": "string",
|
|
2991
|
+
"description": "A typed slug, never prose."
|
|
2992
|
+
},
|
|
2993
|
+
"required": {
|
|
2994
|
+
"type": "string",
|
|
2995
|
+
"description": "The scope the call needed — present on a 403 `scope_denied`."
|
|
2996
|
+
}
|
|
2997
|
+
},
|
|
2998
|
+
"additionalProperties": true
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
3001
|
+
}
|
|
3002
|
+
},
|
|
3003
|
+
"404": {
|
|
3004
|
+
"description": "The `from` domain (or the reply parent) is not on this account.",
|
|
3005
|
+
"content": {
|
|
3006
|
+
"application/json": {
|
|
3007
|
+
"schema": {
|
|
3008
|
+
"type": "object",
|
|
3009
|
+
"required": [
|
|
3010
|
+
"error"
|
|
3011
|
+
],
|
|
3012
|
+
"properties": {
|
|
3013
|
+
"error": {
|
|
3014
|
+
"type": "string",
|
|
3015
|
+
"description": "A typed slug, never prose."
|
|
3016
|
+
},
|
|
3017
|
+
"required": {
|
|
3018
|
+
"type": "string",
|
|
3019
|
+
"description": "The scope the call needed — present on a 403 `scope_denied`."
|
|
3020
|
+
}
|
|
3021
|
+
},
|
|
3022
|
+
"additionalProperties": true
|
|
3023
|
+
}
|
|
3024
|
+
}
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
},
|
|
3028
|
+
"description": "Requires the `drafts:write` scope. The MCP tool `create_draft` calls this operation.",
|
|
3029
|
+
"requestBody": {
|
|
3030
|
+
"required": true,
|
|
3031
|
+
"content": {
|
|
3032
|
+
"application/json": {
|
|
3033
|
+
"schema": {
|
|
3034
|
+
"type": "object",
|
|
3035
|
+
"required": [
|
|
3036
|
+
"from",
|
|
3037
|
+
"to",
|
|
3038
|
+
"subject"
|
|
3039
|
+
],
|
|
3040
|
+
"properties": {
|
|
3041
|
+
"from": {
|
|
3042
|
+
"type": "string",
|
|
3043
|
+
"description": "The sending address. It must be on a domain this account owns, and — when the credential is bound to a domain set — inside that set, or the call is refused with `from_domain_not_bound`."
|
|
3044
|
+
},
|
|
3045
|
+
"fromName": {
|
|
3046
|
+
"type": "string"
|
|
3047
|
+
},
|
|
3048
|
+
"to": {
|
|
3049
|
+
"type": [
|
|
3050
|
+
"string",
|
|
3051
|
+
"array"
|
|
3052
|
+
],
|
|
3053
|
+
"items": {
|
|
3054
|
+
"type": "string"
|
|
3055
|
+
},
|
|
3056
|
+
"description": "One recipient address, or several (at most 50). One draft is one message to all of them."
|
|
3057
|
+
},
|
|
3058
|
+
"subject": {
|
|
3059
|
+
"type": "string"
|
|
3060
|
+
},
|
|
3061
|
+
"text": {
|
|
3062
|
+
"type": "string",
|
|
3063
|
+
"description": "The plain-text body. `text` or `html` is required unless `useAiContext` is true."
|
|
3064
|
+
},
|
|
3065
|
+
"html": {
|
|
3066
|
+
"type": "string"
|
|
3067
|
+
},
|
|
3068
|
+
"replyTo": {
|
|
3069
|
+
"type": "string",
|
|
3070
|
+
"description": "The `Reply-To` header override."
|
|
3071
|
+
},
|
|
3072
|
+
"replyToMessageId": {
|
|
3073
|
+
"type": "string",
|
|
3074
|
+
"description": "Reply in thread: the parent message's SMTP `Message-ID`. The threading headers are derived at send time — sending them by hand is refused."
|
|
3075
|
+
},
|
|
3076
|
+
"useAiContext": {
|
|
3077
|
+
"type": "boolean",
|
|
3078
|
+
"description": "Draft the reply from the domain's AI context and address persona instead of a hand-written body. Requires `replyToMessageId`; a plan without AI context answers `402`."
|
|
3079
|
+
}
|
|
3080
|
+
}
|
|
3081
|
+
}
|
|
3082
|
+
}
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
3085
|
+
},
|
|
3086
|
+
"get": {
|
|
3087
|
+
"operationId": "listDrafts",
|
|
3088
|
+
"summary": "List the account's drafts, newest first. Each entry includes its body and its review outcome, so an agent can tell whether a person has approved or rejected what it wrote.",
|
|
3089
|
+
"tags": [
|
|
3090
|
+
"drafts"
|
|
3091
|
+
],
|
|
3092
|
+
"security": [
|
|
3093
|
+
{
|
|
3094
|
+
"bearerAuth": []
|
|
3095
|
+
}
|
|
3096
|
+
],
|
|
3097
|
+
"responses": {
|
|
3098
|
+
"200": {
|
|
3099
|
+
"description": "Success.",
|
|
3100
|
+
"content": {
|
|
3101
|
+
"application/json": {
|
|
3102
|
+
"schema": {
|
|
3103
|
+
"type": "object",
|
|
3104
|
+
"required": [
|
|
3105
|
+
"drafts",
|
|
3106
|
+
"total"
|
|
3107
|
+
],
|
|
3108
|
+
"properties": {
|
|
3109
|
+
"drafts": {
|
|
3110
|
+
"type": "array",
|
|
3111
|
+
"items": {
|
|
3112
|
+
"type": "object"
|
|
3113
|
+
}
|
|
3114
|
+
},
|
|
3115
|
+
"total": {
|
|
3116
|
+
"type": "integer"
|
|
3117
|
+
}
|
|
3118
|
+
}
|
|
3119
|
+
}
|
|
3120
|
+
}
|
|
3121
|
+
}
|
|
3122
|
+
},
|
|
3123
|
+
"400": {
|
|
3124
|
+
"description": "An unknown `status`, or a bad `limit`.",
|
|
3125
|
+
"content": {
|
|
3126
|
+
"application/json": {
|
|
3127
|
+
"schema": {
|
|
3128
|
+
"type": "object",
|
|
3129
|
+
"required": [
|
|
3130
|
+
"error"
|
|
3131
|
+
],
|
|
3132
|
+
"properties": {
|
|
3133
|
+
"error": {
|
|
3134
|
+
"type": "string",
|
|
3135
|
+
"description": "A typed slug, never prose."
|
|
3136
|
+
},
|
|
3137
|
+
"required": {
|
|
3138
|
+
"type": "string",
|
|
3139
|
+
"description": "The scope the call needed — present on a 403 `scope_denied`."
|
|
3140
|
+
}
|
|
3141
|
+
},
|
|
3142
|
+
"additionalProperties": true
|
|
3143
|
+
}
|
|
3144
|
+
}
|
|
3145
|
+
}
|
|
3146
|
+
},
|
|
3147
|
+
"401": {
|
|
3148
|
+
"description": "Missing, malformed or revoked bearer.",
|
|
3149
|
+
"content": {
|
|
3150
|
+
"application/json": {
|
|
3151
|
+
"schema": {
|
|
3152
|
+
"type": "object",
|
|
3153
|
+
"required": [
|
|
3154
|
+
"error"
|
|
3155
|
+
],
|
|
3156
|
+
"properties": {
|
|
3157
|
+
"error": {
|
|
3158
|
+
"type": "string",
|
|
3159
|
+
"description": "A typed slug, never prose."
|
|
3160
|
+
},
|
|
3161
|
+
"required": {
|
|
3162
|
+
"type": "string",
|
|
3163
|
+
"description": "The scope the call needed — present on a 403 `scope_denied`."
|
|
3164
|
+
}
|
|
3165
|
+
},
|
|
3166
|
+
"additionalProperties": true
|
|
3167
|
+
}
|
|
3168
|
+
}
|
|
3169
|
+
}
|
|
3170
|
+
},
|
|
3171
|
+
"403": {
|
|
3172
|
+
"description": "The credential lacks `drafts:read`.",
|
|
3173
|
+
"content": {
|
|
3174
|
+
"application/json": {
|
|
3175
|
+
"schema": {
|
|
3176
|
+
"type": "object",
|
|
3177
|
+
"required": [
|
|
3178
|
+
"error"
|
|
3179
|
+
],
|
|
3180
|
+
"properties": {
|
|
3181
|
+
"error": {
|
|
3182
|
+
"type": "string",
|
|
3183
|
+
"description": "A typed slug, never prose."
|
|
3184
|
+
},
|
|
3185
|
+
"required": {
|
|
3186
|
+
"type": "string",
|
|
3187
|
+
"description": "The scope the call needed — present on a 403 `scope_denied`."
|
|
3188
|
+
}
|
|
3189
|
+
},
|
|
3190
|
+
"additionalProperties": true
|
|
3191
|
+
}
|
|
3192
|
+
}
|
|
3193
|
+
}
|
|
3194
|
+
}
|
|
3195
|
+
},
|
|
3196
|
+
"description": "Requires the `drafts:read` scope. The MCP tool `list_drafts` calls this operation.",
|
|
3197
|
+
"parameters": [
|
|
3198
|
+
{
|
|
3199
|
+
"name": "status",
|
|
3200
|
+
"in": "query",
|
|
3201
|
+
"required": false,
|
|
3202
|
+
"description": "Only drafts in this state: `pending_review`, `approved`, `rejected` or `sent`.",
|
|
3203
|
+
"schema": {
|
|
3204
|
+
"type": "string",
|
|
3205
|
+
"enum": [
|
|
3206
|
+
"pending_review",
|
|
3207
|
+
"approved",
|
|
3208
|
+
"rejected",
|
|
3209
|
+
"sent"
|
|
3210
|
+
]
|
|
3211
|
+
}
|
|
3212
|
+
},
|
|
3213
|
+
{
|
|
3214
|
+
"name": "domainId",
|
|
3215
|
+
"in": "query",
|
|
3216
|
+
"required": false,
|
|
3217
|
+
"description": "Only drafts on this sending domain.",
|
|
3218
|
+
"schema": {
|
|
3219
|
+
"type": "string"
|
|
3220
|
+
}
|
|
3221
|
+
},
|
|
3222
|
+
{
|
|
3223
|
+
"name": "limit",
|
|
3224
|
+
"in": "query",
|
|
3225
|
+
"required": false,
|
|
3226
|
+
"description": "Maximum number of drafts to return (default 20, at most 100).",
|
|
3227
|
+
"schema": {
|
|
3228
|
+
"type": "integer",
|
|
3229
|
+
"minimum": 1,
|
|
3230
|
+
"maximum": 100
|
|
3231
|
+
}
|
|
3232
|
+
}
|
|
3233
|
+
]
|
|
3234
|
+
}
|
|
3235
|
+
},
|
|
3236
|
+
"/api/agent/drafts/{draftId}": {
|
|
3237
|
+
"servers": [
|
|
3238
|
+
{
|
|
3239
|
+
"url": "https://sdk.flowmails.net"
|
|
3240
|
+
}
|
|
3241
|
+
],
|
|
3242
|
+
"get": {
|
|
3243
|
+
"operationId": "getDraft",
|
|
3244
|
+
"summary": "Read one draft, including its review outcome. A draft on another tenant answers `404`, identically to one that does not exist.",
|
|
3245
|
+
"tags": [
|
|
3246
|
+
"drafts"
|
|
3247
|
+
],
|
|
3248
|
+
"security": [
|
|
3249
|
+
{
|
|
3250
|
+
"bearerAuth": []
|
|
3251
|
+
}
|
|
3252
|
+
],
|
|
3253
|
+
"responses": {
|
|
3254
|
+
"200": {
|
|
3255
|
+
"description": "Success.",
|
|
3256
|
+
"content": {
|
|
3257
|
+
"application/json": {
|
|
3258
|
+
"schema": {
|
|
3259
|
+
"type": "object",
|
|
3260
|
+
"required": [
|
|
3261
|
+
"id",
|
|
3262
|
+
"status"
|
|
3263
|
+
],
|
|
3264
|
+
"properties": {
|
|
3265
|
+
"id": {
|
|
3266
|
+
"type": "string"
|
|
3267
|
+
},
|
|
3268
|
+
"status": {
|
|
3269
|
+
"type": "string",
|
|
3270
|
+
"enum": [
|
|
3271
|
+
"pending_review",
|
|
3272
|
+
"approved",
|
|
3273
|
+
"rejected",
|
|
3274
|
+
"sent"
|
|
3275
|
+
]
|
|
3276
|
+
},
|
|
3277
|
+
"reviewNote": {
|
|
3278
|
+
"type": [
|
|
3279
|
+
"string",
|
|
3280
|
+
"null"
|
|
3281
|
+
],
|
|
3282
|
+
"description": "The reviewer's note, when one was left."
|
|
3283
|
+
},
|
|
3284
|
+
"sentMessageId": {
|
|
3285
|
+
"type": [
|
|
3286
|
+
"string",
|
|
3287
|
+
"null"
|
|
3288
|
+
],
|
|
3289
|
+
"description": "The relay's `Message-ID`, once the draft was sent."
|
|
3290
|
+
}
|
|
3291
|
+
}
|
|
3292
|
+
}
|
|
3293
|
+
}
|
|
3294
|
+
}
|
|
3295
|
+
},
|
|
3296
|
+
"400": {
|
|
3297
|
+
"description": "A blank `draftId`.",
|
|
3298
|
+
"content": {
|
|
3299
|
+
"application/json": {
|
|
3300
|
+
"schema": {
|
|
3301
|
+
"type": "object",
|
|
3302
|
+
"required": [
|
|
3303
|
+
"error"
|
|
3304
|
+
],
|
|
3305
|
+
"properties": {
|
|
3306
|
+
"error": {
|
|
3307
|
+
"type": "string",
|
|
3308
|
+
"description": "A typed slug, never prose."
|
|
3309
|
+
},
|
|
3310
|
+
"required": {
|
|
3311
|
+
"type": "string",
|
|
3312
|
+
"description": "The scope the call needed — present on a 403 `scope_denied`."
|
|
3313
|
+
}
|
|
3314
|
+
},
|
|
3315
|
+
"additionalProperties": true
|
|
3316
|
+
}
|
|
3317
|
+
}
|
|
3318
|
+
}
|
|
3319
|
+
},
|
|
3320
|
+
"401": {
|
|
3321
|
+
"description": "Missing, malformed or revoked bearer.",
|
|
3322
|
+
"content": {
|
|
3323
|
+
"application/json": {
|
|
3324
|
+
"schema": {
|
|
3325
|
+
"type": "object",
|
|
3326
|
+
"required": [
|
|
3327
|
+
"error"
|
|
3328
|
+
],
|
|
3329
|
+
"properties": {
|
|
3330
|
+
"error": {
|
|
3331
|
+
"type": "string",
|
|
3332
|
+
"description": "A typed slug, never prose."
|
|
3333
|
+
},
|
|
3334
|
+
"required": {
|
|
3335
|
+
"type": "string",
|
|
3336
|
+
"description": "The scope the call needed — present on a 403 `scope_denied`."
|
|
3337
|
+
}
|
|
3338
|
+
},
|
|
3339
|
+
"additionalProperties": true
|
|
3340
|
+
}
|
|
3341
|
+
}
|
|
3342
|
+
}
|
|
3343
|
+
},
|
|
3344
|
+
"403": {
|
|
3345
|
+
"description": "The credential lacks `drafts:read`.",
|
|
3346
|
+
"content": {
|
|
3347
|
+
"application/json": {
|
|
3348
|
+
"schema": {
|
|
3349
|
+
"type": "object",
|
|
3350
|
+
"required": [
|
|
3351
|
+
"error"
|
|
3352
|
+
],
|
|
3353
|
+
"properties": {
|
|
3354
|
+
"error": {
|
|
3355
|
+
"type": "string",
|
|
3356
|
+
"description": "A typed slug, never prose."
|
|
3357
|
+
},
|
|
3358
|
+
"required": {
|
|
3359
|
+
"type": "string",
|
|
3360
|
+
"description": "The scope the call needed — present on a 403 `scope_denied`."
|
|
3361
|
+
}
|
|
3362
|
+
},
|
|
3363
|
+
"additionalProperties": true
|
|
3364
|
+
}
|
|
3365
|
+
}
|
|
3366
|
+
}
|
|
3367
|
+
},
|
|
3368
|
+
"404": {
|
|
3369
|
+
"description": "No such draft on this account.",
|
|
3370
|
+
"content": {
|
|
3371
|
+
"application/json": {
|
|
3372
|
+
"schema": {
|
|
3373
|
+
"type": "object",
|
|
3374
|
+
"required": [
|
|
3375
|
+
"error"
|
|
3376
|
+
],
|
|
3377
|
+
"properties": {
|
|
3378
|
+
"error": {
|
|
3379
|
+
"type": "string",
|
|
3380
|
+
"description": "A typed slug, never prose."
|
|
3381
|
+
},
|
|
3382
|
+
"required": {
|
|
3383
|
+
"type": "string",
|
|
3384
|
+
"description": "The scope the call needed — present on a 403 `scope_denied`."
|
|
3385
|
+
}
|
|
3386
|
+
},
|
|
3387
|
+
"additionalProperties": true
|
|
3388
|
+
}
|
|
3389
|
+
}
|
|
3390
|
+
}
|
|
3391
|
+
}
|
|
3392
|
+
},
|
|
3393
|
+
"description": "Requires the `drafts:read` scope. The MCP tool `get_draft` calls this operation.",
|
|
3394
|
+
"parameters": [
|
|
3395
|
+
{
|
|
3396
|
+
"name": "draftId",
|
|
3397
|
+
"in": "path",
|
|
3398
|
+
"required": true,
|
|
3399
|
+
"description": "The draft id returned by `createDraft`.",
|
|
3400
|
+
"schema": {
|
|
3401
|
+
"type": "string"
|
|
3402
|
+
}
|
|
3403
|
+
}
|
|
3404
|
+
]
|
|
3405
|
+
}
|
|
3406
|
+
},
|
|
2411
3407
|
"/api/v1/messages": {
|
|
2412
3408
|
"servers": [
|
|
2413
3409
|
{
|
|
@@ -2631,7 +3627,7 @@
|
|
|
2631
3627
|
},
|
|
2632
3628
|
"replyToMessageId": {
|
|
2633
3629
|
"type": "string",
|
|
2634
|
-
"description": "Reply in thread. The parent message's SMTP `Message-ID` or its
|
|
3630
|
+
"description": "Reply in thread. The parent message's SMTP `Message-ID` or its mailstore UUIDv7 row id. The platform derives the threading headers itself — sending them by hand is refused."
|
|
2635
3631
|
},
|
|
2636
3632
|
"idempotencyKey": {
|
|
2637
3633
|
"type": "string",
|