-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathopenapi.yaml
More file actions
9153 lines (9149 loc) · 366 KB
/
Copy pathopenapi.yaml
File metadata and controls
9153 lines (9149 loc) · 366 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
components:
headers:
ETag:
description: "Opaque STRONG entity-tag validator for the returned representation, currently a quoted 32-hex-character token (e.g. \"9f86d081884c7d65…\"). Treat it as opaque: never parse, derive, or construct one. Store the received value and replay it VERBATIM in a later If-Match to make a write conditional. Any accepted write moves the validator, so a stale value cannot match and the conditional write is rejected with 412 precondition_failed."
schema:
type: string
RateLimitLimit:
description: Request quota for the current limiter window.
schema:
type: integer
RateLimitRemaining:
description: Requests remaining in the current limiter window.
schema:
type: integer
RateLimitReset:
description: Seconds until the current limiter window resets.
schema:
type: integer
ResourceLocation:
description: "Canonical path-relative URL of the affected resource. Path segments are percent-encoded PER SEGMENT, which legally leaves the sub-delimiters @ + & = : $ unescaped — /v1/contacts/a.partner@fund.vc is an expected value, and so is the fully-escaped /v1/contacts/a.partner%40fund.vc. Neither form is promised, so never string-compare this header against a URL built locally: percent-decode the final path segment to recover the canonical resource key, then compare that."
schema:
format: uri-reference
type: string
RetryAfter:
description: Positive integer seconds to wait before retrying a transient 429 or 503 response.
schema:
minimum: 1
type: integer
XRequestID:
description: Always-present request correlation id. Error responses echo the same value in error.request_id.
schema:
type: string
schemas:
APIKeyExportEntry:
additionalProperties: true
properties:
created_at:
format: date-time
type: string
id:
type: string
key_prefix:
type: string
last_used_at:
format: date-time
type: string
name:
type: string
revoked_at:
format: date-time
type: string
required:
- id
- name
- key_prefix
- created_at
type: object
x-stability-level: beta
APIKeyView:
additionalProperties: true
properties:
agent_email:
description: Bound inbox email for agent-scoped keys; omitted for account scope.
type: string
created_at:
format: date-time
type: string
expires_at:
format: date-time
type: string
id:
type: string
key_prefix:
description: Non-secret visible prefix (e.g. e2a_acct_… / e2a_agt_…).
type: string
last_used_at:
format: date-time
type: string
name:
type: string
scope:
description: "account = workspace admin; agent = bound to one inbox. Open set: new values may be added over time, so treat these as strings and tolerate unknown values. Known values: account, agent."
type: string
required:
- id
- name
- key_prefix
- scope
- created_at
type: object
AccountMetricsView:
additionalProperties: true
properties:
agents:
description: Per-agent breakdown, busiest first. Empty unless group_by=agent was requested.
items:
$ref: "#/components/schemas/AgentMetricsGroupView"
type:
- array
- "null"
agents_truncated:
description: "True when the account has more agents with traffic than the breakdown returned (cap: 200). The account-wide totals above stay complete — only the breakdown is cut."
type: boolean
counters:
description: Every reason code observed across the account in the window, ordered by code.
items:
$ref: "#/components/schemas/MetricsCounterView"
type:
- array
- "null"
end:
description: Exclusive end of the cohort window.
format: date-time
type: string
messages_in_window:
description: Messages created in the window across every agent this account owns.
format: int64
type: integer
messages_with_lifecycle:
description: Messages in the window carrying at least one persisted lifecycle observation. Below messages_in_window means part of the window predates the lifecycle ledger, and every counter here undercounts by that difference.
format: int64
type: integer
rates:
$ref: "#/components/schemas/MetricsRatesView"
description: Account-wide rates, on the same fixed denominators the per-agent operation uses.
reconstructed_observations:
description: Observations derived from durable message state rather than recorded at the boundary. Included in the counts above; reported separately so the inferred share is visible.
format: int64
type: integer
start:
description: Inclusive start of the cohort window.
format: date-time
type: string
summary:
$ref: "#/components/schemas/MetricsSummaryView"
description: Account-wide counters. Always computed across every agent, never from the possibly-truncated agents array.
webhooks:
$ref: "#/components/schemas/WebhookMetricsView"
required:
- start
- end
- messages_in_window
- messages_with_lifecycle
- reconstructed_observations
- summary
- rates
- counters
- agents
- agents_truncated
- webhooks
type: object
x-stability-level: beta
AccountUserView:
additionalProperties: true
properties:
email:
type: string
id:
type: string
required:
- id
- email
type: object
AccountView:
additionalProperties: true
properties:
agent_email:
type: string
limits:
$ref: "#/components/schemas/LimitsCapsView"
plan_code:
type: string
scope:
description: "Credential scope. Open set: new values may be added over time, so treat these as strings and tolerate unknown values. Known values: account, agent."
type: string
upgrade_url:
type: string
usage:
$ref: "#/components/schemas/LimitsUsageView"
user:
$ref: "#/components/schemas/AccountUserView"
required:
- user
- scope
- plan_code
- limits
- usage
- upgrade_url
type: object
AgentIdentity:
additionalProperties: true
properties:
created_at:
format: date-time
type: string
deleted_at:
format: date-time
type: string
domain:
type: string
domain_verified:
type: boolean
email:
type: string
inbound_7d:
format: int64
type: integer
inbound_allowlist:
items:
type: string
type:
- array
- "null"
inbound_policy:
type: string
inbound_policy_action:
type: string
inbound_scan:
type: string
inbound_scan_block_threshold:
format: double
type: number
inbound_scan_review_threshold:
format: double
type: number
inbound_scan_sensitivity:
type: string
last_delivery_at:
format: date-time
type: string
name:
type: string
on_expiry:
type: string
outbound_7d:
format: int64
type: integer
outbound_allowlist:
items:
type: string
type:
- array
- "null"
outbound_policy:
type: string
outbound_policy_action:
type: string
outbound_scan:
type: string
outbound_scan_block_threshold:
format: double
type: number
outbound_scan_review_threshold:
format: double
type: number
outbound_scan_sensitivity:
type: string
pending_count:
format: int64
type: integer
public:
type: boolean
registered_domain:
type: string
suppress_notifications:
type: boolean
ttl_seconds:
format: int64
type: integer
user_id:
type: string
webhook_status:
description: "Webhook posture for this agent, derived from the account's webhook subscribers that match it (a webhook with no agent filter matches every agent). Open set; tolerate unknown values. Known values: none (no webhook matches this agent), healthy (an enabled webhook matches and none serving this agent has a terminally-failed delivery in the last 24h), failing (an enabled webhook matches but at least one delivery on a matching enabled webhook terminally failed in the last 24h), disabled (webhooks match but every one is disabled, turned off manually), auto_disabled (webhooks match, every one is disabled, and at least one was auto-disabled by the chronic-failure sweep). Present on enriched surfaces (account export, dashboard agent list); absent where not computed."
type: string
required:
- domain
- registered_domain
- email
- name
- domain_verified
- public
- created_at
- user_id
- ttl_seconds
- on_expiry
- suppress_notifications
- inbound_7d
- outbound_7d
- pending_count
- inbound_policy
- inbound_policy_action
- outbound_policy
- outbound_policy_action
- inbound_scan
- inbound_scan_review_threshold
- inbound_scan_block_threshold
- outbound_scan
- outbound_scan_review_threshold
- outbound_scan_block_threshold
- inbound_scan_sensitivity
- outbound_scan_sensitivity
type: object
x-stability-level: beta
AgentMetricsGroupView:
additionalProperties: true
properties:
agent_email:
type: string
counters:
description: Every reason code this agent produced in the window, ordered by code.
items:
$ref: "#/components/schemas/MetricsCounterView"
type:
- array
- "null"
messages_in_window:
format: int64
type: integer
messages_with_lifecycle:
format: int64
type: integer
rates:
$ref: "#/components/schemas/MetricsRatesView"
reconstructed_observations:
format: int64
type: integer
summary:
$ref: "#/components/schemas/MetricsSummaryView"
required:
- agent_email
- messages_in_window
- messages_with_lifecycle
- reconstructed_observations
- summary
- rates
- counters
type: object
x-stability-level: beta
AgentMetricsView:
additionalProperties: true
properties:
agent_email:
description: The agent these metrics describe.
type: string
counters:
description: Every reason code observed in the window, ordered by code. Codes with no observations are omitted rather than reported as zero.
items:
$ref: "#/components/schemas/MetricsCounterView"
type:
- array
- "null"
end:
description: Exclusive end of the cohort window.
format: date-time
type: string
messages_in_window:
description: Messages created in the window, from the message table itself.
format: int64
type: integer
messages_with_lifecycle:
description: Messages in the window carrying at least one persisted lifecycle observation. Below messages_in_window means part of the window predates the lifecycle ledger, and every counter here undercounts by that difference.
format: int64
type: integer
rates:
$ref: "#/components/schemas/MetricsRatesView"
reconstructed_observations:
description: Observations in the window derived from durable message state rather than recorded at the boundary. Included in the counts above; reported separately so the inferred share is visible.
format: int64
type: integer
start:
description: Inclusive start of the cohort window.
format: date-time
type: string
summary:
$ref: "#/components/schemas/MetricsSummaryView"
required:
- agent_email
- start
- end
- messages_in_window
- messages_with_lifecycle
- reconstructed_observations
- summary
- rates
- counters
type: object
x-stability-level: beta
AgentSuppressionAddedData:
additionalProperties: true
properties:
address:
type: string
agent_email:
type: string
source:
description: "How the suppression was created. Known values: unsubscribe, manual."
type: string
required:
- agent_email
- address
- source
type: object
x-stability-level: beta
AgentSuppressionView:
additionalProperties: true
properties:
address:
type: string
agent_email:
type: string
created_at:
format: date-time
type: string
reason:
type: string
source:
description: "How the block was created. Known values: unsubscribe, manual."
type: string
required:
- agent_email
- address
- source
- created_at
type: object
x-stability-level: beta
AgentView:
additionalProperties: true
properties:
created_at:
format: date-time
type: string
deleted_at:
description: When the agent was moved to the trash. Omitted for live agents. A trashed agent is restorable until purged — 30 days after deletion by default (deployment-configurable). Live message data is otherwise retained indefinitely.
format: date-time
type: string
domain:
description: The exact domain in the agent email address.
type: string
domain_verified:
type: boolean
email:
type: string
name:
type: string
registered_domain:
description: The explicitly registered domain identity that authorizes this agent. For an inherited subdomain agent, this is its verified parent domain.
type: string
required:
- domain
- registered_domain
- email
- name
- domain_verified
- created_at
type: object
ApproveRequest:
additionalProperties: false
properties:
attachments:
items:
$ref: "#/components/schemas/Attachment"
type: array
bcc:
description: Override Bcc recipients. The message is limited to 50 recipients across to, cc, and bcc combined. Each recipient string (display name + address combined) is limited to 320 characters.
items:
maxLength: 320
type: string
type: array
cc:
description: Override Cc recipients. The message is limited to 50 recipients across to, cc, and bcc combined. Each recipient string (display name + address combined) is limited to 320 characters.
items:
maxLength: 320
type: string
type: array
html:
maxLength: 1048576
type: string
subject:
maxLength: 2000
type: string
text:
maxLength: 1048576
type: string
to:
description: Override primary recipients. The message is limited to 50 recipients across to, cc, and bcc combined. Each recipient string (display name + address combined) is limited to 320 characters.
items:
maxLength: 320
type: string
type: array
type: object
x-stability-level: beta
Attachment:
additionalProperties: false
properties:
content_type:
examples:
- application/pdf
type: string
data:
description: Base64-encoded file content. Each attachment must be ≤ 10 MiB decoded; a message may carry at most 10 attachments totaling ≤ 25 MiB decoded.
examples:
- base64-encoded-content
type: string
filename:
description: Attachment filename. Maximum 1024 UTF-8 bytes; longer names are rejected as invalid_attachment.
examples:
- report.pdf
type: string
required:
- filename
- content_type
- data
type: object
AttachmentMetaView:
additionalProperties: true
properties:
content_id:
description: "Content-ID (angle brackets stripped) for an inline part referenced by a body 'cid:' URL, e.g. an embedded image; the key a cid: reference resolves against. Omitted for non-inline attachments."
type: string
content_type:
type: string
filename:
type: string
index:
description: Stable 0-based attachment index (document order) — the fetch key for the attachment-bytes endpoint.
format: int64
type: integer
size_bytes:
description: DECODED attachment payload size in bytes (Content-Transfer-Encoding undone) — the size of the file a download yields, not its encoded size inside the raw MIME.
format: int64
type: integer
required:
- size_bytes
- index
type: object
AttachmentView:
additionalProperties: true
properties:
content_id:
description: Content-ID (angle brackets stripped) for an inline part referenced by a body 'cid:' URL, e.g. an embedded image. Omitted for non-inline attachments.
type: string
content_type:
type: string
data:
type: string
download_url:
type: string
expires_at:
format: date-time
type: string
filename:
type: string
index:
format: int64
type: integer
size_bytes:
description: DECODED attachment payload size in bytes (Content-Transfer-Encoding undone) — exactly what download_url serves and what the 256 KB inline cap is checked against; not the encoded size inside the raw MIME.
format: int64
type: integer
required:
- index
- size_bytes
- download_url
- expires_at
type: object
Authentication:
additionalProperties: true
properties:
dkim:
description: One result per DKIM signature, in message header order. An unsigned message carries an empty array.
items:
$ref: "#/components/schemas/DKIMResult"
type: array
dmarc:
$ref: "#/components/schemas/DMARCResult"
description: DMARC evaluation of the RFC 5322 Author Domain against aligned SPF and DKIM evidence.
spf:
$ref: "#/components/schemas/SPFResult"
description: SPF evidence for the SMTP peer and RFC 5321 identity.
required:
- spf
- dkim
- dmarc
type: object
ContactDueContact:
additionalProperties: true
properties:
address:
description: The contact's canonical address — identical to the payload's top-level address.
type: string
display_name:
description: The contact's display name; empty string when unset.
type: string
metadata:
additionalProperties: {}
description: The contact's caller-owned metadata, verbatim and uninterpreted. An empty object when the contact carries none.
type: object
required:
- address
- display_name
- metadata
type: object
x-stability-level: beta
ContactDueData:
additionalProperties: true
properties:
address:
description: The contact's canonical address — who the agent owes an action to.
type: string
agent_email:
description: The agent that owns this outreach — its id and address (an agent's id IS its email).
type: string
contact:
$ref: "#/components/schemas/ContactDueContact"
description: The contact's identity, inlined so an agent-scoped consumer needs no account-wide contact read.
last_conversation_id:
description: Conversation id of the most recent exchange with this contact, to continue that thread. Omitted when there is none.
type: string
last_outbound_at:
description: When this agent last sent to the contact. Omitted when it never has.
format: date-time
type: string
next_action_at:
description: The schedule instant that came due — the value set on the engagement, not the time the sweep observed it.
format: date-time
type: string
outbound_count:
description: How many messages this agent has sent to the contact since the engagement was created. Computed at claim time, not a stored counter.
format: int64
type: integer
replied:
description: True when the contact has replied since this agent's first outbound to them.
type: boolean
stage:
description: The caller-owned outreach stage, verbatim. e2a never interprets it; empty when unset.
type: string
required:
- address
- agent_email
- contact
- next_action_at
- outbound_count
- replied
- stage
type: object
x-stability-level: beta
ContactEngagementView:
additionalProperties: true
properties:
address:
type: string
agent_email:
type: string
contact:
$ref: "#/components/schemas/EmbeddedContactView"
created_at:
format: date-time
type: string
first_outbound_at:
description: Server-owned.
format: date-time
type:
- string
- "null"
inbound_count:
description: DMARC-authenticated inbound messages delivered since enrollment. Spoofed, held, blocked, and pre-enrollment messages are excluded. Server-owned.
format: int64
type: integer
last_conversation_id:
description: Server-owned.
type: string
last_inbound_at:
description: Server-owned.
format: date-time
type:
- string
- "null"
last_outbound_at:
description: Server-owned. Include it in the due query (last_outbound_before) so a lost client state-write cannot cause a duplicate send.
format: date-time
type:
- string
- "null"
metadata:
additionalProperties: {}
description: Caller-owned key/value data scoped to this relationship. Opaque to e2a.
type: object
next_action_at:
description: When the caller wants to act next. e2a does not act on it; it drives the outreach query and the contact.due wake-up.
format: date-time
type:
- string
- "null"
outbound_count:
description: Successfully submitted outbound messages since enrollment. Queue failures and pre-enrollment history are excluded. Server-owned.
format: int64
type: integer
replied:
description: Whether this contact has answered since outreach began — computed as last_inbound_at > first_outbound_at, so it means 'replied to us' rather than 'has ever written'. Server-owned.
type: boolean
stage:
description: Caller-defined outreach stage. Opaque to e2a — there is no server-side state machine, and any string is valid.
type: string
suppressed:
description: Whether sends to this address are blocked, by an account-wide or agent-scoped suppression. Server-owned; reflects the same state the send path enforces.
type: boolean
suppression_reason:
description: Free-text detail recorded with the block, when present.
type: string
suppression_source:
description: "Why the block exists, when suppressed. Open set; tolerate unknown values. Known values: unsubscribe, manual, bounce, complaint."
type: string
updated_at:
format: date-time
type: string
required:
- agent_email
- address
- stage
- next_action_at
- metadata
- replied
- suppressed
- first_outbound_at
- last_outbound_at
- last_inbound_at
- outbound_count
- inbound_count
- contact
- created_at
- updated_at
type: object
x-stability-level: beta
ContactImportItemResult:
additionalProperties: true
properties:
address:
description: Canonicalized address. Absent when the row could not be parsed.
type: string
code:
description: "Machine-branchable reason, present for skipped and failed rows. Known values: duplicate_in_batch, already_exists, invalid_recipient, invalid_request, contact_limit_reached."
type: string
enrolled:
description: True when this import created the optional per-agent outreach enrolment for this row. False means no agent was requested or the enrolment already existed.
type: boolean
index:
description: Zero-based position of this row in the submitted contacts array.
format: int64
type: integer
message:
description: Human-readable explanation for a skipped or failed row.
type: string
status:
description: "Outcome for this row. Known values: created, updated, skipped, failed."
type: string
suppressed:
description: True when this address is on a suppression list. The contact is still recorded — suppression is surfaced here so the import count stays honest rather than silently smaller — but sends to it will be refused.
type: boolean
required:
- index
- status
type: object
x-stability-level: beta
ContactImportResult:
additionalProperties: true
properties:
batch_id:
description: Identifier for this import. Pass it to DELETE /v1/contacts/imports/{batch_id} to reverse the upload, or as a filter on the contacts list.
type: string
created:
format: int64
type: integer
failed:
format: int64
type: integer
results:
description: One entry per submitted row, in request order.
items:
$ref: "#/components/schemas/ContactImportItemResult"
type: array
skipped:
format: int64
type: integer
updated:
format: int64
type: integer
required:
- batch_id
- created
- updated
- skipped
- failed
- results
type: object
x-stability-level: beta
ContactImportRow:
additionalProperties: false
properties:
address:
description: Email address. Accepts a bare address or an RFC 5322 mailbox ("A. Partner <partner@fund.vc>"). At most 320 Unicode code points; a longer value fails this row alone with invalid_recipient and does not reject the batch.
type: string
display_name:
description: Optional human-readable name, at most 320 Unicode code points; a longer value fails this row alone with invalid_request and does not reject the batch. Omit it and an existing contact keeps the name it already has — so a narrower re-upload that drops the name column does not erase names. Send an explicit empty string to clear one.
type: string
metadata:
additionalProperties: {}
description: "Optional flat key/value data owned by the caller and stored verbatim; e2a never interprets it. A row that exceeds a bound fails on its own, without affecting the rest of the batch. Bounds, all enforced (400 invalid_request on violation): at most 50 keys; each key at most 128 bytes; each value must be a string, number, boolean, or null — nested objects and arrays are rejected, never flattened; each string value at most 4096 bytes; the whole object at most 16384 bytes once JSON-encoded. The byte-counted limits are UTF-8 octets, so a non-ASCII key or value reaches its limit sooner than its character count suggests."
maxProperties: 50
propertyNames:
maxLength: 128
type: object
required:
- address
type: object
x-stability-level: beta
ContactView:
additionalProperties: true
properties:
address:
description: "Canonical (normalized) email address. This is the resource key: a display-name form such as \"A. Partner <partner@fund.vc>\" and the bare address resolve to the same contact."
type: string
created_at:
format: date-time
type: string
display_name:
description: Human-readable name. May be empty.
type: string
import_batch_id:
description: The import that created this contact, when source is import. Absent otherwise.
type: string
metadata:
additionalProperties: {}
description: Caller-owned key/value data stored on the contact, returned verbatim. e2a never interprets it. An empty object when none is set. Flat objects only; the write-side bounds are published on CreateContactRequest.metadata.
type: object
source:
description: "How this contact first entered the account — provenance, not lifecycle; it never changes after creation. Open set; tolerate unknown values. Known values: import, manual, inbound."
type: string
updated_at:
format: date-time
type: string
required:
- address
- display_name
- metadata
- source
- created_at
- updated_at
type: object
x-stability-level: beta
ConversationDetailView:
additionalProperties: true
properties:
first_message_at:
format: date-time
type: string
has_unread:
type: boolean
id:
type: string
inbound_count:
format: int64
type: integer
labels:
items:
type: string
type: array
last_message_at:
format: date-time
type: string
latest_from:
type: string
latest_subject:
type: string
message_count:
format: int64
type: integer
messages:
items:
$ref: "#/components/schemas/MessageSummaryView"
type: array
outbound_count:
format: int64
type: integer
participants:
items:
type: string
type: array
required:
- participants
- labels
- messages
- id
- last_message_at
- first_message_at
- message_count
- inbound_count
- outbound_count
- has_unread
- latest_subject
- latest_from
type: object
ConversationSummaryView:
additionalProperties: true
properties:
first_message_at:
format: date-time
type: string
has_unread:
type: boolean
id:
type: string
inbound_count:
format: int64
type: integer
last_message_at:
format: date-time
type: string
latest_from:
type: string
latest_subject:
type: string
message_count:
format: int64
type: integer
outbound_count:
format: int64
type: integer
required:
- id
- last_message_at
- first_message_at
- message_count
- inbound_count
- outbound_count
- has_unread
- latest_subject
- latest_from
type: object
CreateAPIKeyRequest:
additionalProperties: false
properties:
agent_email:
description: Inbox email to bind the key to; required when scope=agent.
type: string
expires_at:
description: Optional hard expiry (RFC 3339, must be in the future). Omit for a never-expiring key.
format: date-time
type: string
name:
description: Human label for the key. At most 200 characters (Unicode code points).
maxLength: 200
type: string
scope:
description: account = workspace admin (default); agent = bound to a single inbox.
enum:
- account
- agent
type: string
type: object
CreateAPIKeyResponse:
additionalProperties: true
properties:
agent_email:
description: Bound inbox email for agent-scoped keys; omitted for account scope.
type: string
created_at:
format: date-time
type: string
expires_at:
format: date-time
type: string
id:
type: string
key:
description: The secret key. Shown once; store it now — it cannot be retrieved later.
type: string
key_prefix:
description: Non-secret visible prefix (e.g. e2a_acct_… / e2a_agt_…).
type: string
last_used_at:
format: date-time
type: string
name:
type: string
scope:
description: "account = workspace admin; agent = bound to one inbox. Open set: new values may be added over time, so treat these as strings and tolerate unknown values. Known values: account, agent."
type: string
required:
- key
- id
- name
- key_prefix
- scope
- created_at
type: object
CreateAgentRequest:
additionalProperties: false
properties:
email:
description: The agent's full email address — its identity. At most 320 characters (Unicode code points).