revox 0.0.2 → 0.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.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +96 -0
  3. data/README.md +88 -22
  4. data/lib/revox/client.rb +19 -1
  5. data/lib/revox/internal/transport/base_client.rb +5 -0
  6. data/lib/revox/internal/type/base_model.rb +3 -3
  7. data/lib/revox/internal/util.rb +53 -7
  8. data/lib/revox/models/assistant_create_params.rb +1036 -11
  9. data/lib/revox/models/assistant_create_response.rb +1071 -11
  10. data/lib/revox/models/assistant_delete_params.rb +7 -1
  11. data/lib/revox/models/assistant_list_response.rb +1070 -11
  12. data/lib/revox/models/assistant_retrieve_params.rb +7 -1
  13. data/lib/revox/models/assistant_retrieve_response.rb +1066 -11
  14. data/lib/revox/models/assistant_update_params.rb +1043 -11
  15. data/lib/revox/models/assistant_update_response.rb +1097 -12
  16. data/lib/revox/models/call_create_params.rb +1063 -11
  17. data/lib/revox/models/call_create_response.rb +2507 -87
  18. data/lib/revox/models/call_retrieve_params.rb +7 -1
  19. data/lib/revox/models/call_retrieve_response.rb +2512 -87
  20. data/lib/revox/models/campaign_cancel_params.rb +20 -0
  21. data/lib/revox/models/campaign_cancel_response.rb +16 -0
  22. data/lib/revox/models/campaign_create_params.rb +239 -0
  23. data/lib/revox/models/campaign_create_response.rb +2030 -0
  24. data/lib/revox/models/campaign_delete_params.rb +20 -0
  25. data/lib/revox/models/campaign_delete_response.rb +16 -0
  26. data/lib/revox/models/campaign_export_rows_params.rb +20 -0
  27. data/lib/revox/models/campaign_export_rows_response.rb +22 -0
  28. data/lib/revox/models/campaign_get_rows_params.rb +20 -0
  29. data/lib/revox/models/campaign_get_rows_response.rb +3176 -0
  30. data/lib/revox/models/campaign_list_params.rb +14 -0
  31. data/lib/revox/models/campaign_list_response.rb +2024 -0
  32. data/lib/revox/models/campaign_retrieve_params.rb +20 -0
  33. data/lib/revox/models/campaign_retrieve_response.rb +2032 -0
  34. data/lib/revox/models/users/me_retrieve_response.rb +13 -1
  35. data/lib/revox/models/users/me_update_response.rb +13 -1
  36. data/lib/revox/models/voice_list_response.rb +55 -1
  37. data/lib/revox/models/voice_preview_params.rb +43 -3
  38. data/lib/revox/models/voice_retrieve_params.rb +7 -1
  39. data/lib/revox/models.rb +14 -2
  40. data/lib/revox/resources/assistants.rb +138 -6
  41. data/lib/revox/resources/call.rb +10 -27
  42. data/lib/revox/resources/campaigns.rb +176 -0
  43. data/lib/revox/resources/voices.rb +17 -7
  44. data/lib/revox/version.rb +1 -1
  45. data/lib/revox.rb +15 -2
  46. data/rbi/revox/client.rbi +3 -0
  47. data/rbi/revox/internal/util.rbi +28 -0
  48. data/rbi/revox/models/assistant_create_params.rbi +2135 -102
  49. data/rbi/revox/models/assistant_create_response.rbi +2454 -199
  50. data/rbi/revox/models/assistant_delete_params.rbi +11 -5
  51. data/rbi/revox/models/assistant_list_response.rbi +2448 -195
  52. data/rbi/revox/models/assistant_retrieve_params.rbi +11 -5
  53. data/rbi/revox/models/assistant_retrieve_response.rbi +2401 -210
  54. data/rbi/revox/models/assistant_update_params.rbi +2139 -100
  55. data/rbi/revox/models/assistant_update_response.rbi +2504 -198
  56. data/rbi/revox/models/call_create_params.rbi +2377 -222
  57. data/rbi/revox/models/call_create_response.rbi +5840 -594
  58. data/rbi/revox/models/call_retrieve_params.rbi +11 -5
  59. data/rbi/revox/models/call_retrieve_response.rbi +5872 -618
  60. data/rbi/revox/models/campaign_cancel_params.rbi +33 -0
  61. data/rbi/revox/models/campaign_cancel_response.rbi +23 -0
  62. data/rbi/revox/models/campaign_create_params.rbi +433 -0
  63. data/rbi/revox/models/campaign_create_response.rbi +4170 -0
  64. data/rbi/revox/models/campaign_delete_params.rbi +33 -0
  65. data/rbi/revox/models/campaign_delete_response.rbi +23 -0
  66. data/rbi/revox/models/campaign_export_rows_params.rbi +33 -0
  67. data/rbi/revox/models/campaign_export_rows_response.rbi +29 -0
  68. data/rbi/revox/models/campaign_get_rows_params.rbi +33 -0
  69. data/rbi/revox/models/campaign_get_rows_response.rbi +6706 -0
  70. data/rbi/revox/models/campaign_list_params.rbi +27 -0
  71. data/rbi/revox/models/campaign_list_response.rbi +4156 -0
  72. data/rbi/revox/models/campaign_retrieve_params.rbi +33 -0
  73. data/rbi/revox/models/campaign_retrieve_response.rbi +4175 -0
  74. data/rbi/revox/models/users/me_retrieve_response.rbi +13 -3
  75. data/rbi/revox/models/users/me_update_response.rbi +13 -3
  76. data/rbi/revox/models/voice_list_response.rbi +105 -3
  77. data/rbi/revox/models/voice_preview_params.rbi +60 -2
  78. data/rbi/revox/models/voice_retrieve_params.rbi +6 -1
  79. data/rbi/revox/models.rbi +14 -2
  80. data/rbi/revox/resources/assistants.rbi +301 -6
  81. data/rbi/revox/resources/call.rbi +10 -19
  82. data/rbi/revox/resources/campaigns.rbi +121 -0
  83. data/rbi/revox/resources/voices.rbi +15 -5
  84. data/sig/revox/client.rbs +2 -0
  85. data/sig/revox/internal/util.rbs +14 -0
  86. data/sig/revox/models/assistant_create_params.rbs +841 -4
  87. data/sig/revox/models/assistant_create_response.rbs +860 -3
  88. data/sig/revox/models/assistant_delete_params.rbs +8 -3
  89. data/sig/revox/models/assistant_list_response.rbs +860 -3
  90. data/sig/revox/models/assistant_retrieve_params.rbs +8 -3
  91. data/sig/revox/models/assistant_retrieve_response.rbs +859 -3
  92. data/sig/revox/models/assistant_update_params.rbs +846 -4
  93. data/sig/revox/models/assistant_update_response.rbs +886 -6
  94. data/sig/revox/models/call_create_params.rbs +844 -6
  95. data/sig/revox/models/call_create_response.rbs +2166 -79
  96. data/sig/revox/models/call_retrieve_params.rbs +9 -3
  97. data/sig/revox/models/call_retrieve_response.rbs +2166 -79
  98. data/sig/revox/models/campaign_cancel_params.rbs +20 -0
  99. data/sig/revox/models/campaign_cancel_response.rbs +13 -0
  100. data/sig/revox/models/campaign_create_params.rbs +203 -0
  101. data/sig/revox/models/campaign_create_response.rbs +1694 -0
  102. data/sig/revox/models/campaign_delete_params.rbs +20 -0
  103. data/sig/revox/models/campaign_delete_response.rbs +13 -0
  104. data/sig/revox/models/campaign_export_rows_params.rbs +20 -0
  105. data/sig/revox/models/campaign_export_rows_response.rbs +15 -0
  106. data/sig/revox/models/campaign_get_rows_params.rbs +20 -0
  107. data/sig/revox/models/campaign_get_rows_response.rbs +2688 -0
  108. data/sig/revox/models/campaign_list_params.rbs +14 -0
  109. data/sig/revox/models/campaign_list_response.rbs +1694 -0
  110. data/sig/revox/models/campaign_retrieve_params.rbs +20 -0
  111. data/sig/revox/models/campaign_retrieve_response.rbs +1694 -0
  112. data/sig/revox/models/users/me_retrieve_response.rbs +8 -3
  113. data/sig/revox/models/users/me_update_response.rbs +8 -3
  114. data/sig/revox/models/voice_list_response.rbs +45 -3
  115. data/sig/revox/models/voice_preview_params.rbs +35 -1
  116. data/sig/revox/models/voice_retrieve_params.rbs +5 -1
  117. data/sig/revox/models.rbs +14 -2
  118. data/sig/revox/resources/assistants.rbs +54 -0
  119. data/sig/revox/resources/call.rbs +0 -6
  120. data/sig/revox/resources/campaigns.rbs +49 -0
  121. data/sig/revox/resources/voices.rbs +3 -0
  122. metadata +47 -8
  123. data/lib/revox/models/call_list_params.rb +0 -29
  124. data/lib/revox/models/call_list_response.rb +0 -197
  125. data/rbi/revox/models/call_list_params.rbi +0 -47
  126. data/rbi/revox/models/call_list_response.rbi +0 -401
  127. data/sig/revox/models/call_list_params.rbs +0 -28
  128. data/sig/revox/models/call_list_response.rbs +0 -171
