@primitivedotdev/sdk 0.14.0 → 0.16.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 +47 -1
- package/dist/api/index.d.ts +2 -2
- package/dist/{api-DH-YKt7a.js → api-CTf0cUsi.js} +52 -2
- package/dist/{index-Cts9r1sL.d.ts → index-SK_HbwVN.d.ts} +210 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/oclif/commands/emails-latest.js +44 -7
- package/dist/oclif/commands/send.js +1 -0
- package/dist/oclif/index.js +10 -1
- package/dist/openapi/index.d.ts +6 -0
- package/dist/openapi/openapi.generated.js +113 -48
- package/dist/openapi/operations.generated.js +2267 -18
- package/oclif.manifest.json +57 -14
- package/package.json +1 -1
|
@@ -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,11 +658,54 @@ 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",
|
|
277
665
|
"tagCommand": "emails"
|
|
278
666
|
},
|
|
667
|
+
{
|
|
668
|
+
"binaryResponse": false,
|
|
669
|
+
"bodyRequired": false,
|
|
670
|
+
"command": "discard-email-content",
|
|
671
|
+
"description": "Permanently deletes the email's raw bytes, parsed body (text + HTML),\nand attachments while preserving metadata (sender, recipient,\nsubject, timestamps, hashes, attachment manifest) for audit logs.\nIdempotent: a second call returns success with\n`already_discarded: true` and does no work.\n\n**Gated** on the customer's discard-content opt-in (managed in the\ndashboard at Settings > Webhooks). When the toggle is off, this\nendpoint returns `403` with code `discard_not_enabled` and a\nmessage pointing the human at the dashboard. There is intentionally\nno API to flip this toggle — opting in to a destructive,\nnon-reversible operation must be a deliberate human click in the\nUI.\n",
|
|
672
|
+
"hasJsonBody": false,
|
|
673
|
+
"method": "POST",
|
|
674
|
+
"operationId": "discardEmailContent",
|
|
675
|
+
"path": "/emails/{id}/discard-content",
|
|
676
|
+
"pathParams": [
|
|
677
|
+
{
|
|
678
|
+
"description": "Resource UUID",
|
|
679
|
+
"enum": null,
|
|
680
|
+
"name": "id",
|
|
681
|
+
"required": true,
|
|
682
|
+
"type": "string"
|
|
683
|
+
}
|
|
684
|
+
],
|
|
685
|
+
"queryParams": [],
|
|
686
|
+
"requestSchema": null,
|
|
687
|
+
"responseSchema": {
|
|
688
|
+
"type": "object",
|
|
689
|
+
"properties": {
|
|
690
|
+
"discarded": {
|
|
691
|
+
"type": "boolean",
|
|
692
|
+
"description": "Always `true` on a 2xx response. The content is either now\ndiscarded as a result of this call, or was already discarded\nbefore this call ran.\n"
|
|
693
|
+
},
|
|
694
|
+
"already_discarded": {
|
|
695
|
+
"type": "boolean",
|
|
696
|
+
"description": "`true` if the email's content was already discarded before\nthis call ran (no work was done). `false` if this call was\nthe one that performed the discard.\n"
|
|
697
|
+
}
|
|
698
|
+
},
|
|
699
|
+
"required": [
|
|
700
|
+
"discarded",
|
|
701
|
+
"already_discarded"
|
|
702
|
+
]
|
|
703
|
+
},
|
|
704
|
+
"sdkName": "discardEmailContent",
|
|
705
|
+
"summary": "Discard email content",
|
|
706
|
+
"tag": "Emails",
|
|
707
|
+
"tagCommand": "emails"
|
|
708
|
+
},
|
|
279
709
|
{
|
|
280
710
|
"binaryResponse": true,
|
|
281
711
|
"bodyRequired": false,
|
|
@@ -304,6 +734,7 @@ export const operationManifest = [
|
|
|
304
734
|
}
|
|
305
735
|
],
|
|
306
736
|
"requestSchema": null,
|
|
737
|
+
"responseSchema": null,
|
|
307
738
|
"sdkName": "downloadAttachments",
|
|
308
739
|
"summary": "Download email attachments",
|
|
309
740
|
"tag": "Emails",
|
|
@@ -337,6 +768,7 @@ export const operationManifest = [
|
|
|
337
768
|
}
|
|
338
769
|
],
|
|
339
770
|
"requestSchema": null,
|
|
771
|
+
"responseSchema": null,
|
|
340
772
|
"sdkName": "downloadRawEmail",
|
|
341
773
|
"summary": "Download raw email",
|
|
342
774
|
"tag": "Emails",
|
|
@@ -346,7 +778,7 @@ export const operationManifest = [
|
|
|
346
778
|
"binaryResponse": false,
|
|
347
779
|
"bodyRequired": false,
|
|
348
780
|
"command": "get-email",
|
|
349
|
-
"description":
|
|
781
|
+
"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
782
|
"hasJsonBody": false,
|
|
351
783
|
"method": "GET",
|
|
352
784
|
"operationId": "getEmail",
|
|
@@ -362,8 +794,276 @@ export const operationManifest = [
|
|
|
362
794
|
],
|
|
363
795
|
"queryParams": [],
|
|
364
796
|
"requestSchema": null,
|
|
797
|
+
"responseSchema": {
|
|
798
|
+
"type": "object",
|
|
799
|
+
"properties": {
|
|
800
|
+
"id": {
|
|
801
|
+
"type": "string",
|
|
802
|
+
"format": "uuid"
|
|
803
|
+
},
|
|
804
|
+
"message_id": {
|
|
805
|
+
"type": [
|
|
806
|
+
"string",
|
|
807
|
+
"null"
|
|
808
|
+
]
|
|
809
|
+
},
|
|
810
|
+
"domain_id": {
|
|
811
|
+
"type": [
|
|
812
|
+
"string",
|
|
813
|
+
"null"
|
|
814
|
+
],
|
|
815
|
+
"format": "uuid"
|
|
816
|
+
},
|
|
817
|
+
"org_id": {
|
|
818
|
+
"type": [
|
|
819
|
+
"string",
|
|
820
|
+
"null"
|
|
821
|
+
],
|
|
822
|
+
"format": "uuid"
|
|
823
|
+
},
|
|
824
|
+
"sender": {
|
|
825
|
+
"type": "string",
|
|
826
|
+
"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"
|
|
827
|
+
},
|
|
828
|
+
"recipient": {
|
|
829
|
+
"type": "string"
|
|
830
|
+
},
|
|
831
|
+
"subject": {
|
|
832
|
+
"type": [
|
|
833
|
+
"string",
|
|
834
|
+
"null"
|
|
835
|
+
]
|
|
836
|
+
},
|
|
837
|
+
"body_text": {
|
|
838
|
+
"type": [
|
|
839
|
+
"string",
|
|
840
|
+
"null"
|
|
841
|
+
],
|
|
842
|
+
"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."
|
|
843
|
+
},
|
|
844
|
+
"body_html": {
|
|
845
|
+
"type": [
|
|
846
|
+
"string",
|
|
847
|
+
"null"
|
|
848
|
+
],
|
|
849
|
+
"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."
|
|
850
|
+
},
|
|
851
|
+
"status": {
|
|
852
|
+
"type": "string",
|
|
853
|
+
"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",
|
|
854
|
+
"enum": [
|
|
855
|
+
"pending",
|
|
856
|
+
"accepted",
|
|
857
|
+
"completed",
|
|
858
|
+
"rejected"
|
|
859
|
+
]
|
|
860
|
+
},
|
|
861
|
+
"domain": {
|
|
862
|
+
"type": "string"
|
|
863
|
+
},
|
|
864
|
+
"spam_score": {
|
|
865
|
+
"type": [
|
|
866
|
+
"number",
|
|
867
|
+
"null"
|
|
868
|
+
]
|
|
869
|
+
},
|
|
870
|
+
"raw_size_bytes": {
|
|
871
|
+
"type": [
|
|
872
|
+
"integer",
|
|
873
|
+
"null"
|
|
874
|
+
]
|
|
875
|
+
},
|
|
876
|
+
"raw_sha256": {
|
|
877
|
+
"type": [
|
|
878
|
+
"string",
|
|
879
|
+
"null"
|
|
880
|
+
]
|
|
881
|
+
},
|
|
882
|
+
"created_at": {
|
|
883
|
+
"type": "string",
|
|
884
|
+
"format": "date-time"
|
|
885
|
+
},
|
|
886
|
+
"received_at": {
|
|
887
|
+
"type": "string",
|
|
888
|
+
"format": "date-time"
|
|
889
|
+
},
|
|
890
|
+
"rejection_reason": {
|
|
891
|
+
"type": [
|
|
892
|
+
"string",
|
|
893
|
+
"null"
|
|
894
|
+
]
|
|
895
|
+
},
|
|
896
|
+
"webhook_status": {
|
|
897
|
+
"type": [
|
|
898
|
+
"string",
|
|
899
|
+
"null"
|
|
900
|
+
],
|
|
901
|
+
"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",
|
|
902
|
+
"enum": [
|
|
903
|
+
"pending",
|
|
904
|
+
"in_flight",
|
|
905
|
+
"fired",
|
|
906
|
+
"failed",
|
|
907
|
+
"exhausted",
|
|
908
|
+
null
|
|
909
|
+
]
|
|
910
|
+
},
|
|
911
|
+
"webhook_attempt_count": {
|
|
912
|
+
"type": "integer"
|
|
913
|
+
},
|
|
914
|
+
"webhook_last_attempt_at": {
|
|
915
|
+
"type": [
|
|
916
|
+
"string",
|
|
917
|
+
"null"
|
|
918
|
+
],
|
|
919
|
+
"format": "date-time"
|
|
920
|
+
},
|
|
921
|
+
"webhook_last_status_code": {
|
|
922
|
+
"type": [
|
|
923
|
+
"integer",
|
|
924
|
+
"null"
|
|
925
|
+
]
|
|
926
|
+
},
|
|
927
|
+
"webhook_last_error": {
|
|
928
|
+
"type": [
|
|
929
|
+
"string",
|
|
930
|
+
"null"
|
|
931
|
+
]
|
|
932
|
+
},
|
|
933
|
+
"webhook_fired_at": {
|
|
934
|
+
"type": [
|
|
935
|
+
"string",
|
|
936
|
+
"null"
|
|
937
|
+
],
|
|
938
|
+
"format": "date-time"
|
|
939
|
+
},
|
|
940
|
+
"smtp_helo": {
|
|
941
|
+
"type": [
|
|
942
|
+
"string",
|
|
943
|
+
"null"
|
|
944
|
+
]
|
|
945
|
+
},
|
|
946
|
+
"smtp_mail_from": {
|
|
947
|
+
"type": [
|
|
948
|
+
"string",
|
|
949
|
+
"null"
|
|
950
|
+
],
|
|
951
|
+
"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"
|
|
952
|
+
},
|
|
953
|
+
"smtp_rcpt_to": {
|
|
954
|
+
"type": [
|
|
955
|
+
"array",
|
|
956
|
+
"null"
|
|
957
|
+
],
|
|
958
|
+
"items": {
|
|
959
|
+
"type": "string"
|
|
960
|
+
}
|
|
961
|
+
},
|
|
962
|
+
"from_header": {
|
|
963
|
+
"type": [
|
|
964
|
+
"string",
|
|
965
|
+
"null"
|
|
966
|
+
],
|
|
967
|
+
"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"
|
|
968
|
+
},
|
|
969
|
+
"content_discarded_at": {
|
|
970
|
+
"type": [
|
|
971
|
+
"string",
|
|
972
|
+
"null"
|
|
973
|
+
],
|
|
974
|
+
"format": "date-time"
|
|
975
|
+
},
|
|
976
|
+
"content_discarded_by_delivery_id": {
|
|
977
|
+
"type": [
|
|
978
|
+
"string",
|
|
979
|
+
"null"
|
|
980
|
+
]
|
|
981
|
+
},
|
|
982
|
+
"from_email": {
|
|
983
|
+
"type": "string",
|
|
984
|
+
"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"
|
|
985
|
+
},
|
|
986
|
+
"to_email": {
|
|
987
|
+
"type": "string",
|
|
988
|
+
"description": "Parsed to address (same as recipient)"
|
|
989
|
+
},
|
|
990
|
+
"from_known_address": {
|
|
991
|
+
"type": "boolean",
|
|
992
|
+
"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"
|
|
993
|
+
},
|
|
994
|
+
"replies": {
|
|
995
|
+
"type": "array",
|
|
996
|
+
"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",
|
|
997
|
+
"items": {
|
|
998
|
+
"type": "object",
|
|
999
|
+
"properties": {
|
|
1000
|
+
"id": {
|
|
1001
|
+
"type": "string",
|
|
1002
|
+
"format": "uuid",
|
|
1003
|
+
"description": "Sent-email row id."
|
|
1004
|
+
},
|
|
1005
|
+
"status": {
|
|
1006
|
+
"type": "string",
|
|
1007
|
+
"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",
|
|
1008
|
+
"enum": [
|
|
1009
|
+
"queued",
|
|
1010
|
+
"submitted_to_agent",
|
|
1011
|
+
"agent_failed",
|
|
1012
|
+
"gate_denied",
|
|
1013
|
+
"unknown",
|
|
1014
|
+
"delivered",
|
|
1015
|
+
"bounced",
|
|
1016
|
+
"deferred",
|
|
1017
|
+
"wait_timeout"
|
|
1018
|
+
]
|
|
1019
|
+
},
|
|
1020
|
+
"to_address": {
|
|
1021
|
+
"type": "string",
|
|
1022
|
+
"description": "Recipient address as recorded on the sent_emails row."
|
|
1023
|
+
},
|
|
1024
|
+
"subject": {
|
|
1025
|
+
"type": [
|
|
1026
|
+
"string",
|
|
1027
|
+
"null"
|
|
1028
|
+
]
|
|
1029
|
+
},
|
|
1030
|
+
"created_at": {
|
|
1031
|
+
"type": "string",
|
|
1032
|
+
"format": "date-time"
|
|
1033
|
+
},
|
|
1034
|
+
"queue_id": {
|
|
1035
|
+
"type": [
|
|
1036
|
+
"string",
|
|
1037
|
+
"null"
|
|
1038
|
+
],
|
|
1039
|
+
"description": "Outbound relay queue identifier when available."
|
|
1040
|
+
}
|
|
1041
|
+
},
|
|
1042
|
+
"required": [
|
|
1043
|
+
"id",
|
|
1044
|
+
"status",
|
|
1045
|
+
"to_address",
|
|
1046
|
+
"created_at"
|
|
1047
|
+
]
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
},
|
|
1051
|
+
"required": [
|
|
1052
|
+
"id",
|
|
1053
|
+
"sender",
|
|
1054
|
+
"recipient",
|
|
1055
|
+
"status",
|
|
1056
|
+
"domain",
|
|
1057
|
+
"created_at",
|
|
1058
|
+
"received_at",
|
|
1059
|
+
"webhook_attempt_count",
|
|
1060
|
+
"from_email",
|
|
1061
|
+
"to_email",
|
|
1062
|
+
"replies"
|
|
1063
|
+
]
|
|
1064
|
+
},
|
|
365
1065
|
"sdkName": "getEmail",
|
|
366
|
-
"summary": "Get email
|
|
1066
|
+
"summary": "Get inbound email by id",
|
|
367
1067
|
"tag": "Emails",
|
|
368
1068
|
"tagCommand": "emails"
|
|
369
1069
|
},
|
|
@@ -400,13 +1100,8 @@ export const operationManifest = [
|
|
|
400
1100
|
"type": "string"
|
|
401
1101
|
},
|
|
402
1102
|
{
|
|
403
|
-
"description": "Filter by
|
|
404
|
-
"enum":
|
|
405
|
-
"pending",
|
|
406
|
-
"accepted",
|
|
407
|
-
"completed",
|
|
408
|
-
"rejected"
|
|
409
|
-
],
|
|
1103
|
+
"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",
|
|
1104
|
+
"enum": null,
|
|
410
1105
|
"name": "status",
|
|
411
1106
|
"required": false,
|
|
412
1107
|
"type": "string"
|
|
@@ -434,6 +1129,112 @@ export const operationManifest = [
|
|
|
434
1129
|
}
|
|
435
1130
|
],
|
|
436
1131
|
"requestSchema": null,
|
|
1132
|
+
"responseSchema": {
|
|
1133
|
+
"type": "array",
|
|
1134
|
+
"items": {
|
|
1135
|
+
"type": "object",
|
|
1136
|
+
"properties": {
|
|
1137
|
+
"id": {
|
|
1138
|
+
"type": "string",
|
|
1139
|
+
"format": "uuid"
|
|
1140
|
+
},
|
|
1141
|
+
"message_id": {
|
|
1142
|
+
"type": [
|
|
1143
|
+
"string",
|
|
1144
|
+
"null"
|
|
1145
|
+
]
|
|
1146
|
+
},
|
|
1147
|
+
"domain_id": {
|
|
1148
|
+
"type": [
|
|
1149
|
+
"string",
|
|
1150
|
+
"null"
|
|
1151
|
+
],
|
|
1152
|
+
"format": "uuid"
|
|
1153
|
+
},
|
|
1154
|
+
"org_id": {
|
|
1155
|
+
"type": [
|
|
1156
|
+
"string",
|
|
1157
|
+
"null"
|
|
1158
|
+
],
|
|
1159
|
+
"format": "uuid"
|
|
1160
|
+
},
|
|
1161
|
+
"status": {
|
|
1162
|
+
"type": "string",
|
|
1163
|
+
"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",
|
|
1164
|
+
"enum": [
|
|
1165
|
+
"pending",
|
|
1166
|
+
"accepted",
|
|
1167
|
+
"completed",
|
|
1168
|
+
"rejected"
|
|
1169
|
+
]
|
|
1170
|
+
},
|
|
1171
|
+
"sender": {
|
|
1172
|
+
"type": "string",
|
|
1173
|
+
"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"
|
|
1174
|
+
},
|
|
1175
|
+
"recipient": {
|
|
1176
|
+
"type": "string"
|
|
1177
|
+
},
|
|
1178
|
+
"subject": {
|
|
1179
|
+
"type": [
|
|
1180
|
+
"string",
|
|
1181
|
+
"null"
|
|
1182
|
+
]
|
|
1183
|
+
},
|
|
1184
|
+
"domain": {
|
|
1185
|
+
"type": "string"
|
|
1186
|
+
},
|
|
1187
|
+
"spam_score": {
|
|
1188
|
+
"type": [
|
|
1189
|
+
"number",
|
|
1190
|
+
"null"
|
|
1191
|
+
]
|
|
1192
|
+
},
|
|
1193
|
+
"created_at": {
|
|
1194
|
+
"type": "string",
|
|
1195
|
+
"format": "date-time"
|
|
1196
|
+
},
|
|
1197
|
+
"received_at": {
|
|
1198
|
+
"type": "string",
|
|
1199
|
+
"format": "date-time"
|
|
1200
|
+
},
|
|
1201
|
+
"raw_size_bytes": {
|
|
1202
|
+
"type": [
|
|
1203
|
+
"integer",
|
|
1204
|
+
"null"
|
|
1205
|
+
]
|
|
1206
|
+
},
|
|
1207
|
+
"webhook_status": {
|
|
1208
|
+
"type": [
|
|
1209
|
+
"string",
|
|
1210
|
+
"null"
|
|
1211
|
+
],
|
|
1212
|
+
"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",
|
|
1213
|
+
"enum": [
|
|
1214
|
+
"pending",
|
|
1215
|
+
"in_flight",
|
|
1216
|
+
"fired",
|
|
1217
|
+
"failed",
|
|
1218
|
+
"exhausted",
|
|
1219
|
+
null
|
|
1220
|
+
]
|
|
1221
|
+
},
|
|
1222
|
+
"webhook_attempt_count": {
|
|
1223
|
+
"type": "integer"
|
|
1224
|
+
}
|
|
1225
|
+
},
|
|
1226
|
+
"required": [
|
|
1227
|
+
"id",
|
|
1228
|
+
"status",
|
|
1229
|
+
"sender",
|
|
1230
|
+
"recipient",
|
|
1231
|
+
"domain",
|
|
1232
|
+
"created_at",
|
|
1233
|
+
"received_at",
|
|
1234
|
+
"webhook_attempt_count"
|
|
1235
|
+
]
|
|
1236
|
+
}
|
|
1237
|
+
},
|
|
437
1238
|
"sdkName": "listEmails",
|
|
438
1239
|
"summary": "List inbound emails",
|
|
439
1240
|
"tag": "Emails",
|
|
@@ -459,6 +1260,23 @@ export const operationManifest = [
|
|
|
459
1260
|
],
|
|
460
1261
|
"queryParams": [],
|
|
461
1262
|
"requestSchema": null,
|
|
1263
|
+
"responseSchema": {
|
|
1264
|
+
"type": "object",
|
|
1265
|
+
"properties": {
|
|
1266
|
+
"delivered": {
|
|
1267
|
+
"type": "integer",
|
|
1268
|
+
"description": "Number of successful deliveries"
|
|
1269
|
+
},
|
|
1270
|
+
"failed": {
|
|
1271
|
+
"type": "integer",
|
|
1272
|
+
"description": "Number of failed deliveries"
|
|
1273
|
+
}
|
|
1274
|
+
},
|
|
1275
|
+
"required": [
|
|
1276
|
+
"delivered",
|
|
1277
|
+
"failed"
|
|
1278
|
+
]
|
|
1279
|
+
},
|
|
462
1280
|
"sdkName": "replayEmailWebhooks",
|
|
463
1281
|
"summary": "Replay email webhooks",
|
|
464
1282
|
"tag": "Emails",
|
|
@@ -506,6 +1324,104 @@ export const operationManifest = [
|
|
|
506
1324
|
"url"
|
|
507
1325
|
]
|
|
508
1326
|
},
|
|
1327
|
+
"responseSchema": {
|
|
1328
|
+
"type": "object",
|
|
1329
|
+
"properties": {
|
|
1330
|
+
"id": {
|
|
1331
|
+
"type": "string",
|
|
1332
|
+
"format": "uuid"
|
|
1333
|
+
},
|
|
1334
|
+
"org_id": {
|
|
1335
|
+
"type": "string",
|
|
1336
|
+
"format": "uuid"
|
|
1337
|
+
},
|
|
1338
|
+
"url": {
|
|
1339
|
+
"type": [
|
|
1340
|
+
"string",
|
|
1341
|
+
"null"
|
|
1342
|
+
]
|
|
1343
|
+
},
|
|
1344
|
+
"enabled": {
|
|
1345
|
+
"type": "boolean"
|
|
1346
|
+
},
|
|
1347
|
+
"domain_id": {
|
|
1348
|
+
"type": [
|
|
1349
|
+
"string",
|
|
1350
|
+
"null"
|
|
1351
|
+
],
|
|
1352
|
+
"format": "uuid",
|
|
1353
|
+
"description": "Restrict this endpoint to emails from a specific domain"
|
|
1354
|
+
},
|
|
1355
|
+
"rules": {
|
|
1356
|
+
"type": "object",
|
|
1357
|
+
"description": "Endpoint-specific filtering rules"
|
|
1358
|
+
},
|
|
1359
|
+
"created_at": {
|
|
1360
|
+
"type": "string",
|
|
1361
|
+
"format": "date-time"
|
|
1362
|
+
},
|
|
1363
|
+
"updated_at": {
|
|
1364
|
+
"type": "string",
|
|
1365
|
+
"format": "date-time"
|
|
1366
|
+
},
|
|
1367
|
+
"delivery_count": {
|
|
1368
|
+
"type": "integer",
|
|
1369
|
+
"description": "Total webhook deliveries attempted"
|
|
1370
|
+
},
|
|
1371
|
+
"success_count": {
|
|
1372
|
+
"type": "integer",
|
|
1373
|
+
"description": "Successful deliveries"
|
|
1374
|
+
},
|
|
1375
|
+
"failure_count": {
|
|
1376
|
+
"type": "integer",
|
|
1377
|
+
"description": "Failed deliveries"
|
|
1378
|
+
},
|
|
1379
|
+
"consecutive_fails": {
|
|
1380
|
+
"type": "integer",
|
|
1381
|
+
"description": "Current streak of consecutive failures"
|
|
1382
|
+
},
|
|
1383
|
+
"last_delivery_at": {
|
|
1384
|
+
"type": [
|
|
1385
|
+
"string",
|
|
1386
|
+
"null"
|
|
1387
|
+
],
|
|
1388
|
+
"format": "date-time"
|
|
1389
|
+
},
|
|
1390
|
+
"last_success_at": {
|
|
1391
|
+
"type": [
|
|
1392
|
+
"string",
|
|
1393
|
+
"null"
|
|
1394
|
+
],
|
|
1395
|
+
"format": "date-time"
|
|
1396
|
+
},
|
|
1397
|
+
"last_failure_at": {
|
|
1398
|
+
"type": [
|
|
1399
|
+
"string",
|
|
1400
|
+
"null"
|
|
1401
|
+
],
|
|
1402
|
+
"format": "date-time"
|
|
1403
|
+
},
|
|
1404
|
+
"deactivated_at": {
|
|
1405
|
+
"type": [
|
|
1406
|
+
"string",
|
|
1407
|
+
"null"
|
|
1408
|
+
],
|
|
1409
|
+
"format": "date-time"
|
|
1410
|
+
}
|
|
1411
|
+
},
|
|
1412
|
+
"required": [
|
|
1413
|
+
"id",
|
|
1414
|
+
"org_id",
|
|
1415
|
+
"enabled",
|
|
1416
|
+
"rules",
|
|
1417
|
+
"created_at",
|
|
1418
|
+
"updated_at",
|
|
1419
|
+
"delivery_count",
|
|
1420
|
+
"success_count",
|
|
1421
|
+
"failure_count",
|
|
1422
|
+
"consecutive_fails"
|
|
1423
|
+
]
|
|
1424
|
+
},
|
|
509
1425
|
"sdkName": "createEndpoint",
|
|
510
1426
|
"summary": "Create a webhook endpoint",
|
|
511
1427
|
"tag": "Endpoints",
|
|
@@ -531,6 +1447,7 @@ export const operationManifest = [
|
|
|
531
1447
|
],
|
|
532
1448
|
"queryParams": [],
|
|
533
1449
|
"requestSchema": null,
|
|
1450
|
+
"responseSchema": null,
|
|
534
1451
|
"sdkName": "deleteEndpoint",
|
|
535
1452
|
"summary": "Delete a webhook endpoint",
|
|
536
1453
|
"tag": "Endpoints",
|
|
@@ -548,6 +1465,107 @@ export const operationManifest = [
|
|
|
548
1465
|
"pathParams": [],
|
|
549
1466
|
"queryParams": [],
|
|
550
1467
|
"requestSchema": null,
|
|
1468
|
+
"responseSchema": {
|
|
1469
|
+
"type": "array",
|
|
1470
|
+
"items": {
|
|
1471
|
+
"type": "object",
|
|
1472
|
+
"properties": {
|
|
1473
|
+
"id": {
|
|
1474
|
+
"type": "string",
|
|
1475
|
+
"format": "uuid"
|
|
1476
|
+
},
|
|
1477
|
+
"org_id": {
|
|
1478
|
+
"type": "string",
|
|
1479
|
+
"format": "uuid"
|
|
1480
|
+
},
|
|
1481
|
+
"url": {
|
|
1482
|
+
"type": [
|
|
1483
|
+
"string",
|
|
1484
|
+
"null"
|
|
1485
|
+
]
|
|
1486
|
+
},
|
|
1487
|
+
"enabled": {
|
|
1488
|
+
"type": "boolean"
|
|
1489
|
+
},
|
|
1490
|
+
"domain_id": {
|
|
1491
|
+
"type": [
|
|
1492
|
+
"string",
|
|
1493
|
+
"null"
|
|
1494
|
+
],
|
|
1495
|
+
"format": "uuid",
|
|
1496
|
+
"description": "Restrict this endpoint to emails from a specific domain"
|
|
1497
|
+
},
|
|
1498
|
+
"rules": {
|
|
1499
|
+
"type": "object",
|
|
1500
|
+
"description": "Endpoint-specific filtering rules"
|
|
1501
|
+
},
|
|
1502
|
+
"created_at": {
|
|
1503
|
+
"type": "string",
|
|
1504
|
+
"format": "date-time"
|
|
1505
|
+
},
|
|
1506
|
+
"updated_at": {
|
|
1507
|
+
"type": "string",
|
|
1508
|
+
"format": "date-time"
|
|
1509
|
+
},
|
|
1510
|
+
"delivery_count": {
|
|
1511
|
+
"type": "integer",
|
|
1512
|
+
"description": "Total webhook deliveries attempted"
|
|
1513
|
+
},
|
|
1514
|
+
"success_count": {
|
|
1515
|
+
"type": "integer",
|
|
1516
|
+
"description": "Successful deliveries"
|
|
1517
|
+
},
|
|
1518
|
+
"failure_count": {
|
|
1519
|
+
"type": "integer",
|
|
1520
|
+
"description": "Failed deliveries"
|
|
1521
|
+
},
|
|
1522
|
+
"consecutive_fails": {
|
|
1523
|
+
"type": "integer",
|
|
1524
|
+
"description": "Current streak of consecutive failures"
|
|
1525
|
+
},
|
|
1526
|
+
"last_delivery_at": {
|
|
1527
|
+
"type": [
|
|
1528
|
+
"string",
|
|
1529
|
+
"null"
|
|
1530
|
+
],
|
|
1531
|
+
"format": "date-time"
|
|
1532
|
+
},
|
|
1533
|
+
"last_success_at": {
|
|
1534
|
+
"type": [
|
|
1535
|
+
"string",
|
|
1536
|
+
"null"
|
|
1537
|
+
],
|
|
1538
|
+
"format": "date-time"
|
|
1539
|
+
},
|
|
1540
|
+
"last_failure_at": {
|
|
1541
|
+
"type": [
|
|
1542
|
+
"string",
|
|
1543
|
+
"null"
|
|
1544
|
+
],
|
|
1545
|
+
"format": "date-time"
|
|
1546
|
+
},
|
|
1547
|
+
"deactivated_at": {
|
|
1548
|
+
"type": [
|
|
1549
|
+
"string",
|
|
1550
|
+
"null"
|
|
1551
|
+
],
|
|
1552
|
+
"format": "date-time"
|
|
1553
|
+
}
|
|
1554
|
+
},
|
|
1555
|
+
"required": [
|
|
1556
|
+
"id",
|
|
1557
|
+
"org_id",
|
|
1558
|
+
"enabled",
|
|
1559
|
+
"rules",
|
|
1560
|
+
"created_at",
|
|
1561
|
+
"updated_at",
|
|
1562
|
+
"delivery_count",
|
|
1563
|
+
"success_count",
|
|
1564
|
+
"failure_count",
|
|
1565
|
+
"consecutive_fails"
|
|
1566
|
+
]
|
|
1567
|
+
}
|
|
1568
|
+
},
|
|
551
1569
|
"sdkName": "listEndpoints",
|
|
552
1570
|
"summary": "List webhook endpoints",
|
|
553
1571
|
"tag": "Endpoints",
|
|
@@ -573,6 +1591,27 @@ export const operationManifest = [
|
|
|
573
1591
|
],
|
|
574
1592
|
"queryParams": [],
|
|
575
1593
|
"requestSchema": null,
|
|
1594
|
+
"responseSchema": {
|
|
1595
|
+
"type": "object",
|
|
1596
|
+
"properties": {
|
|
1597
|
+
"status": {
|
|
1598
|
+
"type": "integer",
|
|
1599
|
+
"description": "HTTP status code returned by the endpoint"
|
|
1600
|
+
},
|
|
1601
|
+
"body": {
|
|
1602
|
+
"type": "string",
|
|
1603
|
+
"description": "Response body (truncated to 1000 characters)"
|
|
1604
|
+
},
|
|
1605
|
+
"signature": {
|
|
1606
|
+
"type": "string",
|
|
1607
|
+
"description": "The signature header value sent (if webhook secret is configured)"
|
|
1608
|
+
}
|
|
1609
|
+
},
|
|
1610
|
+
"required": [
|
|
1611
|
+
"status",
|
|
1612
|
+
"body"
|
|
1613
|
+
]
|
|
1614
|
+
},
|
|
576
1615
|
"sdkName": "testEndpoint",
|
|
577
1616
|
"summary": "Send a test webhook",
|
|
578
1617
|
"tag": "Endpoints",
|
|
@@ -603,24 +1642,122 @@ export const operationManifest = [
|
|
|
603
1642
|
"properties": {
|
|
604
1643
|
"url": {
|
|
605
1644
|
"type": "string",
|
|
606
|
-
"minLength": 1,
|
|
607
|
-
"description": "New webhook URL (triggers endpoint rotation)"
|
|
1645
|
+
"minLength": 1,
|
|
1646
|
+
"description": "New webhook URL (triggers endpoint rotation)"
|
|
1647
|
+
},
|
|
1648
|
+
"enabled": {
|
|
1649
|
+
"type": "boolean"
|
|
1650
|
+
},
|
|
1651
|
+
"domain_id": {
|
|
1652
|
+
"type": [
|
|
1653
|
+
"string",
|
|
1654
|
+
"null"
|
|
1655
|
+
],
|
|
1656
|
+
"format": "uuid"
|
|
1657
|
+
},
|
|
1658
|
+
"rules": {
|
|
1659
|
+
"type": "object"
|
|
1660
|
+
}
|
|
1661
|
+
},
|
|
1662
|
+
"minProperties": 1
|
|
1663
|
+
},
|
|
1664
|
+
"responseSchema": {
|
|
1665
|
+
"type": "object",
|
|
1666
|
+
"properties": {
|
|
1667
|
+
"id": {
|
|
1668
|
+
"type": "string",
|
|
1669
|
+
"format": "uuid"
|
|
1670
|
+
},
|
|
1671
|
+
"org_id": {
|
|
1672
|
+
"type": "string",
|
|
1673
|
+
"format": "uuid"
|
|
1674
|
+
},
|
|
1675
|
+
"url": {
|
|
1676
|
+
"type": [
|
|
1677
|
+
"string",
|
|
1678
|
+
"null"
|
|
1679
|
+
]
|
|
1680
|
+
},
|
|
1681
|
+
"enabled": {
|
|
1682
|
+
"type": "boolean"
|
|
1683
|
+
},
|
|
1684
|
+
"domain_id": {
|
|
1685
|
+
"type": [
|
|
1686
|
+
"string",
|
|
1687
|
+
"null"
|
|
1688
|
+
],
|
|
1689
|
+
"format": "uuid",
|
|
1690
|
+
"description": "Restrict this endpoint to emails from a specific domain"
|
|
1691
|
+
},
|
|
1692
|
+
"rules": {
|
|
1693
|
+
"type": "object",
|
|
1694
|
+
"description": "Endpoint-specific filtering rules"
|
|
1695
|
+
},
|
|
1696
|
+
"created_at": {
|
|
1697
|
+
"type": "string",
|
|
1698
|
+
"format": "date-time"
|
|
608
1699
|
},
|
|
609
|
-
"
|
|
610
|
-
"type": "
|
|
1700
|
+
"updated_at": {
|
|
1701
|
+
"type": "string",
|
|
1702
|
+
"format": "date-time"
|
|
611
1703
|
},
|
|
612
|
-
"
|
|
1704
|
+
"delivery_count": {
|
|
1705
|
+
"type": "integer",
|
|
1706
|
+
"description": "Total webhook deliveries attempted"
|
|
1707
|
+
},
|
|
1708
|
+
"success_count": {
|
|
1709
|
+
"type": "integer",
|
|
1710
|
+
"description": "Successful deliveries"
|
|
1711
|
+
},
|
|
1712
|
+
"failure_count": {
|
|
1713
|
+
"type": "integer",
|
|
1714
|
+
"description": "Failed deliveries"
|
|
1715
|
+
},
|
|
1716
|
+
"consecutive_fails": {
|
|
1717
|
+
"type": "integer",
|
|
1718
|
+
"description": "Current streak of consecutive failures"
|
|
1719
|
+
},
|
|
1720
|
+
"last_delivery_at": {
|
|
613
1721
|
"type": [
|
|
614
1722
|
"string",
|
|
615
1723
|
"null"
|
|
616
1724
|
],
|
|
617
|
-
"format": "
|
|
1725
|
+
"format": "date-time"
|
|
618
1726
|
},
|
|
619
|
-
"
|
|
620
|
-
"type":
|
|
1727
|
+
"last_success_at": {
|
|
1728
|
+
"type": [
|
|
1729
|
+
"string",
|
|
1730
|
+
"null"
|
|
1731
|
+
],
|
|
1732
|
+
"format": "date-time"
|
|
1733
|
+
},
|
|
1734
|
+
"last_failure_at": {
|
|
1735
|
+
"type": [
|
|
1736
|
+
"string",
|
|
1737
|
+
"null"
|
|
1738
|
+
],
|
|
1739
|
+
"format": "date-time"
|
|
1740
|
+
},
|
|
1741
|
+
"deactivated_at": {
|
|
1742
|
+
"type": [
|
|
1743
|
+
"string",
|
|
1744
|
+
"null"
|
|
1745
|
+
],
|
|
1746
|
+
"format": "date-time"
|
|
621
1747
|
}
|
|
622
1748
|
},
|
|
623
|
-
"
|
|
1749
|
+
"required": [
|
|
1750
|
+
"id",
|
|
1751
|
+
"org_id",
|
|
1752
|
+
"enabled",
|
|
1753
|
+
"rules",
|
|
1754
|
+
"created_at",
|
|
1755
|
+
"updated_at",
|
|
1756
|
+
"delivery_count",
|
|
1757
|
+
"success_count",
|
|
1758
|
+
"failure_count",
|
|
1759
|
+
"consecutive_fails"
|
|
1760
|
+
]
|
|
624
1761
|
},
|
|
625
1762
|
"sdkName": "updateEndpoint",
|
|
626
1763
|
"summary": "Update a webhook endpoint",
|
|
@@ -669,6 +1806,53 @@ export const operationManifest = [
|
|
|
669
1806
|
"pattern"
|
|
670
1807
|
]
|
|
671
1808
|
},
|
|
1809
|
+
"responseSchema": {
|
|
1810
|
+
"type": "object",
|
|
1811
|
+
"properties": {
|
|
1812
|
+
"id": {
|
|
1813
|
+
"type": "string",
|
|
1814
|
+
"format": "uuid"
|
|
1815
|
+
},
|
|
1816
|
+
"org_id": {
|
|
1817
|
+
"type": "string",
|
|
1818
|
+
"format": "uuid"
|
|
1819
|
+
},
|
|
1820
|
+
"domain_id": {
|
|
1821
|
+
"type": [
|
|
1822
|
+
"string",
|
|
1823
|
+
"null"
|
|
1824
|
+
],
|
|
1825
|
+
"format": "uuid",
|
|
1826
|
+
"description": "If set, filter applies only to this domain"
|
|
1827
|
+
},
|
|
1828
|
+
"type": {
|
|
1829
|
+
"type": "string",
|
|
1830
|
+
"enum": [
|
|
1831
|
+
"whitelist",
|
|
1832
|
+
"blocklist"
|
|
1833
|
+
]
|
|
1834
|
+
},
|
|
1835
|
+
"pattern": {
|
|
1836
|
+
"type": "string",
|
|
1837
|
+
"description": "Email address or pattern to match (stored lowercase)"
|
|
1838
|
+
},
|
|
1839
|
+
"enabled": {
|
|
1840
|
+
"type": "boolean"
|
|
1841
|
+
},
|
|
1842
|
+
"created_at": {
|
|
1843
|
+
"type": "string",
|
|
1844
|
+
"format": "date-time"
|
|
1845
|
+
}
|
|
1846
|
+
},
|
|
1847
|
+
"required": [
|
|
1848
|
+
"id",
|
|
1849
|
+
"org_id",
|
|
1850
|
+
"type",
|
|
1851
|
+
"pattern",
|
|
1852
|
+
"enabled",
|
|
1853
|
+
"created_at"
|
|
1854
|
+
]
|
|
1855
|
+
},
|
|
672
1856
|
"sdkName": "createFilter",
|
|
673
1857
|
"summary": "Create a filter rule",
|
|
674
1858
|
"tag": "Filters",
|
|
@@ -694,6 +1878,7 @@ export const operationManifest = [
|
|
|
694
1878
|
],
|
|
695
1879
|
"queryParams": [],
|
|
696
1880
|
"requestSchema": null,
|
|
1881
|
+
"responseSchema": null,
|
|
697
1882
|
"sdkName": "deleteFilter",
|
|
698
1883
|
"summary": "Delete a filter rule",
|
|
699
1884
|
"tag": "Filters",
|
|
@@ -711,6 +1896,56 @@ export const operationManifest = [
|
|
|
711
1896
|
"pathParams": [],
|
|
712
1897
|
"queryParams": [],
|
|
713
1898
|
"requestSchema": null,
|
|
1899
|
+
"responseSchema": {
|
|
1900
|
+
"type": "array",
|
|
1901
|
+
"items": {
|
|
1902
|
+
"type": "object",
|
|
1903
|
+
"properties": {
|
|
1904
|
+
"id": {
|
|
1905
|
+
"type": "string",
|
|
1906
|
+
"format": "uuid"
|
|
1907
|
+
},
|
|
1908
|
+
"org_id": {
|
|
1909
|
+
"type": "string",
|
|
1910
|
+
"format": "uuid"
|
|
1911
|
+
},
|
|
1912
|
+
"domain_id": {
|
|
1913
|
+
"type": [
|
|
1914
|
+
"string",
|
|
1915
|
+
"null"
|
|
1916
|
+
],
|
|
1917
|
+
"format": "uuid",
|
|
1918
|
+
"description": "If set, filter applies only to this domain"
|
|
1919
|
+
},
|
|
1920
|
+
"type": {
|
|
1921
|
+
"type": "string",
|
|
1922
|
+
"enum": [
|
|
1923
|
+
"whitelist",
|
|
1924
|
+
"blocklist"
|
|
1925
|
+
]
|
|
1926
|
+
},
|
|
1927
|
+
"pattern": {
|
|
1928
|
+
"type": "string",
|
|
1929
|
+
"description": "Email address or pattern to match (stored lowercase)"
|
|
1930
|
+
},
|
|
1931
|
+
"enabled": {
|
|
1932
|
+
"type": "boolean"
|
|
1933
|
+
},
|
|
1934
|
+
"created_at": {
|
|
1935
|
+
"type": "string",
|
|
1936
|
+
"format": "date-time"
|
|
1937
|
+
}
|
|
1938
|
+
},
|
|
1939
|
+
"required": [
|
|
1940
|
+
"id",
|
|
1941
|
+
"org_id",
|
|
1942
|
+
"type",
|
|
1943
|
+
"pattern",
|
|
1944
|
+
"enabled",
|
|
1945
|
+
"created_at"
|
|
1946
|
+
]
|
|
1947
|
+
}
|
|
1948
|
+
},
|
|
714
1949
|
"sdkName": "listFilters",
|
|
715
1950
|
"summary": "List filter rules",
|
|
716
1951
|
"tag": "Filters",
|
|
@@ -747,6 +1982,53 @@ export const operationManifest = [
|
|
|
747
1982
|
"enabled"
|
|
748
1983
|
]
|
|
749
1984
|
},
|
|
1985
|
+
"responseSchema": {
|
|
1986
|
+
"type": "object",
|
|
1987
|
+
"properties": {
|
|
1988
|
+
"id": {
|
|
1989
|
+
"type": "string",
|
|
1990
|
+
"format": "uuid"
|
|
1991
|
+
},
|
|
1992
|
+
"org_id": {
|
|
1993
|
+
"type": "string",
|
|
1994
|
+
"format": "uuid"
|
|
1995
|
+
},
|
|
1996
|
+
"domain_id": {
|
|
1997
|
+
"type": [
|
|
1998
|
+
"string",
|
|
1999
|
+
"null"
|
|
2000
|
+
],
|
|
2001
|
+
"format": "uuid",
|
|
2002
|
+
"description": "If set, filter applies only to this domain"
|
|
2003
|
+
},
|
|
2004
|
+
"type": {
|
|
2005
|
+
"type": "string",
|
|
2006
|
+
"enum": [
|
|
2007
|
+
"whitelist",
|
|
2008
|
+
"blocklist"
|
|
2009
|
+
]
|
|
2010
|
+
},
|
|
2011
|
+
"pattern": {
|
|
2012
|
+
"type": "string",
|
|
2013
|
+
"description": "Email address or pattern to match (stored lowercase)"
|
|
2014
|
+
},
|
|
2015
|
+
"enabled": {
|
|
2016
|
+
"type": "boolean"
|
|
2017
|
+
},
|
|
2018
|
+
"created_at": {
|
|
2019
|
+
"type": "string",
|
|
2020
|
+
"format": "date-time"
|
|
2021
|
+
}
|
|
2022
|
+
},
|
|
2023
|
+
"required": [
|
|
2024
|
+
"id",
|
|
2025
|
+
"org_id",
|
|
2026
|
+
"type",
|
|
2027
|
+
"pattern",
|
|
2028
|
+
"enabled",
|
|
2029
|
+
"created_at"
|
|
2030
|
+
]
|
|
2031
|
+
},
|
|
750
2032
|
"sdkName": "updateFilter",
|
|
751
2033
|
"summary": "Update a filter rule",
|
|
752
2034
|
"tag": "Filters",
|
|
@@ -764,6 +2046,129 @@ export const operationManifest = [
|
|
|
764
2046
|
"pathParams": [],
|
|
765
2047
|
"queryParams": [],
|
|
766
2048
|
"requestSchema": null,
|
|
2049
|
+
"responseSchema": {
|
|
2050
|
+
"type": "array",
|
|
2051
|
+
"items": {
|
|
2052
|
+
"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",
|
|
2053
|
+
"discriminator": {
|
|
2054
|
+
"propertyName": "type",
|
|
2055
|
+
"mapping": {
|
|
2056
|
+
"any_recipient": "#/components/schemas/SendPermissionAnyRecipient",
|
|
2057
|
+
"managed_zone": "#/components/schemas/SendPermissionManagedZone",
|
|
2058
|
+
"your_domain": "#/components/schemas/SendPermissionYourDomain",
|
|
2059
|
+
"address": "#/components/schemas/SendPermissionAddress"
|
|
2060
|
+
}
|
|
2061
|
+
},
|
|
2062
|
+
"oneOf": [
|
|
2063
|
+
{
|
|
2064
|
+
"type": "object",
|
|
2065
|
+
"description": "The caller can send to any recipient. When this rule is\npresent, every other rule in the response is redundant.\n",
|
|
2066
|
+
"properties": {
|
|
2067
|
+
"type": {
|
|
2068
|
+
"type": "string",
|
|
2069
|
+
"enum": [
|
|
2070
|
+
"any_recipient"
|
|
2071
|
+
]
|
|
2072
|
+
},
|
|
2073
|
+
"description": {
|
|
2074
|
+
"type": "string",
|
|
2075
|
+
"description": "Human-prose summary of the rule."
|
|
2076
|
+
}
|
|
2077
|
+
},
|
|
2078
|
+
"required": [
|
|
2079
|
+
"type",
|
|
2080
|
+
"description"
|
|
2081
|
+
]
|
|
2082
|
+
},
|
|
2083
|
+
{
|
|
2084
|
+
"type": "object",
|
|
2085
|
+
"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",
|
|
2086
|
+
"properties": {
|
|
2087
|
+
"type": {
|
|
2088
|
+
"type": "string",
|
|
2089
|
+
"enum": [
|
|
2090
|
+
"managed_zone"
|
|
2091
|
+
]
|
|
2092
|
+
},
|
|
2093
|
+
"zone": {
|
|
2094
|
+
"type": "string",
|
|
2095
|
+
"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"
|
|
2096
|
+
},
|
|
2097
|
+
"description": {
|
|
2098
|
+
"type": "string",
|
|
2099
|
+
"description": "Human-prose summary of the rule."
|
|
2100
|
+
}
|
|
2101
|
+
},
|
|
2102
|
+
"required": [
|
|
2103
|
+
"type",
|
|
2104
|
+
"zone",
|
|
2105
|
+
"description"
|
|
2106
|
+
]
|
|
2107
|
+
},
|
|
2108
|
+
{
|
|
2109
|
+
"type": "object",
|
|
2110
|
+
"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",
|
|
2111
|
+
"properties": {
|
|
2112
|
+
"type": {
|
|
2113
|
+
"type": "string",
|
|
2114
|
+
"enum": [
|
|
2115
|
+
"your_domain"
|
|
2116
|
+
]
|
|
2117
|
+
},
|
|
2118
|
+
"domain": {
|
|
2119
|
+
"type": "string",
|
|
2120
|
+
"description": "A verified outbound domain owned by the caller's org."
|
|
2121
|
+
},
|
|
2122
|
+
"description": {
|
|
2123
|
+
"type": "string",
|
|
2124
|
+
"description": "Human-prose summary of the rule."
|
|
2125
|
+
}
|
|
2126
|
+
},
|
|
2127
|
+
"required": [
|
|
2128
|
+
"type",
|
|
2129
|
+
"domain",
|
|
2130
|
+
"description"
|
|
2131
|
+
]
|
|
2132
|
+
},
|
|
2133
|
+
{
|
|
2134
|
+
"type": "object",
|
|
2135
|
+
"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",
|
|
2136
|
+
"properties": {
|
|
2137
|
+
"type": {
|
|
2138
|
+
"type": "string",
|
|
2139
|
+
"enum": [
|
|
2140
|
+
"address"
|
|
2141
|
+
]
|
|
2142
|
+
},
|
|
2143
|
+
"address": {
|
|
2144
|
+
"type": "string",
|
|
2145
|
+
"description": "The bare email address this rule grants sends to."
|
|
2146
|
+
},
|
|
2147
|
+
"last_received_at": {
|
|
2148
|
+
"type": "string",
|
|
2149
|
+
"format": "date-time",
|
|
2150
|
+
"description": "Most recent inbound email from this address that\nauthenticated successfully (DMARC pass + DKIM/SPF\nalignment). Updated on each new authenticated receipt.\n"
|
|
2151
|
+
},
|
|
2152
|
+
"received_count": {
|
|
2153
|
+
"type": "integer",
|
|
2154
|
+
"description": "Total number of authenticated inbound emails from this\naddress. Increments only when `last_received_at` advances.\n"
|
|
2155
|
+
},
|
|
2156
|
+
"description": {
|
|
2157
|
+
"type": "string",
|
|
2158
|
+
"description": "Human-prose summary of the rule."
|
|
2159
|
+
}
|
|
2160
|
+
},
|
|
2161
|
+
"required": [
|
|
2162
|
+
"type",
|
|
2163
|
+
"address",
|
|
2164
|
+
"last_received_at",
|
|
2165
|
+
"received_count",
|
|
2166
|
+
"description"
|
|
2167
|
+
]
|
|
2168
|
+
}
|
|
2169
|
+
]
|
|
2170
|
+
}
|
|
2171
|
+
},
|
|
767
2172
|
"sdkName": "getSendPermissions",
|
|
768
2173
|
"summary": "List send-permission rules",
|
|
769
2174
|
"tag": "Sending",
|
|
@@ -789,6 +2194,285 @@ export const operationManifest = [
|
|
|
789
2194
|
],
|
|
790
2195
|
"queryParams": [],
|
|
791
2196
|
"requestSchema": null,
|
|
2197
|
+
"responseSchema": {
|
|
2198
|
+
"description": "Full sent-email record, including `body_text` and\n`body_html`. Returned by /sent-emails/{id}.\n",
|
|
2199
|
+
"allOf": [
|
|
2200
|
+
{
|
|
2201
|
+
"type": "object",
|
|
2202
|
+
"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",
|
|
2203
|
+
"properties": {
|
|
2204
|
+
"id": {
|
|
2205
|
+
"type": "string",
|
|
2206
|
+
"format": "uuid"
|
|
2207
|
+
},
|
|
2208
|
+
"status": {
|
|
2209
|
+
"type": "string",
|
|
2210
|
+
"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",
|
|
2211
|
+
"enum": [
|
|
2212
|
+
"queued",
|
|
2213
|
+
"submitted_to_agent",
|
|
2214
|
+
"agent_failed",
|
|
2215
|
+
"gate_denied",
|
|
2216
|
+
"unknown",
|
|
2217
|
+
"delivered",
|
|
2218
|
+
"bounced",
|
|
2219
|
+
"deferred",
|
|
2220
|
+
"wait_timeout"
|
|
2221
|
+
]
|
|
2222
|
+
},
|
|
2223
|
+
"status_changed_at": {
|
|
2224
|
+
"type": "string",
|
|
2225
|
+
"format": "date-time",
|
|
2226
|
+
"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"
|
|
2227
|
+
},
|
|
2228
|
+
"created_at": {
|
|
2229
|
+
"type": "string",
|
|
2230
|
+
"format": "date-time"
|
|
2231
|
+
},
|
|
2232
|
+
"updated_at": {
|
|
2233
|
+
"type": "string",
|
|
2234
|
+
"format": "date-time"
|
|
2235
|
+
},
|
|
2236
|
+
"client_idempotency_key": {
|
|
2237
|
+
"type": [
|
|
2238
|
+
"string",
|
|
2239
|
+
"null"
|
|
2240
|
+
],
|
|
2241
|
+
"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"
|
|
2242
|
+
},
|
|
2243
|
+
"content_hash": {
|
|
2244
|
+
"type": "string",
|
|
2245
|
+
"description": "Stable hash of the canonical send payload."
|
|
2246
|
+
},
|
|
2247
|
+
"from_header": {
|
|
2248
|
+
"type": "string",
|
|
2249
|
+
"description": "Raw `From:` header as sent on the wire, including any\ndisplay name (e.g. `\"Acme Support\" <agent@acme.test>`).\n"
|
|
2250
|
+
},
|
|
2251
|
+
"from_address": {
|
|
2252
|
+
"type": "string",
|
|
2253
|
+
"description": "Bare email address parsed from `from_header`."
|
|
2254
|
+
},
|
|
2255
|
+
"to_header": {
|
|
2256
|
+
"type": "string",
|
|
2257
|
+
"description": "Raw `To:` header as sent on the wire, including any\ndisplay name.\n"
|
|
2258
|
+
},
|
|
2259
|
+
"to_address": {
|
|
2260
|
+
"type": "string",
|
|
2261
|
+
"description": "Bare email address parsed from `to_header`."
|
|
2262
|
+
},
|
|
2263
|
+
"subject": {
|
|
2264
|
+
"type": "string"
|
|
2265
|
+
},
|
|
2266
|
+
"body_size_bytes": {
|
|
2267
|
+
"type": "integer",
|
|
2268
|
+
"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"
|
|
2269
|
+
},
|
|
2270
|
+
"content_discarded_at": {
|
|
2271
|
+
"type": [
|
|
2272
|
+
"string",
|
|
2273
|
+
"null"
|
|
2274
|
+
],
|
|
2275
|
+
"format": "date-time",
|
|
2276
|
+
"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"
|
|
2277
|
+
},
|
|
2278
|
+
"message_id": {
|
|
2279
|
+
"type": [
|
|
2280
|
+
"string",
|
|
2281
|
+
"null"
|
|
2282
|
+
],
|
|
2283
|
+
"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"
|
|
2284
|
+
},
|
|
2285
|
+
"in_reply_to": {
|
|
2286
|
+
"type": [
|
|
2287
|
+
"string",
|
|
2288
|
+
"null"
|
|
2289
|
+
],
|
|
2290
|
+
"description": "Wire-level In-Reply-To header value, when this send\nwas a reply.\n"
|
|
2291
|
+
},
|
|
2292
|
+
"email_references": {
|
|
2293
|
+
"type": [
|
|
2294
|
+
"string",
|
|
2295
|
+
"null"
|
|
2296
|
+
],
|
|
2297
|
+
"description": "Wire-level References header value, when this send\nwas a reply.\n"
|
|
2298
|
+
},
|
|
2299
|
+
"in_reply_to_email_id": {
|
|
2300
|
+
"type": [
|
|
2301
|
+
"string",
|
|
2302
|
+
"null"
|
|
2303
|
+
],
|
|
2304
|
+
"format": "uuid",
|
|
2305
|
+
"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"
|
|
2306
|
+
},
|
|
2307
|
+
"queue_id": {
|
|
2308
|
+
"type": [
|
|
2309
|
+
"string",
|
|
2310
|
+
"null"
|
|
2311
|
+
],
|
|
2312
|
+
"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"
|
|
2313
|
+
},
|
|
2314
|
+
"smtp_response_code": {
|
|
2315
|
+
"type": [
|
|
2316
|
+
"integer",
|
|
2317
|
+
"null"
|
|
2318
|
+
],
|
|
2319
|
+
"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"
|
|
2320
|
+
},
|
|
2321
|
+
"smtp_response_text": {
|
|
2322
|
+
"type": [
|
|
2323
|
+
"string",
|
|
2324
|
+
"null"
|
|
2325
|
+
],
|
|
2326
|
+
"description": "Free-form text portion of the receiver's SMTP\nresponse. The most useful debugging signal on a\n`bounced` or `deferred` row.\n"
|
|
2327
|
+
},
|
|
2328
|
+
"smtp_enhanced_status_code": {
|
|
2329
|
+
"type": [
|
|
2330
|
+
"string",
|
|
2331
|
+
"null"
|
|
2332
|
+
],
|
|
2333
|
+
"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"
|
|
2334
|
+
},
|
|
2335
|
+
"dkim_selector": {
|
|
2336
|
+
"type": [
|
|
2337
|
+
"string",
|
|
2338
|
+
"null"
|
|
2339
|
+
],
|
|
2340
|
+
"description": "DKIM selector used to sign the outbound message.\nPublic DNS data; useful for diagnosing why a downstream\nverifier rejected the signature.\n"
|
|
2341
|
+
},
|
|
2342
|
+
"dkim_domain": {
|
|
2343
|
+
"type": [
|
|
2344
|
+
"string",
|
|
2345
|
+
"null"
|
|
2346
|
+
],
|
|
2347
|
+
"description": "DKIM signing domain."
|
|
2348
|
+
},
|
|
2349
|
+
"error_code": {
|
|
2350
|
+
"type": [
|
|
2351
|
+
"string",
|
|
2352
|
+
"null"
|
|
2353
|
+
],
|
|
2354
|
+
"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"
|
|
2355
|
+
},
|
|
2356
|
+
"error_message": {
|
|
2357
|
+
"type": [
|
|
2358
|
+
"string",
|
|
2359
|
+
"null"
|
|
2360
|
+
],
|
|
2361
|
+
"description": "Free-form error message accompanying `error_code`."
|
|
2362
|
+
},
|
|
2363
|
+
"gates": {
|
|
2364
|
+
"type": [
|
|
2365
|
+
"array",
|
|
2366
|
+
"null"
|
|
2367
|
+
],
|
|
2368
|
+
"items": {
|
|
2369
|
+
"type": "object",
|
|
2370
|
+
"properties": {
|
|
2371
|
+
"name": {
|
|
2372
|
+
"type": "string",
|
|
2373
|
+
"enum": [
|
|
2374
|
+
"send_to_confirmed_domains",
|
|
2375
|
+
"send_to_known_addresses"
|
|
2376
|
+
],
|
|
2377
|
+
"description": "Public recipient-scope gate name that denied the send."
|
|
2378
|
+
},
|
|
2379
|
+
"reason": {
|
|
2380
|
+
"type": "string",
|
|
2381
|
+
"enum": [
|
|
2382
|
+
"domain_not_confirmed",
|
|
2383
|
+
"recipient_unauthenticated",
|
|
2384
|
+
"recipient_not_known"
|
|
2385
|
+
],
|
|
2386
|
+
"description": "Stable machine-readable denial reason."
|
|
2387
|
+
},
|
|
2388
|
+
"message": {
|
|
2389
|
+
"type": "string",
|
|
2390
|
+
"description": "Human-readable explanation of the gate denial."
|
|
2391
|
+
},
|
|
2392
|
+
"subject": {
|
|
2393
|
+
"type": "string",
|
|
2394
|
+
"description": "Domain or address the gate evaluated."
|
|
2395
|
+
},
|
|
2396
|
+
"fix": {
|
|
2397
|
+
"type": "object",
|
|
2398
|
+
"properties": {
|
|
2399
|
+
"action": {
|
|
2400
|
+
"type": "string",
|
|
2401
|
+
"enum": [
|
|
2402
|
+
"confirm_domain",
|
|
2403
|
+
"sender_must_fix_authentication",
|
|
2404
|
+
"wait_for_inbound"
|
|
2405
|
+
],
|
|
2406
|
+
"description": "Suggested next action for the caller."
|
|
2407
|
+
},
|
|
2408
|
+
"subject": {
|
|
2409
|
+
"type": "string",
|
|
2410
|
+
"description": "Entity the action applies to."
|
|
2411
|
+
}
|
|
2412
|
+
},
|
|
2413
|
+
"required": [
|
|
2414
|
+
"action",
|
|
2415
|
+
"subject"
|
|
2416
|
+
]
|
|
2417
|
+
},
|
|
2418
|
+
"docs_url": {
|
|
2419
|
+
"type": "string",
|
|
2420
|
+
"description": "Public docs URL with more context."
|
|
2421
|
+
}
|
|
2422
|
+
},
|
|
2423
|
+
"required": [
|
|
2424
|
+
"name",
|
|
2425
|
+
"reason",
|
|
2426
|
+
"message",
|
|
2427
|
+
"subject"
|
|
2428
|
+
]
|
|
2429
|
+
},
|
|
2430
|
+
"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"
|
|
2431
|
+
},
|
|
2432
|
+
"request_id": {
|
|
2433
|
+
"type": [
|
|
2434
|
+
"string",
|
|
2435
|
+
"null"
|
|
2436
|
+
],
|
|
2437
|
+
"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"
|
|
2438
|
+
}
|
|
2439
|
+
},
|
|
2440
|
+
"required": [
|
|
2441
|
+
"id",
|
|
2442
|
+
"status",
|
|
2443
|
+
"status_changed_at",
|
|
2444
|
+
"created_at",
|
|
2445
|
+
"updated_at",
|
|
2446
|
+
"content_hash",
|
|
2447
|
+
"from_header",
|
|
2448
|
+
"from_address",
|
|
2449
|
+
"to_header",
|
|
2450
|
+
"to_address",
|
|
2451
|
+
"subject",
|
|
2452
|
+
"body_size_bytes"
|
|
2453
|
+
]
|
|
2454
|
+
},
|
|
2455
|
+
{
|
|
2456
|
+
"type": "object",
|
|
2457
|
+
"properties": {
|
|
2458
|
+
"body_text": {
|
|
2459
|
+
"type": [
|
|
2460
|
+
"string",
|
|
2461
|
+
"null"
|
|
2462
|
+
],
|
|
2463
|
+
"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"
|
|
2464
|
+
},
|
|
2465
|
+
"body_html": {
|
|
2466
|
+
"type": [
|
|
2467
|
+
"string",
|
|
2468
|
+
"null"
|
|
2469
|
+
],
|
|
2470
|
+
"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"
|
|
2471
|
+
}
|
|
2472
|
+
}
|
|
2473
|
+
}
|
|
2474
|
+
]
|
|
2475
|
+
},
|
|
792
2476
|
"sdkName": "getSentEmail",
|
|
793
2477
|
"summary": "Get a sent email by id",
|
|
794
2478
|
"tag": "Sending",
|
|
@@ -856,6 +2540,264 @@ export const operationManifest = [
|
|
|
856
2540
|
}
|
|
857
2541
|
],
|
|
858
2542
|
"requestSchema": null,
|
|
2543
|
+
"responseSchema": {
|
|
2544
|
+
"type": "array",
|
|
2545
|
+
"items": {
|
|
2546
|
+
"type": "object",
|
|
2547
|
+
"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",
|
|
2548
|
+
"properties": {
|
|
2549
|
+
"id": {
|
|
2550
|
+
"type": "string",
|
|
2551
|
+
"format": "uuid"
|
|
2552
|
+
},
|
|
2553
|
+
"status": {
|
|
2554
|
+
"type": "string",
|
|
2555
|
+
"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",
|
|
2556
|
+
"enum": [
|
|
2557
|
+
"queued",
|
|
2558
|
+
"submitted_to_agent",
|
|
2559
|
+
"agent_failed",
|
|
2560
|
+
"gate_denied",
|
|
2561
|
+
"unknown",
|
|
2562
|
+
"delivered",
|
|
2563
|
+
"bounced",
|
|
2564
|
+
"deferred",
|
|
2565
|
+
"wait_timeout"
|
|
2566
|
+
]
|
|
2567
|
+
},
|
|
2568
|
+
"status_changed_at": {
|
|
2569
|
+
"type": "string",
|
|
2570
|
+
"format": "date-time",
|
|
2571
|
+
"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"
|
|
2572
|
+
},
|
|
2573
|
+
"created_at": {
|
|
2574
|
+
"type": "string",
|
|
2575
|
+
"format": "date-time"
|
|
2576
|
+
},
|
|
2577
|
+
"updated_at": {
|
|
2578
|
+
"type": "string",
|
|
2579
|
+
"format": "date-time"
|
|
2580
|
+
},
|
|
2581
|
+
"client_idempotency_key": {
|
|
2582
|
+
"type": [
|
|
2583
|
+
"string",
|
|
2584
|
+
"null"
|
|
2585
|
+
],
|
|
2586
|
+
"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"
|
|
2587
|
+
},
|
|
2588
|
+
"content_hash": {
|
|
2589
|
+
"type": "string",
|
|
2590
|
+
"description": "Stable hash of the canonical send payload."
|
|
2591
|
+
},
|
|
2592
|
+
"from_header": {
|
|
2593
|
+
"type": "string",
|
|
2594
|
+
"description": "Raw `From:` header as sent on the wire, including any\ndisplay name (e.g. `\"Acme Support\" <agent@acme.test>`).\n"
|
|
2595
|
+
},
|
|
2596
|
+
"from_address": {
|
|
2597
|
+
"type": "string",
|
|
2598
|
+
"description": "Bare email address parsed from `from_header`."
|
|
2599
|
+
},
|
|
2600
|
+
"to_header": {
|
|
2601
|
+
"type": "string",
|
|
2602
|
+
"description": "Raw `To:` header as sent on the wire, including any\ndisplay name.\n"
|
|
2603
|
+
},
|
|
2604
|
+
"to_address": {
|
|
2605
|
+
"type": "string",
|
|
2606
|
+
"description": "Bare email address parsed from `to_header`."
|
|
2607
|
+
},
|
|
2608
|
+
"subject": {
|
|
2609
|
+
"type": "string"
|
|
2610
|
+
},
|
|
2611
|
+
"body_size_bytes": {
|
|
2612
|
+
"type": "integer",
|
|
2613
|
+
"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"
|
|
2614
|
+
},
|
|
2615
|
+
"content_discarded_at": {
|
|
2616
|
+
"type": [
|
|
2617
|
+
"string",
|
|
2618
|
+
"null"
|
|
2619
|
+
],
|
|
2620
|
+
"format": "date-time",
|
|
2621
|
+
"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"
|
|
2622
|
+
},
|
|
2623
|
+
"message_id": {
|
|
2624
|
+
"type": [
|
|
2625
|
+
"string",
|
|
2626
|
+
"null"
|
|
2627
|
+
],
|
|
2628
|
+
"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"
|
|
2629
|
+
},
|
|
2630
|
+
"in_reply_to": {
|
|
2631
|
+
"type": [
|
|
2632
|
+
"string",
|
|
2633
|
+
"null"
|
|
2634
|
+
],
|
|
2635
|
+
"description": "Wire-level In-Reply-To header value, when this send\nwas a reply.\n"
|
|
2636
|
+
},
|
|
2637
|
+
"email_references": {
|
|
2638
|
+
"type": [
|
|
2639
|
+
"string",
|
|
2640
|
+
"null"
|
|
2641
|
+
],
|
|
2642
|
+
"description": "Wire-level References header value, when this send\nwas a reply.\n"
|
|
2643
|
+
},
|
|
2644
|
+
"in_reply_to_email_id": {
|
|
2645
|
+
"type": [
|
|
2646
|
+
"string",
|
|
2647
|
+
"null"
|
|
2648
|
+
],
|
|
2649
|
+
"format": "uuid",
|
|
2650
|
+
"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"
|
|
2651
|
+
},
|
|
2652
|
+
"queue_id": {
|
|
2653
|
+
"type": [
|
|
2654
|
+
"string",
|
|
2655
|
+
"null"
|
|
2656
|
+
],
|
|
2657
|
+
"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"
|
|
2658
|
+
},
|
|
2659
|
+
"smtp_response_code": {
|
|
2660
|
+
"type": [
|
|
2661
|
+
"integer",
|
|
2662
|
+
"null"
|
|
2663
|
+
],
|
|
2664
|
+
"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"
|
|
2665
|
+
},
|
|
2666
|
+
"smtp_response_text": {
|
|
2667
|
+
"type": [
|
|
2668
|
+
"string",
|
|
2669
|
+
"null"
|
|
2670
|
+
],
|
|
2671
|
+
"description": "Free-form text portion of the receiver's SMTP\nresponse. The most useful debugging signal on a\n`bounced` or `deferred` row.\n"
|
|
2672
|
+
},
|
|
2673
|
+
"smtp_enhanced_status_code": {
|
|
2674
|
+
"type": [
|
|
2675
|
+
"string",
|
|
2676
|
+
"null"
|
|
2677
|
+
],
|
|
2678
|
+
"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"
|
|
2679
|
+
},
|
|
2680
|
+
"dkim_selector": {
|
|
2681
|
+
"type": [
|
|
2682
|
+
"string",
|
|
2683
|
+
"null"
|
|
2684
|
+
],
|
|
2685
|
+
"description": "DKIM selector used to sign the outbound message.\nPublic DNS data; useful for diagnosing why a downstream\nverifier rejected the signature.\n"
|
|
2686
|
+
},
|
|
2687
|
+
"dkim_domain": {
|
|
2688
|
+
"type": [
|
|
2689
|
+
"string",
|
|
2690
|
+
"null"
|
|
2691
|
+
],
|
|
2692
|
+
"description": "DKIM signing domain."
|
|
2693
|
+
},
|
|
2694
|
+
"error_code": {
|
|
2695
|
+
"type": [
|
|
2696
|
+
"string",
|
|
2697
|
+
"null"
|
|
2698
|
+
],
|
|
2699
|
+
"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"
|
|
2700
|
+
},
|
|
2701
|
+
"error_message": {
|
|
2702
|
+
"type": [
|
|
2703
|
+
"string",
|
|
2704
|
+
"null"
|
|
2705
|
+
],
|
|
2706
|
+
"description": "Free-form error message accompanying `error_code`."
|
|
2707
|
+
},
|
|
2708
|
+
"gates": {
|
|
2709
|
+
"type": [
|
|
2710
|
+
"array",
|
|
2711
|
+
"null"
|
|
2712
|
+
],
|
|
2713
|
+
"items": {
|
|
2714
|
+
"type": "object",
|
|
2715
|
+
"properties": {
|
|
2716
|
+
"name": {
|
|
2717
|
+
"type": "string",
|
|
2718
|
+
"enum": [
|
|
2719
|
+
"send_to_confirmed_domains",
|
|
2720
|
+
"send_to_known_addresses"
|
|
2721
|
+
],
|
|
2722
|
+
"description": "Public recipient-scope gate name that denied the send."
|
|
2723
|
+
},
|
|
2724
|
+
"reason": {
|
|
2725
|
+
"type": "string",
|
|
2726
|
+
"enum": [
|
|
2727
|
+
"domain_not_confirmed",
|
|
2728
|
+
"recipient_unauthenticated",
|
|
2729
|
+
"recipient_not_known"
|
|
2730
|
+
],
|
|
2731
|
+
"description": "Stable machine-readable denial reason."
|
|
2732
|
+
},
|
|
2733
|
+
"message": {
|
|
2734
|
+
"type": "string",
|
|
2735
|
+
"description": "Human-readable explanation of the gate denial."
|
|
2736
|
+
},
|
|
2737
|
+
"subject": {
|
|
2738
|
+
"type": "string",
|
|
2739
|
+
"description": "Domain or address the gate evaluated."
|
|
2740
|
+
},
|
|
2741
|
+
"fix": {
|
|
2742
|
+
"type": "object",
|
|
2743
|
+
"properties": {
|
|
2744
|
+
"action": {
|
|
2745
|
+
"type": "string",
|
|
2746
|
+
"enum": [
|
|
2747
|
+
"confirm_domain",
|
|
2748
|
+
"sender_must_fix_authentication",
|
|
2749
|
+
"wait_for_inbound"
|
|
2750
|
+
],
|
|
2751
|
+
"description": "Suggested next action for the caller."
|
|
2752
|
+
},
|
|
2753
|
+
"subject": {
|
|
2754
|
+
"type": "string",
|
|
2755
|
+
"description": "Entity the action applies to."
|
|
2756
|
+
}
|
|
2757
|
+
},
|
|
2758
|
+
"required": [
|
|
2759
|
+
"action",
|
|
2760
|
+
"subject"
|
|
2761
|
+
]
|
|
2762
|
+
},
|
|
2763
|
+
"docs_url": {
|
|
2764
|
+
"type": "string",
|
|
2765
|
+
"description": "Public docs URL with more context."
|
|
2766
|
+
}
|
|
2767
|
+
},
|
|
2768
|
+
"required": [
|
|
2769
|
+
"name",
|
|
2770
|
+
"reason",
|
|
2771
|
+
"message",
|
|
2772
|
+
"subject"
|
|
2773
|
+
]
|
|
2774
|
+
},
|
|
2775
|
+
"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"
|
|
2776
|
+
},
|
|
2777
|
+
"request_id": {
|
|
2778
|
+
"type": [
|
|
2779
|
+
"string",
|
|
2780
|
+
"null"
|
|
2781
|
+
],
|
|
2782
|
+
"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"
|
|
2783
|
+
}
|
|
2784
|
+
},
|
|
2785
|
+
"required": [
|
|
2786
|
+
"id",
|
|
2787
|
+
"status",
|
|
2788
|
+
"status_changed_at",
|
|
2789
|
+
"created_at",
|
|
2790
|
+
"updated_at",
|
|
2791
|
+
"content_hash",
|
|
2792
|
+
"from_header",
|
|
2793
|
+
"from_address",
|
|
2794
|
+
"to_header",
|
|
2795
|
+
"to_address",
|
|
2796
|
+
"subject",
|
|
2797
|
+
"body_size_bytes"
|
|
2798
|
+
]
|
|
2799
|
+
}
|
|
2800
|
+
},
|
|
859
2801
|
"sdkName": "listSentEmails",
|
|
860
2802
|
"summary": "List outbound sent emails",
|
|
861
2803
|
"tag": "Sending",
|
|
@@ -905,6 +2847,104 @@ export const operationManifest = [
|
|
|
905
2847
|
}
|
|
906
2848
|
}
|
|
907
2849
|
},
|
|
2850
|
+
"responseSchema": {
|
|
2851
|
+
"type": "object",
|
|
2852
|
+
"properties": {
|
|
2853
|
+
"id": {
|
|
2854
|
+
"type": "string",
|
|
2855
|
+
"description": "Persisted sent-email attempt ID."
|
|
2856
|
+
},
|
|
2857
|
+
"status": {
|
|
2858
|
+
"type": "string",
|
|
2859
|
+
"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",
|
|
2860
|
+
"enum": [
|
|
2861
|
+
"queued",
|
|
2862
|
+
"submitted_to_agent",
|
|
2863
|
+
"agent_failed",
|
|
2864
|
+
"gate_denied",
|
|
2865
|
+
"unknown",
|
|
2866
|
+
"delivered",
|
|
2867
|
+
"bounced",
|
|
2868
|
+
"deferred",
|
|
2869
|
+
"wait_timeout"
|
|
2870
|
+
]
|
|
2871
|
+
},
|
|
2872
|
+
"from": {
|
|
2873
|
+
"type": "string",
|
|
2874
|
+
"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"
|
|
2875
|
+
},
|
|
2876
|
+
"queue_id": {
|
|
2877
|
+
"type": [
|
|
2878
|
+
"string",
|
|
2879
|
+
"null"
|
|
2880
|
+
],
|
|
2881
|
+
"description": "Message identifier assigned by Primitive's OUTBOUND relay\n(the box that signs your mail and submits it to the\nreceiving MTA). NOT the receiver's queue id.\n\nThe receiver may also report its own queue id in\n`smtp_response_text` (e.g. `\"250 2.0.0 Ok: queued as\n99D111927CDA\"` from a Postfix receiver). Those two ids\nrefer to different mail systems and are NOT comparable.\nTreat `queue_id` as Primitive-internal and the\nreceiver's id as remote-system-internal.\n\nNull on rows that never reached the relay (queued,\ngate_denied, agent_failed before signing).\n"
|
|
2882
|
+
},
|
|
2883
|
+
"accepted": {
|
|
2884
|
+
"type": "array",
|
|
2885
|
+
"items": {
|
|
2886
|
+
"type": "string"
|
|
2887
|
+
},
|
|
2888
|
+
"description": "Recipient addresses accepted by the relay."
|
|
2889
|
+
},
|
|
2890
|
+
"rejected": {
|
|
2891
|
+
"type": "array",
|
|
2892
|
+
"items": {
|
|
2893
|
+
"type": "string"
|
|
2894
|
+
},
|
|
2895
|
+
"description": "Recipient addresses rejected by the relay."
|
|
2896
|
+
},
|
|
2897
|
+
"client_idempotency_key": {
|
|
2898
|
+
"type": "string",
|
|
2899
|
+
"description": "Effective idempotency key used for this send."
|
|
2900
|
+
},
|
|
2901
|
+
"request_id": {
|
|
2902
|
+
"type": "string",
|
|
2903
|
+
"description": "Server-issued request identifier for support and tracing."
|
|
2904
|
+
},
|
|
2905
|
+
"content_hash": {
|
|
2906
|
+
"type": "string",
|
|
2907
|
+
"description": "Stable hash of the canonical send payload."
|
|
2908
|
+
},
|
|
2909
|
+
"delivery_status": {
|
|
2910
|
+
"type": "string",
|
|
2911
|
+
"description": "Narrower enum covering only the four terminal delivery\noutcomes returned to a synchronous `wait: true` send.\n\nOn the SendMailResult shape, `delivery_status` is always\nequal to `status` whenever both are present (i.e. on\nterminal-state replays and live wait=true responses).\nThe two fields exist so callers that want to type-narrow\non \"this is a delivery outcome\" can pattern-match against\nthe four-value enum without handling the broader\nSentEmailStatus value set (which also covers `queued`,\n`submitted_to_agent`, `agent_failed`, `gate_denied`,\n`unknown`).\n\nOn async-mode and pre-terminal responses, `delivery_status`\nis absent and only `status` is populated. Use `status` if\nyou want a single field that's always present.\n",
|
|
2912
|
+
"enum": [
|
|
2913
|
+
"delivered",
|
|
2914
|
+
"bounced",
|
|
2915
|
+
"deferred",
|
|
2916
|
+
"wait_timeout"
|
|
2917
|
+
]
|
|
2918
|
+
},
|
|
2919
|
+
"smtp_response_code": {
|
|
2920
|
+
"type": [
|
|
2921
|
+
"integer",
|
|
2922
|
+
"null"
|
|
2923
|
+
],
|
|
2924
|
+
"description": "SMTP response code from the first downstream delivery outcome when wait is true."
|
|
2925
|
+
},
|
|
2926
|
+
"smtp_response_text": {
|
|
2927
|
+
"type": "string",
|
|
2928
|
+
"description": "SMTP response text from the first downstream delivery outcome when wait is true."
|
|
2929
|
+
},
|
|
2930
|
+
"idempotent_replay": {
|
|
2931
|
+
"type": "boolean",
|
|
2932
|
+
"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"
|
|
2933
|
+
}
|
|
2934
|
+
},
|
|
2935
|
+
"required": [
|
|
2936
|
+
"id",
|
|
2937
|
+
"status",
|
|
2938
|
+
"from",
|
|
2939
|
+
"queue_id",
|
|
2940
|
+
"accepted",
|
|
2941
|
+
"rejected",
|
|
2942
|
+
"client_idempotency_key",
|
|
2943
|
+
"request_id",
|
|
2944
|
+
"content_hash",
|
|
2945
|
+
"idempotent_replay"
|
|
2946
|
+
]
|
|
2947
|
+
},
|
|
908
2948
|
"sdkName": "replyToEmail",
|
|
909
2949
|
"summary": "Reply to an inbound email",
|
|
910
2950
|
"tag": "Sending",
|
|
@@ -986,6 +3026,104 @@ export const operationManifest = [
|
|
|
986
3026
|
"subject"
|
|
987
3027
|
]
|
|
988
3028
|
},
|
|
3029
|
+
"responseSchema": {
|
|
3030
|
+
"type": "object",
|
|
3031
|
+
"properties": {
|
|
3032
|
+
"id": {
|
|
3033
|
+
"type": "string",
|
|
3034
|
+
"description": "Persisted sent-email attempt ID."
|
|
3035
|
+
},
|
|
3036
|
+
"status": {
|
|
3037
|
+
"type": "string",
|
|
3038
|
+
"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",
|
|
3039
|
+
"enum": [
|
|
3040
|
+
"queued",
|
|
3041
|
+
"submitted_to_agent",
|
|
3042
|
+
"agent_failed",
|
|
3043
|
+
"gate_denied",
|
|
3044
|
+
"unknown",
|
|
3045
|
+
"delivered",
|
|
3046
|
+
"bounced",
|
|
3047
|
+
"deferred",
|
|
3048
|
+
"wait_timeout"
|
|
3049
|
+
]
|
|
3050
|
+
},
|
|
3051
|
+
"from": {
|
|
3052
|
+
"type": "string",
|
|
3053
|
+
"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"
|
|
3054
|
+
},
|
|
3055
|
+
"queue_id": {
|
|
3056
|
+
"type": [
|
|
3057
|
+
"string",
|
|
3058
|
+
"null"
|
|
3059
|
+
],
|
|
3060
|
+
"description": "Message identifier assigned by Primitive's OUTBOUND relay\n(the box that signs your mail and submits it to the\nreceiving MTA). NOT the receiver's queue id.\n\nThe receiver may also report its own queue id in\n`smtp_response_text` (e.g. `\"250 2.0.0 Ok: queued as\n99D111927CDA\"` from a Postfix receiver). Those two ids\nrefer to different mail systems and are NOT comparable.\nTreat `queue_id` as Primitive-internal and the\nreceiver's id as remote-system-internal.\n\nNull on rows that never reached the relay (queued,\ngate_denied, agent_failed before signing).\n"
|
|
3061
|
+
},
|
|
3062
|
+
"accepted": {
|
|
3063
|
+
"type": "array",
|
|
3064
|
+
"items": {
|
|
3065
|
+
"type": "string"
|
|
3066
|
+
},
|
|
3067
|
+
"description": "Recipient addresses accepted by the relay."
|
|
3068
|
+
},
|
|
3069
|
+
"rejected": {
|
|
3070
|
+
"type": "array",
|
|
3071
|
+
"items": {
|
|
3072
|
+
"type": "string"
|
|
3073
|
+
},
|
|
3074
|
+
"description": "Recipient addresses rejected by the relay."
|
|
3075
|
+
},
|
|
3076
|
+
"client_idempotency_key": {
|
|
3077
|
+
"type": "string",
|
|
3078
|
+
"description": "Effective idempotency key used for this send."
|
|
3079
|
+
},
|
|
3080
|
+
"request_id": {
|
|
3081
|
+
"type": "string",
|
|
3082
|
+
"description": "Server-issued request identifier for support and tracing."
|
|
3083
|
+
},
|
|
3084
|
+
"content_hash": {
|
|
3085
|
+
"type": "string",
|
|
3086
|
+
"description": "Stable hash of the canonical send payload."
|
|
3087
|
+
},
|
|
3088
|
+
"delivery_status": {
|
|
3089
|
+
"type": "string",
|
|
3090
|
+
"description": "Narrower enum covering only the four terminal delivery\noutcomes returned to a synchronous `wait: true` send.\n\nOn the SendMailResult shape, `delivery_status` is always\nequal to `status` whenever both are present (i.e. on\nterminal-state replays and live wait=true responses).\nThe two fields exist so callers that want to type-narrow\non \"this is a delivery outcome\" can pattern-match against\nthe four-value enum without handling the broader\nSentEmailStatus value set (which also covers `queued`,\n`submitted_to_agent`, `agent_failed`, `gate_denied`,\n`unknown`).\n\nOn async-mode and pre-terminal responses, `delivery_status`\nis absent and only `status` is populated. Use `status` if\nyou want a single field that's always present.\n",
|
|
3091
|
+
"enum": [
|
|
3092
|
+
"delivered",
|
|
3093
|
+
"bounced",
|
|
3094
|
+
"deferred",
|
|
3095
|
+
"wait_timeout"
|
|
3096
|
+
]
|
|
3097
|
+
},
|
|
3098
|
+
"smtp_response_code": {
|
|
3099
|
+
"type": [
|
|
3100
|
+
"integer",
|
|
3101
|
+
"null"
|
|
3102
|
+
],
|
|
3103
|
+
"description": "SMTP response code from the first downstream delivery outcome when wait is true."
|
|
3104
|
+
},
|
|
3105
|
+
"smtp_response_text": {
|
|
3106
|
+
"type": "string",
|
|
3107
|
+
"description": "SMTP response text from the first downstream delivery outcome when wait is true."
|
|
3108
|
+
},
|
|
3109
|
+
"idempotent_replay": {
|
|
3110
|
+
"type": "boolean",
|
|
3111
|
+
"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"
|
|
3112
|
+
}
|
|
3113
|
+
},
|
|
3114
|
+
"required": [
|
|
3115
|
+
"id",
|
|
3116
|
+
"status",
|
|
3117
|
+
"from",
|
|
3118
|
+
"queue_id",
|
|
3119
|
+
"accepted",
|
|
3120
|
+
"rejected",
|
|
3121
|
+
"client_idempotency_key",
|
|
3122
|
+
"request_id",
|
|
3123
|
+
"content_hash",
|
|
3124
|
+
"idempotent_replay"
|
|
3125
|
+
]
|
|
3126
|
+
},
|
|
989
3127
|
"sdkName": "sendEmail",
|
|
990
3128
|
"summary": "Send outbound email",
|
|
991
3129
|
"tag": "Sending",
|
|
@@ -1051,6 +3189,100 @@ export const operationManifest = [
|
|
|
1051
3189
|
}
|
|
1052
3190
|
],
|
|
1053
3191
|
"requestSchema": null,
|
|
3192
|
+
"responseSchema": {
|
|
3193
|
+
"type": "array",
|
|
3194
|
+
"items": {
|
|
3195
|
+
"type": "object",
|
|
3196
|
+
"properties": {
|
|
3197
|
+
"id": {
|
|
3198
|
+
"type": "string",
|
|
3199
|
+
"description": "Delivery ID (numeric string)"
|
|
3200
|
+
},
|
|
3201
|
+
"email_id": {
|
|
3202
|
+
"type": "string",
|
|
3203
|
+
"format": "uuid"
|
|
3204
|
+
},
|
|
3205
|
+
"org_id": {
|
|
3206
|
+
"type": "string",
|
|
3207
|
+
"format": "uuid"
|
|
3208
|
+
},
|
|
3209
|
+
"endpoint_id": {
|
|
3210
|
+
"type": "string",
|
|
3211
|
+
"format": "uuid"
|
|
3212
|
+
},
|
|
3213
|
+
"endpoint_url": {
|
|
3214
|
+
"type": "string"
|
|
3215
|
+
},
|
|
3216
|
+
"status": {
|
|
3217
|
+
"type": "string",
|
|
3218
|
+
"enum": [
|
|
3219
|
+
"pending",
|
|
3220
|
+
"delivered",
|
|
3221
|
+
"header_confirmed",
|
|
3222
|
+
"failed"
|
|
3223
|
+
]
|
|
3224
|
+
},
|
|
3225
|
+
"attempt_count": {
|
|
3226
|
+
"type": "integer"
|
|
3227
|
+
},
|
|
3228
|
+
"duration_ms": {
|
|
3229
|
+
"type": [
|
|
3230
|
+
"integer",
|
|
3231
|
+
"null"
|
|
3232
|
+
]
|
|
3233
|
+
},
|
|
3234
|
+
"last_error": {
|
|
3235
|
+
"type": [
|
|
3236
|
+
"string",
|
|
3237
|
+
"null"
|
|
3238
|
+
]
|
|
3239
|
+
},
|
|
3240
|
+
"created_at": {
|
|
3241
|
+
"type": "string",
|
|
3242
|
+
"format": "date-time"
|
|
3243
|
+
},
|
|
3244
|
+
"updated_at": {
|
|
3245
|
+
"type": "string",
|
|
3246
|
+
"format": "date-time"
|
|
3247
|
+
},
|
|
3248
|
+
"email": {
|
|
3249
|
+
"type": [
|
|
3250
|
+
"object",
|
|
3251
|
+
"null"
|
|
3252
|
+
],
|
|
3253
|
+
"properties": {
|
|
3254
|
+
"sender": {
|
|
3255
|
+
"type": "string"
|
|
3256
|
+
},
|
|
3257
|
+
"recipient": {
|
|
3258
|
+
"type": "string"
|
|
3259
|
+
},
|
|
3260
|
+
"subject": {
|
|
3261
|
+
"type": [
|
|
3262
|
+
"string",
|
|
3263
|
+
"null"
|
|
3264
|
+
]
|
|
3265
|
+
}
|
|
3266
|
+
},
|
|
3267
|
+
"required": [
|
|
3268
|
+
"sender",
|
|
3269
|
+
"recipient"
|
|
3270
|
+
]
|
|
3271
|
+
}
|
|
3272
|
+
},
|
|
3273
|
+
"required": [
|
|
3274
|
+
"id",
|
|
3275
|
+
"email_id",
|
|
3276
|
+
"org_id",
|
|
3277
|
+
"endpoint_id",
|
|
3278
|
+
"endpoint_url",
|
|
3279
|
+
"status",
|
|
3280
|
+
"attempt_count",
|
|
3281
|
+
"created_at",
|
|
3282
|
+
"updated_at"
|
|
3283
|
+
]
|
|
3284
|
+
}
|
|
3285
|
+
},
|
|
1054
3286
|
"sdkName": "listDeliveries",
|
|
1055
3287
|
"summary": "List webhook deliveries",
|
|
1056
3288
|
"tag": "Webhook Deliveries",
|
|
@@ -1076,6 +3308,23 @@ export const operationManifest = [
|
|
|
1076
3308
|
],
|
|
1077
3309
|
"queryParams": [],
|
|
1078
3310
|
"requestSchema": null,
|
|
3311
|
+
"responseSchema": {
|
|
3312
|
+
"type": "object",
|
|
3313
|
+
"properties": {
|
|
3314
|
+
"delivered": {
|
|
3315
|
+
"type": "integer",
|
|
3316
|
+
"description": "Number of successful deliveries"
|
|
3317
|
+
},
|
|
3318
|
+
"failed": {
|
|
3319
|
+
"type": "integer",
|
|
3320
|
+
"description": "Number of failed deliveries"
|
|
3321
|
+
}
|
|
3322
|
+
},
|
|
3323
|
+
"required": [
|
|
3324
|
+
"delivered",
|
|
3325
|
+
"failed"
|
|
3326
|
+
]
|
|
3327
|
+
},
|
|
1079
3328
|
"sdkName": "replayDelivery",
|
|
1080
3329
|
"summary": "Replay a webhook delivery",
|
|
1081
3330
|
"tag": "Webhook Deliveries",
|