agentphone 1.0.2 → 1.0.4

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.
Files changed (160) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +6 -0
  3. package/dist/cjs/Client.js +18 -8
  4. package/dist/cjs/api/resources/agentWebhooks/client/Client.d.ts +1 -1
  5. package/dist/cjs/api/resources/agentWebhooks/client/Client.js +1 -1
  6. package/dist/cjs/api/resources/agents/client/Client.d.ts +30 -2
  7. package/dist/cjs/api/resources/agents/client/Client.js +96 -2
  8. package/dist/cjs/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  9. package/dist/cjs/api/resources/agents/client/requests/DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest.d.ts +11 -0
  10. package/dist/cjs/api/resources/agents/client/requests/DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest.js +3 -0
  11. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +2 -0
  12. package/dist/cjs/api/resources/agents/client/requests/index.d.ts +1 -0
  13. package/dist/cjs/api/resources/calls/client/Client.d.ts +27 -3
  14. package/dist/cjs/api/resources/calls/client/Client.js +68 -4
  15. package/dist/cjs/api/resources/calls/client/requests/CreateOutboundCallRequest.d.ts +2 -2
  16. package/dist/cjs/api/resources/calls/client/requests/ListCallsV1CallsGetRequest.d.ts +8 -0
  17. package/dist/cjs/api/resources/calls/client/requests/StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest.d.ts +9 -0
  18. package/dist/cjs/api/resources/calls/client/requests/StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest.js +3 -0
  19. package/dist/cjs/api/resources/calls/client/requests/index.d.ts +1 -0
  20. package/dist/cjs/api/resources/contacts/client/Client.d.ts +94 -0
  21. package/dist/cjs/api/resources/contacts/client/Client.js +341 -0
  22. package/dist/cjs/api/resources/contacts/client/index.d.ts +1 -0
  23. package/dist/cjs/api/resources/contacts/client/index.js +17 -0
  24. package/dist/cjs/api/resources/contacts/client/requests/CreateContactRequest.d.ts +13 -0
  25. package/dist/cjs/api/resources/contacts/client/requests/CreateContactRequest.js +3 -0
  26. package/dist/cjs/api/resources/contacts/client/requests/DeleteContactV1ContactsContactIdDeleteRequest.d.ts +9 -0
  27. package/dist/cjs/api/resources/contacts/client/requests/DeleteContactV1ContactsContactIdDeleteRequest.js +3 -0
  28. package/dist/cjs/api/resources/contacts/client/requests/GetContactV1ContactsContactIdGetRequest.d.ts +9 -0
  29. package/dist/cjs/api/resources/contacts/client/requests/GetContactV1ContactsContactIdGetRequest.js +3 -0
  30. package/dist/cjs/api/resources/contacts/client/requests/ListContactsV1ContactsGetRequest.d.ts +9 -0
  31. package/dist/cjs/api/resources/contacts/client/requests/ListContactsV1ContactsGetRequest.js +3 -0
  32. package/dist/cjs/api/resources/contacts/client/requests/UpdateContactRequest.d.ts +13 -0
  33. package/dist/cjs/api/resources/contacts/client/requests/UpdateContactRequest.js +3 -0
  34. package/dist/cjs/api/resources/contacts/client/requests/index.d.ts +5 -0
  35. package/dist/cjs/api/resources/contacts/client/requests/index.js +2 -0
  36. package/dist/cjs/api/resources/contacts/index.d.ts +1 -0
  37. package/dist/cjs/api/resources/contacts/index.js +17 -0
  38. package/dist/cjs/api/resources/conversations/client/Client.d.ts +1 -1
  39. package/dist/cjs/api/resources/conversations/client/Client.js +1 -1
  40. package/dist/cjs/api/resources/index.d.ts +4 -0
  41. package/dist/cjs/api/resources/index.js +5 -1
  42. package/dist/cjs/api/resources/messages/client/Client.d.ts +49 -0
  43. package/dist/cjs/api/resources/messages/client/Client.js +183 -0
  44. package/dist/cjs/api/resources/messages/client/index.d.ts +1 -0
  45. package/dist/cjs/api/resources/messages/client/index.js +17 -0
  46. package/dist/cjs/api/resources/messages/client/requests/SendMessageRequest.d.ts +15 -0
  47. package/dist/cjs/api/resources/messages/client/requests/SendMessageRequest.js +3 -0
  48. package/dist/cjs/api/resources/messages/client/requests/SendReactionRequest.d.ts +11 -0
  49. package/dist/cjs/api/resources/messages/client/requests/SendReactionRequest.js +3 -0
  50. package/dist/cjs/api/resources/messages/client/requests/index.d.ts +2 -0
  51. package/dist/cjs/api/resources/messages/client/requests/index.js +2 -0
  52. package/dist/cjs/api/resources/messages/index.d.ts +1 -0
  53. package/dist/cjs/api/resources/messages/index.js +17 -0
  54. package/dist/cjs/api/resources/numbers/client/Client.d.ts +1 -1
  55. package/dist/cjs/api/resources/numbers/client/Client.js +1 -1
  56. package/dist/cjs/api/resources/usage/client/Client.d.ts +1 -1
  57. package/dist/cjs/api/resources/usage/client/Client.js +1 -1
  58. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +6 -6
  59. package/dist/cjs/api/resources/webhooks/client/Client.js +6 -6
  60. package/dist/cjs/api/types/AgentNumberResponse.d.ts +1 -0
  61. package/dist/cjs/api/types/AgentResponse.d.ts +2 -0
  62. package/dist/cjs/api/types/CallSummary.d.ts +1 -1
  63. package/dist/cjs/api/types/ContactListResponse.d.ts +6 -0
  64. package/dist/cjs/api/types/ContactListResponse.js +3 -0
  65. package/dist/cjs/api/types/ContactResponse.d.ts +9 -0
  66. package/dist/cjs/api/types/ContactResponse.js +3 -0
  67. package/dist/cjs/api/types/MessageInConversation.d.ts +2 -0
  68. package/dist/cjs/api/types/MessageResponse.d.ts +2 -0
  69. package/dist/cjs/api/types/PhoneNumberResponse.d.ts +1 -0
  70. package/dist/cjs/api/types/SendMessageResponse.d.ts +7 -0
  71. package/dist/cjs/api/types/SendMessageResponse.js +3 -0
  72. package/dist/cjs/api/types/SendReactionResponse.d.ts +6 -0
  73. package/dist/cjs/api/types/SendReactionResponse.js +3 -0
  74. package/dist/cjs/api/types/WebhookCreateRequest.d.ts +1 -0
  75. package/dist/cjs/api/types/WebhookResponse.d.ts +1 -0
  76. package/dist/cjs/api/types/index.d.ts +4 -0
  77. package/dist/cjs/api/types/index.js +4 -0
  78. package/dist/cjs/version.d.ts +1 -1
  79. package/dist/cjs/version.js +1 -1
  80. package/dist/esm/BaseClient.mjs +2 -2
  81. package/dist/esm/Client.d.mts +6 -0
  82. package/dist/esm/Client.mjs +10 -0
  83. package/dist/esm/api/resources/agentWebhooks/client/Client.d.mts +1 -1
  84. package/dist/esm/api/resources/agentWebhooks/client/Client.mjs +1 -1
  85. package/dist/esm/api/resources/agents/client/Client.d.mts +30 -2
  86. package/dist/esm/api/resources/agents/client/Client.mjs +96 -2
  87. package/dist/esm/api/resources/agents/client/requests/CreateAgentRequest.d.mts +2 -0
  88. package/dist/esm/api/resources/agents/client/requests/DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest.d.mts +11 -0
  89. package/dist/esm/api/resources/agents/client/requests/DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest.mjs +2 -0
  90. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +2 -0
  91. package/dist/esm/api/resources/agents/client/requests/index.d.mts +1 -0
  92. package/dist/esm/api/resources/calls/client/Client.d.mts +27 -3
  93. package/dist/esm/api/resources/calls/client/Client.mjs +68 -4
  94. package/dist/esm/api/resources/calls/client/requests/CreateOutboundCallRequest.d.mts +2 -2
  95. package/dist/esm/api/resources/calls/client/requests/ListCallsV1CallsGetRequest.d.mts +8 -0
  96. package/dist/esm/api/resources/calls/client/requests/StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest.d.mts +9 -0
  97. package/dist/esm/api/resources/calls/client/requests/StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest.mjs +2 -0
  98. package/dist/esm/api/resources/calls/client/requests/index.d.mts +1 -0
  99. package/dist/esm/api/resources/contacts/client/Client.d.mts +94 -0
  100. package/dist/esm/api/resources/contacts/client/Client.mjs +304 -0
  101. package/dist/esm/api/resources/contacts/client/index.d.mts +1 -0
  102. package/dist/esm/api/resources/contacts/client/index.mjs +1 -0
  103. package/dist/esm/api/resources/contacts/client/requests/CreateContactRequest.d.mts +13 -0
  104. package/dist/esm/api/resources/contacts/client/requests/CreateContactRequest.mjs +2 -0
  105. package/dist/esm/api/resources/contacts/client/requests/DeleteContactV1ContactsContactIdDeleteRequest.d.mts +9 -0
  106. package/dist/esm/api/resources/contacts/client/requests/DeleteContactV1ContactsContactIdDeleteRequest.mjs +2 -0
  107. package/dist/esm/api/resources/contacts/client/requests/GetContactV1ContactsContactIdGetRequest.d.mts +9 -0
  108. package/dist/esm/api/resources/contacts/client/requests/GetContactV1ContactsContactIdGetRequest.mjs +2 -0
  109. package/dist/esm/api/resources/contacts/client/requests/ListContactsV1ContactsGetRequest.d.mts +9 -0
  110. package/dist/esm/api/resources/contacts/client/requests/ListContactsV1ContactsGetRequest.mjs +2 -0
  111. package/dist/esm/api/resources/contacts/client/requests/UpdateContactRequest.d.mts +13 -0
  112. package/dist/esm/api/resources/contacts/client/requests/UpdateContactRequest.mjs +2 -0
  113. package/dist/esm/api/resources/contacts/client/requests/index.d.mts +5 -0
  114. package/dist/esm/api/resources/contacts/client/requests/index.mjs +1 -0
  115. package/dist/esm/api/resources/contacts/index.d.mts +1 -0
  116. package/dist/esm/api/resources/contacts/index.mjs +1 -0
  117. package/dist/esm/api/resources/conversations/client/Client.d.mts +1 -1
  118. package/dist/esm/api/resources/conversations/client/Client.mjs +1 -1
  119. package/dist/esm/api/resources/index.d.mts +4 -0
  120. package/dist/esm/api/resources/index.mjs +4 -0
  121. package/dist/esm/api/resources/messages/client/Client.d.mts +49 -0
  122. package/dist/esm/api/resources/messages/client/Client.mjs +146 -0
  123. package/dist/esm/api/resources/messages/client/index.d.mts +1 -0
  124. package/dist/esm/api/resources/messages/client/index.mjs +1 -0
  125. package/dist/esm/api/resources/messages/client/requests/SendMessageRequest.d.mts +15 -0
  126. package/dist/esm/api/resources/messages/client/requests/SendMessageRequest.mjs +2 -0
  127. package/dist/esm/api/resources/messages/client/requests/SendReactionRequest.d.mts +11 -0
  128. package/dist/esm/api/resources/messages/client/requests/SendReactionRequest.mjs +2 -0
  129. package/dist/esm/api/resources/messages/client/requests/index.d.mts +2 -0
  130. package/dist/esm/api/resources/messages/client/requests/index.mjs +1 -0
  131. package/dist/esm/api/resources/messages/index.d.mts +1 -0
  132. package/dist/esm/api/resources/messages/index.mjs +1 -0
  133. package/dist/esm/api/resources/numbers/client/Client.d.mts +1 -1
  134. package/dist/esm/api/resources/numbers/client/Client.mjs +1 -1
  135. package/dist/esm/api/resources/usage/client/Client.d.mts +1 -1
  136. package/dist/esm/api/resources/usage/client/Client.mjs +1 -1
  137. package/dist/esm/api/resources/webhooks/client/Client.d.mts +6 -6
  138. package/dist/esm/api/resources/webhooks/client/Client.mjs +6 -6
  139. package/dist/esm/api/types/AgentNumberResponse.d.mts +1 -0
  140. package/dist/esm/api/types/AgentResponse.d.mts +2 -0
  141. package/dist/esm/api/types/CallSummary.d.mts +1 -1
  142. package/dist/esm/api/types/ContactListResponse.d.mts +6 -0
  143. package/dist/esm/api/types/ContactListResponse.mjs +2 -0
  144. package/dist/esm/api/types/ContactResponse.d.mts +9 -0
  145. package/dist/esm/api/types/ContactResponse.mjs +2 -0
  146. package/dist/esm/api/types/MessageInConversation.d.mts +2 -0
  147. package/dist/esm/api/types/MessageResponse.d.mts +2 -0
  148. package/dist/esm/api/types/PhoneNumberResponse.d.mts +1 -0
  149. package/dist/esm/api/types/SendMessageResponse.d.mts +7 -0
  150. package/dist/esm/api/types/SendMessageResponse.mjs +2 -0
  151. package/dist/esm/api/types/SendReactionResponse.d.mts +6 -0
  152. package/dist/esm/api/types/SendReactionResponse.mjs +2 -0
  153. package/dist/esm/api/types/WebhookCreateRequest.d.mts +1 -0
  154. package/dist/esm/api/types/WebhookResponse.d.mts +1 -0
  155. package/dist/esm/api/types/index.d.mts +4 -0
  156. package/dist/esm/api/types/index.mjs +4 -0
  157. package/dist/esm/version.d.mts +1 -1
  158. package/dist/esm/version.mjs +1 -1
  159. package/package.json +1 -1
  160. package/reference.md +780 -114