@@ -3,36 +3,90 @@
3
3
  module Revox
4
4
  module Resources
5
5
  class Assistants
6
+ # Create a new AI assistant with a custom prompt, voice, and behavior
7
+ # configuration. Assistants define how the AI agent behaves during calls,
8
+ # including the system prompt given to the LLM, the first sentence spoken, the
9
+ # voice provider and voice ID (Cartesia or ElevenLabs), and end-of-call behavior.
10
+ # Once created, reference the assistant by its ID when placing calls.
6
11
  sig do
7
12
  params(
8
13
  name: String,
9
14
  prompt: String,
15
+ after_call_sms_outcomes:
16
+ T.nilable(
17
+ T::Array[
18
+ Revox::AssistantCreateParams::AfterCallSMSOutcome::OrSymbol
19
+ ]
20
+ ),
21
+ after_call_sms_prompt: T.nilable(String),
10
22
  background_sound:
11
23
  T.nilable(Revox::AssistantCreateParams::BackgroundSound::OrSymbol),
24
+ background_sound_volume: Float,
12
25
  calendly: T.nilable(Revox::AssistantCreateParams::Calendly::OrHash),
13
26
  call_retry_config:
14
27
  Revox::AssistantCreateParams::CallRetryConfig::OrHash,
28
+ cartesia_dictionary_pronunciation_id: T.nilable(String),
29
+ custom_tools:
30
+ T.nilable(
31
+ T::Array[Revox::AssistantCreateParams::CustomTool::OrHash]
32
+ ),
33
+ email_notification_address: T.nilable(String),
34
+ email_notification_language:
35
+ Revox::AssistantCreateParams::EmailNotificationLanguage::OrSymbol,
36
+ email_notification_outcomes:
37
+ T.nilable(
38
+ T::Array[
39
+ Revox::AssistantCreateParams::EmailNotificationOutcome::OrSymbol
40
+ ]
41
+ ),
15
42
  end_of_call_sentence: String,
16
43
  faq_items: T::Array[Revox::AssistantCreateParams::FaqItem::OrHash],
17
44
  first_sentence: String,
18
45
  first_sentence_delay_ms: Integer,
19
46
  first_sentence_mode:
20
47
  Revox::AssistantCreateParams::FirstSentenceMode::OrSymbol,
48
+ from_phone_number: T.nilable(String),
49
+ human_transfer_mode:
50
+ T.nilable(
51
+ Revox::AssistantCreateParams::HumanTransferMode::OrSymbol
52
+ ),
21
53
  ivr_navigation_enabled: T::Boolean,
22
54
  llm_model:
23
55
  T.any(
24
56
  Revox::AssistantCreateParams::LlmModel::UnionMember0::OrHash,
25
- Revox::AssistantCreateParams::LlmModel::UnionMember1::OrHash
57
+ Revox::AssistantCreateParams::LlmModel::UnionMember1::OrHash,
58
+ Revox::AssistantCreateParams::LlmModel::UnionMember2::OrHash,
59
+ Revox::AssistantCreateParams::LlmModel::UnionMember3::OrHash
26
60
  ),
61
+ logo_url: T.nilable(String),
27
62
  max_call_duration_secs: Float,
63
+ max_duration_end_message: T.nilable(String),
64
+ position: T.nilable(Revox::AssistantCreateParams::Position::OrHash),
65
+ prompt_flow:
66
+ T.nilable(Revox::AssistantCreateParams::PromptFlow::OrHash),
67
+ slack: T.nilable(Revox::AssistantCreateParams::Slack::OrHash),
68
+ sms_enabled: T::Boolean,
69
+ sms_template: T.nilable(String),
28
70
  structured_output_config:
29
71
  T::Array[
30
72
  Revox::AssistantCreateParams::StructuredOutputConfig::OrHash
31
73
  ],
74
+ structured_output_prompt: T.nilable(String),
75
+ stt_context:
76
+ T.nilable(Revox::AssistantCreateParams::SttContext::OrHash),
77
+ stt_model: Revox::AssistantCreateParams::SttModel::OrSymbol,
78
+ thinking_sound:
79
+ T.nilable(Revox::AssistantCreateParams::ThinkingSound::OrSymbol),
80
+ thinking_sound_probability: Float,
81
+ thinking_sound_volume: Float,
32
82
  transfer_phone_number: T.nilable(String),
83
+ type: Revox::AssistantCreateParams::Type::OrSymbol,
33
84
  voice: Revox::AssistantCreateParams::Voice::OrHash,
34
85
  voicemail_message: T.nilable(String),
86
+ voicemail_sms_prompt: T.nilable(String),
87
+ warm_transfer_summary_instructions: T.nilable(String),
35
88
  webhook_url: String,
89
+ zoho: T.nilable(Revox::AssistantCreateParams::Zoho::OrHash),
36
90
  request_options: Revox::RequestOptions::OrHash
37
91
  ).returns(Revox::Models::AssistantCreateResponse)
