@primitivedotdev/sdk 0.13.0 → 0.15.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/dist/api/generated/index.js +1 -1
- package/dist/api/generated/sdk.gen.js +67 -1
- package/dist/api/index.d.ts +2 -2
- package/dist/{api-DvJpdOJ8.js → api-DpATn7LQ.js} +76 -2
- package/dist/{index-ChLFXxTa.d.ts → index-DEY4h3MZ.d.ts} +464 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/oclif/commands/emails-latest.js +131 -0
- package/dist/oclif/commands/send.js +10 -1
- package/dist/oclif/index.js +78 -3
- package/dist/openapi/index.d.ts +6 -0
- package/dist/openapi/openapi.generated.js +395 -47
- package/dist/openapi/operations.generated.js +2395 -98
- package/oclif.manifest.json +212 -13
- package/package.json +3 -3
|
@@ -17,6 +17,78 @@ export const operationManifest = [
|
|
|
17
17
|
"pathParams": [],
|
|
18
18
|
"queryParams": [],
|
|
19
19
|
"requestSchema": null,
|
|
20
|
+
"responseSchema": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"id": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"format": "uuid"
|
|
26
|
+
},
|
|
27
|
+
"email": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"plan": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"created_at": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"format": "date-time"
|
|
36
|
+
},
|
|
37
|
+
"onboarding_completed": {
|
|
38
|
+
"type": "boolean"
|
|
39
|
+
},
|
|
40
|
+
"onboarding_step": {
|
|
41
|
+
"type": [
|
|
42
|
+
"string",
|
|
43
|
+
"null"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"stripe_subscription_status": {
|
|
47
|
+
"type": [
|
|
48
|
+
"string",
|
|
49
|
+
"null"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"subscription_current_period_end": {
|
|
53
|
+
"type": [
|
|
54
|
+
"string",
|
|
55
|
+
"null"
|
|
56
|
+
],
|
|
57
|
+
"format": "date-time"
|
|
58
|
+
},
|
|
59
|
+
"subscription_cancel_at_period_end": {
|
|
60
|
+
"type": [
|
|
61
|
+
"boolean",
|
|
62
|
+
"null"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"spam_threshold": {
|
|
66
|
+
"type": [
|
|
67
|
+
"number",
|
|
68
|
+
"null"
|
|
69
|
+
],
|
|
70
|
+
"minimum": 0,
|
|
71
|
+
"maximum": 15
|
|
72
|
+
},
|
|
73
|
+
"discard_content_on_webhook_confirmed": {
|
|
74
|
+
"type": "boolean"
|
|
75
|
+
},
|
|
76
|
+
"webhook_secret_rotated_at": {
|
|
77
|
+
"type": [
|
|
78
|
+
"string",
|
|
79
|
+
"null"
|
|
80
|
+
],
|
|
81
|
+
"format": "date-time"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"required": [
|
|
85
|
+
"id",
|
|
86
|
+
"email",
|
|
87
|
+
"plan",
|
|
88
|
+
"created_at",
|
|
89
|
+
"discard_content_on_webhook_confirmed"
|
|
90
|
+
]
|
|
91
|
+
},
|
|
20
92
|
"sdkName": "getAccount",
|
|
21
93
|
"summary": "Get account info",
|
|
22
94
|
"tag": "Account",
|
|
@@ -34,6 +106,43 @@ export const operationManifest = [
|
|
|
34
106
|
"pathParams": [],
|
|
35
107
|
"queryParams": [],
|
|
36
108
|
"requestSchema": null,
|
|
109
|
+
"responseSchema": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"properties": {
|
|
112
|
+
"used_bytes": {
|
|
113
|
+
"type": "integer",
|
|
114
|
+
"description": "Total storage used in bytes"
|
|
115
|
+
},
|
|
116
|
+
"used_kb": {
|
|
117
|
+
"type": "number",
|
|
118
|
+
"description": "Total storage used in kilobytes (1 decimal)"
|
|
119
|
+
},
|
|
120
|
+
"used_mb": {
|
|
121
|
+
"type": "number",
|
|
122
|
+
"description": "Total storage used in megabytes (2 decimals)"
|
|
123
|
+
},
|
|
124
|
+
"quota_mb": {
|
|
125
|
+
"type": "number",
|
|
126
|
+
"description": "Storage quota in megabytes (based on plan)"
|
|
127
|
+
},
|
|
128
|
+
"percentage": {
|
|
129
|
+
"type": "number",
|
|
130
|
+
"description": "Percentage of quota used (1 decimal)"
|
|
131
|
+
},
|
|
132
|
+
"emails_count": {
|
|
133
|
+
"type": "integer",
|
|
134
|
+
"description": "Number of stored emails"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"required": [
|
|
138
|
+
"used_bytes",
|
|
139
|
+
"used_kb",
|
|
140
|
+
"used_mb",
|
|
141
|
+
"quota_mb",
|
|
142
|
+
"percentage",
|
|
143
|
+
"emails_count"
|
|
144
|
+
]
|
|
145
|
+
},
|
|
37
146
|
"sdkName": "getStorageStats",
|
|
38
147
|
"summary": "Get storage usage",
|
|
39
148
|
"tag": "Account",
|
|
@@ -51,6 +160,18 @@ export const operationManifest = [
|
|
|
51
160
|
"pathParams": [],
|
|
52
161
|
"queryParams": [],
|
|
53
162
|
"requestSchema": null,
|
|
163
|
+
"responseSchema": {
|
|
164
|
+
"type": "object",
|
|
165
|
+
"properties": {
|
|
166
|
+
"secret": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"description": "The webhook signing secret value"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"required": [
|
|
172
|
+
"secret"
|
|
173
|
+
]
|
|
174
|
+
},
|
|
54
175
|
"sdkName": "getWebhookSecret",
|
|
55
176
|
"summary": "Get webhook signing secret",
|
|
56
177
|
"tag": "Account",
|
|
@@ -68,6 +189,18 @@ export const operationManifest = [
|
|
|
68
189
|
"pathParams": [],
|
|
69
190
|
"queryParams": [],
|
|
70
191
|
"requestSchema": null,
|
|
192
|
+
"responseSchema": {
|
|
193
|
+
"type": "object",
|
|
194
|
+
"properties": {
|
|
195
|
+
"secret": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"description": "The webhook signing secret value"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"required": [
|
|
201
|
+
"secret"
|
|
202
|
+
]
|
|
203
|
+
},
|
|
71
204
|
"sdkName": "rotateWebhookSecret",
|
|
72
205
|
"summary": "Rotate webhook signing secret",
|
|
73
206
|
"tag": "Account",
|
|
@@ -104,6 +237,38 @@ export const operationManifest = [
|
|
|
104
237
|
},
|
|
105
238
|
"minProperties": 1
|
|
106
239
|
},
|
|
240
|
+
"responseSchema": {
|
|
241
|
+
"type": "object",
|
|
242
|
+
"properties": {
|
|
243
|
+
"id": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"format": "uuid"
|
|
246
|
+
},
|
|
247
|
+
"email": {
|
|
248
|
+
"type": "string"
|
|
249
|
+
},
|
|
250
|
+
"plan": {
|
|
251
|
+
"type": "string"
|
|
252
|
+
},
|
|
253
|
+
"spam_threshold": {
|
|
254
|
+
"type": [
|
|
255
|
+
"number",
|
|
256
|
+
"null"
|
|
257
|
+
],
|
|
258
|
+
"minimum": 0,
|
|
259
|
+
"maximum": 15
|
|
260
|
+
},
|
|
261
|
+
"discard_content_on_webhook_confirmed": {
|
|
262
|
+
"type": "boolean"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"required": [
|
|
266
|
+
"id",
|
|
267
|
+
"email",
|
|
268
|
+
"plan",
|
|
269
|
+
"discard_content_on_webhook_confirmed"
|
|
270
|
+
]
|
|
271
|
+
},
|
|
107
272
|
"sdkName": "updateAccount",
|
|
108
273
|
"summary": "Update account settings",
|
|
109
274
|
"tag": "Account",
|
|
@@ -135,6 +300,42 @@ export const operationManifest = [
|
|
|
135
300
|
"domain"
|
|
136
301
|
]
|
|
137
302
|
},
|
|
303
|
+
"responseSchema": {
|
|
304
|
+
"type": "object",
|
|
305
|
+
"properties": {
|
|
306
|
+
"id": {
|
|
307
|
+
"type": "string",
|
|
308
|
+
"format": "uuid"
|
|
309
|
+
},
|
|
310
|
+
"org_id": {
|
|
311
|
+
"type": "string",
|
|
312
|
+
"format": "uuid"
|
|
313
|
+
},
|
|
314
|
+
"domain": {
|
|
315
|
+
"type": "string"
|
|
316
|
+
},
|
|
317
|
+
"verified": {
|
|
318
|
+
"type": "boolean",
|
|
319
|
+
"const": false
|
|
320
|
+
},
|
|
321
|
+
"verification_token": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"description": "Add this value as a TXT record to verify ownership"
|
|
324
|
+
},
|
|
325
|
+
"created_at": {
|
|
326
|
+
"type": "string",
|
|
327
|
+
"format": "date-time"
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
"required": [
|
|
331
|
+
"id",
|
|
332
|
+
"org_id",
|
|
333
|
+
"domain",
|
|
334
|
+
"verified",
|
|
335
|
+
"verification_token",
|
|
336
|
+
"created_at"
|
|
337
|
+
]
|
|
338
|
+
},
|
|
138
339
|
"sdkName": "addDomain",
|
|
139
340
|
"summary": "Claim a new domain",
|
|
140
341
|
"tag": "Domains",
|
|
@@ -160,6 +361,7 @@ export const operationManifest = [
|
|
|
160
361
|
],
|
|
161
362
|
"queryParams": [],
|
|
162
363
|
"requestSchema": null,
|
|
364
|
+
"responseSchema": null,
|
|
163
365
|
"sdkName": "deleteDomain",
|
|
164
366
|
"summary": "Delete a domain",
|
|
165
367
|
"tag": "Domains",
|
|
@@ -177,6 +379,99 @@ export const operationManifest = [
|
|
|
177
379
|
"pathParams": [],
|
|
178
380
|
"queryParams": [],
|
|
179
381
|
"requestSchema": null,
|
|
382
|
+
"responseSchema": {
|
|
383
|
+
"type": "array",
|
|
384
|
+
"items": {
|
|
385
|
+
"description": "A domain can be either verified or unverified. Verified domains have\n`is_active` and `spam_threshold` fields. Unverified domains have a\n`verification_token` for DNS verification.\n",
|
|
386
|
+
"oneOf": [
|
|
387
|
+
{
|
|
388
|
+
"type": "object",
|
|
389
|
+
"properties": {
|
|
390
|
+
"id": {
|
|
391
|
+
"type": "string",
|
|
392
|
+
"format": "uuid"
|
|
393
|
+
},
|
|
394
|
+
"org_id": {
|
|
395
|
+
"type": "string",
|
|
396
|
+
"format": "uuid"
|
|
397
|
+
},
|
|
398
|
+
"domain": {
|
|
399
|
+
"type": "string"
|
|
400
|
+
},
|
|
401
|
+
"verified": {
|
|
402
|
+
"type": "boolean",
|
|
403
|
+
"const": true
|
|
404
|
+
},
|
|
405
|
+
"is_active": {
|
|
406
|
+
"type": "boolean"
|
|
407
|
+
},
|
|
408
|
+
"spam_threshold": {
|
|
409
|
+
"type": [
|
|
410
|
+
"number",
|
|
411
|
+
"null"
|
|
412
|
+
],
|
|
413
|
+
"minimum": 0,
|
|
414
|
+
"maximum": 15
|
|
415
|
+
},
|
|
416
|
+
"verification_token": {
|
|
417
|
+
"type": [
|
|
418
|
+
"string",
|
|
419
|
+
"null"
|
|
420
|
+
]
|
|
421
|
+
},
|
|
422
|
+
"created_at": {
|
|
423
|
+
"type": "string",
|
|
424
|
+
"format": "date-time"
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
"required": [
|
|
428
|
+
"id",
|
|
429
|
+
"org_id",
|
|
430
|
+
"domain",
|
|
431
|
+
"verified",
|
|
432
|
+
"is_active",
|
|
433
|
+
"created_at"
|
|
434
|
+
]
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"type": "object",
|
|
438
|
+
"properties": {
|
|
439
|
+
"id": {
|
|
440
|
+
"type": "string",
|
|
441
|
+
"format": "uuid"
|
|
442
|
+
},
|
|
443
|
+
"org_id": {
|
|
444
|
+
"type": "string",
|
|
445
|
+
"format": "uuid"
|
|
446
|
+
},
|
|
447
|
+
"domain": {
|
|
448
|
+
"type": "string"
|
|
449
|
+
},
|
|
450
|
+
"verified": {
|
|
451
|
+
"type": "boolean",
|
|
452
|
+
"const": false
|
|
453
|
+
},
|
|
454
|
+
"verification_token": {
|
|
455
|
+
"type": "string",
|
|
456
|
+
"description": "Add this value as a TXT record to verify ownership"
|
|
457
|
+
},
|
|
458
|
+
"created_at": {
|
|
459
|
+
"type": "string",
|
|
460
|
+
"format": "date-time"
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
"required": [
|
|
464
|
+
"id",
|
|
465
|
+
"org_id",
|
|
466
|
+
"domain",
|
|
467
|
+
"verified",
|
|
468
|
+
"verification_token",
|
|
469
|
+
"created_at"
|
|
470
|
+
]
|
|
471
|
+
}
|
|
472
|
+
]
|
|
473
|
+
}
|
|
474
|
+
},
|
|
180
475
|
"sdkName": "listDomains",
|
|
181
476
|
"summary": "List all domains",
|
|
182
477
|
"tag": "Domains",
|
|
@@ -221,6 +516,55 @@ export const operationManifest = [
|
|
|
221
516
|
},
|
|
222
517
|
"minProperties": 1
|
|
223
518
|
},
|
|
519
|
+
"responseSchema": {
|
|
520
|
+
"type": "object",
|
|
521
|
+
"properties": {
|
|
522
|
+
"id": {
|
|
523
|
+
"type": "string",
|
|
524
|
+
"format": "uuid"
|
|
525
|
+
},
|
|
526
|
+
"org_id": {
|
|
527
|
+
"type": "string",
|
|
528
|
+
"format": "uuid"
|
|
529
|
+
},
|
|
530
|
+
"domain": {
|
|
531
|
+
"type": "string"
|
|
532
|
+
},
|
|
533
|
+
"verified": {
|
|
534
|
+
"type": "boolean",
|
|
535
|
+
"const": true
|
|
536
|
+
},
|
|
537
|
+
"is_active": {
|
|
538
|
+
"type": "boolean"
|
|
539
|
+
},
|
|
540
|
+
"spam_threshold": {
|
|
541
|
+
"type": [
|
|
542
|
+
"number",
|
|
543
|
+
"null"
|
|
544
|
+
],
|
|
545
|
+
"minimum": 0,
|
|
546
|
+
"maximum": 15
|
|
547
|
+
},
|
|
548
|
+
"verification_token": {
|
|
549
|
+
"type": [
|
|
550
|
+
"string",
|
|
551
|
+
"null"
|
|
552
|
+
]
|
|
553
|
+
},
|
|
554
|
+
"created_at": {
|
|
555
|
+
"type": "string",
|
|
556
|
+
"format": "date-time"
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
"required": [
|
|
560
|
+
"id",
|
|
561
|
+
"org_id",
|
|
562
|
+
"domain",
|
|
563
|
+
"verified",
|
|
564
|
+
"is_active",
|
|
565
|
+
"created_at"
|
|
566
|
+
]
|
|
567
|
+
},
|
|
224
568
|
"sdkName": "updateDomain",
|
|
225
569
|
"summary": "Update domain settings",
|
|
226
570
|
"tag": "Domains",
|
|
@@ -246,6 +590,49 @@ export const operationManifest = [
|
|
|
246
590
|
],
|
|
247
591
|
"queryParams": [],
|
|
248
592
|
"requestSchema": null,
|
|
593
|
+
"responseSchema": {
|
|
594
|
+
"oneOf": [
|
|
595
|
+
{
|
|
596
|
+
"type": "object",
|
|
597
|
+
"properties": {
|
|
598
|
+
"verified": {
|
|
599
|
+
"type": "boolean",
|
|
600
|
+
"const": true
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
"required": [
|
|
604
|
+
"verified"
|
|
605
|
+
]
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"type": "object",
|
|
609
|
+
"properties": {
|
|
610
|
+
"verified": {
|
|
611
|
+
"type": "boolean",
|
|
612
|
+
"const": false
|
|
613
|
+
},
|
|
614
|
+
"mxFound": {
|
|
615
|
+
"type": "boolean",
|
|
616
|
+
"description": "Whether MX records point to Primitive"
|
|
617
|
+
},
|
|
618
|
+
"txtFound": {
|
|
619
|
+
"type": "boolean",
|
|
620
|
+
"description": "Whether the TXT verification record was found"
|
|
621
|
+
},
|
|
622
|
+
"error": {
|
|
623
|
+
"type": "string",
|
|
624
|
+
"description": "Human-readable verification failure reason"
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
"required": [
|
|
628
|
+
"verified",
|
|
629
|
+
"mxFound",
|
|
630
|
+
"txtFound",
|
|
631
|
+
"error"
|
|
632
|
+
]
|
|
633
|
+
}
|
|
634
|
+
]
|
|
635
|
+
},
|
|
249
636
|
"sdkName": "verifyDomain",
|
|
250
637
|
"summary": "Verify domain ownership",
|
|
251
638
|
"tag": "Domains",
|
|
@@ -271,6 +658,7 @@ export const operationManifest = [
|
|
|
271
658
|
],
|
|
272
659
|
"queryParams": [],
|
|
273
660
|
"requestSchema": null,
|
|
661
|
+
"responseSchema": null,
|
|
274
662
|
"sdkName": "deleteEmail",
|
|
275
663
|
"summary": "Delete an email",
|
|
276
664
|
"tag": "Emails",
|
|
@@ -304,6 +692,7 @@ export const operationManifest = [
|
|
|
304
692
|
}
|
|
305
693
|
],
|
|
306
694
|
"requestSchema": null,
|
|
695
|
+
"responseSchema": null,
|
|
307
696
|
"sdkName": "downloadAttachments",
|
|
308
697
|
"summary": "Download email attachments",
|
|
309
698
|
"tag": "Emails",
|
|
@@ -337,6 +726,7 @@ export const operationManifest = [
|
|
|
337
726
|
}
|
|
338
727
|
],
|
|
339
728
|
"requestSchema": null,
|
|
729
|
+
"responseSchema": null,
|
|
340
730
|
"sdkName": "downloadRawEmail",
|
|
341
731
|
"summary": "Download raw email",
|
|
342
732
|
"tag": "Emails",
|
|
@@ -346,7 +736,7 @@ export const operationManifest = [
|
|
|
346
736
|
"binaryResponse": false,
|
|
347
737
|
"bodyRequired": false,
|
|
348
738
|
"command": "get-email",
|
|
349
|
-
"description":
|
|
739
|
+
"description": "Returns the full record for an inbound email received at one\nof your verified domains, including the parsed text and HTML\nbodies, threading metadata, SMTP envelope detail, webhook\ndelivery state, and a `replies` array for any outbound sends\nrecorded as replies to this inbound.\n\nFor listing inbound emails (with cursor pagination, status\nand date filters, and free-text search), use\n`/emails`. Outbound (sent) email records are NOT returned\nhere; use `/sent-emails/{id}` for those.\n\nThe response carries four sender-shaped fields whose\nmeanings overlap. `from_email` is the canonical \"who sent\nthis\" field for most use cases (parsed bare address from\nthe `From:` header, with a `sender` fallback). `from_header`\nis the raw header including any display name. `sender` and\n`smtp_mail_from` both carry the SMTP envelope MAIL FROM\n(return-path) and are equal by construction; `sender` is\nthe older field name retained for compatibility. See\n`primitive describe emails:get-email | jq '.responseSchema.properties'`\nfor per-field detail.\n",
|
|
350
740
|
"hasJsonBody": false,
|
|
351
741
|
"method": "GET",
|
|
352
742
|
"operationId": "getEmail",
|
|
@@ -362,103 +752,489 @@ export const operationManifest = [
|
|
|
362
752
|
],
|
|
363
753
|
"queryParams": [],
|
|
364
754
|
"requestSchema": null,
|
|
365
|
-
"
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
"
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
"
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
"
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
"
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
"
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
"
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
"
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
"
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
"
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
"
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
755
|
+
"responseSchema": {
|
|
756
|
+
"type": "object",
|
|
757
|
+
"properties": {
|
|
758
|
+
"id": {
|
|
759
|
+
"type": "string",
|
|
760
|
+
"format": "uuid"
|
|
761
|
+
},
|
|
762
|
+
"message_id": {
|
|
763
|
+
"type": [
|
|
764
|
+
"string",
|
|
765
|
+
"null"
|
|
766
|
+
]
|
|
767
|
+
},
|
|
768
|
+
"domain_id": {
|
|
769
|
+
"type": [
|
|
770
|
+
"string",
|
|
771
|
+
"null"
|
|
772
|
+
],
|
|
773
|
+
"format": "uuid"
|
|
774
|
+
},
|
|
775
|
+
"org_id": {
|
|
776
|
+
"type": [
|
|
777
|
+
"string",
|
|
778
|
+
"null"
|
|
779
|
+
],
|
|
780
|
+
"format": "uuid"
|
|
781
|
+
},
|
|
782
|
+
"sender": {
|
|
783
|
+
"type": "string",
|
|
784
|
+
"description": "SMTP envelope sender (return-path) the inbound mail server\naccepted. Same value as `smtp_mail_from`; both fields exist\nso protocol-aware tooling can use whichever name it expects.\n\nFor most legitimate mail this equals `from_email`; for\nmailing lists, bounce handlers, and forwarders it is\ntypically the bounce-handling address rather than the\nhuman-visible sender.\n\n**For the canonical \"who sent this email\" value, use\n`from_email`.**\n"
|
|
785
|
+
},
|
|
786
|
+
"recipient": {
|
|
787
|
+
"type": "string"
|
|
788
|
+
},
|
|
789
|
+
"subject": {
|
|
790
|
+
"type": [
|
|
791
|
+
"string",
|
|
792
|
+
"null"
|
|
793
|
+
]
|
|
794
|
+
},
|
|
795
|
+
"body_text": {
|
|
796
|
+
"type": [
|
|
797
|
+
"string",
|
|
798
|
+
"null"
|
|
799
|
+
],
|
|
800
|
+
"description": "Plain-text body parsed from the inbound MIME, matching the `email.parsed.body_text` field on the webhook payload. Null when the message had no text part or parsing failed."
|
|
801
|
+
},
|
|
802
|
+
"body_html": {
|
|
803
|
+
"type": [
|
|
804
|
+
"string",
|
|
805
|
+
"null"
|
|
806
|
+
],
|
|
807
|
+
"description": "HTML body parsed from the inbound MIME, matching the `email.parsed.body_html` field on the webhook payload. Null when the message had no HTML part or parsing failed."
|
|
808
|
+
},
|
|
809
|
+
"status": {
|
|
810
|
+
"type": "string",
|
|
811
|
+
"description": "Lifecycle status of an INBOUND email (a row in the `emails`\ntable). Distinct from `SentEmailStatus`, which describes\nthe OUTBOUND lifecycle (the `sent_emails` table) and uses\na different vocabulary because the lifecycles differ.\nPossible values:\n\n - `pending`: the row was inserted at ingestion (mx_main)\n and has not yet completed the spam / filter / auth\n pipeline. Body and parsed fields are present; webhook\n delivery is not yet scheduled. Most rows transition out\n of `pending` within seconds.\n - `accepted`: the inbound passed the policy gates and is\n queued for webhook delivery. The `webhook_status` field\n tracks the separate webhook-delivery lifecycle from\n this point.\n - `completed`: terminal success. Webhook delivery\n attempted and acknowledged by every active endpoint, OR\n no endpoints are configured, so the row is durably\n archived.\n - `rejected`: terminal failure at ingestion (spam, blocked\n sender, filter rule, malformed). The body and metadata\n are stored for auditing but no webhook fires and the\n row is not repliable.\n\nSee also `webhook_status` (separate enum tracking the\nwebhook-delivery state machine) and `SentEmailStatus` (the\noutbound vocabulary).\n",
|
|
812
|
+
"enum": [
|
|
813
|
+
"pending",
|
|
814
|
+
"accepted",
|
|
815
|
+
"completed",
|
|
816
|
+
"rejected"
|
|
817
|
+
]
|
|
818
|
+
},
|
|
819
|
+
"domain": {
|
|
820
|
+
"type": "string"
|
|
821
|
+
},
|
|
822
|
+
"spam_score": {
|
|
823
|
+
"type": [
|
|
824
|
+
"number",
|
|
825
|
+
"null"
|
|
826
|
+
]
|
|
827
|
+
},
|
|
828
|
+
"raw_size_bytes": {
|
|
829
|
+
"type": [
|
|
830
|
+
"integer",
|
|
831
|
+
"null"
|
|
832
|
+
]
|
|
833
|
+
},
|
|
834
|
+
"raw_sha256": {
|
|
835
|
+
"type": [
|
|
836
|
+
"string",
|
|
837
|
+
"null"
|
|
838
|
+
]
|
|
839
|
+
},
|
|
840
|
+
"created_at": {
|
|
841
|
+
"type": "string",
|
|
842
|
+
"format": "date-time"
|
|
843
|
+
},
|
|
844
|
+
"received_at": {
|
|
845
|
+
"type": "string",
|
|
846
|
+
"format": "date-time"
|
|
847
|
+
},
|
|
848
|
+
"rejection_reason": {
|
|
849
|
+
"type": [
|
|
850
|
+
"string",
|
|
851
|
+
"null"
|
|
852
|
+
]
|
|
853
|
+
},
|
|
854
|
+
"webhook_status": {
|
|
855
|
+
"type": [
|
|
856
|
+
"string",
|
|
857
|
+
"null"
|
|
858
|
+
],
|
|
859
|
+
"description": "Webhook-delivery state for an inbound email. Tracks a\nSEPARATE lifecycle from the email's `status` field; the\nsame row carries both. Possible values:\n\n - `pending`: ingestion is past `pending` (the email itself\n is `accepted`) but the webhook fan-out has not yet\n started for this row.\n - `in_flight`: at least one delivery attempt is in flight.\n - `fired`: terminal success. Every active endpoint\n acknowledged the delivery (or accepted it after retries).\n - `failed`: terminal partial-failure. At least one endpoint\n exhausted its retry budget; some endpoints may still\n have succeeded.\n - `exhausted`: terminal failure. Every endpoint exhausted\n its retry budget without success.\n - `null`: no endpoints configured, so no webhook lifecycle\n applies.\n\nNote that the value `pending` here does NOT mean the email\nis `pending`; it means the email is past ingestion but\nwebhook delivery has not yet begun. Two overlapping uses\nof the word `pending` for distinct lifecycle phases.\n",
|
|
860
|
+
"enum": [
|
|
861
|
+
"pending",
|
|
862
|
+
"in_flight",
|
|
863
|
+
"fired",
|
|
864
|
+
"failed",
|
|
865
|
+
"exhausted",
|
|
866
|
+
null
|
|
867
|
+
]
|
|
868
|
+
},
|
|
869
|
+
"webhook_attempt_count": {
|
|
870
|
+
"type": "integer"
|
|
871
|
+
},
|
|
872
|
+
"webhook_last_attempt_at": {
|
|
873
|
+
"type": [
|
|
874
|
+
"string",
|
|
875
|
+
"null"
|
|
876
|
+
],
|
|
877
|
+
"format": "date-time"
|
|
878
|
+
},
|
|
879
|
+
"webhook_last_status_code": {
|
|
880
|
+
"type": [
|
|
881
|
+
"integer",
|
|
882
|
+
"null"
|
|
883
|
+
]
|
|
884
|
+
},
|
|
885
|
+
"webhook_last_error": {
|
|
886
|
+
"type": [
|
|
887
|
+
"string",
|
|
888
|
+
"null"
|
|
889
|
+
]
|
|
890
|
+
},
|
|
891
|
+
"webhook_fired_at": {
|
|
892
|
+
"type": [
|
|
893
|
+
"string",
|
|
894
|
+
"null"
|
|
895
|
+
],
|
|
896
|
+
"format": "date-time"
|
|
897
|
+
},
|
|
898
|
+
"smtp_helo": {
|
|
899
|
+
"type": [
|
|
900
|
+
"string",
|
|
901
|
+
"null"
|
|
902
|
+
]
|
|
903
|
+
},
|
|
904
|
+
"smtp_mail_from": {
|
|
905
|
+
"type": [
|
|
906
|
+
"string",
|
|
907
|
+
"null"
|
|
908
|
+
],
|
|
909
|
+
"description": "SMTP envelope MAIL FROM (return-path), as accepted by the\ninbound mail server. Same value as `sender`; both fields\nexist so protocol-aware tooling can use whichever name it\nexpects.\n\nFor the canonical \"who sent this email\" value (display name\nstripped, From-header preferred), use `from_email`.\n"
|
|
910
|
+
},
|
|
911
|
+
"smtp_rcpt_to": {
|
|
912
|
+
"type": [
|
|
913
|
+
"array",
|
|
914
|
+
"null"
|
|
915
|
+
],
|
|
916
|
+
"items": {
|
|
917
|
+
"type": "string"
|
|
918
|
+
}
|
|
919
|
+
},
|
|
920
|
+
"from_header": {
|
|
921
|
+
"type": [
|
|
922
|
+
"string",
|
|
923
|
+
"null"
|
|
924
|
+
],
|
|
925
|
+
"description": "Raw `From:` header from the message body, including any\ndisplay name (e.g. `\"Alice Example\" <alice@example.com>`).\nUse this when you need the display name for rendering.\n\nFor the bare email address (display name stripped), use\n`from_email`.\n"
|
|
926
|
+
},
|
|
927
|
+
"content_discarded_at": {
|
|
928
|
+
"type": [
|
|
929
|
+
"string",
|
|
930
|
+
"null"
|
|
931
|
+
],
|
|
932
|
+
"format": "date-time"
|
|
933
|
+
},
|
|
934
|
+
"content_discarded_by_delivery_id": {
|
|
935
|
+
"type": [
|
|
936
|
+
"string",
|
|
937
|
+
"null"
|
|
938
|
+
]
|
|
939
|
+
},
|
|
940
|
+
"from_email": {
|
|
941
|
+
"type": "string",
|
|
942
|
+
"description": "Bare email address parsed from the `From:` header, with\ndisplay name stripped (e.g. `alice@example.com`). Falls\nback to `sender` (the SMTP envelope MAIL FROM) when the\n`From:` header cannot be parsed.\n\n**This is the canonical \"who sent this email\" field for\nmost use cases**, including comparing against allowlists,\nrouting replies, or displaying the sender to a user. Use\n`from_header` when you specifically need the display name,\nor `sender`/`smtp_mail_from` when you need the SMTP\nenvelope value (e.g. to follow a bounce).\n"
|
|
943
|
+
},
|
|
944
|
+
"to_email": {
|
|
945
|
+
"type": "string",
|
|
946
|
+
"description": "Parsed to address (same as recipient)"
|
|
947
|
+
},
|
|
948
|
+
"from_known_address": {
|
|
949
|
+
"type": "boolean",
|
|
950
|
+
"description": "True when the inbound's sender address has a matching grant\nin the org's known-send-addresses list. Advisory: a true\nvalue does not by itself guarantee that a reply will be\naccepted by send-mail's gates; the per-send check at send\ntime remains authoritative.\n"
|
|
951
|
+
},
|
|
952
|
+
"replies": {
|
|
953
|
+
"type": "array",
|
|
954
|
+
"description": "Sent emails recorded as replies to this inbound, in send\norder (ascending). Populated when a customer's send-mail\nrequest carries an `in_reply_to` Message-ID that matches\nthis inbound's `message_id` in the same org. Includes\nattempts that were gate-denied, so the array reflects every\nrecorded reply attempt regardless of outcome.\n",
|
|
955
|
+
"items": {
|
|
956
|
+
"type": "object",
|
|
957
|
+
"properties": {
|
|
958
|
+
"id": {
|
|
959
|
+
"type": "string",
|
|
960
|
+
"format": "uuid",
|
|
961
|
+
"description": "Sent-email row id."
|
|
962
|
+
},
|
|
963
|
+
"status": {
|
|
964
|
+
"type": "string",
|
|
965
|
+
"description": "Lifecycle status of a sent_emails row. Possible values:\n\n - `queued`: pre-call INSERT; the outbound agent has not\n yet replied.\n - `submitted_to_agent`: agent accepted; `queue_id` is set.\n - `agent_failed`: agent rejected; `error_code` and\n `error_message` carry the reason.\n - `gate_denied`: a recipient-scope gate denied the send;\n the agent was never called. The `gates` array carries\n the denial detail. /send-mail returns 403 in this case\n so callers see the denial synchronously; /sent-emails\n additionally records the row for historical lookup,\n which is when this status appears in a listing.\n - `unknown`: terminal indeterminate; the on-box log\n poller couldn't classify the receiver's response.\n - `delivered` / `bounced` / `deferred` / `wait_timeout`:\n terminal delivery outcomes (see DeliveryStatus).\n",
|
|
966
|
+
"enum": [
|
|
967
|
+
"queued",
|
|
968
|
+
"submitted_to_agent",
|
|
969
|
+
"agent_failed",
|
|
970
|
+
"gate_denied",
|
|
971
|
+
"unknown",
|
|
972
|
+
"delivered",
|
|
973
|
+
"bounced",
|
|
974
|
+
"deferred",
|
|
975
|
+
"wait_timeout"
|
|
976
|
+
]
|
|
977
|
+
},
|
|
978
|
+
"to_address": {
|
|
979
|
+
"type": "string",
|
|
980
|
+
"description": "Recipient address as recorded on the sent_emails row."
|
|
981
|
+
},
|
|
982
|
+
"subject": {
|
|
983
|
+
"type": [
|
|
984
|
+
"string",
|
|
985
|
+
"null"
|
|
986
|
+
]
|
|
987
|
+
},
|
|
988
|
+
"created_at": {
|
|
989
|
+
"type": "string",
|
|
990
|
+
"format": "date-time"
|
|
991
|
+
},
|
|
992
|
+
"queue_id": {
|
|
993
|
+
"type": [
|
|
994
|
+
"string",
|
|
995
|
+
"null"
|
|
996
|
+
],
|
|
997
|
+
"description": "Outbound relay queue identifier when available."
|
|
998
|
+
}
|
|
999
|
+
},
|
|
1000
|
+
"required": [
|
|
1001
|
+
"id",
|
|
1002
|
+
"status",
|
|
1003
|
+
"to_address",
|
|
1004
|
+
"created_at"
|
|
1005
|
+
]
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
},
|
|
1009
|
+
"required": [
|
|
1010
|
+
"id",
|
|
1011
|
+
"sender",
|
|
1012
|
+
"recipient",
|
|
1013
|
+
"status",
|
|
1014
|
+
"domain",
|
|
1015
|
+
"created_at",
|
|
1016
|
+
"received_at",
|
|
1017
|
+
"webhook_attempt_count",
|
|
1018
|
+
"from_email",
|
|
1019
|
+
"to_email",
|
|
1020
|
+
"replies"
|
|
1021
|
+
]
|
|
1022
|
+
},
|
|
1023
|
+
"sdkName": "getEmail",
|
|
1024
|
+
"summary": "Get inbound email by id",
|
|
1025
|
+
"tag": "Emails",
|
|
1026
|
+
"tagCommand": "emails"
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
"binaryResponse": false,
|
|
1030
|
+
"bodyRequired": false,
|
|
1031
|
+
"command": "list-emails",
|
|
1032
|
+
"description": "Returns a paginated list of INBOUND emails received at your\nverified domains. Outbound messages sent via /send-mail are not\nincluded; this endpoint is the inbox view, not a unified\nsend/receive history.\n\nSupports filtering by domain, status, date range, and free-text\nsearch across subject, sender, and recipient fields.\n",
|
|
1033
|
+
"hasJsonBody": false,
|
|
1034
|
+
"method": "GET",
|
|
1035
|
+
"operationId": "listEmails",
|
|
1036
|
+
"path": "/emails",
|
|
1037
|
+
"pathParams": [],
|
|
1038
|
+
"queryParams": [
|
|
1039
|
+
{
|
|
1040
|
+
"description": "Pagination cursor from a previous response's `meta.cursor` field.\nFormat: `{ISO-datetime}|{id}`\n",
|
|
1041
|
+
"enum": null,
|
|
1042
|
+
"name": "cursor",
|
|
1043
|
+
"required": false,
|
|
1044
|
+
"type": "string"
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"description": "Number of results per page",
|
|
1048
|
+
"enum": null,
|
|
1049
|
+
"name": "limit",
|
|
1050
|
+
"required": false,
|
|
1051
|
+
"type": "integer"
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
"description": "Filter by domain ID",
|
|
1055
|
+
"enum": null,
|
|
1056
|
+
"name": "domain_id",
|
|
1057
|
+
"required": false,
|
|
1058
|
+
"type": "string"
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
"description": "Filter inbound rows by lifecycle status. See `EmailStatus`\nfor what each value means. Note that the webhook delivery\nstate is a SEPARATE lifecycle on the same row; filter by\n`webhook_status` semantics is not currently supported on\nthis endpoint.\n",
|
|
1062
|
+
"enum": null,
|
|
1063
|
+
"name": "status",
|
|
1064
|
+
"required": false,
|
|
1065
|
+
"type": "string"
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
"description": "Search subject, sender, and recipient (case-insensitive)",
|
|
1069
|
+
"enum": null,
|
|
1070
|
+
"name": "search",
|
|
1071
|
+
"required": false,
|
|
1072
|
+
"type": "string"
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"description": "Filter emails created on or after this timestamp",
|
|
1076
|
+
"enum": null,
|
|
1077
|
+
"name": "date_from",
|
|
1078
|
+
"required": false,
|
|
1079
|
+
"type": "string"
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
"description": "Filter emails created on or before this timestamp",
|
|
1083
|
+
"enum": null,
|
|
1084
|
+
"name": "date_to",
|
|
1085
|
+
"required": false,
|
|
1086
|
+
"type": "string"
|
|
1087
|
+
}
|
|
1088
|
+
],
|
|
461
1089
|
"requestSchema": null,
|
|
1090
|
+
"responseSchema": {
|
|
1091
|
+
"type": "array",
|
|
1092
|
+
"items": {
|
|
1093
|
+
"type": "object",
|
|
1094
|
+
"properties": {
|
|
1095
|
+
"id": {
|
|
1096
|
+
"type": "string",
|
|
1097
|
+
"format": "uuid"
|
|
1098
|
+
},
|
|
1099
|
+
"message_id": {
|
|
1100
|
+
"type": [
|
|
1101
|
+
"string",
|
|
1102
|
+
"null"
|
|
1103
|
+
]
|
|
1104
|
+
},
|
|
1105
|
+
"domain_id": {
|
|
1106
|
+
"type": [
|
|
1107
|
+
"string",
|
|
1108
|
+
"null"
|
|
1109
|
+
],
|
|
1110
|
+
"format": "uuid"
|
|
1111
|
+
},
|
|
1112
|
+
"org_id": {
|
|
1113
|
+
"type": [
|
|
1114
|
+
"string",
|
|
1115
|
+
"null"
|
|
1116
|
+
],
|
|
1117
|
+
"format": "uuid"
|
|
1118
|
+
},
|
|
1119
|
+
"status": {
|
|
1120
|
+
"type": "string",
|
|
1121
|
+
"description": "Lifecycle status of an INBOUND email (a row in the `emails`\ntable). Distinct from `SentEmailStatus`, which describes\nthe OUTBOUND lifecycle (the `sent_emails` table) and uses\na different vocabulary because the lifecycles differ.\nPossible values:\n\n - `pending`: the row was inserted at ingestion (mx_main)\n and has not yet completed the spam / filter / auth\n pipeline. Body and parsed fields are present; webhook\n delivery is not yet scheduled. Most rows transition out\n of `pending` within seconds.\n - `accepted`: the inbound passed the policy gates and is\n queued for webhook delivery. The `webhook_status` field\n tracks the separate webhook-delivery lifecycle from\n this point.\n - `completed`: terminal success. Webhook delivery\n attempted and acknowledged by every active endpoint, OR\n no endpoints are configured, so the row is durably\n archived.\n - `rejected`: terminal failure at ingestion (spam, blocked\n sender, filter rule, malformed). The body and metadata\n are stored for auditing but no webhook fires and the\n row is not repliable.\n\nSee also `webhook_status` (separate enum tracking the\nwebhook-delivery state machine) and `SentEmailStatus` (the\noutbound vocabulary).\n",
|
|
1122
|
+
"enum": [
|
|
1123
|
+
"pending",
|
|
1124
|
+
"accepted",
|
|
1125
|
+
"completed",
|
|
1126
|
+
"rejected"
|
|
1127
|
+
]
|
|
1128
|
+
},
|
|
1129
|
+
"sender": {
|
|
1130
|
+
"type": "string",
|
|
1131
|
+
"description": "SMTP envelope sender (return-path) the inbound mail server\naccepted. For most legitimate mail this equals the bare\naddress in the From header; for mailing lists, bounce\nhandlers, and forwarders it is typically the bounce address\nrather than the human-visible sender.\n\nFor the parsed From-header value (with display name handling\nand a sender-fallback when the header is unparseable), GET\nthe email by id and use `from_email`.\n"
|
|
1132
|
+
},
|
|
1133
|
+
"recipient": {
|
|
1134
|
+
"type": "string"
|
|
1135
|
+
},
|
|
1136
|
+
"subject": {
|
|
1137
|
+
"type": [
|
|
1138
|
+
"string",
|
|
1139
|
+
"null"
|
|
1140
|
+
]
|
|
1141
|
+
},
|
|
1142
|
+
"domain": {
|
|
1143
|
+
"type": "string"
|
|
1144
|
+
},
|
|
1145
|
+
"spam_score": {
|
|
1146
|
+
"type": [
|
|
1147
|
+
"number",
|
|
1148
|
+
"null"
|
|
1149
|
+
]
|
|
1150
|
+
},
|
|
1151
|
+
"created_at": {
|
|
1152
|
+
"type": "string",
|
|
1153
|
+
"format": "date-time"
|
|
1154
|
+
},
|
|
1155
|
+
"received_at": {
|
|
1156
|
+
"type": "string",
|
|
1157
|
+
"format": "date-time"
|
|
1158
|
+
},
|
|
1159
|
+
"raw_size_bytes": {
|
|
1160
|
+
"type": [
|
|
1161
|
+
"integer",
|
|
1162
|
+
"null"
|
|
1163
|
+
]
|
|
1164
|
+
},
|
|
1165
|
+
"webhook_status": {
|
|
1166
|
+
"type": [
|
|
1167
|
+
"string",
|
|
1168
|
+
"null"
|
|
1169
|
+
],
|
|
1170
|
+
"description": "Webhook-delivery state for an inbound email. Tracks a\nSEPARATE lifecycle from the email's `status` field; the\nsame row carries both. Possible values:\n\n - `pending`: ingestion is past `pending` (the email itself\n is `accepted`) but the webhook fan-out has not yet\n started for this row.\n - `in_flight`: at least one delivery attempt is in flight.\n - `fired`: terminal success. Every active endpoint\n acknowledged the delivery (or accepted it after retries).\n - `failed`: terminal partial-failure. At least one endpoint\n exhausted its retry budget; some endpoints may still\n have succeeded.\n - `exhausted`: terminal failure. Every endpoint exhausted\n its retry budget without success.\n - `null`: no endpoints configured, so no webhook lifecycle\n applies.\n\nNote that the value `pending` here does NOT mean the email\nis `pending`; it means the email is past ingestion but\nwebhook delivery has not yet begun. Two overlapping uses\nof the word `pending` for distinct lifecycle phases.\n",
|
|
1171
|
+
"enum": [
|
|
1172
|
+
"pending",
|
|
1173
|
+
"in_flight",
|
|
1174
|
+
"fired",
|
|
1175
|
+
"failed",
|
|
1176
|
+
"exhausted",
|
|
1177
|
+
null
|
|
1178
|
+
]
|
|
1179
|
+
},
|
|
1180
|
+
"webhook_attempt_count": {
|
|
1181
|
+
"type": "integer"
|
|
1182
|
+
}
|
|
1183
|
+
},
|
|
1184
|
+
"required": [
|
|
1185
|
+
"id",
|
|
1186
|
+
"status",
|
|
1187
|
+
"sender",
|
|
1188
|
+
"recipient",
|
|
1189
|
+
"domain",
|
|
1190
|
+
"created_at",
|
|
1191
|
+
"received_at",
|
|
1192
|
+
"webhook_attempt_count"
|
|
1193
|
+
]
|
|
1194
|
+
}
|
|
1195
|
+
},
|
|
1196
|
+
"sdkName": "listEmails",
|
|
1197
|
+
"summary": "List inbound emails",
|
|
1198
|
+
"tag": "Emails",
|
|
1199
|
+
"tagCommand": "emails"
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
"binaryResponse": false,
|
|
1203
|
+
"bodyRequired": false,
|
|
1204
|
+
"command": "replay-email-webhooks",
|
|
1205
|
+
"description": "Re-delivers the webhook payload for this email to all active\nendpoints matching the email's domain. Rate limited per-email\n(short cooldown between successive replays of the same email)\nand per-org (burst + sustained windows), sharing an org-wide\nbudget with delivery replays.\n",
|
|
1206
|
+
"hasJsonBody": false,
|
|
1207
|
+
"method": "POST",
|
|
1208
|
+
"operationId": "replayEmailWebhooks",
|
|
1209
|
+
"path": "/emails/{id}/replay",
|
|
1210
|
+
"pathParams": [
|
|
1211
|
+
{
|
|
1212
|
+
"description": "Resource UUID",
|
|
1213
|
+
"enum": null,
|
|
1214
|
+
"name": "id",
|
|
1215
|
+
"required": true,
|
|
1216
|
+
"type": "string"
|
|
1217
|
+
}
|
|
1218
|
+
],
|
|
1219
|
+
"queryParams": [],
|
|
1220
|
+
"requestSchema": null,
|
|
1221
|
+
"responseSchema": {
|
|
1222
|
+
"type": "object",
|
|
1223
|
+
"properties": {
|
|
1224
|
+
"delivered": {
|
|
1225
|
+
"type": "integer",
|
|
1226
|
+
"description": "Number of successful deliveries"
|
|
1227
|
+
},
|
|
1228
|
+
"failed": {
|
|
1229
|
+
"type": "integer",
|
|
1230
|
+
"description": "Number of failed deliveries"
|
|
1231
|
+
}
|
|
1232
|
+
},
|
|
1233
|
+
"required": [
|
|
1234
|
+
"delivered",
|
|
1235
|
+
"failed"
|
|
1236
|
+
]
|
|
1237
|
+
},
|
|
462
1238
|
"sdkName": "replayEmailWebhooks",
|
|
463
1239
|
"summary": "Replay email webhooks",
|
|
464
1240
|
"tag": "Emails",
|
|
@@ -506,6 +1282,104 @@ export const operationManifest = [
|
|
|
506
1282
|
"url"
|
|
507
1283
|
]
|
|
508
1284
|
},
|
|
1285
|
+
"responseSchema": {
|
|
1286
|
+
"type": "object",
|
|
1287
|
+
"properties": {
|
|
1288
|
+
"id": {
|
|
1289
|
+
"type": "string",
|
|
1290
|
+
"format": "uuid"
|
|
1291
|
+
},
|
|
1292
|
+
"org_id": {
|
|
1293
|
+
"type": "string",
|
|
1294
|
+
"format": "uuid"
|
|
1295
|
+
},
|
|
1296
|
+
"url": {
|
|
1297
|
+
"type": [
|
|
1298
|
+
"string",
|
|
1299
|
+
"null"
|
|
1300
|
+
]
|
|
1301
|
+
},
|
|
1302
|
+
"enabled": {
|
|
1303
|
+
"type": "boolean"
|
|
1304
|
+
},
|
|
1305
|
+
"domain_id": {
|
|
1306
|
+
"type": [
|
|
1307
|
+
"string",
|
|
1308
|
+
"null"
|
|
1309
|
+
],
|
|
1310
|
+
"format": "uuid",
|
|
1311
|
+
"description": "Restrict this endpoint to emails from a specific domain"
|
|
1312
|
+
},
|
|
1313
|
+
"rules": {
|
|
1314
|
+
"type": "object",
|
|
1315
|
+
"description": "Endpoint-specific filtering rules"
|
|
1316
|
+
},
|
|
1317
|
+
"created_at": {
|
|
1318
|
+
"type": "string",
|
|
1319
|
+
"format": "date-time"
|
|
1320
|
+
},
|
|
1321
|
+
"updated_at": {
|
|
1322
|
+
"type": "string",
|
|
1323
|
+
"format": "date-time"
|
|
1324
|
+
},
|
|
1325
|
+
"delivery_count": {
|
|
1326
|
+
"type": "integer",
|
|
1327
|
+
"description": "Total webhook deliveries attempted"
|
|
1328
|
+
},
|
|
1329
|
+
"success_count": {
|
|
1330
|
+
"type": "integer",
|
|
1331
|
+
"description": "Successful deliveries"
|
|
1332
|
+
},
|
|
1333
|
+
"failure_count": {
|
|
1334
|
+
"type": "integer",
|
|
1335
|
+
"description": "Failed deliveries"
|
|
1336
|
+
},
|
|
1337
|
+
"consecutive_fails": {
|
|
1338
|
+
"type": "integer",
|
|
1339
|
+
"description": "Current streak of consecutive failures"
|
|
1340
|
+
},
|
|
1341
|
+
"last_delivery_at": {
|
|
1342
|
+
"type": [
|
|
1343
|
+
"string",
|
|
1344
|
+
"null"
|
|
1345
|
+
],
|
|
1346
|
+
"format": "date-time"
|
|
1347
|
+
},
|
|
1348
|
+
"last_success_at": {
|
|
1349
|
+
"type": [
|
|
1350
|
+
"string",
|
|
1351
|
+
"null"
|
|
1352
|
+
],
|
|
1353
|
+
"format": "date-time"
|
|
1354
|
+
},
|
|
1355
|
+
"last_failure_at": {
|
|
1356
|
+
"type": [
|
|
1357
|
+
"string",
|
|
1358
|
+
"null"
|
|
1359
|
+
],
|
|
1360
|
+
"format": "date-time"
|
|
1361
|
+
},
|
|
1362
|
+
"deactivated_at": {
|
|
1363
|
+
"type": [
|
|
1364
|
+
"string",
|
|
1365
|
+
"null"
|
|
1366
|
+
],
|
|
1367
|
+
"format": "date-time"
|
|
1368
|
+
}
|
|
1369
|
+
},
|
|
1370
|
+
"required": [
|
|
1371
|
+
"id",
|
|
1372
|
+
"org_id",
|
|
1373
|
+
"enabled",
|
|
1374
|
+
"rules",
|
|
1375
|
+
"created_at",
|
|
1376
|
+
"updated_at",
|
|
1377
|
+
"delivery_count",
|
|
1378
|
+
"success_count",
|
|
1379
|
+
"failure_count",
|
|
1380
|
+
"consecutive_fails"
|
|
1381
|
+
]
|
|
1382
|
+
},
|
|
509
1383
|
"sdkName": "createEndpoint",
|
|
510
1384
|
"summary": "Create a webhook endpoint",
|
|
511
1385
|
"tag": "Endpoints",
|
|
@@ -531,6 +1405,7 @@ export const operationManifest = [
|
|
|
531
1405
|
],
|
|
532
1406
|
"queryParams": [],
|
|
533
1407
|
"requestSchema": null,
|
|
1408
|
+
"responseSchema": null,
|
|
534
1409
|
"sdkName": "deleteEndpoint",
|
|
535
1410
|
"summary": "Delete a webhook endpoint",
|
|
536
1411
|
"tag": "Endpoints",
|
|
@@ -548,6 +1423,107 @@ export const operationManifest = [
|
|
|
548
1423
|
"pathParams": [],
|
|
549
1424
|
"queryParams": [],
|
|
550
1425
|
"requestSchema": null,
|
|
1426
|
+
"responseSchema": {
|
|
1427
|
+
"type": "array",
|
|
1428
|
+
"items": {
|
|
1429
|
+
"type": "object",
|
|
1430
|
+
"properties": {
|
|
1431
|
+
"id": {
|
|
1432
|
+
"type": "string",
|
|
1433
|
+
"format": "uuid"
|
|
1434
|
+
},
|
|
1435
|
+
"org_id": {
|
|
1436
|
+
"type": "string",
|
|
1437
|
+
"format": "uuid"
|
|
1438
|
+
},
|
|
1439
|
+
"url": {
|
|
1440
|
+
"type": [
|
|
1441
|
+
"string",
|
|
1442
|
+
"null"
|
|
1443
|
+
]
|
|
1444
|
+
},
|
|
1445
|
+
"enabled": {
|
|
1446
|
+
"type": "boolean"
|
|
1447
|
+
},
|
|
1448
|
+
"domain_id": {
|
|
1449
|
+
"type": [
|
|
1450
|
+
"string",
|
|
1451
|
+
"null"
|
|
1452
|
+
],
|
|
1453
|
+
"format": "uuid",
|
|
1454
|
+
"description": "Restrict this endpoint to emails from a specific domain"
|
|
1455
|
+
},
|
|
1456
|
+
"rules": {
|
|
1457
|
+
"type": "object",
|
|
1458
|
+
"description": "Endpoint-specific filtering rules"
|
|
1459
|
+
},
|
|
1460
|
+
"created_at": {
|
|
1461
|
+
"type": "string",
|
|
1462
|
+
"format": "date-time"
|
|
1463
|
+
},
|
|
1464
|
+
"updated_at": {
|
|
1465
|
+
"type": "string",
|
|
1466
|
+
"format": "date-time"
|
|
1467
|
+
},
|
|
1468
|
+
"delivery_count": {
|
|
1469
|
+
"type": "integer",
|
|
1470
|
+
"description": "Total webhook deliveries attempted"
|
|
1471
|
+
},
|
|
1472
|
+
"success_count": {
|
|
1473
|
+
"type": "integer",
|
|
1474
|
+
"description": "Successful deliveries"
|
|
1475
|
+
},
|
|
1476
|
+
"failure_count": {
|
|
1477
|
+
"type": "integer",
|
|
1478
|
+
"description": "Failed deliveries"
|
|
1479
|
+
},
|
|
1480
|
+
"consecutive_fails": {
|
|
1481
|
+
"type": "integer",
|
|
1482
|
+
"description": "Current streak of consecutive failures"
|
|
1483
|
+
},
|
|
1484
|
+
"last_delivery_at": {
|
|
1485
|
+
"type": [
|
|
1486
|
+
"string",
|
|
1487
|
+
"null"
|
|
1488
|
+
],
|
|
1489
|
+
"format": "date-time"
|
|
1490
|
+
},
|
|
1491
|
+
"last_success_at": {
|
|
1492
|
+
"type": [
|
|
1493
|
+
"string",
|
|
1494
|
+
"null"
|
|
1495
|
+
],
|
|
1496
|
+
"format": "date-time"
|
|
1497
|
+
},
|
|
1498
|
+
"last_failure_at": {
|
|
1499
|
+
"type": [
|
|
1500
|
+
"string",
|
|
1501
|
+
"null"
|
|
1502
|
+
],
|
|
1503
|
+
"format": "date-time"
|
|
1504
|
+
},
|
|
1505
|
+
"deactivated_at": {
|
|
1506
|
+
"type": [
|
|
1507
|
+
"string",
|
|
1508
|
+
"null"
|
|
1509
|
+
],
|
|
1510
|
+
"format": "date-time"
|
|
1511
|
+
}
|
|
1512
|
+
},
|
|
1513
|
+
"required": [
|
|
1514
|
+
"id",
|
|
1515
|
+
"org_id",
|
|
1516
|
+
"enabled",
|
|
1517
|
+
"rules",
|
|
1518
|
+
"created_at",
|
|
1519
|
+
"updated_at",
|
|
1520
|
+
"delivery_count",
|
|
1521
|
+
"success_count",
|
|
1522
|
+
"failure_count",
|
|
1523
|
+
"consecutive_fails"
|
|
1524
|
+
]
|
|
1525
|
+
}
|
|
1526
|
+
},
|
|
551
1527
|
"sdkName": "listEndpoints",
|
|
552
1528
|
"summary": "List webhook endpoints",
|
|
553
1529
|
"tag": "Endpoints",
|
|
@@ -573,6 +1549,27 @@ export const operationManifest = [
|
|
|
573
1549
|
],
|
|
574
1550
|
"queryParams": [],
|
|
575
1551
|
"requestSchema": null,
|
|
1552
|
+
"responseSchema": {
|
|
1553
|
+
"type": "object",
|
|
1554
|
+
"properties": {
|
|
1555
|
+
"status": {
|
|
1556
|
+
"type": "integer",
|
|
1557
|
+
"description": "HTTP status code returned by the endpoint"
|
|
1558
|
+
},
|
|
1559
|
+
"body": {
|
|
1560
|
+
"type": "string",
|
|
1561
|
+
"description": "Response body (truncated to 1000 characters)"
|
|
1562
|
+
},
|
|
1563
|
+
"signature": {
|
|
1564
|
+
"type": "string",
|
|
1565
|
+
"description": "The signature header value sent (if webhook secret is configured)"
|
|
1566
|
+
}
|
|
1567
|
+
},
|
|
1568
|
+
"required": [
|
|
1569
|
+
"status",
|
|
1570
|
+
"body"
|
|
1571
|
+
]
|
|
1572
|
+
},
|
|
576
1573
|
"sdkName": "testEndpoint",
|
|
577
1574
|
"summary": "Send a test webhook",
|
|
578
1575
|
"tag": "Endpoints",
|
|
@@ -622,6 +1619,104 @@ export const operationManifest = [
|
|
|
622
1619
|
},
|
|
623
1620
|
"minProperties": 1
|
|
624
1621
|
},
|
|
1622
|
+
"responseSchema": {
|
|
1623
|
+
"type": "object",
|
|
1624
|
+
"properties": {
|
|
1625
|
+
"id": {
|
|
1626
|
+
"type": "string",
|
|
1627
|
+
"format": "uuid"
|
|
1628
|
+
},
|
|
1629
|
+
"org_id": {
|
|
1630
|
+
"type": "string",
|
|
1631
|
+
"format": "uuid"
|
|
1632
|
+
},
|
|
1633
|
+
"url": {
|
|
1634
|
+
"type": [
|
|
1635
|
+
"string",
|
|
1636
|
+
"null"
|
|
1637
|
+
]
|
|
1638
|
+
},
|
|
1639
|
+
"enabled": {
|
|
1640
|
+
"type": "boolean"
|
|
1641
|
+
},
|
|
1642
|
+
"domain_id": {
|
|
1643
|
+
"type": [
|
|
1644
|
+
"string",
|
|
1645
|
+
"null"
|
|
1646
|
+
],
|
|
1647
|
+
"format": "uuid",
|
|
1648
|
+
"description": "Restrict this endpoint to emails from a specific domain"
|
|
1649
|
+
},
|
|
1650
|
+
"rules": {
|
|
1651
|
+
"type": "object",
|
|
1652
|
+
"description": "Endpoint-specific filtering rules"
|
|
1653
|
+
},
|
|
1654
|
+
"created_at": {
|
|
1655
|
+
"type": "string",
|
|
1656
|
+
"format": "date-time"
|
|
1657
|
+
},
|
|
1658
|
+
"updated_at": {
|
|
1659
|
+
"type": "string",
|
|
1660
|
+
"format": "date-time"
|
|
1661
|
+
},
|
|
1662
|
+
"delivery_count": {
|
|
1663
|
+
"type": "integer",
|
|
1664
|
+
"description": "Total webhook deliveries attempted"
|
|
1665
|
+
},
|
|
1666
|
+
"success_count": {
|
|
1667
|
+
"type": "integer",
|
|
1668
|
+
"description": "Successful deliveries"
|
|
1669
|
+
},
|
|
1670
|
+
"failure_count": {
|
|
1671
|
+
"type": "integer",
|
|
1672
|
+
"description": "Failed deliveries"
|
|
1673
|
+
},
|
|
1674
|
+
"consecutive_fails": {
|
|
1675
|
+
"type": "integer",
|
|
1676
|
+
"description": "Current streak of consecutive failures"
|
|
1677
|
+
},
|
|
1678
|
+
"last_delivery_at": {
|
|
1679
|
+
"type": [
|
|
1680
|
+
"string",
|
|
1681
|
+
"null"
|
|
1682
|
+
],
|
|
1683
|
+
"format": "date-time"
|
|
1684
|
+
},
|
|
1685
|
+
"last_success_at": {
|
|
1686
|
+
"type": [
|
|
1687
|
+
"string",
|
|
1688
|
+
"null"
|
|
1689
|
+
],
|
|
1690
|
+
"format": "date-time"
|
|
1691
|
+
},
|
|
1692
|
+
"last_failure_at": {
|
|
1693
|
+
"type": [
|
|
1694
|
+
"string",
|
|
1695
|
+
"null"
|
|
1696
|
+
],
|
|
1697
|
+
"format": "date-time"
|
|
1698
|
+
},
|
|
1699
|
+
"deactivated_at": {
|
|
1700
|
+
"type": [
|
|
1701
|
+
"string",
|
|
1702
|
+
"null"
|
|
1703
|
+
],
|
|
1704
|
+
"format": "date-time"
|
|
1705
|
+
}
|
|
1706
|
+
},
|
|
1707
|
+
"required": [
|
|
1708
|
+
"id",
|
|
1709
|
+
"org_id",
|
|
1710
|
+
"enabled",
|
|
1711
|
+
"rules",
|
|
1712
|
+
"created_at",
|
|
1713
|
+
"updated_at",
|
|
1714
|
+
"delivery_count",
|
|
1715
|
+
"success_count",
|
|
1716
|
+
"failure_count",
|
|
1717
|
+
"consecutive_fails"
|
|
1718
|
+
]
|
|
1719
|
+
},
|
|
625
1720
|
"sdkName": "updateEndpoint",
|
|
626
1721
|
"summary": "Update a webhook endpoint",
|
|
627
1722
|
"tag": "Endpoints",
|
|
@@ -666,7 +1761,54 @@ export const operationManifest = [
|
|
|
666
1761
|
},
|
|
667
1762
|
"required": [
|
|
668
1763
|
"type",
|
|
669
|
-
"pattern"
|
|
1764
|
+
"pattern"
|
|
1765
|
+
]
|
|
1766
|
+
},
|
|
1767
|
+
"responseSchema": {
|
|
1768
|
+
"type": "object",
|
|
1769
|
+
"properties": {
|
|
1770
|
+
"id": {
|
|
1771
|
+
"type": "string",
|
|
1772
|
+
"format": "uuid"
|
|
1773
|
+
},
|
|
1774
|
+
"org_id": {
|
|
1775
|
+
"type": "string",
|
|
1776
|
+
"format": "uuid"
|
|
1777
|
+
},
|
|
1778
|
+
"domain_id": {
|
|
1779
|
+
"type": [
|
|
1780
|
+
"string",
|
|
1781
|
+
"null"
|
|
1782
|
+
],
|
|
1783
|
+
"format": "uuid",
|
|
1784
|
+
"description": "If set, filter applies only to this domain"
|
|
1785
|
+
},
|
|
1786
|
+
"type": {
|
|
1787
|
+
"type": "string",
|
|
1788
|
+
"enum": [
|
|
1789
|
+
"whitelist",
|
|
1790
|
+
"blocklist"
|
|
1791
|
+
]
|
|
1792
|
+
},
|
|
1793
|
+
"pattern": {
|
|
1794
|
+
"type": "string",
|
|
1795
|
+
"description": "Email address or pattern to match (stored lowercase)"
|
|
1796
|
+
},
|
|
1797
|
+
"enabled": {
|
|
1798
|
+
"type": "boolean"
|
|
1799
|
+
},
|
|
1800
|
+
"created_at": {
|
|
1801
|
+
"type": "string",
|
|
1802
|
+
"format": "date-time"
|
|
1803
|
+
}
|
|
1804
|
+
},
|
|
1805
|
+
"required": [
|
|
1806
|
+
"id",
|
|
1807
|
+
"org_id",
|
|
1808
|
+
"type",
|
|
1809
|
+
"pattern",
|
|
1810
|
+
"enabled",
|
|
1811
|
+
"created_at"
|
|
670
1812
|
]
|
|
671
1813
|
},
|
|
672
1814
|
"sdkName": "createFilter",
|
|
@@ -694,6 +1836,7 @@ export const operationManifest = [
|
|
|
694
1836
|
],
|
|
695
1837
|
"queryParams": [],
|
|
696
1838
|
"requestSchema": null,
|
|
1839
|
+
"responseSchema": null,
|
|
697
1840
|
"sdkName": "deleteFilter",
|
|
698
1841
|
"summary": "Delete a filter rule",
|
|
699
1842
|
"tag": "Filters",
|
|
@@ -711,6 +1854,56 @@ export const operationManifest = [
|
|
|
711
1854
|
"pathParams": [],
|
|
712
1855
|
"queryParams": [],
|
|
713
1856
|
"requestSchema": null,
|
|
1857
|
+
"responseSchema": {
|
|
1858
|
+
"type": "array",
|
|
1859
|
+
"items": {
|
|
1860
|
+
"type": "object",
|
|
1861
|
+
"properties": {
|
|
1862
|
+
"id": {
|
|
1863
|
+
"type": "string",
|
|
1864
|
+
"format": "uuid"
|
|
1865
|
+
},
|
|
1866
|
+
"org_id": {
|
|
1867
|
+
"type": "string",
|
|
1868
|
+
"format": "uuid"
|
|
1869
|
+
},
|
|
1870
|
+
"domain_id": {
|
|
1871
|
+
"type": [
|
|
1872
|
+
"string",
|
|
1873
|
+
"null"
|
|
1874
|
+
],
|
|
1875
|
+
"format": "uuid",
|
|
1876
|
+
"description": "If set, filter applies only to this domain"
|
|
1877
|
+
},
|
|
1878
|
+
"type": {
|
|
1879
|
+
"type": "string",
|
|
1880
|
+
"enum": [
|
|
1881
|
+
"whitelist",
|
|
1882
|
+
"blocklist"
|
|
1883
|
+
]
|
|
1884
|
+
},
|
|
1885
|
+
"pattern": {
|
|
1886
|
+
"type": "string",
|
|
1887
|
+
"description": "Email address or pattern to match (stored lowercase)"
|
|
1888
|
+
},
|
|
1889
|
+
"enabled": {
|
|
1890
|
+
"type": "boolean"
|
|
1891
|
+
},
|
|
1892
|
+
"created_at": {
|
|
1893
|
+
"type": "string",
|
|
1894
|
+
"format": "date-time"
|
|
1895
|
+
}
|
|
1896
|
+
},
|
|
1897
|
+
"required": [
|
|
1898
|
+
"id",
|
|
1899
|
+
"org_id",
|
|
1900
|
+
"type",
|
|
1901
|
+
"pattern",
|
|
1902
|
+
"enabled",
|
|
1903
|
+
"created_at"
|
|
1904
|
+
]
|
|
1905
|
+
}
|
|
1906
|
+
},
|
|
714
1907
|
"sdkName": "listFilters",
|
|
715
1908
|
"summary": "List filter rules",
|
|
716
1909
|
"tag": "Filters",
|
|
@@ -747,6 +1940,53 @@ export const operationManifest = [
|
|
|
747
1940
|
"enabled"
|
|
748
1941
|
]
|
|
749
1942
|
},
|
|
1943
|
+
"responseSchema": {
|
|
1944
|
+
"type": "object",
|
|
1945
|
+
"properties": {
|
|
1946
|
+
"id": {
|
|
1947
|
+
"type": "string",
|
|
1948
|
+
"format": "uuid"
|
|
1949
|
+
},
|
|
1950
|
+
"org_id": {
|
|
1951
|
+
"type": "string",
|
|
1952
|
+
"format": "uuid"
|
|
1953
|
+
},
|
|
1954
|
+
"domain_id": {
|
|
1955
|
+
"type": [
|
|
1956
|
+
"string",
|
|
1957
|
+
"null"
|
|
1958
|
+
],
|
|
1959
|
+
"format": "uuid",
|
|
1960
|
+
"description": "If set, filter applies only to this domain"
|
|
1961
|
+
},
|
|
1962
|
+
"type": {
|
|
1963
|
+
"type": "string",
|
|
1964
|
+
"enum": [
|
|
1965
|
+
"whitelist",
|
|
1966
|
+
"blocklist"
|
|
1967
|
+
]
|
|
1968
|
+
},
|
|
1969
|
+
"pattern": {
|
|
1970
|
+
"type": "string",
|
|
1971
|
+
"description": "Email address or pattern to match (stored lowercase)"
|
|
1972
|
+
},
|
|
1973
|
+
"enabled": {
|
|
1974
|
+
"type": "boolean"
|
|
1975
|
+
},
|
|
1976
|
+
"created_at": {
|
|
1977
|
+
"type": "string",
|
|
1978
|
+
"format": "date-time"
|
|
1979
|
+
}
|
|
1980
|
+
},
|
|
1981
|
+
"required": [
|
|
1982
|
+
"id",
|
|
1983
|
+
"org_id",
|
|
1984
|
+
"type",
|
|
1985
|
+
"pattern",
|
|
1986
|
+
"enabled",
|
|
1987
|
+
"created_at"
|
|
1988
|
+
]
|
|
1989
|
+
},
|
|
750
1990
|
"sdkName": "updateFilter",
|
|
751
1991
|
"summary": "Update a filter rule",
|
|
752
1992
|
"tag": "Filters",
|
|
@@ -764,11 +2004,763 @@ export const operationManifest = [
|
|
|
764
2004
|
"pathParams": [],
|
|
765
2005
|
"queryParams": [],
|
|
766
2006
|
"requestSchema": null,
|
|
2007
|
+
"responseSchema": {
|
|
2008
|
+
"type": "array",
|
|
2009
|
+
"items": {
|
|
2010
|
+
"description": "One recipient-scope rule describing a destination the caller\nmay send to. Discriminated on `type`. Each rule carries a\nhuman-prose `description` field intended for display.\n\nRule kinds are stable within an SDK release. A response\ncontaining a `type` value not enumerated in this schema\nmeans the server is running a newer version than the SDK;\nupgrade the SDK to the release that matches the server's\nschema. Strict-parsing SDKs (Go, Python) will raise a\ndecode error in that case rather than silently dropping\nthe unknown rule, since silent drops would let an outbound\nagent reason from an incomplete view of its own permissions.\n",
|
|
2011
|
+
"discriminator": {
|
|
2012
|
+
"propertyName": "type",
|
|
2013
|
+
"mapping": {
|
|
2014
|
+
"any_recipient": "#/components/schemas/SendPermissionAnyRecipient",
|
|
2015
|
+
"managed_zone": "#/components/schemas/SendPermissionManagedZone",
|
|
2016
|
+
"your_domain": "#/components/schemas/SendPermissionYourDomain",
|
|
2017
|
+
"address": "#/components/schemas/SendPermissionAddress"
|
|
2018
|
+
}
|
|
2019
|
+
},
|
|
2020
|
+
"oneOf": [
|
|
2021
|
+
{
|
|
2022
|
+
"type": "object",
|
|
2023
|
+
"description": "The caller can send to any recipient. When this rule is\npresent, every other rule in the response is redundant.\n",
|
|
2024
|
+
"properties": {
|
|
2025
|
+
"type": {
|
|
2026
|
+
"type": "string",
|
|
2027
|
+
"enum": [
|
|
2028
|
+
"any_recipient"
|
|
2029
|
+
]
|
|
2030
|
+
},
|
|
2031
|
+
"description": {
|
|
2032
|
+
"type": "string",
|
|
2033
|
+
"description": "Human-prose summary of the rule."
|
|
2034
|
+
}
|
|
2035
|
+
},
|
|
2036
|
+
"required": [
|
|
2037
|
+
"type",
|
|
2038
|
+
"description"
|
|
2039
|
+
]
|
|
2040
|
+
},
|
|
2041
|
+
{
|
|
2042
|
+
"type": "object",
|
|
2043
|
+
"description": "The caller can send to any address at the named\nPrimitive-managed zone. Always emitted (no entitlement\nrequired) because Primitive owns the zone and every mailbox\nbelongs to a Primitive customer by construction.\n",
|
|
2044
|
+
"properties": {
|
|
2045
|
+
"type": {
|
|
2046
|
+
"type": "string",
|
|
2047
|
+
"enum": [
|
|
2048
|
+
"managed_zone"
|
|
2049
|
+
]
|
|
2050
|
+
},
|
|
2051
|
+
"zone": {
|
|
2052
|
+
"type": "string",
|
|
2053
|
+
"description": "The managed apex domain. Sends are accepted to any\naddress at the apex itself or any subdomain (e.g.\n`alice@primitive.email` and `alice@acme.primitive.email`\nboth match the `primitive.email` zone rule).\n"
|
|
2054
|
+
},
|
|
2055
|
+
"description": {
|
|
2056
|
+
"type": "string",
|
|
2057
|
+
"description": "Human-prose summary of the rule."
|
|
2058
|
+
}
|
|
2059
|
+
},
|
|
2060
|
+
"required": [
|
|
2061
|
+
"type",
|
|
2062
|
+
"zone",
|
|
2063
|
+
"description"
|
|
2064
|
+
]
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
"type": "object",
|
|
2068
|
+
"description": "The caller can send to any address at one of their own\nverified outbound domains. Emitted once per active row in\nthe org's `domains` table.\n",
|
|
2069
|
+
"properties": {
|
|
2070
|
+
"type": {
|
|
2071
|
+
"type": "string",
|
|
2072
|
+
"enum": [
|
|
2073
|
+
"your_domain"
|
|
2074
|
+
]
|
|
2075
|
+
},
|
|
2076
|
+
"domain": {
|
|
2077
|
+
"type": "string",
|
|
2078
|
+
"description": "A verified outbound domain owned by the caller's org."
|
|
2079
|
+
},
|
|
2080
|
+
"description": {
|
|
2081
|
+
"type": "string",
|
|
2082
|
+
"description": "Human-prose summary of the rule."
|
|
2083
|
+
}
|
|
2084
|
+
},
|
|
2085
|
+
"required": [
|
|
2086
|
+
"type",
|
|
2087
|
+
"domain",
|
|
2088
|
+
"description"
|
|
2089
|
+
]
|
|
2090
|
+
},
|
|
2091
|
+
{
|
|
2092
|
+
"type": "object",
|
|
2093
|
+
"description": "The caller can send to a specific address that has\nauthenticated inbound mail to the org. Emitted once per row\nin the org's `known_send_addresses` table, capped at\n`meta.address_cap`.\n",
|
|
2094
|
+
"properties": {
|
|
2095
|
+
"type": {
|
|
2096
|
+
"type": "string",
|
|
2097
|
+
"enum": [
|
|
2098
|
+
"address"
|
|
2099
|
+
]
|
|
2100
|
+
},
|
|
2101
|
+
"address": {
|
|
2102
|
+
"type": "string",
|
|
2103
|
+
"description": "The bare email address this rule grants sends to."
|
|
2104
|
+
},
|
|
2105
|
+
"last_received_at": {
|
|
2106
|
+
"type": "string",
|
|
2107
|
+
"format": "date-time",
|
|
2108
|
+
"description": "Most recent inbound email from this address that\nauthenticated successfully (DMARC pass + DKIM/SPF\nalignment). Updated on each new authenticated receipt.\n"
|
|
2109
|
+
},
|
|
2110
|
+
"received_count": {
|
|
2111
|
+
"type": "integer",
|
|
2112
|
+
"description": "Total number of authenticated inbound emails from this\naddress. Increments only when `last_received_at` advances.\n"
|
|
2113
|
+
},
|
|
2114
|
+
"description": {
|
|
2115
|
+
"type": "string",
|
|
2116
|
+
"description": "Human-prose summary of the rule."
|
|
2117
|
+
}
|
|
2118
|
+
},
|
|
2119
|
+
"required": [
|
|
2120
|
+
"type",
|
|
2121
|
+
"address",
|
|
2122
|
+
"last_received_at",
|
|
2123
|
+
"received_count",
|
|
2124
|
+
"description"
|
|
2125
|
+
]
|
|
2126
|
+
}
|
|
2127
|
+
]
|
|
2128
|
+
}
|
|
2129
|
+
},
|
|
767
2130
|
"sdkName": "getSendPermissions",
|
|
768
2131
|
"summary": "List send-permission rules",
|
|
769
2132
|
"tag": "Sending",
|
|
770
2133
|
"tagCommand": "sending"
|
|
771
2134
|
},
|
|
2135
|
+
{
|
|
2136
|
+
"binaryResponse": false,
|
|
2137
|
+
"bodyRequired": false,
|
|
2138
|
+
"command": "get-sent-email",
|
|
2139
|
+
"description": "Returns the full sent-email record by id, including\n`body_text` and `body_html` (omitted from the listing\nendpoint to keep paginated responses small). Use this when\ndiagnosing a specific send, e.g. inspecting the receiver's\nSMTP response on a `bounced` row or pulling the gate\ndenial detail on a `gate_denied` row.\n",
|
|
2140
|
+
"hasJsonBody": false,
|
|
2141
|
+
"method": "GET",
|
|
2142
|
+
"operationId": "getSentEmail",
|
|
2143
|
+
"path": "/sent-emails/{id}",
|
|
2144
|
+
"pathParams": [
|
|
2145
|
+
{
|
|
2146
|
+
"description": "Resource UUID",
|
|
2147
|
+
"enum": null,
|
|
2148
|
+
"name": "id",
|
|
2149
|
+
"required": true,
|
|
2150
|
+
"type": "string"
|
|
2151
|
+
}
|
|
2152
|
+
],
|
|
2153
|
+
"queryParams": [],
|
|
2154
|
+
"requestSchema": null,
|
|
2155
|
+
"responseSchema": {
|
|
2156
|
+
"description": "Full sent-email record, including `body_text` and\n`body_html`. Returned by /sent-emails/{id}.\n",
|
|
2157
|
+
"allOf": [
|
|
2158
|
+
{
|
|
2159
|
+
"type": "object",
|
|
2160
|
+
"description": "List-row projection of a sent-email record. Drops\n`body_text` and `body_html` to keep paginated responses\nsmall; fetch /sent-emails/{id} for the full record with\nbodies.\n",
|
|
2161
|
+
"properties": {
|
|
2162
|
+
"id": {
|
|
2163
|
+
"type": "string",
|
|
2164
|
+
"format": "uuid"
|
|
2165
|
+
},
|
|
2166
|
+
"status": {
|
|
2167
|
+
"type": "string",
|
|
2168
|
+
"description": "Lifecycle status of a sent_emails row. Possible values:\n\n - `queued`: pre-call INSERT; the outbound agent has not\n yet replied.\n - `submitted_to_agent`: agent accepted; `queue_id` is set.\n - `agent_failed`: agent rejected; `error_code` and\n `error_message` carry the reason.\n - `gate_denied`: a recipient-scope gate denied the send;\n the agent was never called. The `gates` array carries\n the denial detail. /send-mail returns 403 in this case\n so callers see the denial synchronously; /sent-emails\n additionally records the row for historical lookup,\n which is when this status appears in a listing.\n - `unknown`: terminal indeterminate; the on-box log\n poller couldn't classify the receiver's response.\n - `delivered` / `bounced` / `deferred` / `wait_timeout`:\n terminal delivery outcomes (see DeliveryStatus).\n",
|
|
2169
|
+
"enum": [
|
|
2170
|
+
"queued",
|
|
2171
|
+
"submitted_to_agent",
|
|
2172
|
+
"agent_failed",
|
|
2173
|
+
"gate_denied",
|
|
2174
|
+
"unknown",
|
|
2175
|
+
"delivered",
|
|
2176
|
+
"bounced",
|
|
2177
|
+
"deferred",
|
|
2178
|
+
"wait_timeout"
|
|
2179
|
+
]
|
|
2180
|
+
},
|
|
2181
|
+
"status_changed_at": {
|
|
2182
|
+
"type": "string",
|
|
2183
|
+
"format": "date-time",
|
|
2184
|
+
"description": "Timestamp of the most recent status transition.\nPolling clients should treat `status='queued'` AND\n`status_changed_at` older than 5 minutes as\n\"stuck-queued\" (the post-tx UPDATE failed and the\nactual delivery state is recoverable from on-box logs\nvia `queue_id` when populated, or `request_id`).\n"
|
|
2185
|
+
},
|
|
2186
|
+
"created_at": {
|
|
2187
|
+
"type": "string",
|
|
2188
|
+
"format": "date-time"
|
|
2189
|
+
},
|
|
2190
|
+
"updated_at": {
|
|
2191
|
+
"type": "string",
|
|
2192
|
+
"format": "date-time"
|
|
2193
|
+
},
|
|
2194
|
+
"client_idempotency_key": {
|
|
2195
|
+
"type": [
|
|
2196
|
+
"string",
|
|
2197
|
+
"null"
|
|
2198
|
+
],
|
|
2199
|
+
"description": "Effective idempotency key used for this send. If the\ncaller passed the `Idempotency-Key` header, this is\nthat value; otherwise it's a server-derived hash of\nthe canonical request payload.\n"
|
|
2200
|
+
},
|
|
2201
|
+
"content_hash": {
|
|
2202
|
+
"type": "string",
|
|
2203
|
+
"description": "Stable hash of the canonical send payload."
|
|
2204
|
+
},
|
|
2205
|
+
"from_header": {
|
|
2206
|
+
"type": "string",
|
|
2207
|
+
"description": "Raw `From:` header as sent on the wire, including any\ndisplay name (e.g. `\"Acme Support\" <agent@acme.test>`).\n"
|
|
2208
|
+
},
|
|
2209
|
+
"from_address": {
|
|
2210
|
+
"type": "string",
|
|
2211
|
+
"description": "Bare email address parsed from `from_header`."
|
|
2212
|
+
},
|
|
2213
|
+
"to_header": {
|
|
2214
|
+
"type": "string",
|
|
2215
|
+
"description": "Raw `To:` header as sent on the wire, including any\ndisplay name.\n"
|
|
2216
|
+
},
|
|
2217
|
+
"to_address": {
|
|
2218
|
+
"type": "string",
|
|
2219
|
+
"description": "Bare email address parsed from `to_header`."
|
|
2220
|
+
},
|
|
2221
|
+
"subject": {
|
|
2222
|
+
"type": "string"
|
|
2223
|
+
},
|
|
2224
|
+
"body_size_bytes": {
|
|
2225
|
+
"type": "integer",
|
|
2226
|
+
"description": "Total UTF-8 byte length of `body_text` + `body_html`.\nSurfaced on the list endpoint so callers can see \"this\nrow has a 4MB body\" without fetching it.\n"
|
|
2227
|
+
},
|
|
2228
|
+
"content_discarded_at": {
|
|
2229
|
+
"type": [
|
|
2230
|
+
"string",
|
|
2231
|
+
"null"
|
|
2232
|
+
],
|
|
2233
|
+
"format": "date-time",
|
|
2234
|
+
"description": "Timestamp at which the bodies were discarded by an\nentitlement-driven retention policy. Null when bodies\nare still present. The detail endpoint returns\nnull-valued `body_text`/`body_html` for discarded rows.\n"
|
|
2235
|
+
},
|
|
2236
|
+
"message_id": {
|
|
2237
|
+
"type": [
|
|
2238
|
+
"string",
|
|
2239
|
+
"null"
|
|
2240
|
+
],
|
|
2241
|
+
"description": "Wire-level Message-ID assigned to the outbound message\n(RFC 5322). Null on rows that never reached signing\n(queued, gate_denied, agent_failed before signing).\n"
|
|
2242
|
+
},
|
|
2243
|
+
"in_reply_to": {
|
|
2244
|
+
"type": [
|
|
2245
|
+
"string",
|
|
2246
|
+
"null"
|
|
2247
|
+
],
|
|
2248
|
+
"description": "Wire-level In-Reply-To header value, when this send\nwas a reply.\n"
|
|
2249
|
+
},
|
|
2250
|
+
"email_references": {
|
|
2251
|
+
"type": [
|
|
2252
|
+
"string",
|
|
2253
|
+
"null"
|
|
2254
|
+
],
|
|
2255
|
+
"description": "Wire-level References header value, when this send\nwas a reply.\n"
|
|
2256
|
+
},
|
|
2257
|
+
"in_reply_to_email_id": {
|
|
2258
|
+
"type": [
|
|
2259
|
+
"string",
|
|
2260
|
+
"null"
|
|
2261
|
+
],
|
|
2262
|
+
"format": "uuid",
|
|
2263
|
+
"description": "Reference to the inbound `emails.id` that this send\nreplied to, when known. Populated when the caller used\n/emails/{id}/reply or when /send-mail's `in_reply_to`\nmatched a stored inbound message_id in the same org.\n"
|
|
2264
|
+
},
|
|
2265
|
+
"queue_id": {
|
|
2266
|
+
"type": [
|
|
2267
|
+
"string",
|
|
2268
|
+
"null"
|
|
2269
|
+
],
|
|
2270
|
+
"description": "Message identifier assigned by Primitive's outbound\nrelay once the agent accepts the message. Null on\nqueued, gate_denied, and agent_failed rows.\n"
|
|
2271
|
+
},
|
|
2272
|
+
"smtp_response_code": {
|
|
2273
|
+
"type": [
|
|
2274
|
+
"integer",
|
|
2275
|
+
"null"
|
|
2276
|
+
],
|
|
2277
|
+
"description": "Receiver's 3-digit SMTP code (e.g. 250, 550, 451).\nPopulated on terminal delivery statuses; may be null\non a deferred where the agent never got an SMTP-level\nresponse (TCP refused, DNS failed, TLS handshake\nfailed). `smtp_response_text` still carries Postfix's\ndescriptive text in those cases.\n"
|
|
2278
|
+
},
|
|
2279
|
+
"smtp_response_text": {
|
|
2280
|
+
"type": [
|
|
2281
|
+
"string",
|
|
2282
|
+
"null"
|
|
2283
|
+
],
|
|
2284
|
+
"description": "Free-form text portion of the receiver's SMTP\nresponse. The most useful debugging signal on a\n`bounced` or `deferred` row.\n"
|
|
2285
|
+
},
|
|
2286
|
+
"smtp_enhanced_status_code": {
|
|
2287
|
+
"type": [
|
|
2288
|
+
"string",
|
|
2289
|
+
"null"
|
|
2290
|
+
],
|
|
2291
|
+
"description": "RFC 3463 enhanced status code (e.g. `5.1.1` for \"Bad\ndestination mailbox address\"). Distinct from\n`smtp_response_code`: the basic 3-digit code is coarse\n(550 = \"permanent failure\"), the enhanced code is\nfiner-grained.\n"
|
|
2292
|
+
},
|
|
2293
|
+
"dkim_selector": {
|
|
2294
|
+
"type": [
|
|
2295
|
+
"string",
|
|
2296
|
+
"null"
|
|
2297
|
+
],
|
|
2298
|
+
"description": "DKIM selector used to sign the outbound message.\nPublic DNS data; useful for diagnosing why a downstream\nverifier rejected the signature.\n"
|
|
2299
|
+
},
|
|
2300
|
+
"dkim_domain": {
|
|
2301
|
+
"type": [
|
|
2302
|
+
"string",
|
|
2303
|
+
"null"
|
|
2304
|
+
],
|
|
2305
|
+
"description": "DKIM signing domain."
|
|
2306
|
+
},
|
|
2307
|
+
"error_code": {
|
|
2308
|
+
"type": [
|
|
2309
|
+
"string",
|
|
2310
|
+
"null"
|
|
2311
|
+
],
|
|
2312
|
+
"description": "Stable public error code on `agent_failed` rows. The\nagent's internal codes are remapped to a stable public\ntaxonomy (see `publicAgentError` in the server) so this\nfield is safe to branch on across agent versions.\n"
|
|
2313
|
+
},
|
|
2314
|
+
"error_message": {
|
|
2315
|
+
"type": [
|
|
2316
|
+
"string",
|
|
2317
|
+
"null"
|
|
2318
|
+
],
|
|
2319
|
+
"description": "Free-form error message accompanying `error_code`."
|
|
2320
|
+
},
|
|
2321
|
+
"gates": {
|
|
2322
|
+
"type": [
|
|
2323
|
+
"array",
|
|
2324
|
+
"null"
|
|
2325
|
+
],
|
|
2326
|
+
"items": {
|
|
2327
|
+
"type": "object",
|
|
2328
|
+
"properties": {
|
|
2329
|
+
"name": {
|
|
2330
|
+
"type": "string",
|
|
2331
|
+
"enum": [
|
|
2332
|
+
"send_to_confirmed_domains",
|
|
2333
|
+
"send_to_known_addresses"
|
|
2334
|
+
],
|
|
2335
|
+
"description": "Public recipient-scope gate name that denied the send."
|
|
2336
|
+
},
|
|
2337
|
+
"reason": {
|
|
2338
|
+
"type": "string",
|
|
2339
|
+
"enum": [
|
|
2340
|
+
"domain_not_confirmed",
|
|
2341
|
+
"recipient_unauthenticated",
|
|
2342
|
+
"recipient_not_known"
|
|
2343
|
+
],
|
|
2344
|
+
"description": "Stable machine-readable denial reason."
|
|
2345
|
+
},
|
|
2346
|
+
"message": {
|
|
2347
|
+
"type": "string",
|
|
2348
|
+
"description": "Human-readable explanation of the gate denial."
|
|
2349
|
+
},
|
|
2350
|
+
"subject": {
|
|
2351
|
+
"type": "string",
|
|
2352
|
+
"description": "Domain or address the gate evaluated."
|
|
2353
|
+
},
|
|
2354
|
+
"fix": {
|
|
2355
|
+
"type": "object",
|
|
2356
|
+
"properties": {
|
|
2357
|
+
"action": {
|
|
2358
|
+
"type": "string",
|
|
2359
|
+
"enum": [
|
|
2360
|
+
"confirm_domain",
|
|
2361
|
+
"sender_must_fix_authentication",
|
|
2362
|
+
"wait_for_inbound"
|
|
2363
|
+
],
|
|
2364
|
+
"description": "Suggested next action for the caller."
|
|
2365
|
+
},
|
|
2366
|
+
"subject": {
|
|
2367
|
+
"type": "string",
|
|
2368
|
+
"description": "Entity the action applies to."
|
|
2369
|
+
}
|
|
2370
|
+
},
|
|
2371
|
+
"required": [
|
|
2372
|
+
"action",
|
|
2373
|
+
"subject"
|
|
2374
|
+
]
|
|
2375
|
+
},
|
|
2376
|
+
"docs_url": {
|
|
2377
|
+
"type": "string",
|
|
2378
|
+
"description": "Public docs URL with more context."
|
|
2379
|
+
}
|
|
2380
|
+
},
|
|
2381
|
+
"required": [
|
|
2382
|
+
"name",
|
|
2383
|
+
"reason",
|
|
2384
|
+
"message",
|
|
2385
|
+
"subject"
|
|
2386
|
+
]
|
|
2387
|
+
},
|
|
2388
|
+
"description": "Gate-denial detail on `gate_denied` rows. Mirrors the\nsynchronous /send-mail 403 contract so a caller's\nGateDenial handler is the same across live denies and\nhistorical lookups. Null on every other status.\n"
|
|
2389
|
+
},
|
|
2390
|
+
"request_id": {
|
|
2391
|
+
"type": [
|
|
2392
|
+
"string",
|
|
2393
|
+
"null"
|
|
2394
|
+
],
|
|
2395
|
+
"description": "Server-issued request identifier from the original\n/send-mail call. Surfaced as the `X-Request-Id`\nresponse header on the live send and recorded here\nfor support escalation.\n"
|
|
2396
|
+
}
|
|
2397
|
+
},
|
|
2398
|
+
"required": [
|
|
2399
|
+
"id",
|
|
2400
|
+
"status",
|
|
2401
|
+
"status_changed_at",
|
|
2402
|
+
"created_at",
|
|
2403
|
+
"updated_at",
|
|
2404
|
+
"content_hash",
|
|
2405
|
+
"from_header",
|
|
2406
|
+
"from_address",
|
|
2407
|
+
"to_header",
|
|
2408
|
+
"to_address",
|
|
2409
|
+
"subject",
|
|
2410
|
+
"body_size_bytes"
|
|
2411
|
+
]
|
|
2412
|
+
},
|
|
2413
|
+
{
|
|
2414
|
+
"type": "object",
|
|
2415
|
+
"properties": {
|
|
2416
|
+
"body_text": {
|
|
2417
|
+
"type": [
|
|
2418
|
+
"string",
|
|
2419
|
+
"null"
|
|
2420
|
+
],
|
|
2421
|
+
"description": "Plain-text body sent on the wire. Null when the\nsend carried only an HTML body, or when bodies have\nbeen discarded post-send (`content_discarded_at`\nset).\n"
|
|
2422
|
+
},
|
|
2423
|
+
"body_html": {
|
|
2424
|
+
"type": [
|
|
2425
|
+
"string",
|
|
2426
|
+
"null"
|
|
2427
|
+
],
|
|
2428
|
+
"description": "HTML body sent on the wire. Null when the send\ncarried only a plain-text body, or when bodies\nhave been discarded post-send.\n"
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
]
|
|
2433
|
+
},
|
|
2434
|
+
"sdkName": "getSentEmail",
|
|
2435
|
+
"summary": "Get a sent email by id",
|
|
2436
|
+
"tag": "Sending",
|
|
2437
|
+
"tagCommand": "sending"
|
|
2438
|
+
},
|
|
2439
|
+
{
|
|
2440
|
+
"binaryResponse": false,
|
|
2441
|
+
"bodyRequired": false,
|
|
2442
|
+
"command": "list-sent-emails",
|
|
2443
|
+
"description": "Returns a paginated list of OUTBOUND emails the caller's\norg has sent via /send-mail (and /emails/{id}/reply, which\nforwards through /send-mail). Includes every recorded\nattempt, including gate-denied attempts that the agent\nnever called and rows still in `queued` state.\n\nFor inbound mail received at your verified domains, see\n/emails. There is no unified send/receive history endpoint;\nthe two surfaces are intentionally separate because the\nunderlying tables, statuses, and lifecycle differ.\n\nEmail bodies (`body_text`, `body_html`) are NOT included on\nlist rows so a 50-row page can't balloon into a multi-MB\nresponse when sends are near the 5MB body cap. Use\n/sent-emails/{id} to fetch a single row with bodies, or\ncross-reference by `client_idempotency_key` if the caller\nalready has the body locally.\n",
|
|
2444
|
+
"hasJsonBody": false,
|
|
2445
|
+
"method": "GET",
|
|
2446
|
+
"operationId": "listSentEmails",
|
|
2447
|
+
"path": "/sent-emails",
|
|
2448
|
+
"pathParams": [],
|
|
2449
|
+
"queryParams": [
|
|
2450
|
+
{
|
|
2451
|
+
"description": "Pagination cursor from a previous response's `meta.cursor` field.\nFormat: `{ISO-datetime}|{id}`\n",
|
|
2452
|
+
"enum": null,
|
|
2453
|
+
"name": "cursor",
|
|
2454
|
+
"required": false,
|
|
2455
|
+
"type": "string"
|
|
2456
|
+
},
|
|
2457
|
+
{
|
|
2458
|
+
"description": "Number of results per page",
|
|
2459
|
+
"enum": null,
|
|
2460
|
+
"name": "limit",
|
|
2461
|
+
"required": false,
|
|
2462
|
+
"type": "integer"
|
|
2463
|
+
},
|
|
2464
|
+
{
|
|
2465
|
+
"description": "Filter to rows in this status. Useful for polling\nqueued rows that haven't transitioned, auditing\ngate-denied attempts, or listing only successful\ndeliveries.\n",
|
|
2466
|
+
"enum": null,
|
|
2467
|
+
"name": "status",
|
|
2468
|
+
"required": false,
|
|
2469
|
+
"type": "string"
|
|
2470
|
+
},
|
|
2471
|
+
{
|
|
2472
|
+
"description": "Filter to the row matching a specific server-issued\n`request_id`. The /send-mail response surfaces\n`request_id` on every send; this lookup lets the\ncaller find the historical row for a given live call\nwithout remembering its `id`.\n",
|
|
2473
|
+
"enum": null,
|
|
2474
|
+
"name": "request_id",
|
|
2475
|
+
"required": false,
|
|
2476
|
+
"type": "string"
|
|
2477
|
+
},
|
|
2478
|
+
{
|
|
2479
|
+
"description": "Filter to rows with the given `client_idempotency_key`.\nMultiple rows can share a key (a retry that hit the\nidempotent-replay path returns the same row, but a\nretry with a DIFFERENT canonical payload under the\nsame key is rejected by /send-mail before the row is\nwritten, so duplicates are bounded).\n",
|
|
2480
|
+
"enum": null,
|
|
2481
|
+
"name": "idempotency_key",
|
|
2482
|
+
"required": false,
|
|
2483
|
+
"type": "string"
|
|
2484
|
+
},
|
|
2485
|
+
{
|
|
2486
|
+
"description": "Inclusive lower bound on `created_at`.",
|
|
2487
|
+
"enum": null,
|
|
2488
|
+
"name": "date_from",
|
|
2489
|
+
"required": false,
|
|
2490
|
+
"type": "string"
|
|
2491
|
+
},
|
|
2492
|
+
{
|
|
2493
|
+
"description": "Inclusive upper bound on `created_at`.",
|
|
2494
|
+
"enum": null,
|
|
2495
|
+
"name": "date_to",
|
|
2496
|
+
"required": false,
|
|
2497
|
+
"type": "string"
|
|
2498
|
+
}
|
|
2499
|
+
],
|
|
2500
|
+
"requestSchema": null,
|
|
2501
|
+
"responseSchema": {
|
|
2502
|
+
"type": "array",
|
|
2503
|
+
"items": {
|
|
2504
|
+
"type": "object",
|
|
2505
|
+
"description": "List-row projection of a sent-email record. Drops\n`body_text` and `body_html` to keep paginated responses\nsmall; fetch /sent-emails/{id} for the full record with\nbodies.\n",
|
|
2506
|
+
"properties": {
|
|
2507
|
+
"id": {
|
|
2508
|
+
"type": "string",
|
|
2509
|
+
"format": "uuid"
|
|
2510
|
+
},
|
|
2511
|
+
"status": {
|
|
2512
|
+
"type": "string",
|
|
2513
|
+
"description": "Lifecycle status of a sent_emails row. Possible values:\n\n - `queued`: pre-call INSERT; the outbound agent has not\n yet replied.\n - `submitted_to_agent`: agent accepted; `queue_id` is set.\n - `agent_failed`: agent rejected; `error_code` and\n `error_message` carry the reason.\n - `gate_denied`: a recipient-scope gate denied the send;\n the agent was never called. The `gates` array carries\n the denial detail. /send-mail returns 403 in this case\n so callers see the denial synchronously; /sent-emails\n additionally records the row for historical lookup,\n which is when this status appears in a listing.\n - `unknown`: terminal indeterminate; the on-box log\n poller couldn't classify the receiver's response.\n - `delivered` / `bounced` / `deferred` / `wait_timeout`:\n terminal delivery outcomes (see DeliveryStatus).\n",
|
|
2514
|
+
"enum": [
|
|
2515
|
+
"queued",
|
|
2516
|
+
"submitted_to_agent",
|
|
2517
|
+
"agent_failed",
|
|
2518
|
+
"gate_denied",
|
|
2519
|
+
"unknown",
|
|
2520
|
+
"delivered",
|
|
2521
|
+
"bounced",
|
|
2522
|
+
"deferred",
|
|
2523
|
+
"wait_timeout"
|
|
2524
|
+
]
|
|
2525
|
+
},
|
|
2526
|
+
"status_changed_at": {
|
|
2527
|
+
"type": "string",
|
|
2528
|
+
"format": "date-time",
|
|
2529
|
+
"description": "Timestamp of the most recent status transition.\nPolling clients should treat `status='queued'` AND\n`status_changed_at` older than 5 minutes as\n\"stuck-queued\" (the post-tx UPDATE failed and the\nactual delivery state is recoverable from on-box logs\nvia `queue_id` when populated, or `request_id`).\n"
|
|
2530
|
+
},
|
|
2531
|
+
"created_at": {
|
|
2532
|
+
"type": "string",
|
|
2533
|
+
"format": "date-time"
|
|
2534
|
+
},
|
|
2535
|
+
"updated_at": {
|
|
2536
|
+
"type": "string",
|
|
2537
|
+
"format": "date-time"
|
|
2538
|
+
},
|
|
2539
|
+
"client_idempotency_key": {
|
|
2540
|
+
"type": [
|
|
2541
|
+
"string",
|
|
2542
|
+
"null"
|
|
2543
|
+
],
|
|
2544
|
+
"description": "Effective idempotency key used for this send. If the\ncaller passed the `Idempotency-Key` header, this is\nthat value; otherwise it's a server-derived hash of\nthe canonical request payload.\n"
|
|
2545
|
+
},
|
|
2546
|
+
"content_hash": {
|
|
2547
|
+
"type": "string",
|
|
2548
|
+
"description": "Stable hash of the canonical send payload."
|
|
2549
|
+
},
|
|
2550
|
+
"from_header": {
|
|
2551
|
+
"type": "string",
|
|
2552
|
+
"description": "Raw `From:` header as sent on the wire, including any\ndisplay name (e.g. `\"Acme Support\" <agent@acme.test>`).\n"
|
|
2553
|
+
},
|
|
2554
|
+
"from_address": {
|
|
2555
|
+
"type": "string",
|
|
2556
|
+
"description": "Bare email address parsed from `from_header`."
|
|
2557
|
+
},
|
|
2558
|
+
"to_header": {
|
|
2559
|
+
"type": "string",
|
|
2560
|
+
"description": "Raw `To:` header as sent on the wire, including any\ndisplay name.\n"
|
|
2561
|
+
},
|
|
2562
|
+
"to_address": {
|
|
2563
|
+
"type": "string",
|
|
2564
|
+
"description": "Bare email address parsed from `to_header`."
|
|
2565
|
+
},
|
|
2566
|
+
"subject": {
|
|
2567
|
+
"type": "string"
|
|
2568
|
+
},
|
|
2569
|
+
"body_size_bytes": {
|
|
2570
|
+
"type": "integer",
|
|
2571
|
+
"description": "Total UTF-8 byte length of `body_text` + `body_html`.\nSurfaced on the list endpoint so callers can see \"this\nrow has a 4MB body\" without fetching it.\n"
|
|
2572
|
+
},
|
|
2573
|
+
"content_discarded_at": {
|
|
2574
|
+
"type": [
|
|
2575
|
+
"string",
|
|
2576
|
+
"null"
|
|
2577
|
+
],
|
|
2578
|
+
"format": "date-time",
|
|
2579
|
+
"description": "Timestamp at which the bodies were discarded by an\nentitlement-driven retention policy. Null when bodies\nare still present. The detail endpoint returns\nnull-valued `body_text`/`body_html` for discarded rows.\n"
|
|
2580
|
+
},
|
|
2581
|
+
"message_id": {
|
|
2582
|
+
"type": [
|
|
2583
|
+
"string",
|
|
2584
|
+
"null"
|
|
2585
|
+
],
|
|
2586
|
+
"description": "Wire-level Message-ID assigned to the outbound message\n(RFC 5322). Null on rows that never reached signing\n(queued, gate_denied, agent_failed before signing).\n"
|
|
2587
|
+
},
|
|
2588
|
+
"in_reply_to": {
|
|
2589
|
+
"type": [
|
|
2590
|
+
"string",
|
|
2591
|
+
"null"
|
|
2592
|
+
],
|
|
2593
|
+
"description": "Wire-level In-Reply-To header value, when this send\nwas a reply.\n"
|
|
2594
|
+
},
|
|
2595
|
+
"email_references": {
|
|
2596
|
+
"type": [
|
|
2597
|
+
"string",
|
|
2598
|
+
"null"
|
|
2599
|
+
],
|
|
2600
|
+
"description": "Wire-level References header value, when this send\nwas a reply.\n"
|
|
2601
|
+
},
|
|
2602
|
+
"in_reply_to_email_id": {
|
|
2603
|
+
"type": [
|
|
2604
|
+
"string",
|
|
2605
|
+
"null"
|
|
2606
|
+
],
|
|
2607
|
+
"format": "uuid",
|
|
2608
|
+
"description": "Reference to the inbound `emails.id` that this send\nreplied to, when known. Populated when the caller used\n/emails/{id}/reply or when /send-mail's `in_reply_to`\nmatched a stored inbound message_id in the same org.\n"
|
|
2609
|
+
},
|
|
2610
|
+
"queue_id": {
|
|
2611
|
+
"type": [
|
|
2612
|
+
"string",
|
|
2613
|
+
"null"
|
|
2614
|
+
],
|
|
2615
|
+
"description": "Message identifier assigned by Primitive's outbound\nrelay once the agent accepts the message. Null on\nqueued, gate_denied, and agent_failed rows.\n"
|
|
2616
|
+
},
|
|
2617
|
+
"smtp_response_code": {
|
|
2618
|
+
"type": [
|
|
2619
|
+
"integer",
|
|
2620
|
+
"null"
|
|
2621
|
+
],
|
|
2622
|
+
"description": "Receiver's 3-digit SMTP code (e.g. 250, 550, 451).\nPopulated on terminal delivery statuses; may be null\non a deferred where the agent never got an SMTP-level\nresponse (TCP refused, DNS failed, TLS handshake\nfailed). `smtp_response_text` still carries Postfix's\ndescriptive text in those cases.\n"
|
|
2623
|
+
},
|
|
2624
|
+
"smtp_response_text": {
|
|
2625
|
+
"type": [
|
|
2626
|
+
"string",
|
|
2627
|
+
"null"
|
|
2628
|
+
],
|
|
2629
|
+
"description": "Free-form text portion of the receiver's SMTP\nresponse. The most useful debugging signal on a\n`bounced` or `deferred` row.\n"
|
|
2630
|
+
},
|
|
2631
|
+
"smtp_enhanced_status_code": {
|
|
2632
|
+
"type": [
|
|
2633
|
+
"string",
|
|
2634
|
+
"null"
|
|
2635
|
+
],
|
|
2636
|
+
"description": "RFC 3463 enhanced status code (e.g. `5.1.1` for \"Bad\ndestination mailbox address\"). Distinct from\n`smtp_response_code`: the basic 3-digit code is coarse\n(550 = \"permanent failure\"), the enhanced code is\nfiner-grained.\n"
|
|
2637
|
+
},
|
|
2638
|
+
"dkim_selector": {
|
|
2639
|
+
"type": [
|
|
2640
|
+
"string",
|
|
2641
|
+
"null"
|
|
2642
|
+
],
|
|
2643
|
+
"description": "DKIM selector used to sign the outbound message.\nPublic DNS data; useful for diagnosing why a downstream\nverifier rejected the signature.\n"
|
|
2644
|
+
},
|
|
2645
|
+
"dkim_domain": {
|
|
2646
|
+
"type": [
|
|
2647
|
+
"string",
|
|
2648
|
+
"null"
|
|
2649
|
+
],
|
|
2650
|
+
"description": "DKIM signing domain."
|
|
2651
|
+
},
|
|
2652
|
+
"error_code": {
|
|
2653
|
+
"type": [
|
|
2654
|
+
"string",
|
|
2655
|
+
"null"
|
|
2656
|
+
],
|
|
2657
|
+
"description": "Stable public error code on `agent_failed` rows. The\nagent's internal codes are remapped to a stable public\ntaxonomy (see `publicAgentError` in the server) so this\nfield is safe to branch on across agent versions.\n"
|
|
2658
|
+
},
|
|
2659
|
+
"error_message": {
|
|
2660
|
+
"type": [
|
|
2661
|
+
"string",
|
|
2662
|
+
"null"
|
|
2663
|
+
],
|
|
2664
|
+
"description": "Free-form error message accompanying `error_code`."
|
|
2665
|
+
},
|
|
2666
|
+
"gates": {
|
|
2667
|
+
"type": [
|
|
2668
|
+
"array",
|
|
2669
|
+
"null"
|
|
2670
|
+
],
|
|
2671
|
+
"items": {
|
|
2672
|
+
"type": "object",
|
|
2673
|
+
"properties": {
|
|
2674
|
+
"name": {
|
|
2675
|
+
"type": "string",
|
|
2676
|
+
"enum": [
|
|
2677
|
+
"send_to_confirmed_domains",
|
|
2678
|
+
"send_to_known_addresses"
|
|
2679
|
+
],
|
|
2680
|
+
"description": "Public recipient-scope gate name that denied the send."
|
|
2681
|
+
},
|
|
2682
|
+
"reason": {
|
|
2683
|
+
"type": "string",
|
|
2684
|
+
"enum": [
|
|
2685
|
+
"domain_not_confirmed",
|
|
2686
|
+
"recipient_unauthenticated",
|
|
2687
|
+
"recipient_not_known"
|
|
2688
|
+
],
|
|
2689
|
+
"description": "Stable machine-readable denial reason."
|
|
2690
|
+
},
|
|
2691
|
+
"message": {
|
|
2692
|
+
"type": "string",
|
|
2693
|
+
"description": "Human-readable explanation of the gate denial."
|
|
2694
|
+
},
|
|
2695
|
+
"subject": {
|
|
2696
|
+
"type": "string",
|
|
2697
|
+
"description": "Domain or address the gate evaluated."
|
|
2698
|
+
},
|
|
2699
|
+
"fix": {
|
|
2700
|
+
"type": "object",
|
|
2701
|
+
"properties": {
|
|
2702
|
+
"action": {
|
|
2703
|
+
"type": "string",
|
|
2704
|
+
"enum": [
|
|
2705
|
+
"confirm_domain",
|
|
2706
|
+
"sender_must_fix_authentication",
|
|
2707
|
+
"wait_for_inbound"
|
|
2708
|
+
],
|
|
2709
|
+
"description": "Suggested next action for the caller."
|
|
2710
|
+
},
|
|
2711
|
+
"subject": {
|
|
2712
|
+
"type": "string",
|
|
2713
|
+
"description": "Entity the action applies to."
|
|
2714
|
+
}
|
|
2715
|
+
},
|
|
2716
|
+
"required": [
|
|
2717
|
+
"action",
|
|
2718
|
+
"subject"
|
|
2719
|
+
]
|
|
2720
|
+
},
|
|
2721
|
+
"docs_url": {
|
|
2722
|
+
"type": "string",
|
|
2723
|
+
"description": "Public docs URL with more context."
|
|
2724
|
+
}
|
|
2725
|
+
},
|
|
2726
|
+
"required": [
|
|
2727
|
+
"name",
|
|
2728
|
+
"reason",
|
|
2729
|
+
"message",
|
|
2730
|
+
"subject"
|
|
2731
|
+
]
|
|
2732
|
+
},
|
|
2733
|
+
"description": "Gate-denial detail on `gate_denied` rows. Mirrors the\nsynchronous /send-mail 403 contract so a caller's\nGateDenial handler is the same across live denies and\nhistorical lookups. Null on every other status.\n"
|
|
2734
|
+
},
|
|
2735
|
+
"request_id": {
|
|
2736
|
+
"type": [
|
|
2737
|
+
"string",
|
|
2738
|
+
"null"
|
|
2739
|
+
],
|
|
2740
|
+
"description": "Server-issued request identifier from the original\n/send-mail call. Surfaced as the `X-Request-Id`\nresponse header on the live send and recorded here\nfor support escalation.\n"
|
|
2741
|
+
}
|
|
2742
|
+
},
|
|
2743
|
+
"required": [
|
|
2744
|
+
"id",
|
|
2745
|
+
"status",
|
|
2746
|
+
"status_changed_at",
|
|
2747
|
+
"created_at",
|
|
2748
|
+
"updated_at",
|
|
2749
|
+
"content_hash",
|
|
2750
|
+
"from_header",
|
|
2751
|
+
"from_address",
|
|
2752
|
+
"to_header",
|
|
2753
|
+
"to_address",
|
|
2754
|
+
"subject",
|
|
2755
|
+
"body_size_bytes"
|
|
2756
|
+
]
|
|
2757
|
+
}
|
|
2758
|
+
},
|
|
2759
|
+
"sdkName": "listSentEmails",
|
|
2760
|
+
"summary": "List outbound sent emails",
|
|
2761
|
+
"tag": "Sending",
|
|
2762
|
+
"tagCommand": "sending"
|
|
2763
|
+
},
|
|
772
2764
|
{
|
|
773
2765
|
"binaryResponse": false,
|
|
774
2766
|
"bodyRequired": true,
|
|
@@ -813,6 +2805,103 @@ export const operationManifest = [
|
|
|
813
2805
|
}
|
|
814
2806
|
}
|
|
815
2807
|
},
|
|
2808
|
+
"responseSchema": {
|
|
2809
|
+
"type": "object",
|
|
2810
|
+
"properties": {
|
|
2811
|
+
"id": {
|
|
2812
|
+
"type": "string",
|
|
2813
|
+
"description": "Persisted sent-email attempt ID."
|
|
2814
|
+
},
|
|
2815
|
+
"status": {
|
|
2816
|
+
"type": "string",
|
|
2817
|
+
"description": "Lifecycle status of a sent_emails row. Possible values:\n\n - `queued`: pre-call INSERT; the outbound agent has not\n yet replied.\n - `submitted_to_agent`: agent accepted; `queue_id` is set.\n - `agent_failed`: agent rejected; `error_code` and\n `error_message` carry the reason.\n - `gate_denied`: a recipient-scope gate denied the send;\n the agent was never called. The `gates` array carries\n the denial detail. /send-mail returns 403 in this case\n so callers see the denial synchronously; /sent-emails\n additionally records the row for historical lookup,\n which is when this status appears in a listing.\n - `unknown`: terminal indeterminate; the on-box log\n poller couldn't classify the receiver's response.\n - `delivered` / `bounced` / `deferred` / `wait_timeout`:\n terminal delivery outcomes (see DeliveryStatus).\n",
|
|
2818
|
+
"enum": [
|
|
2819
|
+
"queued",
|
|
2820
|
+
"submitted_to_agent",
|
|
2821
|
+
"agent_failed",
|
|
2822
|
+
"gate_denied",
|
|
2823
|
+
"unknown",
|
|
2824
|
+
"delivered",
|
|
2825
|
+
"bounced",
|
|
2826
|
+
"deferred",
|
|
2827
|
+
"wait_timeout"
|
|
2828
|
+
]
|
|
2829
|
+
},
|
|
2830
|
+
"from": {
|
|
2831
|
+
"type": "string",
|
|
2832
|
+
"description": "Bare from-address actually written on the wire. Echoed\non every success branch so callers can confirm what\nwent out, particularly useful for the /emails/{id}/reply\npath where `from` is server-derived from the inbound's\nrecipient when the caller doesn't override.\n\nFor sends where the caller passed a from-header that\nincluded a display name (e.g. `\"Acme Support\" <support@acme.test>`),\nthis field is the parsed bare address (`support@acme.test`).\nThe display name was sent on the wire intact; this field\njust makes the address easy to compare against allowlists.\n"
|
|
2833
|
+
},
|
|
2834
|
+
"queue_id": {
|
|
2835
|
+
"type": [
|
|
2836
|
+
"string",
|
|
2837
|
+
"null"
|
|
2838
|
+
],
|
|
2839
|
+
"description": "Message identifier assigned by Primitive's outbound relay, when available."
|
|
2840
|
+
},
|
|
2841
|
+
"accepted": {
|
|
2842
|
+
"type": "array",
|
|
2843
|
+
"items": {
|
|
2844
|
+
"type": "string"
|
|
2845
|
+
},
|
|
2846
|
+
"description": "Recipient addresses accepted by the relay."
|
|
2847
|
+
},
|
|
2848
|
+
"rejected": {
|
|
2849
|
+
"type": "array",
|
|
2850
|
+
"items": {
|
|
2851
|
+
"type": "string"
|
|
2852
|
+
},
|
|
2853
|
+
"description": "Recipient addresses rejected by the relay."
|
|
2854
|
+
},
|
|
2855
|
+
"client_idempotency_key": {
|
|
2856
|
+
"type": "string",
|
|
2857
|
+
"description": "Effective idempotency key used for this send."
|
|
2858
|
+
},
|
|
2859
|
+
"request_id": {
|
|
2860
|
+
"type": "string",
|
|
2861
|
+
"description": "Server-issued request identifier for support and tracing."
|
|
2862
|
+
},
|
|
2863
|
+
"content_hash": {
|
|
2864
|
+
"type": "string",
|
|
2865
|
+
"description": "Stable hash of the canonical send payload."
|
|
2866
|
+
},
|
|
2867
|
+
"delivery_status": {
|
|
2868
|
+
"type": "string",
|
|
2869
|
+
"enum": [
|
|
2870
|
+
"delivered",
|
|
2871
|
+
"bounced",
|
|
2872
|
+
"deferred",
|
|
2873
|
+
"wait_timeout"
|
|
2874
|
+
]
|
|
2875
|
+
},
|
|
2876
|
+
"smtp_response_code": {
|
|
2877
|
+
"type": [
|
|
2878
|
+
"integer",
|
|
2879
|
+
"null"
|
|
2880
|
+
],
|
|
2881
|
+
"description": "SMTP response code from the first downstream delivery outcome when wait is true."
|
|
2882
|
+
},
|
|
2883
|
+
"smtp_response_text": {
|
|
2884
|
+
"type": "string",
|
|
2885
|
+
"description": "SMTP response text from the first downstream delivery outcome when wait is true."
|
|
2886
|
+
},
|
|
2887
|
+
"idempotent_replay": {
|
|
2888
|
+
"type": "boolean",
|
|
2889
|
+
"description": "True when the response replays a previously-recorded send\nkeyed by `client_idempotency_key` (same key, same canonical\npayload). False on a fresh send and on gate-denied\nresponses. Lets callers branch on cache state without\ndiffing fields.\n"
|
|
2890
|
+
}
|
|
2891
|
+
},
|
|
2892
|
+
"required": [
|
|
2893
|
+
"id",
|
|
2894
|
+
"status",
|
|
2895
|
+
"from",
|
|
2896
|
+
"queue_id",
|
|
2897
|
+
"accepted",
|
|
2898
|
+
"rejected",
|
|
2899
|
+
"client_idempotency_key",
|
|
2900
|
+
"request_id",
|
|
2901
|
+
"content_hash",
|
|
2902
|
+
"idempotent_replay"
|
|
2903
|
+
]
|
|
2904
|
+
},
|
|
816
2905
|
"sdkName": "replyToEmail",
|
|
817
2906
|
"summary": "Reply to an inbound email",
|
|
818
2907
|
"tag": "Sending",
|
|
@@ -894,6 +2983,103 @@ export const operationManifest = [
|
|
|
894
2983
|
"subject"
|
|
895
2984
|
]
|
|
896
2985
|
},
|
|
2986
|
+
"responseSchema": {
|
|
2987
|
+
"type": "object",
|
|
2988
|
+
"properties": {
|
|
2989
|
+
"id": {
|
|
2990
|
+
"type": "string",
|
|
2991
|
+
"description": "Persisted sent-email attempt ID."
|
|
2992
|
+
},
|
|
2993
|
+
"status": {
|
|
2994
|
+
"type": "string",
|
|
2995
|
+
"description": "Lifecycle status of a sent_emails row. Possible values:\n\n - `queued`: pre-call INSERT; the outbound agent has not\n yet replied.\n - `submitted_to_agent`: agent accepted; `queue_id` is set.\n - `agent_failed`: agent rejected; `error_code` and\n `error_message` carry the reason.\n - `gate_denied`: a recipient-scope gate denied the send;\n the agent was never called. The `gates` array carries\n the denial detail. /send-mail returns 403 in this case\n so callers see the denial synchronously; /sent-emails\n additionally records the row for historical lookup,\n which is when this status appears in a listing.\n - `unknown`: terminal indeterminate; the on-box log\n poller couldn't classify the receiver's response.\n - `delivered` / `bounced` / `deferred` / `wait_timeout`:\n terminal delivery outcomes (see DeliveryStatus).\n",
|
|
2996
|
+
"enum": [
|
|
2997
|
+
"queued",
|
|
2998
|
+
"submitted_to_agent",
|
|
2999
|
+
"agent_failed",
|
|
3000
|
+
"gate_denied",
|
|
3001
|
+
"unknown",
|
|
3002
|
+
"delivered",
|
|
3003
|
+
"bounced",
|
|
3004
|
+
"deferred",
|
|
3005
|
+
"wait_timeout"
|
|
3006
|
+
]
|
|
3007
|
+
},
|
|
3008
|
+
"from": {
|
|
3009
|
+
"type": "string",
|
|
3010
|
+
"description": "Bare from-address actually written on the wire. Echoed\non every success branch so callers can confirm what\nwent out, particularly useful for the /emails/{id}/reply\npath where `from` is server-derived from the inbound's\nrecipient when the caller doesn't override.\n\nFor sends where the caller passed a from-header that\nincluded a display name (e.g. `\"Acme Support\" <support@acme.test>`),\nthis field is the parsed bare address (`support@acme.test`).\nThe display name was sent on the wire intact; this field\njust makes the address easy to compare against allowlists.\n"
|
|
3011
|
+
},
|
|
3012
|
+
"queue_id": {
|
|
3013
|
+
"type": [
|
|
3014
|
+
"string",
|
|
3015
|
+
"null"
|
|
3016
|
+
],
|
|
3017
|
+
"description": "Message identifier assigned by Primitive's outbound relay, when available."
|
|
3018
|
+
},
|
|
3019
|
+
"accepted": {
|
|
3020
|
+
"type": "array",
|
|
3021
|
+
"items": {
|
|
3022
|
+
"type": "string"
|
|
3023
|
+
},
|
|
3024
|
+
"description": "Recipient addresses accepted by the relay."
|
|
3025
|
+
},
|
|
3026
|
+
"rejected": {
|
|
3027
|
+
"type": "array",
|
|
3028
|
+
"items": {
|
|
3029
|
+
"type": "string"
|
|
3030
|
+
},
|
|
3031
|
+
"description": "Recipient addresses rejected by the relay."
|
|
3032
|
+
},
|
|
3033
|
+
"client_idempotency_key": {
|
|
3034
|
+
"type": "string",
|
|
3035
|
+
"description": "Effective idempotency key used for this send."
|
|
3036
|
+
},
|
|
3037
|
+
"request_id": {
|
|
3038
|
+
"type": "string",
|
|
3039
|
+
"description": "Server-issued request identifier for support and tracing."
|
|
3040
|
+
},
|
|
3041
|
+
"content_hash": {
|
|
3042
|
+
"type": "string",
|
|
3043
|
+
"description": "Stable hash of the canonical send payload."
|
|
3044
|
+
},
|
|
3045
|
+
"delivery_status": {
|
|
3046
|
+
"type": "string",
|
|
3047
|
+
"enum": [
|
|
3048
|
+
"delivered",
|
|
3049
|
+
"bounced",
|
|
3050
|
+
"deferred",
|
|
3051
|
+
"wait_timeout"
|
|
3052
|
+
]
|
|
3053
|
+
},
|
|
3054
|
+
"smtp_response_code": {
|
|
3055
|
+
"type": [
|
|
3056
|
+
"integer",
|
|
3057
|
+
"null"
|
|
3058
|
+
],
|
|
3059
|
+
"description": "SMTP response code from the first downstream delivery outcome when wait is true."
|
|
3060
|
+
},
|
|
3061
|
+
"smtp_response_text": {
|
|
3062
|
+
"type": "string",
|
|
3063
|
+
"description": "SMTP response text from the first downstream delivery outcome when wait is true."
|
|
3064
|
+
},
|
|
3065
|
+
"idempotent_replay": {
|
|
3066
|
+
"type": "boolean",
|
|
3067
|
+
"description": "True when the response replays a previously-recorded send\nkeyed by `client_idempotency_key` (same key, same canonical\npayload). False on a fresh send and on gate-denied\nresponses. Lets callers branch on cache state without\ndiffing fields.\n"
|
|
3068
|
+
}
|
|
3069
|
+
},
|
|
3070
|
+
"required": [
|
|
3071
|
+
"id",
|
|
3072
|
+
"status",
|
|
3073
|
+
"from",
|
|
3074
|
+
"queue_id",
|
|
3075
|
+
"accepted",
|
|
3076
|
+
"rejected",
|
|
3077
|
+
"client_idempotency_key",
|
|
3078
|
+
"request_id",
|
|
3079
|
+
"content_hash",
|
|
3080
|
+
"idempotent_replay"
|
|
3081
|
+
]
|
|
3082
|
+
},
|
|
897
3083
|
"sdkName": "sendEmail",
|
|
898
3084
|
"summary": "Send outbound email",
|
|
899
3085
|
"tag": "Sending",
|
|
@@ -959,6 +3145,100 @@ export const operationManifest = [
|
|
|
959
3145
|
}
|
|
960
3146
|
],
|
|
961
3147
|
"requestSchema": null,
|
|
3148
|
+
"responseSchema": {
|
|
3149
|
+
"type": "array",
|
|
3150
|
+
"items": {
|
|
3151
|
+
"type": "object",
|
|
3152
|
+
"properties": {
|
|
3153
|
+
"id": {
|
|
3154
|
+
"type": "string",
|
|
3155
|
+
"description": "Delivery ID (numeric string)"
|
|
3156
|
+
},
|
|
3157
|
+
"email_id": {
|
|
3158
|
+
"type": "string",
|
|
3159
|
+
"format": "uuid"
|
|
3160
|
+
},
|
|
3161
|
+
"org_id": {
|
|
3162
|
+
"type": "string",
|
|
3163
|
+
"format": "uuid"
|
|
3164
|
+
},
|
|
3165
|
+
"endpoint_id": {
|
|
3166
|
+
"type": "string",
|
|
3167
|
+
"format": "uuid"
|
|
3168
|
+
},
|
|
3169
|
+
"endpoint_url": {
|
|
3170
|
+
"type": "string"
|
|
3171
|
+
},
|
|
3172
|
+
"status": {
|
|
3173
|
+
"type": "string",
|
|
3174
|
+
"enum": [
|
|
3175
|
+
"pending",
|
|
3176
|
+
"delivered",
|
|
3177
|
+
"header_confirmed",
|
|
3178
|
+
"failed"
|
|
3179
|
+
]
|
|
3180
|
+
},
|
|
3181
|
+
"attempt_count": {
|
|
3182
|
+
"type": "integer"
|
|
3183
|
+
},
|
|
3184
|
+
"duration_ms": {
|
|
3185
|
+
"type": [
|
|
3186
|
+
"integer",
|
|
3187
|
+
"null"
|
|
3188
|
+
]
|
|
3189
|
+
},
|
|
3190
|
+
"last_error": {
|
|
3191
|
+
"type": [
|
|
3192
|
+
"string",
|
|
3193
|
+
"null"
|
|
3194
|
+
]
|
|
3195
|
+
},
|
|
3196
|
+
"created_at": {
|
|
3197
|
+
"type": "string",
|
|
3198
|
+
"format": "date-time"
|
|
3199
|
+
},
|
|
3200
|
+
"updated_at": {
|
|
3201
|
+
"type": "string",
|
|
3202
|
+
"format": "date-time"
|
|
3203
|
+
},
|
|
3204
|
+
"email": {
|
|
3205
|
+
"type": [
|
|
3206
|
+
"object",
|
|
3207
|
+
"null"
|
|
3208
|
+
],
|
|
3209
|
+
"properties": {
|
|
3210
|
+
"sender": {
|
|
3211
|
+
"type": "string"
|
|
3212
|
+
},
|
|
3213
|
+
"recipient": {
|
|
3214
|
+
"type": "string"
|
|
3215
|
+
},
|
|
3216
|
+
"subject": {
|
|
3217
|
+
"type": [
|
|
3218
|
+
"string",
|
|
3219
|
+
"null"
|
|
3220
|
+
]
|
|
3221
|
+
}
|
|
3222
|
+
},
|
|
3223
|
+
"required": [
|
|
3224
|
+
"sender",
|
|
3225
|
+
"recipient"
|
|
3226
|
+
]
|
|
3227
|
+
}
|
|
3228
|
+
},
|
|
3229
|
+
"required": [
|
|
3230
|
+
"id",
|
|
3231
|
+
"email_id",
|
|
3232
|
+
"org_id",
|
|
3233
|
+
"endpoint_id",
|
|
3234
|
+
"endpoint_url",
|
|
3235
|
+
"status",
|
|
3236
|
+
"attempt_count",
|
|
3237
|
+
"created_at",
|
|
3238
|
+
"updated_at"
|
|
3239
|
+
]
|
|
3240
|
+
}
|
|
3241
|
+
},
|
|
962
3242
|
"sdkName": "listDeliveries",
|
|
963
3243
|
"summary": "List webhook deliveries",
|
|
964
3244
|
"tag": "Webhook Deliveries",
|
|
@@ -984,6 +3264,23 @@ export const operationManifest = [
|
|
|
984
3264
|
],
|
|
985
3265
|
"queryParams": [],
|
|
986
3266
|
"requestSchema": null,
|
|
3267
|
+
"responseSchema": {
|
|
3268
|
+
"type": "object",
|
|
3269
|
+
"properties": {
|
|
3270
|
+
"delivered": {
|
|
3271
|
+
"type": "integer",
|
|
3272
|
+
"description": "Number of successful deliveries"
|
|
3273
|
+
},
|
|
3274
|
+
"failed": {
|
|
3275
|
+
"type": "integer",
|
|
3276
|
+
"description": "Number of failed deliveries"
|
|
3277
|
+
}
|
|
3278
|
+
},
|
|
3279
|
+
"required": [
|
|
3280
|
+
"delivered",
|
|
3281
|
+
"failed"
|
|
3282
|
+
]
|
|
3283
|
+
},
|
|
987
3284
|
"sdkName": "replayDelivery",
|
|
988
3285
|
"summary": "Replay a webhook delivery",
|
|
989
3286
|
"tag": "Webhook Deliveries",
|