package/reference.md CHANGED
@@ -1,5 +1,60 @@
1
1
  # Reference
2
2
  ## Agents
3
+ <details><summary><code>client.agents.<a href="/src/api/resources/agents/client/Client.ts">listVoices</a>() -> unknown</code></summary>
4
+ <dl>
5
+ <dd>
6
+
7
+ #### 📝 Description
8
+
9
+ <dl>
10
+ <dd>
11
+
12
+ <dl>
13
+ <dd>
14
+
15
+ Return available voices from the call provider (Retell).
16
+ </dd>
17
+ </dl>
18
+ </dd>
19
+ </dl>
20
+
21
+ #### 🔌 Usage
22
+
23
+ <dl>
24
+ <dd>
25
+
26
+ <dl>
27
+ <dd>
28
+
29
+ ```typescript
30
+ await client.agents.listVoices();
31
+
32
+ ```
33
+ </dd>
34
+ </dl>
35
+ </dd>
36
+ </dl>
37
+
38
+ #### ⚙️ Parameters
39
+
40
+ <dl>
41
+ <dd>
42
+
43
+ <dl>
44
+ <dd>
45
+
46
+ **requestOptions:** `AgentsClient.RequestOptions`
47
+
48
+ </dd>
49
+ </dl>
50
+ </dd>
51
+ </dl>
52
+
53
+
54
+ </dd>
55
+ </dl>
56
+ </details>
57
+
3
58
  <details><summary><code>client.agents.<a href="/src/api/resources/agents/client/Client.ts">listAgents</a>({ ...params }) -> AgentPhone.AgentListResponse</code></summary>