38
92
  end
@@ -40,13 +94,37 @@ module Revox
40
94
  name:,
41
95
  # The prompt to use for the call. This will be given to the LLM (gpt-4.1)
42
96
  prompt:,
43
- # The background sound to play during the call. Useful to give the impression that
44
- # your AI agent is in an office, in the street, or anywhere else you want.
97
+ # Which call outcomes trigger the after-call SMS. When empty or null, no
98
+ # after-call SMS is sent. E.g. ["interested", "completed", "none"]. Use "none"
99
+ # when outcome is null.
100
+ after_call_sms_outcomes: nil,
101
+ # Prompt / instructions for the after-call SMS. Supports {{variable}}
102
+ # placeholders. When null, no after-call SMS is sent.
103
+ after_call_sms_prompt: nil,
104
+ # Ambient background sound to play during the call. null/omitted disables it.
45
105
  background_sound: nil,
106
+ # Volume of the ambient background sound (0 = silent, 1 = max).
107
+ background_sound_volume: nil,
46
108
  calendly: nil,
47
109
  # Configuration for call retry behavior including time windows, delays, and max
48
110
  # iterations. If not provided, defaults will be used.
49
111
  call_retry_config: nil,
112
+ # Optional Cartesia pronunciation dictionary ID to use for this assistant's calls.
113
+ # Set null to unlink it.
114
+ cartesia_dictionary_pronunciation_id: nil,
115
+ # Custom API tools the assistant can call during conversations. Each tool defines
116
+ # an HTTP endpoint with variable substitution.
117
+ custom_tools: nil,
118
+ # Email address(es) to receive notifications when a call ends with a matching
119
+ # outcome. Accepts a single email or a comma-separated list (e.g. "alice@x.com,
120
+ # bob@y.com").
121
+ email_notification_address: nil,
122
+ # The language used for the notification email content. One of "en" or "fr".
123
+ # Defaults to "en".
124
+ email_notification_language: nil,
125
+ # Which call outcomes trigger an email notification. E.g. ["interested",
126
+ # "completed", "none"]. Use "none" when outcome is null.
127
+ email_notification_outcomes: nil,
50
128
  # Optional message to say when the agent decides to end the call.
