@pidgeon-ai/sdk 1.0.0 → 1.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/dist/index.d.ts CHANGED
@@ -366,12 +366,18 @@ type AgentVerified = {
366
366
  address: string;
367
367
  identity_id: string;
368
368
  sign_in_url: string;
369
+ api_key: string;
370
+ api_key_id: string;
369
371
  };
370
372
  type Identity = {
371
373
  id: string;
372
374
  email: string;
373
375
  local_part: string;
374
376
  domain: string;
377
+ /**
378
+ * Pass this to POST /identities to add another address here.
379
+ */
380
+ domain_id: string;
375
381
  display_name: string | null;
376
382
  /**
377
383
  * human, team, application, workflow or agent.
@@ -462,7 +468,7 @@ type Message = {
462
468
  downloadable: boolean;
463
469
  }>;
464
470
  /**
465
- * The calendar part this message carried, or null. See `prd/calendar.md`.
471
+ * The calendar part this message carried, or null — the invitation, who was asked, and what they answered.
466
472
  */
467
473
  invitation: {
468
474
  method: string | null;
@@ -984,7 +990,7 @@ type Replayed = {
984
990
  status: 'pending';
985
991
  };
986
992
  type Mailbox = {
987
- folder: 'inbox' | 'starred' | 'sent' | 'drafts' | 'scheduled' | 'snoozed' | 'archive' | 'spam' | 'trash';
993
+ folder: 'inbox' | 'starred' | 'sent' | 'drafts' | 'scheduled' | 'snoozed' | 'archive' | 'spam' | 'trash' | 'unauthenticated';
988
994
  /**
989
995
  * Null where the product does not count that folder. Not zero — zero is a claim.
990
996
  */
@@ -1170,7 +1176,13 @@ type Error = {
1170
1176
  };
1171
1177
  type AgentSignUpData = {
1172
1178
  body: {
1179
+ /**
1180
+ * The local part you want on the shared domain.
1181
+ */
1173
1182
  username: string;
1183
+ /**
1184
+ * A person who can be reached. They receive the code that finishes the signup.
1185
+ */
1174
1186
  human_email: string;
1175
1187
  source?: string | null;
1176
1188
  };
@@ -1184,7 +1196,7 @@ type AgentSignUpErrors = {
1184
1196
  */
1185
1197
  401: Error;
1186
1198
  /**
1187
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1199
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1188
1200
  */
1189
1201
  404: Error;
1190
1202
  /**
@@ -1204,7 +1216,13 @@ type AgentSignUpResponses = {
1204
1216
  type AgentSignUpResponse = AgentSignUpResponses[keyof AgentSignUpResponses];
1205
1217
  type AgentAttachHumanData = {
1206
1218
  body: {
1219
+ /**
1220
+ * From the signup this is finishing.
1221
+ */
1207
1222
  signup_id: string;
1223
+ /**
1224
+ * A person who can be reached. They receive the code that finishes the signup.
1225
+ */
1208
1226
  human_email: string;
1209
1227
  };
1210
1228
  path?: never;
@@ -1217,7 +1235,7 @@ type AgentAttachHumanErrors = {
1217
1235
  */
1218
1236
  401: Error;
1219
1237
  /**
1220
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1238
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1221
1239
  */
1222
1240
  404: Error;
1223
1241
  /**
@@ -1237,6 +1255,9 @@ type AgentAttachHumanResponses = {
1237
1255
  type AgentAttachHumanResponse = AgentAttachHumanResponses[keyof AgentAttachHumanResponses];
1238
1256
  type AgentVerifyData = {
1239
1257
  body: {
1258
+ /**
1259
+ * From the signup this is finishing.
1260
+ */
1240
1261
  signup_id: string;
1241
1262
  code: string;
1242
1263
  };
@@ -1250,7 +1271,7 @@ type AgentVerifyErrors = {
1250
1271
  */
1251
1272
  401: Error;
1252
1273
  /**
1253
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1274
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1254
1275
  */
1255
1276
  404: Error;
1256
1277
  /**
@@ -1273,6 +1294,9 @@ type IdentitiesListData = {
1273
1294
  path?: never;
1274
1295
  query?: {
1275
1296
  limit?: number;
1297
+ /**
1298
+ * From a previous page’s `next_cursor`. Opaque — do not parse it.
1299
+ */
1276
1300
  cursor?: string;
1277
1301
  tenant_id?: string;
1278
1302
  };
@@ -1284,7 +1308,7 @@ type IdentitiesListErrors = {
1284
1308
  */
1285
1309
  401: Error;
1286
1310
  /**
1287
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1311
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1288
1312
  */
1289
1313
  404: Error;
1290
1314
  /**
@@ -1309,13 +1333,49 @@ type IdentitiesListResponses = {
1309
1333
  type IdentitiesListResponse = IdentitiesListResponses[keyof IdentitiesListResponses];
1310
1334
  type IdentitiesCreateData = {
1311
1335
  body: {
1312
- domain_id: string;
1313
- local_part: string;
1336
+ /**
1337
+ * From `GET /domains`, or the `domain_id` on any address you already have.
1338
+ */
1339
+ domain_id?: string;
1340
+ /**
1341
+ * A domain name you own, or the shared one. An alternative to `domain_id`.
1342
+ */
1343
+ domain?: string;
1344
+ /**
1345
+ * A whole address — the local part and the domain in one. An alternative to the other two.
1346
+ */
1347
+ address?: string;
1348
+ /**
1349
+ * Everything before the `@`.
1350
+ */
1351
+ local_part?: string;
1352
+ /**
1353
+ * The name a recipient sees beside the address.
1354
+ */
1314
1355
  display_name?: string | null;
1356
+ /**
1357
+ * Whether it keeps mail. With an inbox what arrives is stored and a person can open it; without one it becomes an event and your webhook fires. Defaults from `type`.
1358
+ */
1359
+ inbox?: boolean;
1360
+ /**
1361
+ * A label for what this address is for. It does not change what the address can do — that is `inbox`.
1362
+ */
1315
1363
  type?: 'human' | 'team' | 'application' | 'workflow' | 'agent';
1364
+ /**
1365
+ * Who answers: a person, software, or both.
1366
+ */
1316
1367
  mode?: 'human' | 'automated' | 'hybrid';
1368
+ /**
1369
+ * When it stops accepting mail. Expiry suspends; it never deletes, so the correspondence survives.
1370
+ */
1317
1371
  expires_at?: string | null;
1372
+ /**
1373
+ * Who it may write to. `reply_only` makes an address structurally unable to start a conversation with a stranger.
1374
+ */
1318
1375
  send_policy?: 'open' | 'reply_only' | 'list';
1376
+ /**
1377
+ * Your own opaque grouping — a customer id, whatever your side calls it. Never parsed here.
1378
+ */
1319
1379
  tenant_id?: string | null;
1320
1380
  };
1321
1381
  path?: never;
@@ -1328,7 +1388,7 @@ type IdentitiesCreateErrors = {
1328
1388
  */
1329
1389
  401: Error;
1330
1390
  /**
1331
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1391
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1332
1392
  */
1333
1393
  404: Error;
1334
1394
  /**
@@ -1360,7 +1420,7 @@ type IdentitiesDeleteErrors = {
1360
1420
  */
1361
1421
  401: Error;
1362
1422
  /**
1363
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1423
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1364
1424
  */
1365
1425
  404: Error;
1366
1426
  /**
@@ -1392,7 +1452,7 @@ type IdentitiesGetErrors = {
1392
1452
  */
1393
1453
  401: Error;
1394
1454
  /**
1395
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1455
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1396
1456
  */
1397
1457
  404: Error;
1398
1458
  /**
@@ -1412,14 +1472,29 @@ type IdentitiesGetResponses = {
1412
1472
  type IdentitiesGetResponse = IdentitiesGetResponses[keyof IdentitiesGetResponses];
1413
1473
  type IdentitiesUpdateData = {
1414
1474
  body: {
1475
+ /**
1476
+ * The name a recipient sees beside the address.
1477
+ */
1415
1478
  display_name?: string | null;
1479
+ /**
1480
+ * Who answers: a person, software, or both.
1481
+ */
1416
1482
  mode?: 'human' | 'automated' | 'hybrid';
1417
1483
  capabilities?: {
1418
1484
  [key: string]: boolean;
1419
1485
  };
1420
1486
  status?: 'active' | 'suspended' | 'archived';
1487
+ /**
1488
+ * When it stops accepting mail. Expiry suspends; it never deletes, so the correspondence survives.
1489
+ */
1421
1490
  expires_at?: string | null;
1491
+ /**
1492
+ * Who it may write to. `reply_only` makes an address structurally unable to start a conversation with a stranger.
1493
+ */
1422
1494
  send_policy?: 'open' | 'reply_only' | 'list';
1495
+ /**
1496
+ * Your own opaque grouping — a customer id, whatever your side calls it. Never parsed here.
1497
+ */
1423
1498
  tenant_id?: string | null;
1424
1499
  };
1425
1500
  path: {
@@ -1434,7 +1509,7 @@ type IdentitiesUpdateErrors = {
1434
1509
  */
1435
1510
  401: Error;
1436
1511
  /**
1437
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1512
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1438
1513
  */
1439
1514
  404: Error;
1440
1515
  /**
@@ -1468,7 +1543,7 @@ type IdentitiesAccessDeleteErrors = {
1468
1543
  */
1469
1544
  401: Error;
1470
1545
  /**
1471
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1546
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1472
1547
  */
1473
1548
  404: Error;
1474
1549
  /**
@@ -1500,7 +1575,7 @@ type IdentitiesAccessGetErrors = {
1500
1575
  */
1501
1576
  401: Error;
1502
1577
  /**
1503
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1578
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1504
1579
  */
1505
1580
  404: Error;
1506
1581
  /**
@@ -1523,6 +1598,9 @@ type IdentitiesAccessCreateData = {
1523
1598
  user_id?: string;
1524
1599
  api_key_id?: string;
1525
1600
  everyone?: true;
1601
+ /**
1602
+ * What a key may do. Give an agent the narrowest one that works.
1603
+ */
1526
1604
  access: 'read' | 'send' | 'admin';
1527
1605
  };
1528
1606
  path: {
@@ -1537,7 +1615,7 @@ type IdentitiesAccessCreateErrors = {
1537
1615
  */
1538
1616
  401: Error;
1539
1617
  /**
1540
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1618
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1541
1619
  */
1542
1620
  404: Error;
1543
1621
  /**
@@ -1571,7 +1649,7 @@ type IdentitiesSendRulesDeleteErrors = {
1571
1649
  */
1572
1650
  401: Error;
1573
1651
  /**
1574
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1652
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1575
1653
  */
1576
1654
  404: Error;
1577
1655
  /**
@@ -1603,7 +1681,7 @@ type IdentitiesSendRulesGetErrors = {
1603
1681
  */
1604
1682
  401: Error;
1605
1683
  /**
1606
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1684
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1607
1685
  */
1608
1686
  404: Error;
1609
1687
  /**
@@ -1638,7 +1716,7 @@ type IdentitiesSendRulesCreateErrors = {
1638
1716
  */
1639
1717
  401: Error;
1640
1718
  /**
1641
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1719
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1642
1720
  */
1643
1721
  404: Error;
1644
1722
  /**
@@ -1672,7 +1750,7 @@ type IdentitiesReceiveRulesDeleteErrors = {
1672
1750
  */
1673
1751
  401: Error;
1674
1752
  /**
1675
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1753
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1676
1754
  */
1677
1755
  404: Error;
1678
1756
  /**
@@ -1704,7 +1782,7 @@ type IdentitiesReceiveRulesGetErrors = {
1704
1782
  */
1705
1783
  401: Error;
1706
1784
  /**
1707
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1785
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1708
1786
  */
1709
1787
  404: Error;
1710
1788
  /**
@@ -1739,7 +1817,7 @@ type IdentitiesReceiveRulesCreateErrors = {
1739
1817
  */
1740
1818
  401: Error;
1741
1819
  /**
1742
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1820
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1743
1821
  */
1744
1822
  404: Error;
1745
1823
  /**
@@ -1774,7 +1852,7 @@ type IdentitiesSuspendTenantErrors = {
1774
1852
  */
1775
1853
  401: Error;
1776
1854
  /**
1777
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1855
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1778
1856
  */
1779
1857
  404: Error;
1780
1858
  /**
@@ -1806,7 +1884,7 @@ type LabelsListErrors = {
1806
1884
  */
1807
1885
  401: Error;
1808
1886
  /**
1809
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1887
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1810
1888
  */
1811
1889
  404: Error;
1812
1890
  /**
@@ -1831,6 +1909,9 @@ type LabelsListResponses = {
1831
1909
  type LabelsListResponse = LabelsListResponses[keyof LabelsListResponses];
1832
1910
  type LabelsCreateData = {
1833
1911
  body: {
1912
+ /**
1913
+ * The address this belongs to.
1914
+ */
1834
1915
  identity_id: string;
1835
1916
  name: string;
1836
1917
  colour?: string;
@@ -1845,7 +1926,7 @@ type LabelsCreateErrors = {
1845
1926
  */
1846
1927
  401: Error;
1847
1928
  /**
1848
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1929
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1849
1930
  */
1850
1931
  404: Error;
1851
1932
  /**
@@ -1877,7 +1958,7 @@ type LabelsDeleteErrors = {
1877
1958
  */
1878
1959
  401: Error;
1879
1960
  /**
1880
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1961
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1881
1962
  */
1882
1963
  404: Error;
1883
1964
  /**
@@ -1912,7 +1993,7 @@ type LabelsUpdateErrors = {
1912
1993
  */
1913
1994
  401: Error;
1914
1995
  /**
1915
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
1996
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1916
1997
  */
1917
1998
  404: Error;
1918
1999
  /**
@@ -1946,7 +2027,7 @@ type ThreadsLabelsDeleteErrors = {
1946
2027
  */
1947
2028
  401: Error;
1948
2029
  /**
1949
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2030
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1950
2031
  */
1951
2032
  404: Error;
1952
2033
  /**
@@ -1978,7 +2059,7 @@ type ThreadsLabelsGetErrors = {
1978
2059
  */
1979
2060
  401: Error;
1980
2061
  /**
1981
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2062
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
1982
2063
  */
1983
2064
  404: Error;
1984
2065
  /**
@@ -2017,7 +2098,7 @@ type ThreadsLabelsCreateErrors = {
2017
2098
  */
2018
2099
  401: Error;
2019
2100
  /**
2020
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2101
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2021
2102
  */
2022
2103
  404: Error;
2023
2104
  /**
@@ -2045,6 +2126,9 @@ type MessagesListInThreadData = {
2045
2126
  path?: never;
2046
2127
  query: {
2047
2128
  limit?: number;
2129
+ /**
2130
+ * From a previous page’s `next_cursor`. Opaque — do not parse it.
2131
+ */
2048
2132
  cursor?: string;
2049
2133
  thread_id: string;
2050
2134
  };
@@ -2056,7 +2140,7 @@ type MessagesListInThreadErrors = {
2056
2140
  */
2057
2141
  401: Error;
2058
2142
  /**
2059
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2143
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2060
2144
  */
2061
2145
  404: Error;
2062
2146
  /**
@@ -2081,14 +2165,41 @@ type MessagesListInThreadResponses = {
2081
2165
  type MessagesListInThreadResponse = MessagesListInThreadResponses[keyof MessagesListInThreadResponses];
2082
2166
  type MessagesSendData = {
2083
2167
  body: {
2168
+ /**
2169
+ * An address on a domain you own, and one this key may send from.
2170
+ */
2084
2171
  from: string;
2172
+ /**
2173
+ * One address or several. A string is accepted for the single case.
2174
+ */
2085
2175
  to: string | Array<string>;
2176
+ /**
2177
+ * Copied, and visible to everybody who receives the message.
2178
+ */
2086
2179
  cc?: string | Array<string>;
2180
+ /**
2181
+ * Copied, and visible to nobody else.
2182
+ */
2087
2183
  bcc?: string | Array<string>;
2184
+ /**
2185
+ * Left off a reply, where the thread already has one.
2186
+ */
2088
2187
  subject?: string;
2188
+ /**
2189
+ * The plain-text body. Send this even when you send `html` — some clients only read it.
2190
+ */
2089
2191
  text?: string;
2192
+ /**
2193
+ * The rich body. Sanitised on the way in; scripts and remote content are removed.
2194
+ */
2090
2195
  html?: string;
2196
+ /**
2197
+ * Ids from `POST /attachments`, uploaded before the message that carries them. Up to 20.
2198
+ */
2091
2199
  attachment_ids?: Array<string>;
2200
+ /**
2201
+ * The message being answered. Keeps the conversation together in the recipient’s client too.
2202
+ */
2092
2203
  in_reply_to?: string | null;
2093
2204
  };
2094
2205
  path?: never;
@@ -2101,7 +2212,7 @@ type MessagesSendErrors = {
2101
2212
  */
2102
2213
  401: Error;
2103
2214
  /**
2104
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2215
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2105
2216
  */
2106
2217
  404: Error;
2107
2218
  /**
@@ -2112,10 +2223,10 @@ type MessagesSendErrors = {
2112
2223
  type MessagesSendError = MessagesSendErrors[keyof MessagesSendErrors];
2113
2224
  type MessagesSendResponses = {
2114
2225
  /**
2115
- * The sent message.
2226
+ * Accepted.
2116
2227
  */
2117
- 201: {
2118
- data: Message;
2228
+ 202: {
2229
+ data: Sent;
2119
2230
  };
2120
2231
  };
2121
2232
  type MessagesSendResponse = MessagesSendResponses[keyof MessagesSendResponses];
@@ -2125,7 +2236,7 @@ type MessagesSearchData = {
2125
2236
  query: {
2126
2237
  identity_id: string;
2127
2238
  q?: string;
2128
- in?: 'inbox' | 'starred' | 'sent' | 'drafts' | 'scheduled' | 'snoozed' | 'archive' | 'spam' | 'trash';
2239
+ in?: 'inbox' | 'starred' | 'sent' | 'drafts' | 'scheduled' | 'snoozed' | 'archive' | 'spam' | 'trash' | 'unauthenticated';
2129
2240
  from?: string;
2130
2241
  to?: string;
2131
2242
  has_attachment?: string;
@@ -2142,7 +2253,7 @@ type MessagesSearchErrors = {
2142
2253
  */
2143
2254
  401: Error;
2144
2255
  /**
2145
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2256
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2146
2257
  */
2147
2258
  404: Error;
2148
2259
  /**
@@ -2180,7 +2291,7 @@ type MessagesActErrors = {
2180
2291
  */
2181
2292
  401: Error;
2182
2293
  /**
2183
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2294
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2184
2295
  */
2185
2296
  404: Error;
2186
2297
  /**
@@ -2212,7 +2323,7 @@ type MessagesUndoErrors = {
2212
2323
  */
2213
2324
  401: Error;
2214
2325
  /**
2215
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2326
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2216
2327
  */
2217
2328
  404: Error;
2218
2329
  /**
@@ -2244,7 +2355,7 @@ type MessagesGetErrors = {
2244
2355
  */
2245
2356
  401: Error;
2246
2357
  /**
2247
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2358
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2248
2359
  */
2249
2360
  404: Error;
2250
2361
  /**
@@ -2280,7 +2391,7 @@ type MessagesUpdateErrors = {
2280
2391
  */
2281
2392
  401: Error;
2282
2393
  /**
2283
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2394
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2284
2395
  */
2285
2396
  404: Error;
2286
2397
  /**
@@ -2300,11 +2411,29 @@ type MessagesUpdateResponses = {
2300
2411
  type MessagesUpdateResponse = MessagesUpdateResponses[keyof MessagesUpdateResponses];
2301
2412
  type MessagesReplyData = {
2302
2413
  body: {
2414
+ /**
2415
+ * The plain-text body. Send this even when you send `html` — some clients only read it.
2416
+ */
2303
2417
  text?: string;
2418
+ /**
2419
+ * The rich body. Sanitised on the way in; scripts and remote content are removed.
2420
+ */
2304
2421
  html?: string;
2422
+ /**
2423
+ * One address or several. A string is accepted for the single case.
2424
+ */
2305
2425
  to?: Array<string>;
2426
+ /**
2427
+ * Copied, and visible to everybody who receives the message.
2428
+ */
2306
2429
  cc?: Array<string>;
2430
+ /**
2431
+ * Copied, and visible to nobody else.
2432
+ */
2307
2433
  bcc?: Array<string>;
2434
+ /**
2435
+ * Ids from `POST /attachments`, uploaded before the message that carries them. Up to 20.
2436
+ */
2308
2437
  attachment_ids?: Array<string>;
2309
2438
  };
2310
2439
  path: {
@@ -2319,7 +2448,7 @@ type MessagesReplyErrors = {
2319
2448
  */
2320
2449
  401: Error;
2321
2450
  /**
2322
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2451
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2323
2452
  */
2324
2453
  404: Error;
2325
2454
  /**
@@ -2339,11 +2468,29 @@ type MessagesReplyResponses = {
2339
2468
  type MessagesReplyResponse = MessagesReplyResponses[keyof MessagesReplyResponses];
2340
2469
  type MessagesReplyAllData = {
2341
2470
  body: {
2471
+ /**
2472
+ * The plain-text body. Send this even when you send `html` — some clients only read it.
2473
+ */
2342
2474
  text?: string;
2475
+ /**
2476
+ * The rich body. Sanitised on the way in; scripts and remote content are removed.
2477
+ */
2343
2478
  html?: string;
2479
+ /**
2480
+ * One address or several. A string is accepted for the single case.
2481
+ */
2344
2482
  to?: Array<string>;
2483
+ /**
2484
+ * Copied, and visible to everybody who receives the message.
2485
+ */
2345
2486
  cc?: Array<string>;
2487
+ /**
2488
+ * Copied, and visible to nobody else.
2489
+ */
2346
2490
  bcc?: Array<string>;
2491
+ /**
2492
+ * Ids from `POST /attachments`, uploaded before the message that carries them. Up to 20.
2493
+ */
2347
2494
  attachment_ids?: Array<string>;
2348
2495
  };
2349
2496
  path: {
@@ -2358,7 +2505,7 @@ type MessagesReplyAllErrors = {
2358
2505
  */
2359
2506
  401: Error;
2360
2507
  /**
2361
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2508
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2362
2509
  */
2363
2510
  404: Error;
2364
2511
  /**
@@ -2378,11 +2525,29 @@ type MessagesReplyAllResponses = {
2378
2525
  type MessagesReplyAllResponse = MessagesReplyAllResponses[keyof MessagesReplyAllResponses];
2379
2526
  type MessagesForwardData = {
2380
2527
  body: {
2528
+ /**
2529
+ * The plain-text body. Send this even when you send `html` — some clients only read it.
2530
+ */
2381
2531
  text?: string;
2532
+ /**
2533
+ * The rich body. Sanitised on the way in; scripts and remote content are removed.
2534
+ */
2382
2535
  html?: string;
2536
+ /**
2537
+ * One address or several. A string is accepted for the single case.
2538
+ */
2383
2539
  to?: Array<string>;
2540
+ /**
2541
+ * Copied, and visible to everybody who receives the message.
2542
+ */
2384
2543
  cc?: Array<string>;
2544
+ /**
2545
+ * Copied, and visible to nobody else.
2546
+ */
2385
2547
  bcc?: Array<string>;
2548
+ /**
2549
+ * Ids from `POST /attachments`, uploaded before the message that carries them. Up to 20.
2550
+ */
2386
2551
  attachment_ids?: Array<string>;
2387
2552
  };
2388
2553
  path: {
@@ -2397,7 +2562,7 @@ type MessagesForwardErrors = {
2397
2562
  */
2398
2563
  401: Error;
2399
2564
  /**
2400
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2565
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2401
2566
  */
2402
2567
  404: Error;
2403
2568
  /**
@@ -2429,7 +2594,7 @@ type MessagesRawErrors = {
2429
2594
  */
2430
2595
  401: Error;
2431
2596
  /**
2432
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2597
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2433
2598
  */
2434
2599
  404: Error;
2435
2600
  /**
@@ -2450,7 +2615,17 @@ type ThreadsListData = {
2450
2615
  path?: never;
2451
2616
  query?: {
2452
2617
  limit?: number;
2618
+ /**
2619
+ * From a previous page’s `next_cursor`. Opaque — do not parse it.
2620
+ */
2453
2621
  cursor?: string;
2622
+ identity_id?: string;
2623
+ status?: 'open' | 'waiting' | 'resolved' | 'human_review';
2624
+ owner_type?: 'human' | 'automation' | 'agent';
2625
+ /**
2626
+ * A person’s id, or `unassigned` for the queue nobody has taken.
2627
+ */
2628
+ assignee_id?: string | 'unassigned';
2454
2629
  };
2455
2630
  url: '/threads';
2456
2631
  };
@@ -2460,7 +2635,7 @@ type ThreadsListErrors = {
2460
2635
  */
2461
2636
  401: Error;
2462
2637
  /**
2463
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2638
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2464
2639
  */
2465
2640
  404: Error;
2466
2641
  /**
@@ -2497,7 +2672,7 @@ type ThreadsGetErrors = {
2497
2672
  */
2498
2673
  401: Error;
2499
2674
  /**
2500
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2675
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2501
2676
  */
2502
2677
  404: Error;
2503
2678
  /**
@@ -2533,7 +2708,7 @@ type ThreadsUpdateErrors = {
2533
2708
  */
2534
2709
  401: Error;
2535
2710
  /**
2536
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2711
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2537
2712
  */
2538
2713
  404: Error;
2539
2714
  /**
@@ -2556,6 +2731,9 @@ type DomainsListData = {
2556
2731
  path?: never;
2557
2732
  query?: {
2558
2733
  limit?: number;
2734
+ /**
2735
+ * From a previous page’s `next_cursor`. Opaque — do not parse it.
2736
+ */
2559
2737
  cursor?: string;
2560
2738
  };
2561
2739
  url: '/domains';
@@ -2566,7 +2744,7 @@ type DomainsListErrors = {
2566
2744
  */
2567
2745
  401: Error;
2568
2746
  /**
2569
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2747
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2570
2748
  */
2571
2749
  404: Error;
2572
2750
  /**
@@ -2591,6 +2769,9 @@ type DomainsListResponses = {
2591
2769
  type DomainsListResponse = DomainsListResponses[keyof DomainsListResponses];
2592
2770
  type DomainsCreateData = {
2593
2771
  body: {
2772
+ /**
2773
+ * A domain name you own, or the shared one. An alternative to `domain_id`.
2774
+ */
2594
2775
  domain: string;
2595
2776
  };
2596
2777
  path?: never;
@@ -2603,7 +2784,7 @@ type DomainsCreateErrors = {
2603
2784
  */
2604
2785
  401: Error;
2605
2786
  /**
2606
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2787
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2607
2788
  */
2608
2789
  404: Error;
2609
2790
  /**
@@ -2635,7 +2816,7 @@ type DomainsZoneFileErrors = {
2635
2816
  */
2636
2817
  401: Error;
2637
2818
  /**
2638
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2819
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2639
2820
  */
2640
2821
  404: Error;
2641
2822
  /**
@@ -2670,7 +2851,7 @@ type DomainsGetSetupLinkErrors = {
2670
2851
  */
2671
2852
  401: Error;
2672
2853
  /**
2673
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2854
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2674
2855
  */
2675
2856
  404: Error;
2676
2857
  /**
@@ -2702,7 +2883,7 @@ type DomainsVerifyErrors = {
2702
2883
  */
2703
2884
  401: Error;
2704
2885
  /**
2705
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2886
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2706
2887
  */
2707
2888
  404: Error;
2708
2889
  /**
@@ -2734,7 +2915,7 @@ type DomainsDeleteErrors = {
2734
2915
  */
2735
2916
  401: Error;
2736
2917
  /**
2737
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2918
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2738
2919
  */
2739
2920
  404: Error;
2740
2921
  /**
@@ -2766,7 +2947,7 @@ type DomainsGetErrors = {
2766
2947
  */
2767
2948
  401: Error;
2768
2949
  /**
2769
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2950
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2770
2951
  */
2771
2952
  404: Error;
2772
2953
  /**
@@ -2800,7 +2981,7 @@ type DomainsUpdateErrors = {
2800
2981
  */
2801
2982
  401: Error;
2802
2983
  /**
2803
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
2984
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2804
2985
  */
2805
2986
  404: Error;
2806
2987
  /**
@@ -2832,7 +3013,7 @@ type RoutingListErrors = {
2832
3013
  */
2833
3014
  401: Error;
2834
3015
  /**
2835
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3016
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2836
3017
  */
2837
3018
  404: Error;
2838
3019
  /**
@@ -2884,7 +3065,7 @@ type RoutingCreateErrors = {
2884
3065
  */
2885
3066
  401: Error;
2886
3067
  /**
2887
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3068
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2888
3069
  */
2889
3070
  404: Error;
2890
3071
  /**
@@ -2916,7 +3097,7 @@ type RoutingDeleteErrors = {
2916
3097
  */
2917
3098
  401: Error;
2918
3099
  /**
2919
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3100
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2920
3101
  */
2921
3102
  404: Error;
2922
3103
  /**
@@ -2950,7 +3131,7 @@ type RoutingUpdateErrors = {
2950
3131
  */
2951
3132
  401: Error;
2952
3133
  /**
2953
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3134
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2954
3135
  */
2955
3136
  404: Error;
2956
3137
  /**
@@ -2982,7 +3163,7 @@ type MailboxesListErrors = {
2982
3163
  */
2983
3164
  401: Error;
2984
3165
  /**
2985
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3166
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
2986
3167
  */
2987
3168
  404: Error;
2988
3169
  /**
@@ -3021,7 +3202,7 @@ type MailboxesChangesErrors = {
3021
3202
  */
3022
3203
  401: Error;
3023
3204
  /**
3024
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3205
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3025
3206
  */
3026
3207
  404: Error;
3027
3208
  /**
@@ -3060,7 +3241,7 @@ type MailboxesEmptyTrashErrors = {
3060
3241
  */
3061
3242
  401: Error;
3062
3243
  /**
3063
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3244
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3064
3245
  */
3065
3246
  404: Error;
3066
3247
  /**
@@ -3086,6 +3267,9 @@ type MailboxesListFolderData = {
3086
3267
  query: {
3087
3268
  identity_id: string;
3088
3269
  limit?: number;
3270
+ /**
3271
+ * From a previous page’s `next_cursor`. Opaque — do not parse it.
3272
+ */
3089
3273
  cursor?: string;
3090
3274
  label_id?: string;
3091
3275
  };
@@ -3097,7 +3281,7 @@ type MailboxesListFolderErrors = {
3097
3281
  */
3098
3282
  401: Error;
3099
3283
  /**
3100
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3284
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3101
3285
  */
3102
3286
  404: Error;
3103
3287
  /**
@@ -3132,7 +3316,7 @@ type KeysListErrors = {
3132
3316
  */
3133
3317
  401: Error;
3134
3318
  /**
3135
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3319
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3136
3320
  */
3137
3321
  404: Error;
3138
3322
  /**
@@ -3159,7 +3343,13 @@ type KeysCreateData = {
3159
3343
  body: {
3160
3344
  name: string;
3161
3345
  identity_ids: Array<string>;
3346
+ /**
3347
+ * What a key may do. Give an agent the narrowest one that works.
3348
+ */
3162
3349
  access?: 'read' | 'send' | 'admin';
3350
+ /**
3351
+ * When it stops accepting mail. Expiry suspends; it never deletes, so the correspondence survives.
3352
+ */
3163
3353
  expires_at?: string | null;
3164
3354
  };
3165
3355
  path?: never;
@@ -3172,7 +3362,7 @@ type KeysCreateErrors = {
3172
3362
  */
3173
3363
  401: Error;
3174
3364
  /**
3175
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3365
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3176
3366
  */
3177
3367
  404: Error;
3178
3368
  /**
@@ -3204,7 +3394,7 @@ type KeysRevokeErrors = {
3204
3394
  */
3205
3395
  401: Error;
3206
3396
  /**
3207
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3397
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3208
3398
  */
3209
3399
  404: Error;
3210
3400
  /**
@@ -3236,7 +3426,7 @@ type KeysGetErrors = {
3236
3426
  */
3237
3427
  401: Error;
3238
3428
  /**
3239
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3429
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3240
3430
  */
3241
3431
  404: Error;
3242
3432
  /**
@@ -3270,7 +3460,7 @@ type KeysUpdateErrors = {
3270
3460
  */
3271
3461
  401: Error;
3272
3462
  /**
3273
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3463
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3274
3464
  */
3275
3465
  404: Error;
3276
3466
  /**
@@ -3302,7 +3492,7 @@ type AppPasswordsListErrors = {
3302
3492
  */
3303
3493
  401: Error;
3304
3494
  /**
3305
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3495
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3306
3496
  */
3307
3497
  404: Error;
3308
3498
  /**
@@ -3327,6 +3517,9 @@ type AppPasswordsListResponses = {
3327
3517
  type AppPasswordsListResponse = AppPasswordsListResponses[keyof AppPasswordsListResponses];
3328
3518
  type AppPasswordsCreateData = {
3329
3519
  body: {
3520
+ /**
3521
+ * The address this belongs to.
3522
+ */
3330
3523
  identity_id: string;
3331
3524
  name: string;
3332
3525
  };
@@ -3340,7 +3533,7 @@ type AppPasswordsCreateErrors = {
3340
3533
  */
3341
3534
  401: Error;
3342
3535
  /**
3343
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3536
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3344
3537
  */
3345
3538
  404: Error;
3346
3539
  /**
@@ -3372,7 +3565,7 @@ type AppPasswordsRevokeErrors = {
3372
3565
  */
3373
3566
  401: Error;
3374
3567
  /**
3375
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3568
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3376
3569
  */
3377
3570
  404: Error;
3378
3571
  /**
@@ -3402,7 +3595,7 @@ type WorkspaceGetErrors = {
3402
3595
  */
3403
3596
  401: Error;
3404
3597
  /**
3405
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3598
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3406
3599
  */
3407
3600
  404: Error;
3408
3601
  /**
@@ -3432,7 +3625,7 @@ type WorkspaceMembersErrors = {
3432
3625
  */
3433
3626
  401: Error;
3434
3627
  /**
3435
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3628
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3436
3629
  */
3437
3630
  404: Error;
3438
3631
  /**
@@ -3460,6 +3653,9 @@ type EventsListData = {
3460
3653
  path?: never;
3461
3654
  query?: {
3462
3655
  limit?: number;
3656
+ /**
3657
+ * From a previous page’s `next_cursor`. Opaque — do not parse it.
3658
+ */
3463
3659
  cursor?: string;
3464
3660
  type?: string;
3465
3661
  identity_id?: string;
@@ -3473,7 +3669,7 @@ type EventsListErrors = {
3473
3669
  */
3474
3670
  401: Error;
3475
3671
  /**
3476
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3672
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3477
3673
  */
3478
3674
  404: Error;
3479
3675
  /**
@@ -3510,7 +3706,7 @@ type EventsGetErrors = {
3510
3706
  */
3511
3707
  401: Error;
3512
3708
  /**
3513
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3709
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3514
3710
  */
3515
3711
  404: Error;
3516
3712
  /**
@@ -3533,6 +3729,9 @@ type WebhooksListData = {
3533
3729
  path?: never;
3534
3730
  query?: {
3535
3731
  limit?: number;
3732
+ /**
3733
+ * From a previous page’s `next_cursor`. Opaque — do not parse it.
3734
+ */
3536
3735
  cursor?: string;
3537
3736
  };
3538
3737
  url: '/webhooks';
@@ -3543,7 +3742,7 @@ type WebhooksListErrors = {
3543
3742
  */
3544
3743
  401: Error;
3545
3744
  /**
3546
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3745
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3547
3746
  */
3548
3747
  404: Error;
3549
3748
  /**
@@ -3568,7 +3767,13 @@ type WebhooksListResponses = {
3568
3767
  type WebhooksListResponse = WebhooksListResponses[keyof WebhooksListResponses];
3569
3768
  type WebhooksCreateData = {
3570
3769
  body: {
3770
+ /**
3771
+ * Where we POST. HTTPS, and it has to answer within a few seconds.
3772
+ */
3571
3773
  url: string;
3774
+ /**
3775
+ * The address this belongs to.
3776
+ */
3572
3777
  identity_id?: string | null;
3573
3778
  event_types?: Array<'message.received' | 'message.sent' | 'message.delivered' | 'message.bounced' | 'message.rejected' | 'message.complained' | 'message.spam' | 'message.invitation' | 'message.archived' | 'message.deleted' | 'calendar.event.created' | 'calendar.event.updated' | 'calendar.event.deleted' | 'calendar.event.starting' | 'calendar.event.ending' | 'calendar.event.responded' | 'thread.created' | 'thread.updated' | 'thread.assigned' | 'thread.unassigned' | 'identity.created' | 'identity.updated' | 'identity.suspended' | 'identity.transferred' | 'domain.verified'>;
3574
3779
  };
@@ -3582,7 +3787,7 @@ type WebhooksCreateErrors = {
3582
3787
  */
3583
3788
  401: Error;
3584
3789
  /**
3585
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3790
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3586
3791
  */
3587
3792
  404: Error;
3588
3793
  /**
@@ -3614,7 +3819,7 @@ type WebhooksDeleteErrors = {
3614
3819
  */
3615
3820
  401: Error;
3616
3821
  /**
3617
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3822
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3618
3823
  */
3619
3824
  404: Error;
3620
3825
  /**
@@ -3646,7 +3851,7 @@ type WebhooksGetErrors = {
3646
3851
  */
3647
3852
  401: Error;
3648
3853
  /**
3649
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3854
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3650
3855
  */
3651
3856
  404: Error;
3652
3857
  /**
@@ -3680,7 +3885,7 @@ type WebhooksUpdateErrors = {
3680
3885
  */
3681
3886
  401: Error;
3682
3887
  /**
3683
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3888
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3684
3889
  */
3685
3890
  404: Error;
3686
3891
  /**
@@ -3712,7 +3917,7 @@ type WebhooksGetHeadersErrors = {
3712
3917
  */
3713
3918
  401: Error;
3714
3919
  /**
3715
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3920
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3716
3921
  */
3717
3922
  404: Error;
3718
3923
  /**
@@ -3748,7 +3953,7 @@ type WebhooksUpdateHeadersErrors = {
3748
3953
  */
3749
3954
  401: Error;
3750
3955
  /**
3751
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3956
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3752
3957
  */
3753
3958
  404: Error;
3754
3959
  /**
@@ -3781,7 +3986,7 @@ type WebhooksDeliveriesErrors = {
3781
3986
  */
3782
3987
  401: Error;
3783
3988
  /**
3784
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
3989
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3785
3990
  */
3786
3991
  404: Error;
3787
3992
  /**
@@ -3818,7 +4023,7 @@ type WebhooksReplayErrors = {
3818
4023
  */
3819
4024
  401: Error;
3820
4025
  /**
3821
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4026
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3822
4027
  */
3823
4028
  404: Error;
3824
4029
  /**
@@ -3853,7 +4058,7 @@ type MessagesRespondToInvitationErrors = {
3853
4058
  */
3854
4059
  401: Error;
3855
4060
  /**
3856
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4061
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3857
4062
  */
3858
4063
  404: Error;
3859
4064
  /**
@@ -3891,7 +4096,7 @@ type CalendarGetErrors = {
3891
4096
  */
3892
4097
  401: Error;
3893
4098
  /**
3894
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4099
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3895
4100
  */
3896
4101
  404: Error;
3897
4102
  /**
@@ -3911,6 +4116,9 @@ type CalendarGetResponses = {
3911
4116
  type CalendarGetResponse = CalendarGetResponses[keyof CalendarGetResponses];
3912
4117
  type CalendarUpdateData = {
3913
4118
  body: {
4119
+ /**
4120
+ * An IANA name, like `Europe/Lisbon`. The times above are read in it.
4121
+ */
3914
4122
  timezone: string;
3915
4123
  };
3916
4124
  headers?: {
@@ -3931,7 +4139,7 @@ type CalendarUpdateErrors = {
3931
4139
  */
3932
4140
  401: Error;
3933
4141
  /**
3934
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4142
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3935
4143
  */
3936
4144
  404: Error;
3937
4145
  /**
@@ -3956,6 +4164,9 @@ type CalendarListEventsData = {
3956
4164
  };
3957
4165
  query?: {
3958
4166
  limit?: number;
4167
+ /**
4168
+ * From a previous page’s `next_cursor`. Opaque — do not parse it.
4169
+ */
3959
4170
  cursor?: string;
3960
4171
  };
3961
4172
  url: '/identities/{id}/calendar/events';
@@ -3966,7 +4177,7 @@ type CalendarListEventsErrors = {
3966
4177
  */
3967
4178
  401: Error;
3968
4179
  /**
3969
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4180
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
3970
4181
  */
3971
4182
  404: Error;
3972
4183
  /**
@@ -3994,6 +4205,9 @@ type CalendarCreateEventData = {
3994
4205
  title: string;
3995
4206
  start: string;
3996
4207
  end: string;
4208
+ /**
4209
+ * An IANA name, like `Europe/Lisbon`. The times above are read in it.
4210
+ */
3997
4211
  timezone?: string | null;
3998
4212
  all_day?: boolean;
3999
4213
  description?: string | null;
@@ -4025,7 +4239,7 @@ type CalendarCreateEventErrors = {
4025
4239
  */
4026
4240
  401: Error;
4027
4241
  /**
4028
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4242
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4029
4243
  */
4030
4244
  404: Error;
4031
4245
  /**
@@ -4068,7 +4282,7 @@ type CalendarRespondToEventErrors = {
4068
4282
  */
4069
4283
  401: Error;
4070
4284
  /**
4071
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4285
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4072
4286
  */
4073
4287
  404: Error;
4074
4288
  /**
@@ -4105,7 +4319,7 @@ type CalendarListEventInstancesErrors = {
4105
4319
  */
4106
4320
  401: Error;
4107
4321
  /**
4108
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4322
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4109
4323
  */
4110
4324
  404: Error;
4111
4325
  /**
@@ -4147,7 +4361,7 @@ type CalendarGetAgendaErrors = {
4147
4361
  */
4148
4362
  401: Error;
4149
4363
  /**
4150
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4364
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4151
4365
  */
4152
4366
  404: Error;
4153
4367
  /**
@@ -4196,7 +4410,7 @@ type CalendarDeleteEventErrors = {
4196
4410
  */
4197
4411
  401: Error;
4198
4412
  /**
4199
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4413
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4200
4414
  */
4201
4415
  404: Error;
4202
4416
  /**
@@ -4229,7 +4443,7 @@ type CalendarGetEventErrors = {
4229
4443
  */
4230
4444
  401: Error;
4231
4445
  /**
4232
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4446
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4233
4447
  */
4234
4448
  404: Error;
4235
4449
  /**
@@ -4252,6 +4466,9 @@ type CalendarUpdateEventData = {
4252
4466
  title?: string;
4253
4467
  start?: string;
4254
4468
  end?: string;
4469
+ /**
4470
+ * An IANA name, like `Europe/Lisbon`. The times above are read in it.
4471
+ */
4255
4472
  timezone?: string;
4256
4473
  all_day?: boolean;
4257
4474
  description?: string | null;
@@ -4295,7 +4512,7 @@ type CalendarUpdateEventErrors = {
4295
4512
  */
4296
4513
  401: Error;
4297
4514
  /**
4298
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4515
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4299
4516
  */
4300
4517
  404: Error;
4301
4518
  /**
@@ -4328,7 +4545,7 @@ type DraftsListErrors = {
4328
4545
  */
4329
4546
  401: Error;
4330
4547
  /**
4331
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4548
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4332
4549
  */
4333
4550
  404: Error;
4334
4551
  /**
@@ -4353,14 +4570,38 @@ type DraftsListResponses = {
4353
4570
  type DraftsListResponse = DraftsListResponses[keyof DraftsListResponses];
4354
4571
  type DraftsCreateData = {
4355
4572
  body: {
4573
+ /**
4574
+ * The address this belongs to.
4575
+ */
4356
4576
  identity_id: string;
4577
+ /**
4578
+ * An address on a domain you own, and one this key may send from.
4579
+ */
4357
4580
  from?: string;
4581
+ /**
4582
+ * One address or several. A string is accepted for the single case.
4583
+ */
4358
4584
  to?: Array<string>;
4585
+ /**
4586
+ * Copied, and visible to everybody who receives the message.
4587
+ */
4359
4588
  cc?: Array<string>;
4589
+ /**
4590
+ * Copied, and visible to nobody else.
4591
+ */
4360
4592
  bcc?: Array<string>;
4593
+ /**
4594
+ * Left off a reply, where the thread already has one.
4595
+ */
4361
4596
  subject?: string | null;
4597
+ /**
4598
+ * The plain-text body. Send this even when you send `html` — some clients only read it.
4599
+ */
4362
4600
  text?: string | null;
4363
4601
  in_reply_to_message_id?: string | null;
4602
+ /**
4603
+ * Ids from `POST /attachments`, uploaded before the message that carries them. Up to 20.
4604
+ */
4364
4605
  attachment_ids?: Array<string>;
4365
4606
  };
4366
4607
  path?: never;
@@ -4373,7 +4614,7 @@ type DraftsCreateErrors = {
4373
4614
  */
4374
4615
  401: Error;
4375
4616
  /**
4376
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4617
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4377
4618
  */
4378
4619
  404: Error;
4379
4620
  /**
@@ -4405,7 +4646,7 @@ type DraftsDeleteErrors = {
4405
4646
  */
4406
4647
  401: Error;
4407
4648
  /**
4408
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4649
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4409
4650
  */
4410
4651
  404: Error;
4411
4652
  /**
@@ -4437,7 +4678,7 @@ type DraftsGetErrors = {
4437
4678
  */
4438
4679
  401: Error;
4439
4680
  /**
4440
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4681
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4441
4682
  */
4442
4683
  404: Error;
4443
4684
  /**
@@ -4457,12 +4698,33 @@ type DraftsGetResponses = {
4457
4698
  type DraftsGetResponse = DraftsGetResponses[keyof DraftsGetResponses];
4458
4699
  type DraftsUpdateData = {
4459
4700
  body: {
4701
+ /**
4702
+ * An address on a domain you own, and one this key may send from.
4703
+ */
4460
4704
  from?: string;
4705
+ /**
4706
+ * One address or several. A string is accepted for the single case.
4707
+ */
4461
4708
  to?: Array<string>;
4709
+ /**
4710
+ * Copied, and visible to everybody who receives the message.
4711
+ */
4462
4712
  cc?: Array<string>;
4713
+ /**
4714
+ * Copied, and visible to nobody else.
4715
+ */
4463
4716
  bcc?: Array<string>;
4717
+ /**
4718
+ * Left off a reply, where the thread already has one.
4719
+ */
4464
4720
  subject?: string | null;
4721
+ /**
4722
+ * The plain-text body. Send this even when you send `html` — some clients only read it.
4723
+ */
4465
4724
  text?: string | null;
4725
+ /**
4726
+ * Ids from `POST /attachments`, uploaded before the message that carries them. Up to 20.
4727
+ */
4466
4728
  attachment_ids?: Array<string>;
4467
4729
  };
4468
4730
  path: {
@@ -4477,7 +4739,7 @@ type DraftsUpdateErrors = {
4477
4739
  */
4478
4740
  401: Error;
4479
4741
  /**
4480
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4742
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4481
4743
  */
4482
4744
  404: Error;
4483
4745
  /**
@@ -4509,7 +4771,7 @@ type DraftsSendErrors = {
4509
4771
  */
4510
4772
  401: Error;
4511
4773
  /**
4512
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4774
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4513
4775
  */
4514
4776
  404: Error;
4515
4777
  /**
@@ -4541,7 +4803,7 @@ type DraftsCancelScheduleErrors = {
4541
4803
  */
4542
4804
  401: Error;
4543
4805
  /**
4544
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4806
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4545
4807
  */
4546
4808
  404: Error;
4547
4809
  /**
@@ -4575,7 +4837,7 @@ type DraftsScheduleErrors = {
4575
4837
  */
4576
4838
  401: Error;
4577
4839
  /**
4578
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4840
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4579
4841
  */
4580
4842
  404: Error;
4581
4843
  /**
@@ -4608,7 +4870,7 @@ type DraftsRemoveAttachmentErrors = {
4608
4870
  */
4609
4871
  401: Error;
4610
4872
  /**
4611
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4873
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4612
4874
  */
4613
4875
  404: Error;
4614
4876
  /**
@@ -4641,7 +4903,7 @@ type MetricsQueryErrors = {
4641
4903
  */
4642
4904
  401: Error;
4643
4905
  /**
4644
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4906
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4645
4907
  */
4646
4908
  404: Error;
4647
4909
  /**
@@ -4674,7 +4936,7 @@ type AttachmentsUploadErrors = {
4674
4936
  */
4675
4937
  401: Error;
4676
4938
  /**
4677
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4939
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4678
4940
  */
4679
4941
  404: Error;
4680
4942
  /**
@@ -4706,7 +4968,7 @@ type AttachmentsDownloadUrlErrors = {
4706
4968
  */
4707
4969
  401: Error;
4708
4970
  /**
4709
- * No such resource, **or** one belonging to another account. The two are deliberately indistinguishable: a different answer would enumerate what exists.
4971
+ * No such resource, or one this key cannot reach. The two answer the same, so treat a 404 as “not available to you” rather than “does not exist”.
4710
4972
  */
4711
4973
  404: Error;
4712
4974
  /**
@@ -4753,7 +5015,7 @@ declare const agentAttachHuman: <ThrowOnError extends boolean = false>(options:
4753
5015
  /**
4754
5016
  * Verify an agent with the human’s code
4755
5017
  *
4756
- * Creates the account and the address. Ten wrong codes spend the signup, whatever comes next. It returns no key: the agent asks for one through the account it now belongs to, which is how every other key is made.
5018
+ * Creates the account, the address and a workspace-scoped API key. Ten wrong codes spend the signup, whatever comes next. The key is returned once and never again — store it before doing anything else. It is minted here rather than at signup because this is the call a human has vouched for.
4757
5019
  */
4758
5020
  declare const agentVerify: <ThrowOnError extends boolean = false>(options: Options<AgentVerifyData, ThrowOnError>) => RequestResult<AgentVerifyResponses, AgentVerifyErrors, ThrowOnError>;
4759
5021
  /**
@@ -4891,7 +5153,7 @@ declare const messagesListInThread: <ThrowOnError extends boolean = false>(optio
4891
5153
  /**
4892
5154
  * Send a message
4893
5155
  *
4894
- * Idempotent with an `Idempotency-Key` header.
5156
+ * Idempotent with an `Idempotency-Key` header. Answers `202` with the id, the thread and anything **rejected** — a recipient the address is not allowed to write to is refused here rather than failing later, so read `rejected` before assuming it went.
4895
5157
  */
4896
5158
  declare const messagesSend: <ThrowOnError extends boolean = false>(options: Options<MessagesSendData, ThrowOnError>) => RequestResult<MessagesSendResponses, MessagesSendErrors, ThrowOnError>;
4897
5159
  /**