4
59
  <dl>
5
60
  <dd>
@@ -12,7 +67,7 @@
12
67
  <dl>
13
68
  <dd>
14
69
 
15
- List all agents for this project.
70
+ List all agents for this account.
16
71
  </dd>
17
72
  </dl>
18
73
  </dd>
@@ -349,7 +404,7 @@ await client.agents.updateAgent({
349
404
 
350
405
  Attach an existing phone number to an agent.
351
406
 
352
- The number must belong to the same project and not be released.
407
+ The number must belong to the same account and not be released.
353
408
  </dd>
354
409
  </dl>
355
410
  </dd>
@@ -399,6 +454,74 @@ await client.agents.attachNumberToAgent({
399
454
  </dl>
400
455
 
401
456
 
457
+ </dd>
458
+ </dl>
459
+ </details>
460
+
461
+ <details><summary><code>client.agents.<a href="/src/api/resources/agents/client/Client.ts">detachNumberFromAgent</a>({ ...params }) -> unknown</code></summary>
462
+ <dl>
463
+ <dd>
464
+
465
+ #### 📝 Description
466
+
467
+ <dl>
468
+ <dd>
469
+
470
+ <dl>
471
+ <dd>
472
+
473
+ Detach a phone number from an agent (sets agentId to null).
474
+
475
+ The number remains active and can be re-attached to any agent.
476
+ </dd>
477
+ </dl>
478
+ </dd>
479
+ </dl>
480
+
481
+ #### 🔌 Usage
482
+
483
+ <dl>
484
+ <dd>
485
+
486
+ <dl>
487
+ <dd>
488
+
489
+ ```typescript
490
+ await client.agents.detachNumberFromAgent({
491
+ agent_id: "agent_id",
492
+ number_id: "number_id"
493
+ });
494
+
495
+ ```
496
+ </dd>
497
+ </dl>
498
+ </dd>
499
+ </dl>
500
+
501
+ #### ⚙️ Parameters
502
+
503
+ <dl>
504
+ <dd>
505
+
506
+ <dl>
507
+ <dd>
508
+
509
+ **request:** `AgentPhone.DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest`
510
+
511
+ </dd>
512
+ </dl>
513
+
514
+ <dl>
515
+ <dd>
516
+
517
+ **requestOptions:** `AgentsClient.RequestOptions`
518
+
519
+ </dd>
520
+ </dl>
521
+ </dd>
522
+ </dl>
523
+
524
+
402
525
  </dd>
403
526
  </dl>
404
527
  </details>
@@ -546,7 +669,7 @@ await client.agents.listAgentCalls({
546
669
  <dl>
547
670
  <dd>
548
671
 
549
- List all phone numbers for this project.
672
+ List all phone numbers for this account.
550
673
  </dd>
551
674
  </dl>
552
675
  </dd>
@@ -818,7 +941,7 @@ await client.numbers.deleteNumber({
818
941
  <dl>
819
942
  <dd>
820
943
 
821
- Get the master webhook configuration for this project.
944
+ Get the master webhook configuration for this account.
822
945
  </dd>
823
946
  </dl>
824
947
  </dd>
@@ -873,7 +996,7 @@ await client.webhooks.getWebhook();
873
996
  <dl>
874
997
  <dd>
875
998
 
876
- Register or update the webhook URL for this project.
999
+ Register or update the webhook URL for this account.
877
1000
 
878
1001
  If a webhook already exists, it will be updated.
879
1002
  A new secret is generated each time.
@@ -944,7 +1067,7 @@ await client.webhooks.createOrUpdateWebhook({
944
1067
  <dl>
945
1068
  <dd>
946
1069
 
947
- Remove the master webhook for this project.
1070
+ Remove the master webhook for this account.
948
1071
  </dd>
949
1072
  </dl>
950
1073
  </dd>
@@ -999,7 +1122,7 @@ await client.webhooks.deleteWebhook();
999
1122
  <dl>
1000
1123
  <dd>
1001
1124
 
1002
- Get paginated webhook delivery attempts for all project webhooks.
1125
+ Get paginated webhook delivery attempts for all account webhooks.
1003
1126
  </dd>
1004
1127
  </dl>
1005
1128
  </dd>
@@ -1062,7 +1185,7 @@ await client.webhooks.listDeliveries();
1062
1185
  <dl>
1063
1186
  <dd>
1064
1187
 
1065
- Aggregated delivery stats for the project's webhooks over the last N hours.
1188
+ Aggregated delivery stats for the account's webhooks over the last N hours.
1066
1189
  </dd>
1067
1190
  </dl>
1068
1191
  </dd>
@@ -1184,7 +1307,7 @@ Send a test webhook to verify the endpoint is working.
1184
1307
 
1185
1308
  Sends a fake message payload to the configured URL.
1186
1309
  Pass ?agentId=... to control which agent appears in the payload;
1187
- otherwise the first agent in the project is used.
1310
+ otherwise the first agent in the account is used.
1188
1311
  </dd>
1189
1312
  </dl>
1190
1313
  </dd>
@@ -1315,7 +1438,7 @@ await client.agentWebhooks.getAgentWebhook({
1315
1438
 
1316
1439
  Register or update a webhook URL for a specific agent.
1317
1440
 
1318
- When set, this agent's events are delivered here instead of the project default webhook.
1441
+ When set, this agent's events are delivered here instead of the account default webhook.
1319
1442
  </dd>
1320
1443
  </dl>
1321
1444
  </dd>
@@ -1566,8 +1689,8 @@ await client.agentWebhooks.testAgentWebhook({
1566
1689
  </dl>
1567
1690
  </details>
1568
1691
 
1569
- ## Conversations
1570
- <details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">listConversations</a>({ ...params }) -> AgentPhone.AppRoutesConversationsConversationListResponse</code></summary>
1692
+ ## Contacts
1693
+ <details><summary><code>client.contacts.<a href="/src/api/resources/contacts/client/Client.ts">listContacts</a>({ ...params }) -> AgentPhone.ContactListResponse</code></summary>
1571
1694
  <dl>
1572
1695
  <dd>
1573
1696
 
@@ -1579,9 +1702,9 @@ await client.agentWebhooks.testAgentWebhook({
1579
1702
  <dl>
1580
1703
  <dd>
1581
1704
 
1582
- List all conversations for this project.
1705
+ List all contacts for this account.
1583
1706
 
1584
- Sorted by most recent activity (lastMessageAt desc).
1707
+ Optional `search` query filters by name or phone number (case-insensitive contains).
1585
1708
  </dd>
1586
1709
  </dl>
1587
1710
  </dd>
@@ -1596,7 +1719,7 @@ Sorted by most recent activity (lastMessageAt desc).
1596
1719
  <dd>
1597
1720
 
1598
1721
  ```typescript
1599
- await client.conversations.listConversations();
1722
+ await client.contacts.listContacts();
1600
1723
 
1601
1724
  ```
1602
1725
  </dd>
@@ -1612,7 +1735,7 @@ await client.conversations.listConversations();
1612
1735
  <dl>
1613
1736
  <dd>
1614
1737
 
1615
- **request:** `AgentPhone.ListConversationsV1ConversationsGetRequest`
1738
+ **request:** `AgentPhone.ListContactsV1ContactsGetRequest`
1616
1739
 
1617
1740
  </dd>
1618
1741
  </dl>
@@ -1620,7 +1743,7 @@ await client.conversations.listConversations();
1620
1743
  <dl>
1621
1744
  <dd>
1622
1745
 
1623
- **requestOptions:** `ConversationsClient.RequestOptions`
1746
+ **requestOptions:** `ContactsClient.RequestOptions`
1624
1747
 
1625
1748
  </dd>
1626
1749
  </dl>
@@ -1632,7 +1755,7 @@ await client.conversations.listConversations();
1632
1755
  </dl>
1633
1756
  </details>
1634
1757
 
1635
- <details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">getConversation</a>({ ...params }) -> AgentPhone.ConversationDetail</code></summary>
1758
+ <details><summary><code>client.contacts.<a href="/src/api/resources/contacts/client/Client.ts">createContact</a>({ ...params }) -> AgentPhone.ContactResponse</code></summary>
1636
1759
  <dl>
1637
1760
  <dd>
1638
1761
 
@@ -1644,7 +1767,10 @@ await client.conversations.listConversations();
1644
1767
  <dl>
1645
1768
  <dd>
1646
1769
 
1647
- Get a conversation with its recent messages.
1770
+ Create a new contact.
1771
+
1772
+ Phone number is normalized to E.164 format. Returns 409 if a contact
1773
+ with this phone number already exists for the project.
1648
1774
  </dd>
1649
1775
  </dl>
1650
1776
  </dd>
@@ -1659,8 +1785,9 @@ Get a conversation with its recent messages.
1659
1785
  <dd>
1660
1786
 
1661
1787
  ```typescript
1662
- await client.conversations.getConversation({
1663
- conversation_id: "conversation_id"
1788
+ await client.contacts.createContact({
1789
+ phoneNumber: "phoneNumber",
1790
+ name: "name"
1664
1791
  });
1665
1792
 
1666
1793
  ```
@@ -1677,7 +1804,7 @@ await client.conversations.getConversation({
1677
1804
  <dl>
1678
1805
  <dd>
1679
1806
 
1680
- **request:** `AgentPhone.GetConversationV1ConversationsConversationIdGetRequest`
1807
+ **request:** `AgentPhone.CreateContactRequest`
1681
1808
 
1682
1809
  </dd>
1683
1810
  </dl>
@@ -1685,7 +1812,7 @@ await client.conversations.getConversation({
1685
1812
  <dl>
1686
1813
  <dd>
1687
1814
 
1688
- **requestOptions:** `ConversationsClient.RequestOptions`
1815
+ **requestOptions:** `ContactsClient.RequestOptions`
1689
1816
 
1690
1817
  </dd>
1691
1818
  </dl>
@@ -1697,7 +1824,7 @@ await client.conversations.getConversation({
1697
1824
  </dl>
1698
1825
  </details>
1699
1826
 
1700
- <details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">updateConversation</a>({ ...params }) -> AgentPhone.ConversationDetail</code></summary>
1827
+ <details><summary><code>client.contacts.<a href="/src/api/resources/contacts/client/Client.ts">getContact</a>({ ...params }) -> AgentPhone.ContactResponse</code></summary>
1701
1828
  <dl>
1702
1829
  <dd>
1703
1830
 
@@ -1709,14 +1836,7 @@ await client.conversations.getConversation({
1709
1836
  <dl>
1710
1837
  <dd>
1711
1838
 
1712
- Update conversation metadata (state).
1713
-
1714
- Use this to store custom context for AI agents:
1715
- - Customer information (name, account ID)
1716
- - Business context (order ID, ticket number)
1717
- - Session state (current topic, preferences)
1718
-
1719
- The metadata is included in webhook payloads as `conversationState`.
1839
+ Get a single contact by ID.
1720
1840
  </dd>
1721
1841
  </dl>
1722
1842
  </dd>
@@ -1731,8 +1851,8 @@ The metadata is included in webhook payloads as `conversationState`.
1731
1851
  <dd>
1732
1852
 
1733
1853
  ```typescript
1734
- await client.conversations.updateConversation({
1735
- conversation_id: "conversation_id"
1854
+ await client.contacts.getContact({
1855
+ contact_id: "contact_id"
1736
1856
  });
1737
1857
 
1738
1858
  ```
@@ -1749,7 +1869,7 @@ await client.conversations.updateConversation({
1749
1869
  <dl>
1750
1870
  <dd>
1751
1871
 
1752
- **request:** `AgentPhone.UpdateConversationRequest`
1872
+ **request:** `AgentPhone.GetContactV1ContactsContactIdGetRequest`
1753
1873
 
1754
1874
  </dd>
1755
1875
  </dl>
@@ -1757,7 +1877,7 @@ await client.conversations.updateConversation({
1757
1877
  <dl>
1758
1878
  <dd>
1759
1879
 
1760
- **requestOptions:** `ConversationsClient.RequestOptions`
1880
+ **requestOptions:** `ContactsClient.RequestOptions`
1761
1881
 
1762
1882
  </dd>
1763
1883
  </dl>
@@ -1769,7 +1889,7 @@ await client.conversations.updateConversation({
1769
1889
  </dl>
1770
1890
  </details>
1771
1891
 
1772
- <details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">getConversationMessages</a>({ ...params }) -> AgentPhone.MessagesListResponse</code></summary>
1892
+ <details><summary><code>client.contacts.<a href="/src/api/resources/contacts/client/Client.ts">deleteContact</a>({ ...params }) -> void</code></summary>
1773
1893
  <dl>
1774
1894
  <dd>
1775
1895
 
@@ -1781,9 +1901,7 @@ await client.conversations.updateConversation({
1781
1901
  <dl>
1782
1902
  <dd>
1783
1903
 
1784
- Get paginated messages for a conversation.
1785
-
1786
- Use before/after for cursor-based pagination.
1904
+ Delete a contact.
1787
1905
  </dd>
1788
1906
  </dl>
1789
1907
  </dd>
@@ -1798,8 +1916,8 @@ Use before/after for cursor-based pagination.
1798
1916
  <dd>
1799
1917
 
1800
1918
  ```typescript
1801
- await client.conversations.getConversationMessages({
1802
- conversation_id: "conversation_id"
1919
+ await client.contacts.deleteContact({
1920
+ contact_id: "contact_id"
1803
1921
  });
1804
1922
 
1805
1923
  ```
@@ -1816,7 +1934,7 @@ await client.conversations.getConversationMessages({
1816
1934
  <dl>
1817
1935
  <dd>
1818
1936
 
1819
- **request:** `AgentPhone.GetConversationMessagesV1ConversationsConversationIdMessagesGetRequest`
1937
+ **request:** `AgentPhone.DeleteContactV1ContactsContactIdDeleteRequest`
1820
1938
 
1821
1939
  </dd>
1822
1940
  </dl>
@@ -1824,7 +1942,7 @@ await client.conversations.getConversationMessages({
1824
1942
  <dl>
1825
1943
  <dd>
1826
1944
 
1827
- **requestOptions:** `ConversationsClient.RequestOptions`
1945
+ **requestOptions:** `ContactsClient.RequestOptions`
1828
1946
 
1829
1947
  </dd>
1830
1948
  </dl>
@@ -1836,8 +1954,7 @@ await client.conversations.getConversationMessages({
1836
1954
  </dl>
1837
1955
  </details>
1838
1956
 
1839
- ## Calls
1840
- <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">listCalls</a>({ ...params }) -> unknown</code></summary>
1957
+ <details><summary><code>client.contacts.<a href="/src/api/resources/contacts/client/Client.ts">updateContact</a>({ ...params }) -> AgentPhone.ContactResponse</code></summary>
1841
1958
  <dl>
1842
1959
  <dd>
1843
1960
 
@@ -1849,7 +1966,9 @@ await client.conversations.getConversationMessages({
1849
1966
  <dl>
1850
1967
  <dd>
1851
1968
 
1852
- List all calls for this project.
1969
+ Update a contact's fields.
1970
+
1971
+ If phoneNumber is updated, it's re-normalized and checked for uniqueness (409 on conflict).
1853
1972
  </dd>
1854
1973
  </dl>
1855
1974
  </dd>
@@ -1864,7 +1983,9 @@ List all calls for this project.
1864
1983
  <dd>
1865
1984
 
1866
1985
  ```typescript
1867
- await client.calls.listCalls();
1986
+ await client.contacts.updateContact({
1987
+ contact_id: "contact_id"
1988
+ });
1868
1989
 
1869
1990
  ```
1870
1991
  </dd>
@@ -1880,7 +2001,7 @@ await client.calls.listCalls();
1880
2001
  <dl>
1881
2002
  <dd>
1882
2003
 
1883
- **request:** `AgentPhone.ListCallsV1CallsGetRequest`
2004
+ **request:** `AgentPhone.UpdateContactRequest`
1884
2005
 
1885
2006
  </dd>
1886
2007
  </dl>
@@ -1888,7 +2009,7 @@ await client.calls.listCalls();
1888
2009
  <dl>
1889
2010
  <dd>
1890
2011
 
1891
- **requestOptions:** `CallsClient.RequestOptions`
2012
+ **requestOptions:** `ContactsClient.RequestOptions`
1892
2013
 
1893
2014
  </dd>
1894
2015
  </dl>
@@ -1900,7 +2021,8 @@ await client.calls.listCalls();
1900
2021
  </dl>
1901
2022
  </details>
1902
2023
 
1903
- <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">createOutboundCall</a>({ ...params }) -> unknown</code></summary>
2024
+ ## Conversations
2025
+ <details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">listConversations</a>({ ...params }) -> AgentPhone.AppRoutesConversationsConversationListResponse</code></summary>
1904
2026
  <dl>
1905
2027
  <dd>
1906
2028
 
@@ -1912,18 +2034,9 @@ await client.calls.listCalls();
1912
2034
  <dl>
1913
2035
  <dd>
1914
2036
 
1915
- Initiate an outbound call.
1916
-
1917
- This endpoint allows you to programmatically make phone calls from your agent
1918
- to any phone number. Use `fromNumberId` to pick which of the agent's numbers
1919
- to use as caller ID; if omitted, the first assigned number is used.
2037
+ List all conversations for this account.
1920
2038
 
1921
- Flow:
1922
- 1. Validates the agent belongs to your project and has a phone number
1923
- 2. Initiates a call from the agent's number to the destination
1924
- 3. When recipient answers, speaks the initial greeting (if provided)
1925
- 4. Listens for recipient's speech and sends to your webhook
1926
- 5. Continues conversation using your webhook responses
2039
+ Sorted by most recent activity (lastMessageAt desc).
1927
2040
  </dd>
1928
2041
  </dl>
1929
2042
  </dd>
@@ -1938,10 +2051,7 @@ Flow:
1938
2051
  <dd>
1939
2052
 
1940
2053
  ```typescript
1941
- await client.calls.createOutboundCall({
1942
- agentId: "agentId",
1943
- toNumber: "toNumber"
1944
- });
2054
+ await client.conversations.listConversations();
1945
2055
 
1946
2056
  ```
1947
2057
  </dd>
@@ -1957,7 +2067,7 @@ await client.calls.createOutboundCall({
1957
2067
  <dl>
1958
2068
  <dd>
1959
2069
 
1960
- **request:** `AgentPhone.CreateOutboundCallRequest`
2070
+ **request:** `AgentPhone.ListConversationsV1ConversationsGetRequest`
1961
2071
 
1962
2072
  </dd>
1963
2073
  </dl>
@@ -1965,7 +2075,7 @@ await client.calls.createOutboundCall({
1965
2075
  <dl>
1966
2076
  <dd>
1967
2077
 
1968
- **requestOptions:** `CallsClient.RequestOptions`
2078
+ **requestOptions:** `ConversationsClient.RequestOptions`
1969
2079
 
1970
2080
  </dd>
1971
2081
  </dl>
@@ -1977,7 +2087,7 @@ await client.calls.createOutboundCall({
1977
2087
  </dl>
1978
2088
  </details>
1979
2089
 
1980
- <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">createWebCall</a>({ ...params }) -> unknown</code></summary>
2090
+ <details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">getConversation</a>({ ...params }) -> AgentPhone.ConversationDetail</code></summary>
1981
2091
  <dl>
1982
2092
  <dd>
1983
2093
 
@@ -1989,17 +2099,7 @@ await client.calls.createOutboundCall({
1989
2099
  <dl>
1990
2100
  <dd>
1991
2101
 
1992
- Create a browser-based web call.
1993
-
1994
- Returns an access token that your frontend passes to the AgentPhone Web SDK
1995
- (`agentphone-web-sdk`) to start the call in the browser. The token
1996
- expires 30 seconds after creation.
1997
-
1998
- Flow:
1999
- 1. Validates the agent belongs to your project
2000
- 2. Creates a web call and returns an access token
2001
- 3. Your client calls `webClient.startCall({ accessToken })` to connect
2002
- 4. Call lifecycle (transcripts, webhooks) works the same as phone calls
2102
+ Get a conversation with its recent messages.
2003
2103
  </dd>
2004
2104
  </dl>
2005
2105
  </dd>
@@ -2014,8 +2114,8 @@ Flow:
2014
2114
  <dd>
2015
2115
 
2016
2116
  ```typescript
2017
- await client.calls.createWebCall({
2018
- agentId: "agentId"
2117
+ await client.conversations.getConversation({
2118
+ conversation_id: "conversation_id"
2019
2119
  });
2020
2120
 
2021
2121
  ```
@@ -2032,7 +2132,7 @@ await client.calls.createWebCall({
2032
2132
  <dl>
2033
2133
  <dd>
2034
2134
 
2035
- **request:** `AgentPhone.CreateWebCallRequest`
2135
+ **request:** `AgentPhone.GetConversationV1ConversationsConversationIdGetRequest`
2036
2136
 
2037
2137
  </dd>
2038
2138
  </dl>
@@ -2040,7 +2140,7 @@ await client.calls.createWebCall({
2040
2140
  <dl>
2041
2141
  <dd>
2042
2142
 
2043
- **requestOptions:** `CallsClient.RequestOptions`
2143
+ **requestOptions:** `ConversationsClient.RequestOptions`
2044
2144
 
2045
2145
  </dd>
2046
2146
  </dl>
@@ -2052,7 +2152,7 @@ await client.calls.createWebCall({
2052
2152
  </dl>
2053
2153
  </details>
2054
2154
 
2055
- <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">getCall</a>({ ...params }) -> unknown</code></summary>
2155
+ <details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">updateConversation</a>({ ...params }) -> AgentPhone.ConversationDetail</code></summary>
2056
2156
  <dl>
2057
2157
  <dd>
2058
2158
 
@@ -2064,7 +2164,14 @@ await client.calls.createWebCall({
2064
2164
  <dl>
2065
2165
  <dd>
2066
2166
 
2067
- Get a specific call with its transcripts.
2167
+ Update conversation metadata (state).
2168
+
2169
+ Use this to store custom context for AI agents:
2170
+ - Customer information (name, account ID)
2171
+ - Business context (order ID, ticket number)
2172
+ - Session state (current topic, preferences)
2173
+
2174
+ The metadata is included in webhook payloads as `conversationState`.
2068
2175
  </dd>
2069
2176
  </dl>
2070
2177
  </dd>
@@ -2079,8 +2186,8 @@ Get a specific call with its transcripts.
2079
2186
  <dd>
2080
2187
 
2081
2188
  ```typescript
2082
- await client.calls.getCall({
2083
- call_id: "call_id"
2189
+ await client.conversations.updateConversation({
2190
+ conversation_id: "conversation_id"
2084
2191
  });
2085
2192
 
2086
2193
  ```
@@ -2097,7 +2204,7 @@ await client.calls.getCall({
2097
2204
  <dl>
2098
2205
  <dd>
2099
2206
 
2100
- **request:** `AgentPhone.GetCallV1CallsCallIdGetRequest`
2207
+ **request:** `AgentPhone.UpdateConversationRequest`
2101
2208
 
2102
2209
  </dd>
2103
2210
  </dl>
@@ -2105,7 +2212,7 @@ await client.calls.getCall({
2105
2212
  <dl>
2106
2213
  <dd>
2107
2214
 
2108
- **requestOptions:** `CallsClient.RequestOptions`
2215
+ **requestOptions:** `ConversationsClient.RequestOptions`
2109
2216
 
2110
2217
  </dd>
2111
2218
  </dl>
@@ -2117,7 +2224,7 @@ await client.calls.getCall({
2117
2224
  </dl>
2118
2225
  </details>
2119
2226
 
2120
- <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">getCallTranscript</a>({ ...params }) -> unknown</code></summary>
2227
+ <details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">getConversationMessages</a>({ ...params }) -> AgentPhone.MessagesListResponse</code></summary>
2121
2228
  <dl>
2122
2229
  <dd>
2123
2230
 
@@ -2129,11 +2236,9 @@ await client.calls.getCall({
2129
2236
  <dl>
2130
2237
  <dd>
2131
2238
 
2132
- Get the full transcript for a call.
2239
+ Get paginated messages for a conversation.
2133
2240
 
2134
- Returns the complete, ordered transcript regardless of the webhook
2135
- contextLimit setting. Each entry contains the user utterance and
2136
- the corresponding agent response (when available).
2241
+ Use before/after for cursor-based pagination.
2137
2242
  </dd>
2138
2243
  </dl>
2139
2244
  </dd>
@@ -2148,8 +2253,8 @@ the corresponding agent response (when available).
2148
2253
  <dd>
2149
2254
 
2150
2255
  ```typescript
2151
- await client.calls.getCallTranscript({
2152
- call_id: "call_id"
2256
+ await client.conversations.getConversationMessages({
2257
+ conversation_id: "conversation_id"
2153
2258
  });
2154
2259
 
2155
2260
  ```
@@ -2166,7 +2271,7 @@ await client.calls.getCallTranscript({
2166
2271
  <dl>
2167
2272
  <dd>
2168
2273
 
2169
- **request:** `AgentPhone.GetCallTranscriptV1CallsCallIdTranscriptGetRequest`
2274
+ **request:** `AgentPhone.GetConversationMessagesV1ConversationsConversationIdMessagesGetRequest`
2170
2275
 
2171
2276
  </dd>
2172
2277
  </dl>
@@ -2174,7 +2279,7 @@ await client.calls.getCallTranscript({
2174
2279
  <dl>
2175
2280
  <dd>
2176
2281
 
2177
- **requestOptions:** `CallsClient.RequestOptions`
2282
+ **requestOptions:** `ConversationsClient.RequestOptions`
2178
2283
 
2179
2284
  </dd>
2180
2285
  </dl>
@@ -2186,7 +2291,8 @@ await client.calls.getCallTranscript({
2186
2291
  </dl>
2187
2292
  </details>
2188
2293
 
2189
- <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">listCallsForNumber</a>({ ...params }) -> unknown</code></summary>
2294
+ ## Calls
2295
+ <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">listCalls</a>({ ...params }) -> unknown</code></summary>
2190
2296
  <dl>
2191
2297
  <dd>
2192
2298
 
@@ -2198,7 +2304,7 @@ await client.calls.getCallTranscript({
2198
2304
  <dl>
2199
2305
  <dd>
2200
2306
 
2201
- List all calls for a specific phone number.
2307
+ List all calls for this account.
2202
2308
  </dd>
2203
2309
  </dl>
2204
2310
  </dd>
@@ -2213,9 +2319,7 @@ List all calls for a specific phone number.
2213
2319
  <dd>
2214
2320
 
2215
2321
  ```typescript
2216
- await client.calls.listCallsForNumber({
2217
- number_id: "number_id"
2218
- });
2322
+ await client.calls.listCalls();
2219
2323
 
2220
2324
  ```
2221
2325
  </dd>
@@ -2231,7 +2335,7 @@ await client.calls.listCallsForNumber({
2231
2335
  <dl>
2232
2336
  <dd>
2233
2337
 
2234
- **request:** `AgentPhone.ListCallsForNumberV1NumbersNumberIdCallsGetRequest`
2338
+ **request:** `AgentPhone.ListCallsV1CallsGetRequest`
2235
2339
 
2236
2340
  </dd>
2237
2341
  </dl>
@@ -2251,8 +2355,7 @@ await client.calls.listCallsForNumber({
2251
2355
  </dl>
2252
2356
  </details>
2253
2357
 
2254
- ## Usage
2255
- <details><summary><code>client.usage.<a href="/src/api/resources/usage/client/Client.ts">getUsage</a>() -> AgentPhone.UsageResponse</code></summary>
2358
+ <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">createOutboundCall</a>({ ...params }) -> unknown</code></summary>
2256
2359
  <dl>
2257
2360
  <dd>
2258
2361
 
@@ -2264,14 +2367,440 @@ await client.calls.listCallsForNumber({
2264
2367
  <dl>
2265
2368
  <dd>
2266
2369
 
2267
- Get usage statistics for the current project.
2370
+ Initiate an outbound call.
2268
2371
 
2269
- Returns:
2270
- - Phone number limits (used/limit/remaining)
2271
- - Message statistics (total, last 24h, last 7 days, last 30 days)
2272
- - Call statistics (total, last 24h, last 7 days, last 30 days)
2273
- - Webhook delivery statistics
2274
- </dd>
2372
+ This endpoint allows you to programmatically make phone calls from your agent
2373
+ to any phone number. Use `fromNumberId` to pick which of the agent's numbers
2374
+ to use as caller ID; if omitted, the first assigned number is used.
2375
+
2376
+ Flow:
2377
+ 1. Validates the agent belongs to your account and has a phone number
2378
+ 2. Initiates a call from the agent's number to the destination
2379
+ 3. When recipient answers, speaks the initial greeting (if provided)
2380
+ 4. Listens for recipient's speech and sends to your webhook
2381
+ 5. Continues conversation using your webhook responses
2382
+ </dd>
2383
+ </dl>
2384
+ </dd>
2385
+ </dl>
2386
+
2387
+ #### 🔌 Usage
2388
+
2389
+ <dl>
2390
+ <dd>
2391
+
2392
+ <dl>
2393
+ <dd>
2394
+
2395
+ ```typescript
2396
+ await client.calls.createOutboundCall({
2397
+ agentId: "agentId",
2398
+ toNumber: "toNumber"
2399
+ });
2400
+
2401
+ ```
2402
+ </dd>
2403
+ </dl>
2404
+ </dd>
2405
+ </dl>
2406
+
2407
+ #### ⚙️ Parameters
2408
+
2409
+ <dl>
2410
+ <dd>
2411
+
2412
+ <dl>
2413
+ <dd>
2414
+
2415
+ **request:** `AgentPhone.CreateOutboundCallRequest`
2416
+
2417
+ </dd>
2418
+ </dl>
2419
+
2420
+ <dl>
2421
+ <dd>
2422
+
2423
+ **requestOptions:** `CallsClient.RequestOptions`
2424
+
2425
+ </dd>
2426
+ </dl>
2427
+ </dd>
2428
+ </dl>
2429
+
2430
+
2431
+ </dd>
2432
+ </dl>
2433
+ </details>
2434
+
2435
+ <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">createWebCall</a>({ ...params }) -> unknown</code></summary>
2436
+ <dl>
2437
+ <dd>
2438
+
2439
+ #### 📝 Description
2440
+
2441
+ <dl>
2442
+ <dd>
2443
+
2444
+ <dl>
2445
+ <dd>
2446
+
2447
+ Create a browser-based web call.
2448
+
2449
+ Returns an access token that your frontend passes to the AgentPhone Web SDK
2450
+ (`agentphone-web-sdk`) to start the call in the browser. The token
2451
+ expires 30 seconds after creation.
2452
+
2453
+ Flow:
2454
+ 1. Validates the agent belongs to your account
2455
+ 2. Creates a web call and returns an access token
2456
+ 3. Your client calls `webClient.startCall({ accessToken })` to connect
2457
+ 4. Call lifecycle (transcripts, webhooks) works the same as phone calls
2458
+ </dd>
2459
+ </dl>
2460
+ </dd>
2461
+ </dl>
2462
+
2463
+ #### 🔌 Usage
2464
+
2465
+ <dl>
2466
+ <dd>
2467
+
2468
+ <dl>
2469
+ <dd>
2470
+
2471
+ ```typescript
2472
+ await client.calls.createWebCall({
2473
+ agentId: "agentId"
2474
+ });
2475
+
2476
+ ```
2477
+ </dd>
2478
+ </dl>
2479
+ </dd>
2480
+ </dl>
2481
+
2482
+ #### ⚙️ Parameters
2483
+
2484
+ <dl>
2485
+ <dd>
2486
+
2487
+ <dl>
2488
+ <dd>
2489
+
2490
+ **request:** `AgentPhone.CreateWebCallRequest`
2491
+
2492
+ </dd>
2493
+ </dl>
2494
+
2495
+ <dl>
2496
+ <dd>
2497
+
2498
+ **requestOptions:** `CallsClient.RequestOptions`
2499
+
2500
+ </dd>
2501
+ </dl>
2502
+ </dd>
2503
+ </dl>
2504
+
2505
+
2506
+ </dd>
2507
+ </dl>
2508
+ </details>
2509
+
2510
+ <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">getCall</a>({ ...params }) -> unknown</code></summary>
2511
+ <dl>
2512
+ <dd>
2513
+
2514
+ #### 📝 Description
2515
+
2516
+ <dl>
2517
+ <dd>
2518
+
2519
+ <dl>
2520
+ <dd>
2521
+
2522
+ Get a specific call with its transcripts.
2523
+ </dd>
2524
+ </dl>
2525
+ </dd>
2526
+ </dl>
2527
+
2528
+ #### 🔌 Usage
2529
+
2530
+ <dl>
2531
+ <dd>
2532
+
2533
+ <dl>
2534
+ <dd>
2535
+
2536
+ ```typescript
2537
+ await client.calls.getCall({
2538
+ call_id: "call_id"
2539
+ });
2540
+
2541
+ ```
2542
+ </dd>
2543
+ </dl>
2544
+ </dd>
2545
+ </dl>
2546
+
2547
+ #### ⚙️ Parameters
2548
+
2549
+ <dl>
2550
+ <dd>
2551
+
2552
+ <dl>
2553
+ <dd>
2554
+
2555
+ **request:** `AgentPhone.GetCallV1CallsCallIdGetRequest`
2556
+
2557
+ </dd>
2558
+ </dl>
2559
+
2560
+ <dl>
2561
+ <dd>
2562
+
2563
+ **requestOptions:** `CallsClient.RequestOptions`
2564
+
2565
+ </dd>
2566
+ </dl>
2567
+ </dd>
2568
+ </dl>
2569
+
2570
+
2571
+ </dd>
2572
+ </dl>
2573
+ </details>
2574
+
2575
+ <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">getCallTranscript</a>({ ...params }) -> unknown</code></summary>
2576
+ <dl>
2577
+ <dd>
2578
+
2579
+ #### 📝 Description
2580
+
2581
+ <dl>
2582
+ <dd>
2583
+
2584
+ <dl>
2585
+ <dd>
2586
+
2587
+ Get the full transcript for a call.
2588
+
2589
+ Returns the complete, ordered transcript regardless of the webhook
2590
+ contextLimit setting. Each entry contains the user utterance and
2591
+ the corresponding agent response (when available).
2592
+ </dd>
2593
+ </dl>
2594
+ </dd>
2595
+ </dl>
2596
+
2597
+ #### 🔌 Usage
2598
+
2599
+ <dl>
2600
+ <dd>
2601
+
2602
+ <dl>
2603
+ <dd>
2604
+
2605
+ ```typescript
2606
+ await client.calls.getCallTranscript({
2607
+ call_id: "call_id"
2608
+ });
2609
+
2610
+ ```
2611
+ </dd>
2612
+ </dl>
2613
+ </dd>
2614
+ </dl>
2615
+
2616
+ #### ⚙️ Parameters
2617
+
2618
+ <dl>
2619
+ <dd>
2620
+
2621
+ <dl>
2622
+ <dd>
2623
+
2624
+ **request:** `AgentPhone.GetCallTranscriptV1CallsCallIdTranscriptGetRequest`
2625
+
2626
+ </dd>
2627
+ </dl>
2628
+
2629
+ <dl>
2630
+ <dd>
2631
+
2632
+ **requestOptions:** `CallsClient.RequestOptions`
2633
+
2634
+ </dd>
2635
+ </dl>
2636
+ </dd>
2637
+ </dl>
2638
+
2639
+
2640
+ </dd>
2641
+ </dl>
2642
+ </details>
2643
+
2644
+ <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">streamCallTranscript</a>({ ...params }) -> unknown</code></summary>
2645
+ <dl>
2646
+ <dd>
2647
+
2648
+ #### 📝 Description
2649
+
2650
+ <dl>
2651
+ <dd>
2652
+
2653
+ <dl>
2654
+ <dd>
2655
+
2656
+ Stream a call's transcript via Server-Sent Events.
2657
+
2658
+ On connect the server replays all existing transcript turns from the
2659
+ database, then streams new turns in real time as they arrive from the
2660
+ voice provider. A ``: heartbeat`` comment is sent every 15 s to keep
2661
+ proxies alive. The stream closes after sending an ``ended`` event
2662
+ when the call completes (or immediately after replay if the call has
2663
+ already ended).
2664
+
2665
+ Works for both live and completed calls — same URL either way.
2666
+ </dd>
2667
+ </dl>
2668
+ </dd>
2669
+ </dl>
2670
+
2671
+ #### 🔌 Usage
2672
+
2673
+ <dl>
2674
+ <dd>
2675
+
2676
+ <dl>
2677
+ <dd>
2678
+
2679
+ ```typescript
2680
+ await client.calls.streamCallTranscript({
2681
+ call_id: "call_id"
2682
+ });
2683
+
2684
+ ```
2685
+ </dd>
2686
+ </dl>
2687
+ </dd>
2688
+ </dl>
2689
+
2690
+ #### ⚙️ Parameters
2691
+
2692
+ <dl>
2693
+ <dd>
2694
+
2695
+ <dl>
2696
+ <dd>
2697
+
2698
+ **request:** `AgentPhone.StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest`
2699
+
2700
+ </dd>
2701
+ </dl>
2702
+
2703
+ <dl>
2704
+ <dd>
2705
+
2706
+ **requestOptions:** `CallsClient.RequestOptions`
2707
+
2708
+ </dd>
2709
+ </dl>
2710
+ </dd>
2711
+ </dl>
2712
+
2713
+
2714
+ </dd>
2715
+ </dl>
2716
+ </details>
2717
+
2718
+ <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">listCallsForNumber</a>({ ...params }) -> unknown</code></summary>
2719
+ <dl>
2720
+ <dd>
2721
+
2722
+ #### 📝 Description
2723
+
2724
+ <dl>
2725
+ <dd>
2726
+
2727
+ <dl>
2728
+ <dd>
2729
+
2730
+ List all calls for a specific phone number.
2731
+ </dd>
2732
+ </dl>
2733
+ </dd>
2734
+ </dl>
2735
+
2736
+ #### 🔌 Usage
2737
+
2738
+ <dl>
2739
+ <dd>
2740
+
2741
+ <dl>
2742
+ <dd>
2743
+
2744
+ ```typescript
2745
+ await client.calls.listCallsForNumber({
2746
+ number_id: "number_id"
2747
+ });
2748
+
2749
+ ```
2750
+ </dd>
2751
+ </dl>
2752
+ </dd>
2753
+ </dl>
2754
+
2755
+ #### ⚙️ Parameters
2756
+
2757
+ <dl>
2758
+ <dd>
2759
+
2760
+ <dl>
2761
+ <dd>
2762
+
2763
+ **request:** `AgentPhone.ListCallsForNumberV1NumbersNumberIdCallsGetRequest`
2764
+
2765
+ </dd>
2766
+ </dl>
2767
+
2768
+ <dl>
2769
+ <dd>
2770
+
2771
+ **requestOptions:** `CallsClient.RequestOptions`
2772
+
2773
+ </dd>
2774
+ </dl>
2775
+ </dd>
2776
+ </dl>
2777
+
2778
+
2779
+ </dd>
2780
+ </dl>
2781
+ </details>
2782
+
2783
+ ## Usage
2784
+ <details><summary><code>client.usage.<a href="/src/api/resources/usage/client/Client.ts">getUsage</a>() -> AgentPhone.UsageResponse</code></summary>
2785
+ <dl>
2786
+ <dd>
2787
+
2788
+ #### 📝 Description
2789
+
2790
+ <dl>
2791
+ <dd>
2792
+
2793
+ <dl>
2794
+ <dd>
2795
+
2796
+ Get usage statistics for the current account.
2797
+
2798
+ Returns:
2799
+ - Phone number limits (used/limit/remaining)
2800
+ - Message statistics (total, last 24h, last 7 days, last 30 days)
2801
+ - Call statistics (total, last 24h, last 7 days, last 30 days)
2802
+ - Webhook delivery statistics
2803
+ </dd>
2275
2804
  </dl>
2276
2805
  </dd>
2277
2806
  </dl>
@@ -2437,6 +2966,143 @@ await client.usage.getMonthlyUsage();
2437
2966
  </dl>
2438
2967
 
2439
2968
 
2969
+ </dd>
2970
+ </dl>
2971
+ </details>
2972
+
2973
+ ## Messages
2974
+ <details><summary><code>client.messages.<a href="/src/api/resources/messages/client/Client.ts">sendMessage</a>({ ...params }) -> AgentPhone.SendMessageResponse</code></summary>
2975
+ <dl>
2976
+ <dd>
2977
+
2978
+ #### 📝 Description
2979
+
2980
+ <dl>
2981
+ <dd>
2982
+
2983
+ <dl>
2984
+ <dd>
2985
+
2986
+ Send an outbound message (SMS or iMessage) via the provider assigned to the number.
2987
+ </dd>
2988
+ </dl>
2989
+ </dd>
2990
+ </dl>
2991
+
2992
+ #### 🔌 Usage
2993
+
2994
+ <dl>
2995
+ <dd>
2996
+
2997
+ <dl>
2998
+ <dd>
2999
+
3000
+ ```typescript
3001
+ await client.messages.sendMessage({
3002
+ agent_id: "agent_id",
3003
+ to_number: "to_number",
3004
+ body: "body"
3005
+ });
3006
+
3007
+ ```
3008
+ </dd>
3009
+ </dl>
3010
+ </dd>
3011
+ </dl>
3012
+
3013
+ #### ⚙️ Parameters
3014
+
3015
+ <dl>
3016
+ <dd>
3017
+
3018
+ <dl>
3019
+ <dd>
3020
+
3021
+ **request:** `AgentPhone.SendMessageRequest`
3022
+
3023
+ </dd>
3024
+ </dl>
3025
+
3026
+ <dl>
3027
+ <dd>
3028
+
3029
+ **requestOptions:** `MessagesClient.RequestOptions`
3030
+
3031
+ </dd>
3032
+ </dl>
3033
+ </dd>
3034
+ </dl>
3035
+
3036
+
3037
+ </dd>
3038
+ </dl>
3039
+ </details>
3040
+
3041
+ <details><summary><code>client.messages.<a href="/src/api/resources/messages/client/Client.ts">sendReaction</a>({ ...params }) -> AgentPhone.SendReactionResponse</code></summary>
3042
+ <dl>
3043
+ <dd>
3044
+
3045
+ #### 📝 Description
3046
+
3047
+ <dl>
3048
+ <dd>
3049
+
3050
+ <dl>
3051
+ <dd>
3052
+
3053
+ Send a tapback reaction to a message (iMessage only).
3054
+
3055
+ Reactions are an iMessage feature. Attempting to react to a message
3056
+ sent via an SMS/Twilio number will return a clear error.
3057
+ </dd>
3058
+ </dl>
3059
+ </dd>
3060
+ </dl>
3061
+
3062
+ #### 🔌 Usage
3063
+
3064
+ <dl>
3065
+ <dd>
3066
+
3067
+ <dl>
3068
+ <dd>
3069
+
3070
+ ```typescript
3071
+ await client.messages.sendReaction({
3072
+ message_id: "message_id",
3073
+ reaction: "reaction"
3074
+ });
3075
+
3076
+ ```
3077
+ </dd>
3078
+ </dl>
3079
+ </dd>
3080
+ </dl>
3081
+
3082
+ #### ⚙️ Parameters
3083
+
3084
+ <dl>
3085
+ <dd>
3086
+
3087
+ <dl>
3088
+ <dd>
3089
+
3090
+ **request:** `AgentPhone.SendReactionRequest`
3091
+
3092
+ </dd>
3093
+ </dl>
3094
+
3095
+ <dl>
3096
+ <dd>
3097
+
3098
+ **requestOptions:** `MessagesClient.RequestOptions`
3099
+
3100
+ </dd>
3101
+ </dl>
3102
+ </dd>
3103
+ </dl>
3104
+
3105
+
2440
3106
  </dd>
2441
3107
  </dl>
2442
3108
  </details>