51
129
  end_of_call_sentence: nil,
52
130
  # FAQ items to associate with this assistant. When provided, replaces all existing
@@ -61,31 +139,100 @@ module Revox
61
139
  # first_sentence will be spoken exactly as provided. "none" means the agent will
62
140
  # not speak first and will wait for the user.
63
141
  first_sentence_mode: nil,
142
+ # Override the default outbound phone number for calls placed with this assistant.
143
+ # Must be a phone number owned by the organization in E.164 format (e.g.
144
+ # +1234567890). When null, the organization's default phone number is used.
145
+ from_phone_number: nil,
146
+ # When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER;
147
+ # trunk must allow REFER/PSTN). Omit or null when transfer is disabled.
148
+ human_transfer_mode: nil,
64
149
  # Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
65
150
  # skip turns to navigate phone menus.
66
151
  ivr_navigation_enabled: nil,
67
152
  llm_model: nil,
153
+ # Public URL of the brand logo shown on the assistant's demo page. Upload a new
154
+ # logo via POST /assistants/:id/logo. Set explicitly to null to clear it.
155
+ logo_url: nil,
68
156
  # The maximum duration of the call in seconds. This is the maximum time the call
69
157
  # will be allowed to run.
70
158
  max_call_duration_secs: nil,
159
+ # Optional message the agent will say, without being interruptible, when the call
160
+ # reaches its max duration. Kept short so it fits inside the farewell buffer. If
161
+ # not set, the call ends silently.
162
+ max_duration_end_message: nil,
163
+ # Canvas position of this assistant's node in its multi-step flow editor.
164
+ position: nil,
165
+ # Visual prompt constructor data (nodes, edges, positions). Used by the UI to
166
+ # re-open the visual editor. Does not affect call behavior — the flattened prompt
167
+ # field is what the LLM receives.
168
+ prompt_flow: nil,
169
+ # Slack notification config. When set, posts a message to the chosen channel after
170
+ # a call ends with one of the configured outcomes.
171
+ slack: nil,
172
+ # Enable SMS tool during calls. When enabled, the agent can send SMS messages to
173
+ # the user on the call.
174
+ sms_enabled: nil,
175
+ # Hardcoded SMS template to send during calls. When set, this exact text is sent
176
+ # instead of letting the agent generate the message. Supports {{variable}}
177
+ # placeholders.
178
+ sms_template: nil,
71
179
  # The structured output config to use for the call. This is used to extract the
72
180
  # data from the call (like email, name, company name, etc.).
73
181
  structured_output_config: nil,
182
+ # Custom prompt for structured data extraction. If not provided, a default prompt
183
+ # is used. Available variables: {{transcript}}, {{call_direction}},
184
+ # {{user_phone_number}}, {{agent_phone_number}}.
185
+ structured_output_prompt: nil,
186
+ # Assistant-level speech-to-text context: structured `general` key/value pairs
187
+ # plus a list of domain `terms`. Prompt-derived context is merged in without
188
+ # replacing existing entries.
189
+ stt_context: nil,
190
+ # Transcriber (speech-to-text) model. Defaults to the newest Soniox realtime model
191
+ # when omitted.
192
+ stt_model: nil,
193
+ # Audio clip to play while the agent is processing a response. One of the built-in
194
+ # LiveKit audio clips; null/omitted disables it.
195
+ thinking_sound: nil,
196
+ # Probability [0..1] that the thinking sound plays on any given turn; otherwise
197
+ # the agent is silent while thinking.
198
+ thinking_sound_probability: nil,
199
+ # Volume of the thinking sound (0 = silent, 1 = max).
200
+ thinking_sound_volume: nil,
74
201
  # Phone number to transfer calls to when users request to speak to a human agent
75
202
  # in E.164 format (e.g. +1234567890).
76
203
  transfer_phone_number: nil,
204
+ # Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step'
205
+ # orchestrates a flow of sub-assistants, 'sub-assistant' is a step inside a
206
+ # multi-step flow (hidden from the assistants list). Flow transitions are managed
207
+ # via the /assistants/:id/edges endpoints, not on the assistant itself.
208
+ type: nil,
77
209
  # The voice to use for the call. You can get the list of voices using the /voices
78
210
  # endpoint
79
211
  voice: nil,
