@crvouga/mockingbird-service-resend 3.0.0 → 3.2.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/openapi.yaml CHANGED
@@ -1,727 +1,1728 @@
1
- openapi: 3.1.0
2
- info:
3
- title: Resend API (Mockingbird subset)
4
- description: |
5
- Stateful mock subset of the Resend email API: send (with `Idempotency-Key`), retrieve a sent
6
- email, and the received-email (inbound) endpoints our care-chat hydration reads, including
7
- the attachment download URL. Trimmed from Resend's published API reference to what
8
- `resend@4.8.0` and our backend call.
9
- version: "1"
10
- x-mockingbird-upstream:
11
- note: >-
12
- Trimmed from https://resend.com/docs/api-reference (emails/send-email, emails/retrieve-email,
13
- receiving/retrieve-received-email, receiving/list-attachments); request/response shapes
14
- cross-checked against resend@4.8.0 (dist/index.mjs) and our consumer
15
- (send-emails.service.ts, notification-dispatcher email.ts, resend-inbound-email.client.ts).
16
- servers:
17
- - url: https://api.resend.com
18
- security:
19
- - bearerAuth: []
20
- paths:
21
- /emails:
22
- get:
23
- operationId: ListEmails
24
- x-mockingbird:
25
- supported: true
26
- parity:
27
- enabled: true
28
- safe: true
29
- parameters:
30
- - name: limit
31
- in: query
32
- schema:
33
- type: integer
34
- minimum: 1
35
- maximum: 100
36
- - name: after
37
- in: query
38
- schema:
39
- type: string
40
- - name: before
41
- in: query
42
- schema:
43
- type: string
44
- responses:
45
- "200":
46
- description: Newest-first email metadata
47
- content:
48
- application/json:
49
- schema:
50
- type: object
51
- required: [object, has_more, data]
52
- properties:
53
- object:
54
- type: string
55
- enum: [list]
56
- has_more:
57
- type: boolean
58
- data:
59
- type: array
60
- items:
61
- $ref: "#/components/schemas/SentEmailMetadata"
62
- "401":
63
- description: Request rejected
64
- content:
65
- application/json:
66
- schema:
67
- $ref: "#/components/schemas/Error"
68
- "422":
69
- description: Request rejected
70
- content:
71
- application/json:
72
- schema:
73
- $ref: "#/components/schemas/Error"
74
- "429":
75
- description: Request rejected
76
- content:
77
- application/json:
78
- schema:
79
- $ref: "#/components/schemas/Error"
80
- "500":
81
- description: Request rejected
82
- content:
83
- application/json:
84
- schema:
85
- $ref: "#/components/schemas/Error"
86
- post:
87
- operationId: SendEmail
88
- x-mockingbird:
89
- supported: true
90
- parity:
91
- enabled: true
92
- safe: false
93
- parameters:
94
- - name: Idempotency-Key
95
- in: header
96
- description: Replays the first response for the same key and payload (1–256 characters).
97
- schema:
98
- type: string
99
- pattern: "^[!-~]{1,256}$"
100
- requestBody:
101
- required: true
102
- content:
103
- application/json:
104
- schema:
105
- $ref: "#/components/schemas/SendEmailBody"
106
- responses:
107
- "200":
108
- description: Accepted
109
- content:
110
- application/json:
111
- schema:
112
- type: object
113
- required: [id]
114
- properties:
115
- id:
116
- type: string
117
- x-mockingbird-resource:
118
- type: email
119
- identity: true
120
- x-mockingbird-volatile:
121
- kind: id
122
- "400":
123
- description: Invalid idempotency key
124
- content:
125
- application/json:
126
- schema:
127
- $ref: "#/components/schemas/Error"
128
- "401":
129
- description: Missing API key
130
- content:
131
- application/json:
132
- schema:
133
- $ref: "#/components/schemas/Error"
134
- "409":
135
- description: Idempotency key reused with another payload, or still in flight
136
- content:
137
- application/json:
138
- schema:
139
- $ref: "#/components/schemas/Error"
140
- "422":
141
- description: Validation failed
142
- content:
143
- application/json:
144
- schema:
145
- $ref: "#/components/schemas/Error"
146
- /emails/{email_id}:
147
- parameters:
148
- - name: email_id
149
- in: path
150
- required: true
151
- schema:
152
- type: string
153
- x-mockingbird-resource-ref:
154
- type: email
155
- missing: 00000000-0000-4000-8000-000000000000
156
- get:
157
- operationId: GetEmail
158
- x-mockingbird:
159
- supported: true
160
- parity:
161
- enabled: true
162
- safe: true
163
- responses:
164
- "200":
165
- description: The sent email
166
- content:
167
- application/json:
168
- schema:
169
- $ref: "#/components/schemas/Email"
170
- "401":
171
- description: Missing API key
172
- content:
173
- application/json:
174
- schema:
175
- $ref: "#/components/schemas/Error"
176
- "404":
177
- description: Unknown email
178
- content:
179
- application/json:
180
- schema:
181
- $ref: "#/components/schemas/Error"
182
- /emails/receiving:
183
- get:
184
- operationId: ListReceivedEmails
185
- x-mockingbird:
186
- supported: true
187
- parity:
188
- enabled: true
189
- safe: true
190
- parameters:
191
- - name: limit
192
- in: query
193
- schema:
194
- type: integer
195
- minimum: 1
196
- maximum: 100
197
- - name: after
198
- in: query
199
- schema:
200
- type: string
201
- - name: before
202
- in: query
203
- schema:
204
- type: string
205
- responses:
206
- "200":
207
- description: Newest-first email metadata
208
- content:
209
- application/json:
210
- schema:
211
- type: object
212
- required: [object, has_more, data]
213
- properties:
214
- object:
215
- type: string
216
- enum: [list]
217
- has_more:
218
- type: boolean
219
- data:
220
- type: array
221
- items:
222
- $ref: "#/components/schemas/ReceivedEmailMetadata"
223
- "401":
224
- description: Request rejected
225
- content:
226
- application/json:
227
- schema:
228
- $ref: "#/components/schemas/Error"
229
- "422":
230
- description: Request rejected
231
- content:
232
- application/json:
233
- schema:
234
- $ref: "#/components/schemas/Error"
235
- "429":
236
- description: Request rejected
237
- content:
238
- application/json:
239
- schema:
240
- $ref: "#/components/schemas/Error"
241
- "500":
242
- description: Request rejected
243
- content:
244
- application/json:
245
- schema:
246
- $ref: "#/components/schemas/Error"
247
- /emails/receiving/{email_id}:
248
- parameters:
249
- - $ref: "#/components/parameters/ReceivedEmailId"
250
- get:
251
- operationId: GetReceivedEmail
252
- x-mockingbird:
253
- supported: true
254
- parity:
255
- enabled: true
256
- safe: true
257
- responses:
258
- "200":
259
- description: The received email, with its content
260
- content:
261
- application/json:
262
- schema:
263
- $ref: "#/components/schemas/ReceivedEmail"
264
- "401":
265
- description: Missing API key
266
- content:
267
- application/json:
268
- schema:
269
- $ref: "#/components/schemas/Error"
270
- "404":
271
- description: Unknown email
272
- content:
273
- application/json:
274
- schema:
275
- $ref: "#/components/schemas/Error"
276
- /emails/receiving/{email_id}/attachments:
277
- parameters:
278
- - $ref: "#/components/parameters/ReceivedEmailId"
279
- get:
280
- operationId: ListReceivedEmailAttachments
281
- x-mockingbird:
282
- supported: true
283
- parity:
284
- enabled: true
285
- safe: true
286
- responses:
287
- "200":
288
- description: Attachment metadata with short-lived download URLs
289
- content:
290
- application/json:
291
- schema:
292
- type: object
293
- required: [object, data]
294
- properties:
295
- object:
296
- type: string
297
- enum: [list]
298
- has_more:
299
- type: boolean
300
- data:
301
- type: array
302
- items:
303
- $ref: "#/components/schemas/ReceivedAttachment"
304
- "401":
305
- description: Missing API key
306
- content:
307
- application/json:
308
- schema:
309
- $ref: "#/components/schemas/Error"
310
- "404":
311
- description: Unknown email
312
- content:
313
- application/json:
314
- schema:
315
- $ref: "#/components/schemas/Error"
316
- /downloads/inbound/{attachment_id}:
317
- get:
318
- operationId: DownloadReceivedAttachment
319
- description: >-
320
- The `download_url` of a received attachment: unauthenticated (it stands in for Resend's
321
- signed CDN URL), the raw bytes with their content type and length.
322
- security: []
323
- x-mockingbird:
324
- supported: true
325
- parity:
326
- enabled: true
327
- safe: true
328
- parameters:
329
- - name: attachment_id
330
- in: path
331
- required: true
332
- schema:
333
- type: string
334
- x-mockingbird-resource-ref:
335
- type: received_attachment
336
- missing: 00000000-0000-4000-8000-000000000000
337
- responses:
338
- "200":
339
- description: The attachment bytes
340
- content:
341
- application/octet-stream:
342
- schema:
343
- type: string
344
- format: binary
345
- "404":
346
- description: Unknown attachment
347
- content:
348
- application/json:
349
- schema:
350
- $ref: "#/components/schemas/Error"
351
- components:
352
- securitySchemes:
353
- bearerAuth:
354
- type: http
355
- scheme: bearer
356
- description: "`Authorization: Bearer re_…`"
357
- parameters:
358
- ReceivedEmailId:
359
- name: email_id
360
- in: path
361
- required: true
362
- schema:
363
- type: string
364
- x-mockingbird-resource-ref:
365
- type: received_email
366
- missing: 00000000-0000-4000-8000-000000000000
367
- schemas:
368
- Address:
369
- type: string
370
- description: "`email@example.com` or `Name <email@example.com>`"
371
- pattern: "^([^<>@]* <[A-Za-z0-9._+-]+@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)+>|[A-Za-z0-9._+-]+@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)+)$"
372
- maxLength: 120
373
- Recipients:
374
- oneOf:
375
- - $ref: "#/components/schemas/Address"
376
- - type: array
377
- minItems: 1
378
- maxItems: 50
379
- items:
380
- $ref: "#/components/schemas/Address"
381
- SendEmailBody:
382
- type: object
383
- required: [from, to, subject]
384
- properties:
385
- from:
386
- $ref: "#/components/schemas/Address"
387
- to:
388
- $ref: "#/components/schemas/Recipients"
389
- subject:
390
- type: string
391
- minLength: 1
392
- maxLength: 200
393
- html:
394
- type: string
395
- maxLength: 5000
396
- text:
397
- type: string
398
- maxLength: 5000
399
- cc:
400
- $ref: "#/components/schemas/Recipients"
401
- bcc:
402
- $ref: "#/components/schemas/Recipients"
403
- reply_to:
404
- $ref: "#/components/schemas/Recipients"
405
- scheduled_at:
406
- type: string
407
- maxLength: 60
408
- headers:
409
- type: object
410
- additionalProperties:
411
- type: string
412
- maxLength: 500
413
- tags:
414
- type: array
415
- maxItems: 10
416
- items:
417
- type: object
418
- required: [name, value]
419
- properties:
420
- name:
421
- type: string
422
- pattern: "^[A-Za-z0-9_-]{1,256}$"
423
- value:
424
- type: string
425
- pattern: "^[A-Za-z0-9_-]{1,256}$"
426
- attachments:
427
- type: array
428
- maxItems: 5
429
- items:
430
- type: object
431
- properties:
432
- filename:
433
- type: string
434
- minLength: 1
435
- maxLength: 100
436
- content:
437
- description: Base64 bytes (or a JSON-serialised Node Buffer).
438
- oneOf:
439
- - type: string
440
- maxLength: 10000
441
- - type: object
442
- required: [type, data]
443
- properties:
444
- type:
445
- type: string
446
- enum: [Buffer]
447
- data:
448
- type: array
449
- maxItems: 10000
450
- items:
451
- type: integer
452
- minimum: 0
453
- maximum: 255
454
- path:
455
- type: string
456
- maxLength: 500
457
- content_type:
458
- type: string
459
- maxLength: 100
460
- inline_content_id:
461
- type: string
462
- maxLength: 100
463
- SentEmailMetadata:
464
- type: object
465
- required: [id, to, from, created_at, subject, bcc, cc, reply_to, message_id, last_event, scheduled_at]
466
- properties:
467
- id:
468
- type: string
469
- x-mockingbird-resource:
470
- type: email
471
- identity: true
472
- x-mockingbird-volatile:
473
- kind: id
474
- to:
475
- type: array
476
- items:
477
- type: string
478
- from:
479
- type: string
480
- created_at:
481
- type: string
482
- x-mockingbird-volatile:
483
- kind: timestamp
484
- subject:
485
- type: string
486
- message_id:
487
- type: string
488
- x-mockingbird-volatile:
489
- kind: id
490
- bcc:
491
- type: ["array", "null"]
492
- items:
493
- type: string
494
- cc:
495
- type: ["array", "null"]
496
- items:
497
- type: string
498
- reply_to:
499
- type: ["array", "null"]
500
- items:
501
- type: string
502
- last_event:
503
- type: string
504
- enum: [delivered, scheduled]
505
- scheduled_at:
506
- type: ["string", "null"]
507
- ReceivedEmailMetadata:
508
- type: object
509
- required: [id, to, from, created_at, subject, bcc, cc, reply_to, message_id, attachments]
510
- properties:
511
- id:
512
- type: string
513
- x-mockingbird-resource:
514
- type: received_email
515
- identity: true
516
- x-mockingbird-volatile:
517
- kind: id
518
- to:
519
- type: array
520
- items:
521
- type: string
522
- from:
523
- type: string
524
- created_at:
525
- type: string
526
- x-mockingbird-volatile:
527
- kind: timestamp
528
- subject:
529
- type: ["string", "null"]
530
- message_id:
531
- type: string
532
- x-mockingbird-volatile:
533
- kind: id
534
- bcc:
535
- type: array
536
- items:
537
- type: string
538
- cc:
539
- type: array
540
- items:
541
- type: string
542
- reply_to:
543
- type: array
544
- items:
545
- type: string
546
- attachments:
547
- type: array
548
- items:
549
- type: object
550
- required: [id, filename, content_type, content_id, content_disposition, size]
551
- properties:
552
- id:
553
- type: string
554
- x-mockingbird-volatile:
555
- kind: id
556
- filename:
557
- type: string
558
- content_type:
559
- type: string
560
- content_id:
561
- type: ["string", "null"]
562
- content_disposition:
563
- type: ["string", "null"]
564
- size:
565
- type: integer
566
- Email:
567
- type: object
568
- required: [object, id, to, from, created_at, subject, html, text, bcc, cc, reply_to, last_event]
569
- properties:
570
- object:
571
- type: string
572
- enum: [email]
573
- id:
574
- type: string
575
- x-mockingbird-volatile:
576
- kind: id
577
- to:
578
- type: array
579
- items:
580
- type: string
581
- from:
582
- type: string
583
- created_at:
584
- type: string
585
- x-mockingbird-volatile:
586
- kind: timestamp
587
- subject:
588
- type: string
589
- html:
590
- type: ["string", "null"]
591
- text:
592
- type: ["string", "null"]
593
- bcc:
594
- type: ["array", "null"]
595
- items:
596
- type: string
597
- cc:
598
- type: ["array", "null"]
599
- items:
600
- type: string
601
- reply_to:
602
- type: ["array", "null"]
603
- items:
604
- type: string
605
- last_event:
606
- type: string
607
- enum: [delivered, scheduled]
608
- scheduled_at:
609
- type: ["string", "null"]
610
- headers:
611
- type: object
612
- additionalProperties:
613
- type: string
614
- description: Custom headers from the send, with their original names and values.
615
- tags:
616
- type: array
617
- items:
618
- type: object
619
- properties:
620
- name:
621
- type: string
622
- value:
623
- type: string
624
- ReceivedAttachment:
625
- type: object
626
- required: [id, filename, content_type, size, download_url]
627
- properties:
628
- id:
629
- type: string
630
- x-mockingbird-resource:
631
- type: received_attachment
632
- identity: true
633
- x-mockingbird-volatile:
634
- kind: id
635
- filename:
636
- type: string
637
- content_type:
638
- type: string
639
- content_disposition:
640
- type: ["string", "null"]
641
- content_id:
642
- type: ["string", "null"]
643
- size:
644
- type: integer
645
- download_url:
646
- type: string
647
- x-mockingbird-volatile:
648
- kind: url
649
- expires_at:
650
- type: string
651
- x-mockingbird-volatile:
652
- kind: timestamp
653
- ReceivedEmail:
654
- type: object
655
- required: [object, id, to, from, created_at, subject, html, text, message_id, attachments]
656
- properties:
657
- object:
658
- type: string
659
- enum: [email]
660
- id:
661
- type: string
662
- x-mockingbird-resource:
663
- type: received_email
664
- identity: true
665
- x-mockingbird-volatile:
666
- kind: id
667
- to:
668
- type: array
669
- items:
670
- type: string
671
- from:
672
- type: string
673
- cc:
674
- type: array
675
- items:
676
- type: string
677
- bcc:
678
- type: array
679
- items:
680
- type: string
681
- reply_to:
682
- type: array
683
- items:
684
- type: string
685
- created_at:
686
- type: string
687
- x-mockingbird-volatile:
688
- kind: timestamp
689
- subject:
690
- type: ["string", "null"]
691
- html:
692
- type: ["string", "null"]
693
- text:
694
- type: ["string", "null"]
695
- headers:
696
- type: object
697
- additionalProperties:
698
- type: string
699
- message_id:
700
- type: ["string", "null"]
701
- attachments:
702
- type: array
703
- items:
704
- type: object
705
- required: [id, filename, content_type]
706
- properties:
707
- id:
708
- type: string
709
- filename:
710
- type: string
711
- content_type:
712
- type: string
713
- content_disposition:
714
- type: ["string", "null"]
715
- content_id:
716
- type: ["string", "null"]
717
- Error:
718
- type: object
719
- description: Resend's error body; the SDK returns it verbatim as `error`.
720
- required: [statusCode, name, message]
721
- properties:
722
- statusCode:
723
- type: integer
724
- name:
725
- type: string
726
- message:
727
- type: string
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "Resend API (Mockingbird subset)",
5
+ "description": "Stateful emulator subset of the Resend email API: send (with `Idempotency-Key`), retrieve a sent\nemail, and the received-email (inbound) endpoints our care-chat hydration reads, including\nthe attachment download URL. Trimmed from Resend's published API reference to what\n`resend@4.8.0` and our backend call.\n",
6
+ "version": "1",
7
+ "x-mockingbird-upstream": {
8
+ "note": "Trimmed from https://resend.com/docs/api-reference (emails/send-email, emails/retrieve-email, receiving/retrieve-received-email, receiving/list-attachments); request/response shapes cross-checked against resend@4.8.0 (dist/index.mjs) and our consumer (send-emails.service.ts, notification-dispatcher email.ts, resend-inbound-email.client.ts)."
9
+ }
10
+ },
11
+ "servers": [
12
+ {
13
+ "url": "https://api.resend.com"
14
+ }
15
+ ],
16
+ "security": [
17
+ {
18
+ "bearerAuth": []
19
+ }
20
+ ],
21
+ "paths": {
22
+ "/emails": {
23
+ "get": {
24
+ "operationId": "ListEmails",
25
+ "x-mockingbird": {
26
+ "supported": true,
27
+ "parity": {
28
+ "enabled": true,
29
+ "safe": true
30
+ }
31
+ },
32
+ "parameters": [
33
+ {
34
+ "name": "limit",
35
+ "in": "query",
36
+ "schema": {
37
+ "type": "integer",
38
+ "minimum": 1,
39
+ "maximum": 100
40
+ }
41
+ },
42
+ {
43
+ "name": "after",
44
+ "in": "query",
45
+ "schema": {
46
+ "type": "string"
47
+ }
48
+ },
49
+ {
50
+ "name": "before",
51
+ "in": "query",
52
+ "schema": {
53
+ "type": "string"
54
+ }
55
+ }
56
+ ],
57
+ "responses": {
58
+ "200": {
59
+ "description": "Newest-first email metadata",
60
+ "content": {
61
+ "application/json": {
62
+ "schema": {
63
+ "type": "object",
64
+ "required": [
65
+ "object",
66
+ "has_more",
67
+ "data"
68
+ ],
69
+ "properties": {
70
+ "object": {
71
+ "type": "string",
72
+ "enum": [
73
+ "list"
74
+ ]
75
+ },
76
+ "has_more": {
77
+ "type": "boolean"
78
+ },
79
+ "data": {
80
+ "type": "array",
81
+ "items": {
82
+ "$ref": "#/components/schemas/SentEmailMetadata"
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+ },
90
+ "401": {
91
+ "description": "Request rejected",
92
+ "content": {
93
+ "application/json": {
94
+ "schema": {
95
+ "$ref": "#/components/schemas/Error"
96
+ }
97
+ }
98
+ }
99
+ },
100
+ "422": {
101
+ "description": "Request rejected",
102
+ "content": {
103
+ "application/json": {
104
+ "schema": {
105
+ "$ref": "#/components/schemas/Error"
106
+ }
107
+ }
108
+ }
109
+ },
110
+ "429": {
111
+ "description": "Request rejected",
112
+ "content": {
113
+ "application/json": {
114
+ "schema": {
115
+ "$ref": "#/components/schemas/Error"
116
+ }
117
+ }
118
+ }
119
+ },
120
+ "500": {
121
+ "description": "Request rejected",
122
+ "content": {
123
+ "application/json": {
124
+ "schema": {
125
+ "$ref": "#/components/schemas/Error"
126
+ }
127
+ }
128
+ }
129
+ }
130
+ }
131
+ },
132
+ "post": {
133
+ "operationId": "SendEmail",
134
+ "x-mockingbird": {
135
+ "supported": true,
136
+ "parity": {
137
+ "enabled": true,
138
+ "safe": false
139
+ }
140
+ },
141
+ "parameters": [
142
+ {
143
+ "name": "Idempotency-Key",
144
+ "in": "header",
145
+ "description": "Replays the first response for the same key and payload (1–256 characters).",
146
+ "schema": {
147
+ "type": "string",
148
+ "pattern": "^[!-~]{1,256}$"
149
+ }
150
+ }
151
+ ],
152
+ "requestBody": {
153
+ "required": true,
154
+ "content": {
155
+ "application/json": {
156
+ "schema": {
157
+ "$ref": "#/components/schemas/SendEmailBody"
158
+ }
159
+ }
160
+ }
161
+ },
162
+ "responses": {
163
+ "200": {
164
+ "description": "Accepted",
165
+ "content": {
166
+ "application/json": {
167
+ "schema": {
168
+ "type": "object",
169
+ "required": [
170
+ "id"
171
+ ],
172
+ "properties": {
173
+ "id": {
174
+ "type": "string",
175
+ "x-mockingbird-resource": {
176
+ "type": "email",
177
+ "identity": true
178
+ },
179
+ "x-mockingbird-volatile": {
180
+ "kind": "id"
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ },
188
+ "400": {
189
+ "description": "Invalid idempotency key",
190
+ "content": {
191
+ "application/json": {
192
+ "schema": {
193
+ "$ref": "#/components/schemas/Error"
194
+ }
195
+ }
196
+ }
197
+ },
198
+ "401": {
199
+ "description": "Missing API key",
200
+ "content": {
201
+ "application/json": {
202
+ "schema": {
203
+ "$ref": "#/components/schemas/Error"
204
+ }
205
+ }
206
+ }
207
+ },
208
+ "409": {
209
+ "description": "Idempotency key reused with another payload, or still in flight",
210
+ "content": {
211
+ "application/json": {
212
+ "schema": {
213
+ "$ref": "#/components/schemas/Error"
214
+ }
215
+ }
216
+ }
217
+ },
218
+ "422": {
219
+ "description": "Validation failed",
220
+ "content": {
221
+ "application/json": {
222
+ "schema": {
223
+ "$ref": "#/components/schemas/Error"
224
+ }
225
+ }
226
+ }
227
+ }
228
+ }
229
+ }
230
+ },
231
+ "/emails/{email_id}": {
232
+ "parameters": [
233
+ {
234
+ "name": "email_id",
235
+ "in": "path",
236
+ "required": true,
237
+ "schema": {
238
+ "type": "string",
239
+ "x-mockingbird-resource-ref": {
240
+ "type": "email",
241
+ "missing": "00000000-0000-4000-8000-000000000000"
242
+ }
243
+ }
244
+ }
245
+ ],
246
+ "get": {
247
+ "operationId": "GetEmail",
248
+ "x-mockingbird": {
249
+ "supported": true,
250
+ "parity": {
251
+ "enabled": true,
252
+ "safe": true
253
+ }
254
+ },
255
+ "responses": {
256
+ "200": {
257
+ "description": "The sent email",
258
+ "content": {
259
+ "application/json": {
260
+ "schema": {
261
+ "$ref": "#/components/schemas/Email"
262
+ }
263
+ }
264
+ }
265
+ },
266
+ "401": {
267
+ "description": "Missing API key",
268
+ "content": {
269
+ "application/json": {
270
+ "schema": {
271
+ "$ref": "#/components/schemas/Error"
272
+ }
273
+ }
274
+ }
275
+ },
276
+ "404": {
277
+ "description": "Unknown email",
278
+ "content": {
279
+ "application/json": {
280
+ "schema": {
281
+ "$ref": "#/components/schemas/Error"
282
+ }
283
+ }
284
+ }
285
+ }
286
+ }
287
+ }
288
+ },
289
+ "/emails/receiving": {
290
+ "get": {
291
+ "operationId": "ListReceivedEmails",
292
+ "x-mockingbird": {
293
+ "supported": true,
294
+ "parity": {
295
+ "enabled": true,
296
+ "safe": true
297
+ }
298
+ },
299
+ "parameters": [
300
+ {
301
+ "name": "limit",
302
+ "in": "query",
303
+ "schema": {
304
+ "type": "integer",
305
+ "minimum": 1,
306
+ "maximum": 100
307
+ }
308
+ },
309
+ {
310
+ "name": "after",
311
+ "in": "query",
312
+ "schema": {
313
+ "type": "string"
314
+ }
315
+ },
316
+ {
317
+ "name": "before",
318
+ "in": "query",
319
+ "schema": {
320
+ "type": "string"
321
+ }
322
+ }
323
+ ],
324
+ "responses": {
325
+ "200": {
326
+ "description": "Newest-first email metadata",
327
+ "content": {
328
+ "application/json": {
329
+ "schema": {
330
+ "type": "object",
331
+ "required": [
332
+ "object",
333
+ "has_more",
334
+ "data"
335
+ ],
336
+ "properties": {
337
+ "object": {
338
+ "type": "string",
339
+ "enum": [
340
+ "list"
341
+ ]
342
+ },
343
+ "has_more": {
344
+ "type": "boolean"
345
+ },
346
+ "data": {
347
+ "type": "array",
348
+ "items": {
349
+ "$ref": "#/components/schemas/ReceivedEmailMetadata"
350
+ }
351
+ }
352
+ }
353
+ }
354
+ }
355
+ }
356
+ },
357
+ "401": {
358
+ "description": "Request rejected",
359
+ "content": {
360
+ "application/json": {
361
+ "schema": {
362
+ "$ref": "#/components/schemas/Error"
363
+ }
364
+ }
365
+ }
366
+ },
367
+ "422": {
368
+ "description": "Request rejected",
369
+ "content": {
370
+ "application/json": {
371
+ "schema": {
372
+ "$ref": "#/components/schemas/Error"
373
+ }
374
+ }
375
+ }
376
+ },
377
+ "429": {
378
+ "description": "Request rejected",
379
+ "content": {
380
+ "application/json": {
381
+ "schema": {
382
+ "$ref": "#/components/schemas/Error"
383
+ }
384
+ }
385
+ }
386
+ },
387
+ "500": {
388
+ "description": "Request rejected",
389
+ "content": {
390
+ "application/json": {
391
+ "schema": {
392
+ "$ref": "#/components/schemas/Error"
393
+ }
394
+ }
395
+ }
396
+ }
397
+ }
398
+ }
399
+ },
400
+ "/emails/receiving/{email_id}": {
401
+ "parameters": [
402
+ {
403
+ "$ref": "#/components/parameters/ReceivedEmailId"
404
+ }
405
+ ],
406
+ "get": {
407
+ "operationId": "GetReceivedEmail",
408
+ "x-mockingbird": {
409
+ "supported": true,
410
+ "parity": {
411
+ "enabled": true,
412
+ "safe": true
413
+ }
414
+ },
415
+ "responses": {
416
+ "200": {
417
+ "description": "The received email, with its content",
418
+ "content": {
419
+ "application/json": {
420
+ "schema": {
421
+ "$ref": "#/components/schemas/ReceivedEmail"
422
+ }
423
+ }
424
+ }
425
+ },
426
+ "401": {
427
+ "description": "Missing API key",
428
+ "content": {
429
+ "application/json": {
430
+ "schema": {
431
+ "$ref": "#/components/schemas/Error"
432
+ }
433
+ }
434
+ }
435
+ },
436
+ "404": {
437
+ "description": "Unknown email",
438
+ "content": {
439
+ "application/json": {
440
+ "schema": {
441
+ "$ref": "#/components/schemas/Error"
442
+ }
443
+ }
444
+ }
445
+ }
446
+ }
447
+ }
448
+ },
449
+ "/emails/receiving/{email_id}/attachments": {
450
+ "parameters": [
451
+ {
452
+ "$ref": "#/components/parameters/ReceivedEmailId"
453
+ }
454
+ ],
455
+ "get": {
456
+ "operationId": "ListReceivedEmailAttachments",
457
+ "x-mockingbird": {
458
+ "supported": true,
459
+ "parity": {
460
+ "enabled": true,
461
+ "safe": true
462
+ }
463
+ },
464
+ "responses": {
465
+ "200": {
466
+ "description": "Attachment metadata with short-lived download URLs",
467
+ "content": {
468
+ "application/json": {
469
+ "schema": {
470
+ "type": "object",
471
+ "required": [
472
+ "object",
473
+ "data"
474
+ ],
475
+ "properties": {
476
+ "object": {
477
+ "type": "string",
478
+ "enum": [
479
+ "list"
480
+ ]
481
+ },
482
+ "has_more": {
483
+ "type": "boolean"
484
+ },
485
+ "data": {
486
+ "type": "array",
487
+ "items": {
488
+ "$ref": "#/components/schemas/ReceivedAttachment"
489
+ }
490
+ }
491
+ }
492
+ }
493
+ }
494
+ }
495
+ },
496
+ "401": {
497
+ "description": "Missing API key",
498
+ "content": {
499
+ "application/json": {
500
+ "schema": {
501
+ "$ref": "#/components/schemas/Error"
502
+ }
503
+ }
504
+ }
505
+ },
506
+ "404": {
507
+ "description": "Unknown email",
508
+ "content": {
509
+ "application/json": {
510
+ "schema": {
511
+ "$ref": "#/components/schemas/Error"
512
+ }
513
+ }
514
+ }
515
+ }
516
+ }
517
+ }
518
+ },
519
+ "/downloads/inbound/{attachment_id}": {
520
+ "get": {
521
+ "operationId": "DownloadReceivedAttachment",
522
+ "description": "The `download_url` of a received attachment: unauthenticated (it stands in for Resend's signed CDN URL), the raw bytes with their content type and length.",
523
+ "security": [],
524
+ "x-mockingbird": {
525
+ "supported": true,
526
+ "parity": {
527
+ "enabled": true,
528
+ "safe": true
529
+ }
530
+ },
531
+ "parameters": [
532
+ {
533
+ "name": "attachment_id",
534
+ "in": "path",
535
+ "required": true,
536
+ "schema": {
537
+ "type": "string",
538
+ "x-mockingbird-resource-ref": {
539
+ "type": "received_attachment",
540
+ "missing": "00000000-0000-4000-8000-000000000000"
541
+ }
542
+ }
543
+ }
544
+ ],
545
+ "responses": {
546
+ "200": {
547
+ "description": "The attachment bytes",
548
+ "content": {
549
+ "application/octet-stream": {
550
+ "schema": {
551
+ "type": "string",
552
+ "format": "binary"
553
+ }
554
+ }
555
+ }
556
+ },
557
+ "404": {
558
+ "description": "Unknown attachment",
559
+ "content": {
560
+ "application/json": {
561
+ "schema": {
562
+ "$ref": "#/components/schemas/Error"
563
+ }
564
+ }
565
+ }
566
+ }
567
+ }
568
+ }
569
+ },
570
+ "/api-keys/{id}": {
571
+ "delete": {
572
+ "operationId": "DELETE /api-keys/:id",
573
+ "summary": "DELETE /api-keys/:id",
574
+ "x-mockingbird": {
575
+ "supported": true,
576
+ "parity": {
577
+ "enabled": false,
578
+ "safe": false,
579
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
580
+ }
581
+ },
582
+ "parameters": [
583
+ {
584
+ "in": "path",
585
+ "name": "id",
586
+ "required": true,
587
+ "schema": {
588
+ "type": "string"
589
+ }
590
+ }
591
+ ],
592
+ "responses": {
593
+ "default": {
594
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
595
+ }
596
+ }
597
+ }
598
+ },
599
+ "/audiences/{audience_id}/contacts/{id}": {
600
+ "delete": {
601
+ "operationId": "DELETE /audiences/:audience_id/contacts/:id",
602
+ "summary": "DELETE /audiences/:audience_id/contacts/:id",
603
+ "x-mockingbird": {
604
+ "supported": true,
605
+ "parity": {
606
+ "enabled": false,
607
+ "safe": false,
608
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
609
+ }
610
+ },
611
+ "parameters": [
612
+ {
613
+ "in": "path",
614
+ "name": "audience_id",
615
+ "required": true,
616
+ "schema": {
617
+ "type": "string"
618
+ }
619
+ },
620
+ {
621
+ "in": "path",
622
+ "name": "id",
623
+ "required": true,
624
+ "schema": {
625
+ "type": "string"
626
+ }
627
+ }
628
+ ],
629
+ "responses": {
630
+ "default": {
631
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
632
+ }
633
+ }
634
+ }
635
+ },
636
+ "/audiences/{id}": {
637
+ "delete": {
638
+ "operationId": "DELETE /audiences/:id",
639
+ "summary": "DELETE /audiences/:id",
640
+ "x-mockingbird": {
641
+ "supported": true,
642
+ "parity": {
643
+ "enabled": false,
644
+ "safe": false,
645
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
646
+ }
647
+ },
648
+ "parameters": [
649
+ {
650
+ "in": "path",
651
+ "name": "id",
652
+ "required": true,
653
+ "schema": {
654
+ "type": "string"
655
+ }
656
+ }
657
+ ],
658
+ "responses": {
659
+ "default": {
660
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
661
+ }
662
+ }
663
+ }
664
+ },
665
+ "/domains/{id}": {
666
+ "get": {
667
+ "operationId": "GET /domains/:id",
668
+ "summary": "GET /domains/:id",
669
+ "x-mockingbird": {
670
+ "supported": true,
671
+ "parity": {
672
+ "enabled": false,
673
+ "safe": false,
674
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
675
+ }
676
+ },
677
+ "parameters": [
678
+ {
679
+ "in": "path",
680
+ "name": "id",
681
+ "required": true,
682
+ "schema": {
683
+ "type": "string"
684
+ }
685
+ }
686
+ ],
687
+ "responses": {
688
+ "default": {
689
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
690
+ }
691
+ }
692
+ },
693
+ "delete": {
694
+ "operationId": "DELETE /domains/:id",
695
+ "summary": "DELETE /domains/:id",
696
+ "x-mockingbird": {
697
+ "supported": true,
698
+ "parity": {
699
+ "enabled": false,
700
+ "safe": false,
701
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
702
+ }
703
+ },
704
+ "parameters": [
705
+ {
706
+ "in": "path",
707
+ "name": "id",
708
+ "required": true,
709
+ "schema": {
710
+ "type": "string"
711
+ }
712
+ }
713
+ ],
714
+ "responses": {
715
+ "default": {
716
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
717
+ }
718
+ }
719
+ }
720
+ },
721
+ "/api-keys": {
722
+ "get": {
723
+ "operationId": "GET /api-keys",
724
+ "summary": "GET /api-keys",
725
+ "x-mockingbird": {
726
+ "supported": true,
727
+ "parity": {
728
+ "enabled": false,
729
+ "safe": false,
730
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
731
+ }
732
+ },
733
+ "parameters": [],
734
+ "responses": {
735
+ "default": {
736
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
737
+ }
738
+ }
739
+ },
740
+ "post": {
741
+ "operationId": "POST /api-keys",
742
+ "summary": "POST /api-keys",
743
+ "x-mockingbird": {
744
+ "supported": true,
745
+ "parity": {
746
+ "enabled": false,
747
+ "safe": false,
748
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
749
+ }
750
+ },
751
+ "parameters": [],
752
+ "responses": {
753
+ "default": {
754
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
755
+ }
756
+ }
757
+ }
758
+ },
759
+ "/audiences": {
760
+ "get": {
761
+ "operationId": "GET /audiences",
762
+ "summary": "GET /audiences",
763
+ "x-mockingbird": {
764
+ "supported": true,
765
+ "parity": {
766
+ "enabled": false,
767
+ "safe": false,
768
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
769
+ }
770
+ },
771
+ "parameters": [],
772
+ "responses": {
773
+ "default": {
774
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
775
+ }
776
+ }
777
+ },
778
+ "post": {
779
+ "operationId": "POST /audiences",
780
+ "summary": "POST /audiences",
781
+ "x-mockingbird": {
782
+ "supported": true,
783
+ "parity": {
784
+ "enabled": false,
785
+ "safe": false,
786
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
787
+ }
788
+ },
789
+ "parameters": [],
790
+ "responses": {
791
+ "default": {
792
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
793
+ }
794
+ }
795
+ }
796
+ },
797
+ "/audiences/{audience_id}/contacts": {
798
+ "get": {
799
+ "operationId": "GET /audiences/:audience_id/contacts",
800
+ "summary": "GET /audiences/:audience_id/contacts",
801
+ "x-mockingbird": {
802
+ "supported": true,
803
+ "parity": {
804
+ "enabled": false,
805
+ "safe": false,
806
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
807
+ }
808
+ },
809
+ "parameters": [
810
+ {
811
+ "in": "path",
812
+ "name": "audience_id",
813
+ "required": true,
814
+ "schema": {
815
+ "type": "string"
816
+ }
817
+ }
818
+ ],
819
+ "responses": {
820
+ "default": {
821
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
822
+ }
823
+ }
824
+ },
825
+ "post": {
826
+ "operationId": "POST /audiences/:audience_id/contacts",
827
+ "summary": "POST /audiences/:audience_id/contacts",
828
+ "x-mockingbird": {
829
+ "supported": true,
830
+ "parity": {
831
+ "enabled": false,
832
+ "safe": false,
833
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
834
+ }
835
+ },
836
+ "parameters": [
837
+ {
838
+ "in": "path",
839
+ "name": "audience_id",
840
+ "required": true,
841
+ "schema": {
842
+ "type": "string"
843
+ }
844
+ }
845
+ ],
846
+ "responses": {
847
+ "default": {
848
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
849
+ }
850
+ }
851
+ }
852
+ },
853
+ "/domains": {
854
+ "get": {
855
+ "operationId": "GET /domains",
856
+ "summary": "GET /domains",
857
+ "x-mockingbird": {
858
+ "supported": true,
859
+ "parity": {
860
+ "enabled": false,
861
+ "safe": false,
862
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
863
+ }
864
+ },
865
+ "parameters": [],
866
+ "responses": {
867
+ "default": {
868
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
869
+ }
870
+ }
871
+ },
872
+ "post": {
873
+ "operationId": "POST /domains",
874
+ "summary": "POST /domains",
875
+ "x-mockingbird": {
876
+ "supported": true,
877
+ "parity": {
878
+ "enabled": false,
879
+ "safe": false,
880
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
881
+ }
882
+ },
883
+ "parameters": [],
884
+ "responses": {
885
+ "default": {
886
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
887
+ }
888
+ }
889
+ }
890
+ },
891
+ "/inbox": {
892
+ "get": {
893
+ "operationId": "GET /inbox",
894
+ "summary": "GET /inbox",
895
+ "x-mockingbird": {
896
+ "supported": true,
897
+ "parity": {
898
+ "enabled": false,
899
+ "safe": false,
900
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
901
+ }
902
+ },
903
+ "parameters": [],
904
+ "responses": {
905
+ "default": {
906
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
907
+ }
908
+ }
909
+ }
910
+ },
911
+ "/inbox/{id}": {
912
+ "get": {
913
+ "operationId": "GET /inbox/:id",
914
+ "summary": "GET /inbox/:id",
915
+ "x-mockingbird": {
916
+ "supported": true,
917
+ "parity": {
918
+ "enabled": false,
919
+ "safe": false,
920
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
921
+ }
922
+ },
923
+ "parameters": [
924
+ {
925
+ "in": "path",
926
+ "name": "id",
927
+ "required": true,
928
+ "schema": {
929
+ "type": "string"
930
+ }
931
+ }
932
+ ],
933
+ "responses": {
934
+ "default": {
935
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
936
+ }
937
+ }
938
+ }
939
+ },
940
+ "/domains/{id}/verify": {
941
+ "post": {
942
+ "operationId": "POST /domains/:id/verify",
943
+ "summary": "POST /domains/:id/verify",
944
+ "x-mockingbird": {
945
+ "supported": true,
946
+ "parity": {
947
+ "enabled": false,
948
+ "safe": false,
949
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
950
+ }
951
+ },
952
+ "parameters": [
953
+ {
954
+ "in": "path",
955
+ "name": "id",
956
+ "required": true,
957
+ "schema": {
958
+ "type": "string"
959
+ }
960
+ }
961
+ ],
962
+ "responses": {
963
+ "default": {
964
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
965
+ }
966
+ }
967
+ }
968
+ },
969
+ "/emails/{id}/cancel": {
970
+ "post": {
971
+ "operationId": "POST /emails/:id/cancel",
972
+ "summary": "POST /emails/:id/cancel",
973
+ "x-mockingbird": {
974
+ "supported": true,
975
+ "parity": {
976
+ "enabled": false,
977
+ "safe": false,
978
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
979
+ }
980
+ },
981
+ "parameters": [
982
+ {
983
+ "in": "path",
984
+ "name": "id",
985
+ "required": true,
986
+ "schema": {
987
+ "type": "string"
988
+ }
989
+ }
990
+ ],
991
+ "responses": {
992
+ "default": {
993
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
994
+ }
995
+ }
996
+ }
997
+ },
998
+ "/emails/batch": {
999
+ "post": {
1000
+ "operationId": "POST /emails/batch",
1001
+ "summary": "POST /emails/batch",
1002
+ "x-mockingbird": {
1003
+ "supported": true,
1004
+ "parity": {
1005
+ "enabled": false,
1006
+ "safe": false,
1007
+ "reason": "Verified against a pinned package oracle; independent live vendor evidence is not available."
1008
+ }
1009
+ },
1010
+ "parameters": [],
1011
+ "responses": {
1012
+ "default": {
1013
+ "description": "Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified."
1014
+ }
1015
+ }
1016
+ }
1017
+ }
1018
+ },
1019
+ "components": {
1020
+ "securitySchemes": {
1021
+ "bearerAuth": {
1022
+ "type": "http",
1023
+ "scheme": "bearer",
1024
+ "description": "`Authorization: Bearer re_…`"
1025
+ }
1026
+ },
1027
+ "parameters": {
1028
+ "ReceivedEmailId": {
1029
+ "name": "email_id",
1030
+ "in": "path",
1031
+ "required": true,
1032
+ "schema": {
1033
+ "type": "string",
1034
+ "x-mockingbird-resource-ref": {
1035
+ "type": "received_email",
1036
+ "missing": "00000000-0000-4000-8000-000000000000"
1037
+ }
1038
+ }
1039
+ }
1040
+ },
1041
+ "schemas": {
1042
+ "Address": {
1043
+ "type": "string",
1044
+ "description": "`email@example.com` or `Name <email@example.com>`",
1045
+ "pattern": "^([^<>@]* <[A-Za-z0-9._+-]+@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)+>|[A-Za-z0-9._+-]+@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)+)$",
1046
+ "maxLength": 120
1047
+ },
1048
+ "Recipients": {
1049
+ "oneOf": [
1050
+ {
1051
+ "$ref": "#/components/schemas/Address"
1052
+ },
1053
+ {
1054
+ "type": "array",
1055
+ "minItems": 1,
1056
+ "maxItems": 50,
1057
+ "items": {
1058
+ "$ref": "#/components/schemas/Address"
1059
+ }
1060
+ }
1061
+ ]
1062
+ },
1063
+ "SendEmailBody": {
1064
+ "type": "object",
1065
+ "required": [
1066
+ "from",
1067
+ "to",
1068
+ "subject"
1069
+ ],
1070
+ "properties": {
1071
+ "from": {
1072
+ "$ref": "#/components/schemas/Address"
1073
+ },
1074
+ "to": {
1075
+ "$ref": "#/components/schemas/Recipients"
1076
+ },
1077
+ "subject": {
1078
+ "type": "string",
1079
+ "minLength": 1,
1080
+ "maxLength": 200
1081
+ },
1082
+ "html": {
1083
+ "type": "string",
1084
+ "maxLength": 5000
1085
+ },
1086
+ "text": {
1087
+ "type": "string",
1088
+ "maxLength": 5000
1089
+ },
1090
+ "cc": {
1091
+ "$ref": "#/components/schemas/Recipients"
1092
+ },
1093
+ "bcc": {
1094
+ "$ref": "#/components/schemas/Recipients"
1095
+ },
1096
+ "reply_to": {
1097
+ "$ref": "#/components/schemas/Recipients"
1098
+ },
1099
+ "scheduled_at": {
1100
+ "type": "string",
1101
+ "maxLength": 60
1102
+ },
1103
+ "headers": {
1104
+ "type": "object",
1105
+ "additionalProperties": {
1106
+ "type": "string",
1107
+ "maxLength": 500
1108
+ }
1109
+ },
1110
+ "tags": {
1111
+ "type": "array",
1112
+ "maxItems": 10,
1113
+ "items": {
1114
+ "type": "object",
1115
+ "required": [
1116
+ "name",
1117
+ "value"
1118
+ ],
1119
+ "properties": {
1120
+ "name": {
1121
+ "type": "string",
1122
+ "pattern": "^[A-Za-z0-9_-]{1,256}$"
1123
+ },
1124
+ "value": {
1125
+ "type": "string",
1126
+ "pattern": "^[A-Za-z0-9_-]{1,256}$"
1127
+ }
1128
+ }
1129
+ }
1130
+ },
1131
+ "attachments": {
1132
+ "type": "array",
1133
+ "maxItems": 5,
1134
+ "items": {
1135
+ "type": "object",
1136
+ "properties": {
1137
+ "filename": {
1138
+ "type": "string",
1139
+ "minLength": 1,
1140
+ "maxLength": 100
1141
+ },
1142
+ "content": {
1143
+ "description": "Base64 bytes (or a JSON-serialised Node Buffer).",
1144
+ "oneOf": [
1145
+ {
1146
+ "type": "string",
1147
+ "maxLength": 10000
1148
+ },
1149
+ {
1150
+ "type": "object",
1151
+ "required": [
1152
+ "type",
1153
+ "data"
1154
+ ],
1155
+ "properties": {
1156
+ "type": {
1157
+ "type": "string",
1158
+ "enum": [
1159
+ "Buffer"
1160
+ ]
1161
+ },
1162
+ "data": {
1163
+ "type": "array",
1164
+ "maxItems": 10000,
1165
+ "items": {
1166
+ "type": "integer",
1167
+ "minimum": 0,
1168
+ "maximum": 255
1169
+ }
1170
+ }
1171
+ }
1172
+ }
1173
+ ]
1174
+ },
1175
+ "path": {
1176
+ "type": "string",
1177
+ "maxLength": 500
1178
+ },
1179
+ "content_type": {
1180
+ "type": "string",
1181
+ "maxLength": 100
1182
+ },
1183
+ "inline_content_id": {
1184
+ "type": "string",
1185
+ "maxLength": 100
1186
+ }
1187
+ }
1188
+ }
1189
+ }
1190
+ }
1191
+ },
1192
+ "SentEmailMetadata": {
1193
+ "type": "object",
1194
+ "required": [
1195
+ "id",
1196
+ "to",
1197
+ "from",
1198
+ "created_at",
1199
+ "subject",
1200
+ "bcc",
1201
+ "cc",
1202
+ "reply_to",
1203
+ "message_id",
1204
+ "last_event",
1205
+ "scheduled_at"
1206
+ ],
1207
+ "properties": {
1208
+ "id": {
1209
+ "type": "string",
1210
+ "x-mockingbird-resource": {
1211
+ "type": "email",
1212
+ "identity": true
1213
+ },
1214
+ "x-mockingbird-volatile": {
1215
+ "kind": "id"
1216
+ }
1217
+ },
1218
+ "to": {
1219
+ "type": "array",
1220
+ "items": {
1221
+ "type": "string"
1222
+ }
1223
+ },
1224
+ "from": {
1225
+ "type": "string"
1226
+ },
1227
+ "created_at": {
1228
+ "type": "string",
1229
+ "x-mockingbird-volatile": {
1230
+ "kind": "timestamp"
1231
+ }
1232
+ },
1233
+ "subject": {
1234
+ "type": "string"
1235
+ },
1236
+ "message_id": {
1237
+ "type": "string",
1238
+ "x-mockingbird-volatile": {
1239
+ "kind": "id"
1240
+ }
1241
+ },
1242
+ "bcc": {
1243
+ "type": [
1244
+ "array",
1245
+ "null"
1246
+ ],
1247
+ "items": {
1248
+ "type": "string"
1249
+ }
1250
+ },
1251
+ "cc": {
1252
+ "type": [
1253
+ "array",
1254
+ "null"
1255
+ ],
1256
+ "items": {
1257
+ "type": "string"
1258
+ }
1259
+ },
1260
+ "reply_to": {
1261
+ "type": [
1262
+ "array",
1263
+ "null"
1264
+ ],
1265
+ "items": {
1266
+ "type": "string"
1267
+ }
1268
+ },
1269
+ "last_event": {
1270
+ "type": "string",
1271
+ "enum": [
1272
+ "delivered",
1273
+ "scheduled"
1274
+ ]
1275
+ },
1276
+ "scheduled_at": {
1277
+ "type": [
1278
+ "string",
1279
+ "null"
1280
+ ]
1281
+ }
1282
+ }
1283
+ },
1284
+ "ReceivedEmailMetadata": {
1285
+ "type": "object",
1286
+ "required": [
1287
+ "id",
1288
+ "to",
1289
+ "from",
1290
+ "created_at",
1291
+ "subject",
1292
+ "bcc",
1293
+ "cc",
1294
+ "reply_to",
1295
+ "message_id",
1296
+ "attachments"
1297
+ ],
1298
+ "properties": {
1299
+ "id": {
1300
+ "type": "string",
1301
+ "x-mockingbird-resource": {
1302
+ "type": "received_email",
1303
+ "identity": true
1304
+ },
1305
+ "x-mockingbird-volatile": {
1306
+ "kind": "id"
1307
+ }
1308
+ },
1309
+ "to": {
1310
+ "type": "array",
1311
+ "items": {
1312
+ "type": "string"
1313
+ }
1314
+ },
1315
+ "from": {
1316
+ "type": "string"
1317
+ },
1318
+ "created_at": {
1319
+ "type": "string",
1320
+ "x-mockingbird-volatile": {
1321
+ "kind": "timestamp"
1322
+ }
1323
+ },
1324
+ "subject": {
1325
+ "type": [
1326
+ "string",
1327
+ "null"
1328
+ ]
1329
+ },
1330
+ "message_id": {
1331
+ "type": "string",
1332
+ "x-mockingbird-volatile": {
1333
+ "kind": "id"
1334
+ }
1335
+ },
1336
+ "bcc": {
1337
+ "type": "array",
1338
+ "items": {
1339
+ "type": "string"
1340
+ }
1341
+ },
1342
+ "cc": {
1343
+ "type": "array",
1344
+ "items": {
1345
+ "type": "string"
1346
+ }
1347
+ },
1348
+ "reply_to": {
1349
+ "type": "array",
1350
+ "items": {
1351
+ "type": "string"
1352
+ }
1353
+ },
1354
+ "attachments": {
1355
+ "type": "array",
1356
+ "items": {
1357
+ "type": "object",
1358
+ "required": [
1359
+ "id",
1360
+ "filename",
1361
+ "content_type",
1362
+ "content_id",
1363
+ "content_disposition",
1364
+ "size"
1365
+ ],
1366
+ "properties": {
1367
+ "id": {
1368
+ "type": "string",
1369
+ "x-mockingbird-volatile": {
1370
+ "kind": "id"
1371
+ }
1372
+ },
1373
+ "filename": {
1374
+ "type": "string"
1375
+ },
1376
+ "content_type": {
1377
+ "type": "string"
1378
+ },
1379
+ "content_id": {
1380
+ "type": [
1381
+ "string",
1382
+ "null"
1383
+ ]
1384
+ },
1385
+ "content_disposition": {
1386
+ "type": [
1387
+ "string",
1388
+ "null"
1389
+ ]
1390
+ },
1391
+ "size": {
1392
+ "type": "integer"
1393
+ }
1394
+ }
1395
+ }
1396
+ }
1397
+ }
1398
+ },
1399
+ "Email": {
1400
+ "type": "object",
1401
+ "required": [
1402
+ "object",
1403
+ "id",
1404
+ "to",
1405
+ "from",
1406
+ "created_at",
1407
+ "subject",
1408
+ "html",
1409
+ "text",
1410
+ "bcc",
1411
+ "cc",
1412
+ "reply_to",
1413
+ "last_event"
1414
+ ],
1415
+ "properties": {
1416
+ "object": {
1417
+ "type": "string",
1418
+ "enum": [
1419
+ "email"
1420
+ ]
1421
+ },
1422
+ "id": {
1423
+ "type": "string",
1424
+ "x-mockingbird-volatile": {
1425
+ "kind": "id"
1426
+ }
1427
+ },
1428
+ "to": {
1429
+ "type": "array",
1430
+ "items": {
1431
+ "type": "string"
1432
+ }
1433
+ },
1434
+ "from": {
1435
+ "type": "string"
1436
+ },
1437
+ "created_at": {
1438
+ "type": "string",
1439
+ "x-mockingbird-volatile": {
1440
+ "kind": "timestamp"
1441
+ }
1442
+ },
1443
+ "subject": {
1444
+ "type": "string"
1445
+ },
1446
+ "html": {
1447
+ "type": [
1448
+ "string",
1449
+ "null"
1450
+ ]
1451
+ },
1452
+ "text": {
1453
+ "type": [
1454
+ "string",
1455
+ "null"
1456
+ ]
1457
+ },
1458
+ "bcc": {
1459
+ "type": [
1460
+ "array",
1461
+ "null"
1462
+ ],
1463
+ "items": {
1464
+ "type": "string"
1465
+ }
1466
+ },
1467
+ "cc": {
1468
+ "type": [
1469
+ "array",
1470
+ "null"
1471
+ ],
1472
+ "items": {
1473
+ "type": "string"
1474
+ }
1475
+ },
1476
+ "reply_to": {
1477
+ "type": [
1478
+ "array",
1479
+ "null"
1480
+ ],
1481
+ "items": {
1482
+ "type": "string"
1483
+ }
1484
+ },
1485
+ "last_event": {
1486
+ "type": "string",
1487
+ "enum": [
1488
+ "delivered",
1489
+ "scheduled"
1490
+ ]
1491
+ },
1492
+ "scheduled_at": {
1493
+ "type": [
1494
+ "string",
1495
+ "null"
1496
+ ]
1497
+ },
1498
+ "headers": {
1499
+ "type": "object",
1500
+ "additionalProperties": {
1501
+ "type": "string"
1502
+ },
1503
+ "description": "Custom headers from the send, with their original names and values."
1504
+ },
1505
+ "tags": {
1506
+ "type": "array",
1507
+ "items": {
1508
+ "type": "object",
1509
+ "properties": {
1510
+ "name": {
1511
+ "type": "string"
1512
+ },
1513
+ "value": {
1514
+ "type": "string"
1515
+ }
1516
+ }
1517
+ }
1518
+ }
1519
+ }
1520
+ },
1521
+ "ReceivedAttachment": {
1522
+ "type": "object",
1523
+ "required": [
1524
+ "id",
1525
+ "filename",
1526
+ "content_type",
1527
+ "size",
1528
+ "download_url"
1529
+ ],
1530
+ "properties": {
1531
+ "id": {
1532
+ "type": "string",
1533
+ "x-mockingbird-resource": {
1534
+ "type": "received_attachment",
1535
+ "identity": true
1536
+ },
1537
+ "x-mockingbird-volatile": {
1538
+ "kind": "id"
1539
+ }
1540
+ },
1541
+ "filename": {
1542
+ "type": "string"
1543
+ },
1544
+ "content_type": {
1545
+ "type": "string"
1546
+ },
1547
+ "content_disposition": {
1548
+ "type": [
1549
+ "string",
1550
+ "null"
1551
+ ]
1552
+ },
1553
+ "content_id": {
1554
+ "type": [
1555
+ "string",
1556
+ "null"
1557
+ ]
1558
+ },
1559
+ "size": {
1560
+ "type": "integer"
1561
+ },
1562
+ "download_url": {
1563
+ "type": "string",
1564
+ "x-mockingbird-volatile": {
1565
+ "kind": "url"
1566
+ }
1567
+ },
1568
+ "expires_at": {
1569
+ "type": "string",
1570
+ "x-mockingbird-volatile": {
1571
+ "kind": "timestamp"
1572
+ }
1573
+ }
1574
+ }
1575
+ },
1576
+ "ReceivedEmail": {
1577
+ "type": "object",
1578
+ "required": [
1579
+ "object",
1580
+ "id",
1581
+ "to",
1582
+ "from",
1583
+ "created_at",
1584
+ "subject",
1585
+ "html",
1586
+ "text",
1587
+ "message_id",
1588
+ "attachments"
1589
+ ],
1590
+ "properties": {
1591
+ "object": {
1592
+ "type": "string",
1593
+ "enum": [
1594
+ "email"
1595
+ ]
1596
+ },
1597
+ "id": {
1598
+ "type": "string",
1599
+ "x-mockingbird-resource": {
1600
+ "type": "received_email",
1601
+ "identity": true
1602
+ },
1603
+ "x-mockingbird-volatile": {
1604
+ "kind": "id"
1605
+ }
1606
+ },
1607
+ "to": {
1608
+ "type": "array",
1609
+ "items": {
1610
+ "type": "string"
1611
+ }
1612
+ },
1613
+ "from": {
1614
+ "type": "string"
1615
+ },
1616
+ "cc": {
1617
+ "type": "array",
1618
+ "items": {
1619
+ "type": "string"
1620
+ }
1621
+ },
1622
+ "bcc": {
1623
+ "type": "array",
1624
+ "items": {
1625
+ "type": "string"
1626
+ }
1627
+ },
1628
+ "reply_to": {
1629
+ "type": "array",
1630
+ "items": {
1631
+ "type": "string"
1632
+ }
1633
+ },
1634
+ "created_at": {
1635
+ "type": "string",
1636
+ "x-mockingbird-volatile": {
1637
+ "kind": "timestamp"
1638
+ }
1639
+ },
1640
+ "subject": {
1641
+ "type": [
1642
+ "string",
1643
+ "null"
1644
+ ]
1645
+ },
1646
+ "html": {
1647
+ "type": [
1648
+ "string",
1649
+ "null"
1650
+ ]
1651
+ },
1652
+ "text": {
1653
+ "type": [
1654
+ "string",
1655
+ "null"
1656
+ ]
1657
+ },
1658
+ "headers": {
1659
+ "type": "object",
1660
+ "additionalProperties": {
1661
+ "type": "string"
1662
+ }
1663
+ },
1664
+ "message_id": {
1665
+ "type": [
1666
+ "string",
1667
+ "null"
1668
+ ]
1669
+ },
1670
+ "attachments": {
1671
+ "type": "array",
1672
+ "items": {
1673
+ "type": "object",
1674
+ "required": [
1675
+ "id",
1676
+ "filename",
1677
+ "content_type"
1678
+ ],
1679
+ "properties": {
1680
+ "id": {
1681
+ "type": "string"
1682
+ },
1683
+ "filename": {
1684
+ "type": "string"
1685
+ },
1686
+ "content_type": {
1687
+ "type": "string"
1688
+ },
1689
+ "content_disposition": {
1690
+ "type": [
1691
+ "string",
1692
+ "null"
1693
+ ]
1694
+ },
1695
+ "content_id": {
1696
+ "type": [
1697
+ "string",
1698
+ "null"
1699
+ ]
1700
+ }
1701
+ }
1702
+ }
1703
+ }
1704
+ }
1705
+ },
1706
+ "Error": {
1707
+ "type": "object",
1708
+ "description": "Resend's error body; the SDK returns it verbatim as `error`.",
1709
+ "required": [
1710
+ "statusCode",
1711
+ "name",
1712
+ "message"
1713
+ ],
1714
+ "properties": {
1715
+ "statusCode": {
1716
+ "type": "integer"
1717
+ },
1718
+ "name": {
1719
+ "type": "string"
1720
+ },
1721
+ "message": {
1722
+ "type": "string"
1723
+ }
1724
+ }
1725
+ }
1726
+ }
1727
+ }
1728
+ }