80
212
  # If set, when voicemail is detected the agent will speak this message then hang
81
213
  # up; if null, hang up immediately.
82
214
  voicemail_message: nil,
215
+ # SMS message to send when the call reaches voicemail. Supports {{variable}}
216
+ # placeholders. When null, no SMS is sent on voicemail.
217
+ voicemail_sms_prompt: nil,
218
+ # When using warm transfer: extra instructions for the supervisor handoff summary.
219
+ # If null or empty, the API uses the product default briefing when the call is
220
+ # loaded for the agent.
221
+ warm_transfer_summary_instructions: nil,
83
222
  # The webhook URL to call when the call is completed.
84
223
  webhook_url: nil,
224
+ # Zoho CRM integration config. When set, upserts the prospect (keyed on phone)
225
+ # into the chosen module and attaches a Note with the call summary after a call
226
+ # ends with one of the configured outcomes.
227
+ zoho: nil,
85
228
  request_options: {}
86
229
  )
87
230
  end
88
231
 
232
+ # Retrieve a single assistant by its unique ID. Returns the full assistant
233
+ # configuration including prompt, voice settings, and first sentence mode. Useful
234
+ # for inspecting an assistant's current setup before updating it or placing a
235
+ # call.
89
236
  sig do
90
237
  params(
91
238
  id: String,
@@ -95,49 +242,126 @@ module Revox
95
242
  def retrieve(id, request_options: {})
96
243
  end
97
244
 
245
+ # Update one or more fields on an existing assistant. Supports partial updates —
246
+ # only the fields you include in the request body will be changed. You can update
247
+ # the prompt, voice, first sentence, name, or any other assistant property without
248
+ # affecting the rest of the configuration.
98
249
  sig do
99
250
  params(
100
251
  id: String,
252
+ after_call_sms_outcomes:
253
+ T.nilable(
254
+ T::Array[
255
+ Revox::AssistantUpdateParams::AfterCallSMSOutcome::OrSymbol
256
+ ]
257
+ ),
258
+ after_call_sms_prompt: T.nilable(String),
101
259
  background_sound:
102
260
  T.nilable(Revox::AssistantUpdateParams::BackgroundSound::OrSymbol),
261
+ background_sound_volume: Float,
103
262
  calendly: T.nilable(Revox::AssistantUpdateParams::Calendly::OrHash),
104
263
  call_retry_config:
105
264
  Revox::AssistantUpdateParams::CallRetryConfig::OrHash,
265
+ cartesia_dictionary_pronunciation_id: T.nilable(String),
266
+ custom_tools:
267
+ T.nilable(
268
+ T::Array[Revox::AssistantUpdateParams::CustomTool::OrHash]
269
+ ),
270
+ email_notification_address: T.nilable(String),
271
+ email_notification_language:
272
+ Revox::AssistantUpdateParams::EmailNotificationLanguage::OrSymbol,
273
+ email_notification_outcomes:
274
+ T.nilable(
275
+ T::Array[
276
+ Revox::AssistantUpdateParams::EmailNotificationOutcome::OrSymbol
277
+ ]
278
+ ),
106
279
  end_of_call_sentence: String,
107
280
  faq_items: T::Array[Revox::AssistantUpdateParams::FaqItem::OrHash],
108
281
  first_sentence: String,
109
282
  first_sentence_delay_ms: Integer,
110
283
  first_sentence_mode:
111
284
  Revox::AssistantUpdateParams::FirstSentenceMode::OrSymbol,
285
+ from_phone_number: T.nilable(String),
286
+ human_transfer_mode:
287
+ T.nilable(
288
+ Revox::AssistantUpdateParams::HumanTransferMode::OrSymbol
289
+ ),
112
290
  ivr_navigation_enabled: T::Boolean,
113
291
  llm_model:
114
292
  T.any(
115
293
  Revox::AssistantUpdateParams::LlmModel::UnionMember0::OrHash,
116
- Revox::AssistantUpdateParams::LlmModel::UnionMember1::OrHash
294
+ Revox::AssistantUpdateParams::LlmModel::UnionMember1::OrHash,
295
+ Revox::AssistantUpdateParams::LlmModel::UnionMember2::OrHash,
296
+ Revox::AssistantUpdateParams::LlmModel::UnionMember3::OrHash
117
297
  ),
298
+ logo_url: T.nilable(String),
118
299
  max_call_duration_secs: Float,
300
+ max_duration_end_message: T.nilable(String),
119
301
  name: String,
302
+ position: T.nilable(Revox::AssistantUpdateParams::Position::OrHash),
120
303
  prompt: String,
304
+ prompt_flow:
305
+ T.nilable(Revox::AssistantUpdateParams::PromptFlow::OrHash),
306
+ slack: T.nilable(Revox::AssistantUpdateParams::Slack::OrHash),
307
+ sms_enabled: T::Boolean,
308
+ sms_template: T.nilable(String),
121
309
  structured_output_config:
122
310
  T::Array[
123
311
  Revox::AssistantUpdateParams::StructuredOutputConfig::OrHash
124
312
  ],
313
+ structured_output_prompt: T.nilable(String),
314
+ stt_context:
315
+ T.nilable(Revox::AssistantUpdateParams::SttContext::OrHash),
316
+ stt_model: Revox::AssistantUpdateParams::SttModel::OrSymbol,
317
+ thinking_sound:
318
+ T.nilable(Revox::AssistantUpdateParams::ThinkingSound::OrSymbol),
319
+ thinking_sound_probability: Float,
320
+ thinking_sound_volume: Float,
125
321
  transfer_phone_number: T.nilable(String),
322
+ type: Revox::AssistantUpdateParams::Type::OrSymbol,
126
323
  voice: Revox::AssistantUpdateParams::Voice::OrHash,
127
324
  voicemail_message: T.nilable(String),
325
+ voicemail_sms_prompt: T.nilable(String),
326
+ warm_transfer_summary_instructions: T.nilable(String),
128
327
  webhook_url: String,
328
+ zoho: T.nilable(Revox::AssistantUpdateParams::Zoho::OrHash),
129
329
  request_options: Revox::RequestOptions::OrHash
130
330
  ).returns(Revox::Models::AssistantUpdateResponse)
131
331
  end
132
332
  def update(
133
333
  id,
134
- # The background sound to play during the call. Useful to give the impression that
135
- # your AI agent is in an office, in the street, or anywhere else you want.
334
+ # Which call outcomes trigger the after-call SMS. When empty or null, no
335
+ # after-call SMS is sent. E.g. ["interested", "completed", "none"]. Use "none"
336
+ # when outcome is null.
337
+ after_call_sms_outcomes: nil,
338
+ # Prompt / instructions for the after-call SMS. Supports {{variable}}
339
+ # placeholders. When null, no after-call SMS is sent.
340
+ after_call_sms_prompt: nil,
341
+ # Ambient background sound to play during the call. null/omitted disables it.
136
342
  background_sound: nil,
343
+ # Volume of the ambient background sound (0 = silent, 1 = max).
344
+ background_sound_volume: nil,
137
345
  calendly: nil,
138
346
  # Configuration for call retry behavior including time windows, delays, and max
139
347
  # iterations. If not provided, defaults will be used.
140
348
  call_retry_config: nil,
349
+ # Optional Cartesia pronunciation dictionary ID to use for this assistant's calls.
350
+ # Set null to unlink it.
351
+ cartesia_dictionary_pronunciation_id: nil,
352
+ # Custom API tools the assistant can call during conversations. Each tool defines
353
+ # an HTTP endpoint with variable substitution.
354
+ custom_tools: nil,
355
+ # Email address(es) to receive notifications when a call ends with a matching
356
+ # outcome. Accepts a single email or a comma-separated list (e.g. "alice@x.com,
357
+ # bob@y.com").
358
+ email_notification_address: nil,
359
+ # The language used for the notification email content. One of "en" or "fr".
360
+ # Defaults to "en".
361
+ email_notification_language: nil,
362
+ # Which call outcomes trigger an email notification. E.g. ["interested",
363
+ # "completed", "none"]. Use "none" when outcome is null.
364
+ email_notification_outcomes: nil,
141
365
  # Optional message to say when the agent decides to end the call.
142
366
  end_of_call_sentence: nil,
143
367
  # FAQ items to associate with this assistant. When provided, replaces all existing
@@ -152,34 +376,102 @@ module Revox
152
376
  # first_sentence will be spoken exactly as provided. "none" means the agent will
153
377
  # not speak first and will wait for the user.
154
378
  first_sentence_mode: nil,
379
+ # Override the default outbound phone number for calls placed with this assistant.
380
+ # Must be a phone number owned by the organization in E.164 format (e.g.
381
+ # +1234567890). When null, the organization's default phone number is used.
382
+ from_phone_number: nil,
383
+ # When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER;
384
+ # trunk must allow REFER/PSTN). Omit or null when transfer is disabled.
385
+ human_transfer_mode: nil,
155
386
  # Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
156
387
  # skip turns to navigate phone menus.
157
388
  ivr_navigation_enabled: nil,
158
389
  llm_model: nil,
390
+ # Public URL of the brand logo shown on the assistant's demo page. Upload a new
391
+ # logo via POST /assistants/:id/logo. Set explicitly to null to clear it.
392
+ logo_url: nil,
159
393
  # The maximum duration of the call in seconds. This is the maximum time the call
160
394
  # will be allowed to run.
161
395
  max_call_duration_secs: nil,
396
+ # Optional message the agent will say, without being interruptible, when the call
397
+ # reaches its max duration. Kept short so it fits inside the farewell buffer. If
398
+ # not set, the call ends silently.
399
+ max_duration_end_message: nil,
162
400
  name: nil,
401
+ # Canvas position of this assistant's node in its multi-step flow editor.
402
+ position: nil,
163
403
  # The prompt to use for the call. This will be given to the LLM (gpt-4.1)
164
404
  prompt: nil,
405
+ # Visual prompt constructor data (nodes, edges, positions). Used by the UI to
406
+ # re-open the visual editor. Does not affect call behavior — the flattened prompt
407
+ # field is what the LLM receives.
408
+ prompt_flow: nil,
409
+ # Slack notification config. When set, posts a message to the chosen channel after
410
+ # a call ends with one of the configured outcomes.
411
+ slack: nil,
412
+ # Enable SMS tool during calls. When enabled, the agent can send SMS messages to
413
+ # the user on the call.
414
+ sms_enabled: nil,
415
+ # Hardcoded SMS template to send during calls. When set, this exact text is sent
416
+ # instead of letting the agent generate the message. Supports {{variable}}
417
+ # placeholders.
418
+ sms_template: nil,
165
419
  # The structured output config to use for the call. This is used to extract the
166
420
  # data from the call (like email, name, company name, etc.).
167
421
  structured_output_config: nil,
422
+ # Custom prompt for structured data extraction. If not provided, a default prompt
423
+ # is used. Available variables: {{transcript}}, {{call_direction}},
424
+ # {{user_phone_number}}, {{agent_phone_number}}.
425
+ structured_output_prompt: nil,
426
+ # Assistant-level speech-to-text context: structured `general` key/value pairs
427
+ # plus a list of domain `terms`. Prompt-derived context is merged in without
428
+ # replacing existing entries.
429
+ stt_context: nil,
430
+ # Transcriber (speech-to-text) model. Defaults to the newest Soniox realtime model
431
+ # when omitted.
432
+ stt_model: nil,
433
+ # Audio clip to play while the agent is processing a response. One of the built-in
434
+ # LiveKit audio clips; null/omitted disables it.
435
+ thinking_sound: nil,
436
+ # Probability [0..1] that the thinking sound plays on any given turn; otherwise
437
+ # the agent is silent while thinking.
438
+ thinking_sound_probability: nil,
439
+ # Volume of the thinking sound (0 = silent, 1 = max).
440
+ thinking_sound_volume: nil,
168
441
  # Phone number to transfer calls to when users request to speak to a human agent
169
442
  # in E.164 format (e.g. +1234567890).
170
443
  transfer_phone_number: nil,
444
+ # Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step'
445
+ # orchestrates a flow of sub-assistants, 'sub-assistant' is a step inside a
446
+ # multi-step flow (hidden from the assistants list). Flow transitions are managed
447
+ # via the /assistants/:id/edges endpoints, not on the assistant itself.
448
+ type: nil,
171
449
  # The voice to use for the call. You can get the list of voices using the /voices
172
450
  # endpoint
173
451
  voice: nil,
174
452
  # If set, when voicemail is detected the agent will speak this message then hang
175
453
  # up; if null, hang up immediately.
176
454
  voicemail_message: nil,
455
+ # SMS message to send when the call reaches voicemail. Supports {{variable}}
456
+ # placeholders. When null, no SMS is sent on voicemail.
457
+ voicemail_sms_prompt: nil,
458
+ # When using warm transfer: extra instructions for the supervisor handoff summary.
459
+ # If null or empty, the API uses the product default briefing when the call is
460
+ # loaded for the agent.
461
+ warm_transfer_summary_instructions: nil,
177
462
  # The webhook URL to call when the call is completed.
178
463
  webhook_url: nil,
464
+ # Zoho CRM integration config. When set, upserts the prospect (keyed on phone)
465
+ # into the chosen module and attaches a Note with the call summary after a call
466
+ # ends with one of the configured outcomes.
467
+ zoho: nil,
179
468
  request_options: {}
180
469
  )
181
470
  end
182
471
 
472
+ # Retrieve all assistants associated with your account. Each assistant in the
473
+ # response includes its full configuration: prompt, voice settings, and first
474
+ # sentence. Use this endpoint to list available assistants before placing calls.
183
475
  sig do
184
476
  params(request_options: Revox::RequestOptions::OrHash).returns(
185
477
  Revox::Models::AssistantListResponse
@@ -188,6 +480,9 @@ module Revox
188
480
  def list(request_options: {})
189
481
  end
190
482
 
483
+ # Permanently delete an assistant by its ID. Any future calls referencing this
484
+ # assistant ID will fail. Existing call records that used this assistant are not
485
+ # affected.
191
486
  sig do
192
487
  params(
193
488
  id: String,
@@ -3,8 +3,12 @@
3
3
  module Revox
4
4
  module Resources
5
5
  class Call
6
- # Place a new call order. A call order can be resolved over multiple call attempts
7
- # spanning up to a few days.
6
+ # Place a new outbound call order. Provide either an existing assistant ID or a
7
+ # custom assistant configuration. The call can be scheduled for a specific time or
8
+ # started immediately. A single call order may be resolved over multiple call
9
+ # attempts spanning up to a few days, with automatic retries when voicemail is
10
+ # detected. You can also set concurrency limits and pass prompt variables for
11
+ # dynamic personalization.
8
12
  sig do
9
13
  params(
10
14
  phone_number: String,
@@ -47,7 +51,10 @@ module Revox
47
51
  )
48
52
  end
49
53
 
50
- # Get a call order by ID.
54
+ # Retrieve the full details of a call order by its unique ID. The response
55
+ # includes the call status, call attempts, transcript, recording URL, timestamps,
56
+ # and metadata. Use this endpoint to poll for call completion or inspect results
57
+ # after a call has finished.
51
58
  sig do
52
59
  params(
53
60
  id: String,
@@ -61,22 +68,6 @@ module Revox
61
68
  )
62
69
  end
63
70
 
64
- # Get the list of call orders.
65
- sig do
66
- params(
67
- page: Float,
68
- page_size: Float,
69
- request_options: Revox::RequestOptions::OrHash
70
- ).returns(Revox::Models::CallListResponse)
71
- end
72
- def list(
73
- # The page number you want to get. Starting at 0.
74
- page:,
75
- page_size:,
76
- request_options: {}
77
- )
78
- end
79
-
80
71
  # @api private
81
72
  sig { params(client: Revox::Client).returns(T.attached_class) }
82
73
  def self.new(client:)
@@ -0,0 +1,121 @@
1
+ # typed: strong
2
+
3
+ module Revox
4
+ module Resources
5
+ class Campaigns
6
+ # Create a new outbound calling campaign. By default the campaign launches
7
+ # immediately. Set launch to false to save as a draft for later review.
8
+ sig do
9
+ params(
10
+ assistant_id: String,
11
+ contacts: T::Array[Revox::CampaignCreateParams::Contact::OrHash],
12
+ launch: T::Boolean,
13
+ name: String,
14
+ type: Revox::CampaignCreateParams::Type::OrSymbol,
15
+ call_retry_config:
16
+ Revox::CampaignCreateParams::CallRetryConfig::OrHash,
17
+ from_phone_number: String,
18
+ max_concurrent_calls: Float,
19
+ scheduled_at: Revox::CampaignCreateParams::ScheduledAt::Variants,
20
+ request_options: Revox::RequestOptions::OrHash
21
+ ).returns(Revox::Models::CampaignCreateResponse)
22
+ end
23
+ def create(
24
+ # The ID of the assistant to use
25
+ assistant_id:,
26
+ # The list of contacts to call
27
+ contacts:,
28
+ # Whether to launch the campaign immediately. Set to false to save as a draft.
29
+ launch:,
30
+ # The name of the campaign
31
+ name:,
32
+ # Campaign type. 'jump_in' campaigns only dial while someone is on the campaign
33
+ # page and auto-pause when unattended.
34
+ type:,
35
+ # Override retry configuration for calls in this campaign. If not provided, uses
36
+ # the assistant's retry config.
37
+ call_retry_config: nil,
38
+ # The phone number to use for outbound calls (E.164 format, e.g., +1234567890)
39
+ from_phone_number: nil,
40
+ # Maximum number of concurrent calls allowed for this campaign
41
+ max_concurrent_calls: nil,
42
+ # Schedule all calls in this campaign to start at a specific date and time (ISO
43
+ # 8601 format)
44
+ scheduled_at: nil,
45
+ request_options: {}
46
+ )
47
+ end
48
+
49
+ # Retrieve the full details of a single campaign by its unique ID. Can be used to
50
+ # poll for campaign completion.
51
+ sig do
52
+ params(
53
+ id: String,
54
+ request_options: Revox::RequestOptions::OrHash
55
+ ).returns(Revox::Models::CampaignRetrieveResponse)
56
+ end
57
+ def retrieve(id, request_options: {})
58
+ end
59
+
60
+ # Retrieve all campaigns for your organization, including both active and
61
+ # completed ones.
62
+ sig do
63
+ params(request_options: Revox::RequestOptions::OrHash).returns(
64
+ Revox::Models::CampaignListResponse
65
+ )
66
+ end
67
+ def list(request_options: {})
68
+ end
69
+
70
+ # Permanently delete a campaign and all its associated rows. This action is
71
+ # irreversible. In-progress calls will not be affected, but no new calls will be
72
+ # placed.
73
+ sig do
74
+ params(
75
+ id: String,
76
+ request_options: Revox::RequestOptions::OrHash
77
+ ).returns(Revox::Models::CampaignDeleteResponse)
78
+ end
79
+ def delete(id, request_options: {})
80
+ end
81
+
82
+ # Cancel a running or scheduled campaign. Pending and queued calls will be
83
+ # aborted, while in-progress calls will be allowed to finish. Unlike deletion, the
84
+ # campaign and its rows are preserved for historical reference.
85
+ sig do
86
+ params(
87
+ id: String,
88
+ request_options: Revox::RequestOptions::OrHash
89
+ ).returns(Revox::Models::CampaignCancelResponse)
90
+ end
91
+ def cancel(id, request_options: {})
92
+ end
93
+
94
+ # Export all rows of a campaign as a CSV file for offline analysis or reporting.
95
+ sig do
96
+ params(
97
+ id: String,
98
+ request_options: Revox::RequestOptions::OrHash
99
+ ).returns(Revox::Models::CampaignExportRowsResponse)
100
+ end
101
+ def export_rows(id, request_options: {})
102
+ end
103
+
104
+ # Retrieve all contact rows for a campaign. Useful for loading draft campaign data
105
+ # for editing.
106
+ sig do
107
+ params(
108
+ id: String,
109
+ request_options: Revox::RequestOptions::OrHash
110
+ ).returns(Revox::Models::CampaignGetRowsResponse)
111
+ end
112
+ def get_rows(id, request_options: {})
113
+ end
114
+
115
+ # @api private
116
+ sig { params(client: Revox::Client).returns(T.attached_class) }
117
+ def self.new(client:)
118
+ end
119
+ end
120
+ end
121
+ end