@vapi-ai/web 2.2.6 → 2.2.8

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 (4) hide show
  1. package/api.ts +1177 -838
  2. package/dist/api.d.ts +1031 -595
  3. package/dist/api.js +33 -0
  4. package/package.json +3 -2
package/api.ts CHANGED
@@ -184,19 +184,53 @@ export interface OpenAIMessage {
184
184
  role: 'assistant' | 'function' | 'user' | 'system' | 'tool';
185
185
  }
186
186
 
187
+ export interface Mono {
188
+ /** This is the combined recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. */
189
+ combinedUrl?: string;
190
+ /** This is the mono recording url for the assistant. To enable, set `assistant.artifactPlan.recordingEnabled`. */
191
+ assistantUrl?: string;
192
+ /** This is the mono recording url for the customer. To enable, set `assistant.artifactPlan.recordingEnabled`. */
193
+ customerUrl?: string;
194
+ }
195
+
196
+ export interface Recording {
197
+ /** This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. */
198
+ stereoUrl?: string;
199
+ /** This is the video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. */
200
+ videoUrl?: string;
201
+ /** This is video recording start delay in ms. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. This can be used to align the playback of the recording with artifact.messages timestamps. */
202
+ videoRecordingStartDelaySeconds?: number;
203
+ /** This is the mono recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. */
204
+ mono?: Mono;
205
+ }
206
+
187
207
  export interface Artifact {
188
208
  /** These are the messages that were spoken during the call. */
189
209
  messages?: (UserMessage | SystemMessage | BotMessage | ToolCallMessage | ToolCallResultMessage)[];
190
210
  /** These are the messages that were spoken during the call, formatted for OpenAI. */
191
211
  messagesOpenAIFormatted?: OpenAIMessage[];
192
- /** This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. */
212
+ /**
213
+ * This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.
214
+ * @deprecated
215
+ */
193
216
  recordingUrl?: string;
194
- /** This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. */
217
+ /**
218
+ * This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.
219
+ * @deprecated
220
+ */
195
221
  stereoRecordingUrl?: string;
196
- /** This is video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. */
222
+ /**
223
+ * This is video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`.
224
+ * @deprecated
225
+ */
197
226
  videoRecordingUrl?: string;
198
- /** This is video recording start delay in ms. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. This can be used to align the playback of the recording with artifact.messages timestamps. */
227
+ /**
228
+ * This is video recording start delay in ms. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. This can be used to align the playback of the recording with artifact.messages timestamps.
229
+ * @deprecated
230
+ */
199
231
  videoRecordingStartDelaySeconds?: number;
232
+ /** This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. */
233
+ recording?: Recording;
200
234
  /** This is the transcript of the call. This is derived from `artifact.messages` but provided for convenience. */
201
235
  transcript?: string;
202
236
  /** This is the packet capture url for the call. This is only available for `phone` type calls where phone number's provider is `vapi` or `byo-phone-number`. */
@@ -537,10 +571,15 @@ export interface DeepgramTranscriber {
537
571
  | 'base-conversationalai'
538
572
  | 'base-voicemail'
539
573
  | 'base-video'
574
+ | 'whisper'
540
575
  | string;
541
576
  /** This is the language that will be set for the transcription. The list of languages Deepgram supports can be found here: https://developers.deepgram.com/docs/models-languages-overview */
542
577
  language?:
578
+ | 'ar'
579
+ | 'az'
580
+ | 'ba'
543
581
  | 'bg'
582
+ | 'br'
544
583
  | 'ca'
545
584
  | 'cs'
546
585
  | 'da'
@@ -558,19 +597,28 @@ export interface DeepgramTranscriber {
558
597
  | 'es-419'
559
598
  | 'es-LATAM'
560
599
  | 'et'
600
+ | 'eu'
561
601
  | 'fi'
562
602
  | 'fr'
563
603
  | 'fr-CA'
604
+ | 'ha'
605
+ | 'haw'
606
+ | 'he'
564
607
  | 'hi'
565
608
  | 'hi-Latn'
566
609
  | 'hu'
567
610
  | 'id'
611
+ | 'is'
568
612
  | 'it'
569
613
  | 'ja'
614
+ | 'jw'
615
+ | 'kn'
570
616
  | 'ko'
571
617
  | 'ko-KR'
618
+ | 'ln'
572
619
  | 'lt'
573
620
  | 'lv'
621
+ | 'mk'
574
622
  | 'ms'
575
623
  | 'multi'
576
624
  | 'nl'
@@ -582,6 +630,11 @@ export interface DeepgramTranscriber {
582
630
  | 'ro'
583
631
  | 'ru'
584
632
  | 'sk'
633
+ | 'sl'
634
+ | 'sn'
635
+ | 'so'
636
+ | 'sr'
637
+ | 'su'
585
638
  | 'sv'
586
639
  | 'sv-SE'
587
640
  | 'ta'
@@ -589,8 +642,11 @@ export interface DeepgramTranscriber {
589
642
  | 'th'
590
643
  | 'th-TH'
591
644
  | 'tr'
645
+ | 'tt'
592
646
  | 'uk'
647
+ | 'ur'
593
648
  | 'vi'
649
+ | 'yo'
594
650
  | 'zh'
595
651
  | 'zh-CN'
596
652
  | 'zh-HK'
@@ -1199,6 +1255,7 @@ export interface GoogleTranscriber {
1199
1255
  provider: 'google';
1200
1256
  /** This is the model that will be used for the transcription. */
1201
1257
  model?:
1258
+ | 'gemini-2.5-flash-preview-04-17'
1202
1259
  | 'gemini-2.0-flash-thinking-exp'
1203
1260
  | 'gemini-2.0-pro-exp-02-05'
1204
1261
  | 'gemini-2.0-flash'
@@ -1583,10 +1640,15 @@ export interface FallbackDeepgramTranscriber {
1583
1640
  | 'base-conversationalai'
1584
1641
  | 'base-voicemail'
1585
1642
  | 'base-video'
1643
+ | 'whisper'
1586
1644
  | string;
1587
1645
  /** This is the language that will be set for the transcription. The list of languages Deepgram supports can be found here: https://developers.deepgram.com/docs/models-languages-overview */
1588
1646
  language?:
1647
+ | 'ar'
1648
+ | 'az'
1649
+ | 'ba'
1589
1650
  | 'bg'
1651
+ | 'br'
1590
1652
  | 'ca'
1591
1653
  | 'cs'
1592
1654
  | 'da'
@@ -1604,19 +1666,28 @@ export interface FallbackDeepgramTranscriber {
1604
1666
  | 'es-419'
1605
1667
  | 'es-LATAM'
1606
1668
  | 'et'
1669
+ | 'eu'
1607
1670
  | 'fi'
1608
1671
  | 'fr'
1609
1672
  | 'fr-CA'
1673
+ | 'ha'
1674
+ | 'haw'
1675
+ | 'he'
1610
1676
  | 'hi'
1611
1677
  | 'hi-Latn'
1612
1678
  | 'hu'
1613
1679
  | 'id'
1680
+ | 'is'
1614
1681
  | 'it'
1615
1682
  | 'ja'
1683
+ | 'jw'
1684
+ | 'kn'
1616
1685
  | 'ko'
1617
1686
  | 'ko-KR'
1687
+ | 'ln'
1618
1688
  | 'lt'
1619
1689
  | 'lv'
1690
+ | 'mk'
1620
1691
  | 'ms'
1621
1692
  | 'multi'
1622
1693
  | 'nl'
@@ -1628,6 +1699,11 @@ export interface FallbackDeepgramTranscriber {
1628
1699
  | 'ro'
1629
1700
  | 'ru'
1630
1701
  | 'sk'
1702
+ | 'sl'
1703
+ | 'sn'
1704
+ | 'so'
1705
+ | 'sr'
1706
+ | 'su'
1631
1707
  | 'sv'
1632
1708
  | 'sv-SE'
1633
1709
  | 'ta'
@@ -1635,8 +1711,11 @@ export interface FallbackDeepgramTranscriber {
1635
1711
  | 'th'
1636
1712
  | 'th-TH'
1637
1713
  | 'tr'
1714
+ | 'tt'
1638
1715
  | 'uk'
1716
+ | 'ur'
1639
1717
  | 'vi'
1718
+ | 'yo'
1640
1719
  | 'zh'
1641
1720
  | 'zh-CN'
1642
1721
  | 'zh-HK'
@@ -2235,6 +2314,7 @@ export interface FallbackGoogleTranscriber {
2235
2314
  provider: 'google';
2236
2315
  /** This is the model that will be used for the transcription. */
2237
2316
  model?:
2317
+ | 'gemini-2.5-flash-preview-04-17'
2238
2318
  | 'gemini-2.0-flash-thinking-exp'
2239
2319
  | 'gemini-2.0-pro-exp-02-05'
2240
2320
  | 'gemini-2.0-flash'
@@ -2570,7 +2650,7 @@ export interface Condition {
2570
2650
  * This is the value you want to compare against the parameter.
2571
2651
  * @maxLength 1000
2572
2652
  */
2573
- value: object;
2653
+ value: string;
2574
2654
  }
2575
2655
 
2576
2656
  export interface ToolMessageStart {
@@ -3220,6 +3300,20 @@ export interface TransferDestinationStep {
3220
3300
  description?: string;
3221
3301
  }
3222
3302
 
3303
+ export interface TransferFallbackPlan {
3304
+ /** This is the message the assistant will deliver to the customer if the transfer fails. */
3305
+ message: string | CustomMessage;
3306
+ /**
3307
+ * This controls what happens after delivering the failure message to the customer.
3308
+ * - true: End the call after delivering the failure message (default)
3309
+ * - false: Keep the assistant on the call to continue handling the customer's request
3310
+ *
3311
+ * @default true
3312
+ * @default true
3313
+ */
3314
+ endCallEnabled?: boolean;
3315
+ }
3316
+
3223
3317
  export interface SummaryPlan {
3224
3318
  /**
3225
3319
  * These are the messages used to generate the summary.
@@ -3276,6 +3370,7 @@ export interface TransferPlan {
3276
3370
  * - `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`: The assistant dials the destination, waits for the operator to speak, delivers the `message` to the destination party, and then connects the customer.
3277
3371
  * - `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`: The assistant dials the destination, waits for the operator to speak, provides a summary of the call to the destination party, and then connects the customer.
3278
3372
  * - `warm-transfer-twiml`: The assistant dials the destination, executes the twiml instructions on the destination call leg, connects the customer, and leaves the call.
3373
+ * - `warm-transfer-experimental`: The assistant puts the customer on hold, dials the destination, and if the destination answers (and is human), delivers a message or summary before connecting the customer. If the destination is unreachable or not human (e.g., with voicemail detection), the assistant delivers the `fallbackMessage` to the customer and optionally ends the call.
3279
3374
  *
3280
3375
  * @default 'blind-transfer'
3281
3376
  */
@@ -3286,12 +3381,13 @@ export interface TransferPlan {
3286
3381
  | 'warm-transfer-say-summary'
3287
3382
  | 'warm-transfer-twiml'
3288
3383
  | 'warm-transfer-wait-for-operator-to-speak-first-and-then-say-message'
3289
- | 'warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary';
3384
+ | 'warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary'
3385
+ | 'warm-transfer-experimental';
3290
3386
  /**
3291
3387
  * This is the message the assistant will deliver to the destination party before connecting the customer.
3292
3388
  *
3293
3389
  * Usage:
3294
- * - Used only when `mode` is `blind-transfer-add-summary-to-sip-header`, `warm-transfer-say-message` or `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`.
3390
+ * - Used only when `mode` is `blind-transfer-add-summary-to-sip-header`, `warm-transfer-say-message`, `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`, or `warm-transfer-experimental`.
3295
3391
  */
3296
3392
  message?: string | CustomMessage;
3297
3393
  /**
@@ -3302,6 +3398,17 @@ export interface TransferPlan {
3302
3398
  * @default "refer"
3303
3399
  */
3304
3400
  sipVerb?: 'refer' | 'bye' | 'dial';
3401
+ /**
3402
+ * This is the URL to an audio file played while the customer is on hold during transfer.
3403
+ *
3404
+ * Usage:
3405
+ * - Used only when `mode` is `warm-transfer-experimental`.
3406
+ * - Used when transferring calls to play hold audio for the customer.
3407
+ * - Must be a publicly accessible URL to an audio file.
3408
+ * - Supported formats: MP3 and WAV.
3409
+ * - If not provided, the default hold audio will be used.
3410
+ */
3411
+ holdAudioUrl?: string;
3305
3412
  /**
3306
3413
  * This is the TwiML instructions to execute on the destination call leg before connecting the customer.
3307
3414
  *
@@ -3323,9 +3430,23 @@ export interface TransferPlan {
3323
3430
  * This is the plan for generating a summary of the call to present to the destination party.
3324
3431
  *
3325
3432
  * Usage:
3326
- * - Used only when `mode` is `blind-transfer-add-summary-to-sip-header` or `warm-transfer-say-summary` or `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`.
3433
+ * - Used only when `mode` is `blind-transfer-add-summary-to-sip-header` or `warm-transfer-say-summary` or `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary` or `warm-transfer-experimental`.
3327
3434
  */
3328
3435
  summaryPlan?: SummaryPlan;
3436
+ /**
3437
+ * This flag includes the sipHeaders from above in the refer to sip uri as url encoded query params.
3438
+ *
3439
+ * @default false
3440
+ */
3441
+ sipHeadersInReferToEnabled?: boolean;
3442
+ /**
3443
+ * This configures the fallback plan when the transfer fails (destination unreachable, busy, or not human).
3444
+ *
3445
+ * Usage:
3446
+ * - Used only when `mode` is `warm-transfer-experimental`.
3447
+ * - If not provided when using `warm-transfer-experimental`, a default message will be used.
3448
+ */
3449
+ fallbackPlan?: TransferFallbackPlan;
3329
3450
  }
3330
3451
 
3331
3452
  export interface TransferDestinationNumber {
@@ -3519,6 +3640,7 @@ export interface KnowledgeBase {
3519
3640
  provider: 'google';
3520
3641
  /** The model to use for the knowledge base */
3521
3642
  model?:
3643
+ | 'gemini-2.5-flash-preview-04-17'
3522
3644
  | 'gemini-2.0-flash-thinking-exp'
3523
3645
  | 'gemini-2.0-pro-exp-02-05'
3524
3646
  | 'gemini-2.0-flash'
@@ -4245,6 +4367,7 @@ export interface GoogleModel {
4245
4367
  knowledgeBaseId?: string;
4246
4368
  /** This is the Google model that will be used. */
4247
4369
  model:
4370
+ | 'gemini-2.5-flash-preview-04-17'
4248
4371
  | 'gemini-2.0-flash-thinking-exp'
4249
4372
  | 'gemini-2.0-pro-exp-02-05'
4250
4373
  | 'gemini-2.0-flash'
@@ -4476,7 +4599,9 @@ export interface OpenAIModel {
4476
4599
  | 'gpt-4.1-nano'
4477
4600
  | 'gpt-4.5-preview'
4478
4601
  | 'chatgpt-4o-latest'
4602
+ | 'o3'
4479
4603
  | 'o3-mini'
4604
+ | 'o4-mini'
4480
4605
  | 'o1-preview'
4481
4606
  | 'o1-preview-2024-09-12'
4482
4607
  | 'o1-mini'
@@ -4512,7 +4637,9 @@ export interface OpenAIModel {
4512
4637
  | 'gpt-4.1-nano'
4513
4638
  | 'gpt-4.5-preview'
4514
4639
  | 'chatgpt-4o-latest'
4640
+ | 'o3'
4515
4641
  | 'o3-mini'
4642
+ | 'o4-mini'
4516
4643
  | 'o1-preview'
4517
4644
  | 'o1-preview-2024-09-12'
4518
4645
  | 'o1-mini'
@@ -4767,6 +4894,125 @@ export interface TogetherAIModel {
4767
4894
  numFastTurns?: number;
4768
4895
  }
4769
4896
 
4897
+ export interface Start {
4898
+ type: 'start';
4899
+ /** @maxLength 80 */
4900
+ name: string;
4901
+ /** This is for metadata you want to store on the task. */
4902
+ metadata?: object;
4903
+ }
4904
+
4905
+ export interface Assistant {
4906
+ type: 'assistant';
4907
+ assistantId: string;
4908
+ /** @maxLength 80 */
4909
+ name: string;
4910
+ /** This is for metadata you want to store on the task. */
4911
+ metadata?: object;
4912
+ }
4913
+
4914
+ export interface Say {
4915
+ type: 'say';
4916
+ /** @maxLength 1000 */
4917
+ exact?: string;
4918
+ /** @maxLength 1000 */
4919
+ prompt?: string;
4920
+ /** @maxLength 80 */
4921
+ name: string;
4922
+ /** This is for metadata you want to store on the task. */
4923
+ metadata?: object;
4924
+ }
4925
+
4926
+ export interface SayHook {
4927
+ type: 'say';
4928
+ /** This is for metadata you want to store on the task. */
4929
+ metadata?: object;
4930
+ /** @maxLength 1000 */
4931
+ exact?: string;
4932
+ /** @maxLength 1000 */
4933
+ prompt?: string;
4934
+ }
4935
+
4936
+ export interface Hook {
4937
+ /** @maxLength 80 */
4938
+ on: 'task.start' | 'task.output.confirmation' | 'task.delayed';
4939
+ do: SayHook[];
4940
+ }
4941
+
4942
+ export interface Gather {
4943
+ type: 'gather';
4944
+ output: JsonSchema;
4945
+ /** This is whether or not the workflow should read back the gathered data to the user, and ask about its correctness. */
4946
+ confirmContent?: boolean;
4947
+ /**
4948
+ * This is a list of hooks for a task.
4949
+ * Each hook is a list of tasks to run on a trigger (such as on start, on failure, etc).
4950
+ * Only Say is supported for now.
4951
+ */
4952
+ hooks?: Hook[];
4953
+ /** This is the number of times we should try to gather the information from the user before we failover to the fail path. An example of this would be a user refusing to give their phone number for privacy reasons, and then going down a different path on account of this */
4954
+ maxRetries?: number;
4955
+ /** This is a liquid templating string. On the first call to Gather, the template will be filled out with variables from the context, and will be spoken verbatim to the user. An example would be "Base on your zipcode, it looks like you could be in one of these counties: {{ counties | join: ", " }}. Which one do you live in?" */
4956
+ literalTemplate?: string;
4957
+ /** @maxLength 80 */
4958
+ name: string;
4959
+ /** This is for metadata you want to store on the task. */
4960
+ metadata?: object;
4961
+ }
4962
+
4963
+ export interface ApiRequest {
4964
+ type: 'apiRequest';
4965
+ method: 'POST' | 'GET';
4966
+ /** Api endpoint to send requests to. */
4967
+ url: string;
4968
+ /**
4969
+ * These are the custom headers to include in the Api Request sent.
4970
+ *
4971
+ * Each key-value pair represents a header name and its value.
4972
+ */
4973
+ headers?: JsonSchema;
4974
+ /**
4975
+ * This defined the JSON body of your Api Request. For example, if `body_schema`
4976
+ * included "my_field": "my_gather_statement.user_age", then the json body sent to the server would have that particular value assign to it.
4977
+ * Right now, only data from gather statements are supported.
4978
+ */
4979
+ body?: JsonSchema;
4980
+ /**
4981
+ * This is the mode of the Api Request.
4982
+ * We only support BLOCKING and BACKGROUND for now.
4983
+ */
4984
+ mode: 'blocking' | 'background';
4985
+ /**
4986
+ * This is a list of hooks for a task.
4987
+ * Each hook is a list of tasks to run on a trigger (such as on start, on failure, etc).
4988
+ * Only Say is supported for now.
4989
+ */
4990
+ hooks?: Hook[];
4991
+ /** This is the schema for the outputs of the Api Request. */
4992
+ output?: JsonSchema;
4993
+ /** @maxLength 80 */
4994
+ name: string;
4995
+ /** This is for metadata you want to store on the task. */
4996
+ metadata?: object;
4997
+ }
4998
+
4999
+ export interface Hangup {
5000
+ type: 'hangup';
5001
+ /** @maxLength 80 */
5002
+ name: string;
5003
+ /** This is for metadata you want to store on the task. */
5004
+ metadata?: object;
5005
+ }
5006
+
5007
+ export interface Transfer {
5008
+ type: 'transfer';
5009
+ destination: object;
5010
+ /** @maxLength 80 */
5011
+ name: string;
5012
+ /** This is for metadata you want to store on the task. */
5013
+ metadata?: object;
5014
+ }
5015
+
4770
5016
  export interface AIEdgeCondition {
4771
5017
  type: 'ai';
4772
5018
  /**
@@ -4778,7 +5024,7 @@ export interface AIEdgeCondition {
4778
5024
 
4779
5025
  export interface LogicEdgeCondition {
4780
5026
  type: 'logic';
4781
- /** @maxLength 100 */
5027
+ /** @maxLength 1000 */
4782
5028
  liquid: string;
4783
5029
  }
4784
5030
 
@@ -4796,8 +5042,8 @@ export interface Edge {
4796
5042
  metadata?: object;
4797
5043
  }
4798
5044
 
4799
- export interface Workflow {
4800
- nodes: (Say | Gather | ApiRequest | Hangup | Transfer)[];
5045
+ export interface WorkflowUserEditable {
5046
+ nodes: (Start | Assistant | Say | Gather | ApiRequest | Hangup | Transfer)[];
4801
5047
  /** These are the options for the workflow's LLM. */
4802
5048
  model?:
4803
5049
  | AnthropicModel
@@ -4814,12 +5060,6 @@ export interface Workflow {
4814
5060
  | PerplexityAIModel
4815
5061
  | TogetherAIModel
4816
5062
  | XaiModel;
4817
- id: string;
4818
- orgId: string;
4819
- /** @format date-time */
4820
- createdAt: string;
4821
- /** @format date-time */
4822
- updatedAt: string;
4823
5063
  /** @maxLength 80 */
4824
5064
  name: string;
4825
5065
  edges: Edge[];
@@ -4861,7 +5101,7 @@ export interface VapiModel {
4861
5101
  /** This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead. */
4862
5102
  workflowId?: string;
4863
5103
  /** This is the workflow that will be used for the call. To use an existing workflow, use `workflowId` instead. */
4864
- workflow?: Workflow;
5104
+ workflow?: WorkflowUserEditable;
4865
5105
  /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
4866
5106
  model: string;
4867
5107
  /**
@@ -5182,6 +5422,12 @@ export interface FallbackPlan {
5182
5422
  }
5183
5423
 
5184
5424
  export interface AzureVoice {
5425
+ /**
5426
+ * This is the flag to toggle voice caching for the assistant.
5427
+ * @default true
5428
+ * @example true
5429
+ */
5430
+ cachingEnabled?: boolean;
5185
5431
  /** This is the voice provider that will be used. */
5186
5432
  provider: 'azure';
5187
5433
  /** This is the provider-specific ID that will be used. */
@@ -5225,6 +5471,12 @@ export interface CartesiaExperimentalControls {
5225
5471
  }
5226
5472
 
5227
5473
  export interface CartesiaVoice {
5474
+ /**
5475
+ * This is the flag to toggle voice caching for the assistant.
5476
+ * @default true
5477
+ * @example true
5478
+ */
5479
+ cachingEnabled?: boolean;
5228
5480
  /** This is the voice provider that will be used. */
5229
5481
  provider: 'cartesia';
5230
5482
  /** The ID of the particular voice you want to use. */
@@ -5263,6 +5515,12 @@ export interface CartesiaVoice {
5263
5515
  }
5264
5516
 
5265
5517
  export interface CustomVoice {
5518
+ /**
5519
+ * This is the flag to toggle voice caching for the assistant.
5520
+ * @default true
5521
+ * @example true
5522
+ */
5523
+ cachingEnabled?: boolean;
5266
5524
  /** This is the voice provider that will be used. Use `custom-voice` for providers that are not natively supported. */
5267
5525
  provider: 'custom-voice';
5268
5526
  /** This is the plan for chunking the model output before it is sent to the voice provider. */
@@ -5297,6 +5555,12 @@ export interface CustomVoice {
5297
5555
  }
5298
5556
 
5299
5557
  export interface DeepgramVoice {
5558
+ /**
5559
+ * This is the flag to toggle voice caching for the assistant.
5560
+ * @default true
5561
+ * @example true
5562
+ */
5563
+ cachingEnabled?: boolean;
5300
5564
  /** This is the voice provider that will be used. */
5301
5565
  provider: 'deepgram';
5302
5566
  /**
@@ -5371,6 +5635,12 @@ export interface DeepgramVoice {
5371
5635
  }
5372
5636
 
5373
5637
  export interface ElevenLabsVoice {
5638
+ /**
5639
+ * This is the flag to toggle voice caching for the assistant.
5640
+ * @default true
5641
+ * @example true
5642
+ */
5643
+ cachingEnabled?: boolean;
5374
5644
  /** This is the voice provider that will be used. */
5375
5645
  provider: '11labs';
5376
5646
  /** This is the provider-specific ID that will be used. Ensure the Voice is present in your 11Labs Voice Library. */
@@ -5463,6 +5733,12 @@ export interface ElevenLabsVoice {
5463
5733
  }
5464
5734
 
5465
5735
  export interface HumeVoice {
5736
+ /**
5737
+ * This is the flag to toggle voice caching for the assistant.
5738
+ * @default true
5739
+ * @example true
5740
+ */
5741
+ cachingEnabled?: boolean;
5466
5742
  /** This is the voice provider that will be used. */
5467
5743
  provider: 'hume';
5468
5744
  /**
@@ -5491,6 +5767,12 @@ export interface HumeVoice {
5491
5767
  }
5492
5768
 
5493
5769
  export interface LMNTVoice {
5770
+ /**
5771
+ * This is the flag to toggle voice caching for the assistant.
5772
+ * @default true
5773
+ * @example true
5774
+ */
5775
+ cachingEnabled?: boolean;
5494
5776
  /** This is the voice provider that will be used. */
5495
5777
  provider: 'lmnt';
5496
5778
  /** This is the provider-specific ID that will be used. */
@@ -5509,6 +5791,12 @@ export interface LMNTVoice {
5509
5791
  }
5510
5792
 
5511
5793
  export interface NeuphonicVoice {
5794
+ /**
5795
+ * This is the flag to toggle voice caching for the assistant.
5796
+ * @default true
5797
+ * @example true
5798
+ */
5799
+ cachingEnabled?: boolean;
5512
5800
  /** This is the voice provider that will be used. */
5513
5801
  provider: 'neuphonic';
5514
5802
  /** This is the provider-specific ID that will be used. */
@@ -5537,6 +5825,12 @@ export interface NeuphonicVoice {
5537
5825
  }
5538
5826
 
5539
5827
  export interface OpenAIVoice {
5828
+ /**
5829
+ * This is the flag to toggle voice caching for the assistant.
5830
+ * @default true
5831
+ * @example true
5832
+ */
5833
+ cachingEnabled?: boolean;
5540
5834
  /** This is the voice provider that will be used. */
5541
5835
  provider: 'openai';
5542
5836
  /**
@@ -5566,6 +5860,12 @@ export interface OpenAIVoice {
5566
5860
  }
5567
5861
 
5568
5862
  export interface PlayHTVoice {
5863
+ /**
5864
+ * This is the flag to toggle voice caching for the assistant.
5865
+ * @default true
5866
+ * @example true
5867
+ */
5868
+ cachingEnabled?: boolean;
5569
5869
  /** This is the voice provider that will be used. */
5570
5870
  provider: 'playht';
5571
5871
  /** This is the provider-specific ID that will be used. */
@@ -5681,6 +5981,12 @@ export interface PlayHTVoice {
5681
5981
  }
5682
5982
 
5683
5983
  export interface RimeAIVoice {
5984
+ /**
5985
+ * This is the flag to toggle voice caching for the assistant.
5986
+ * @default true
5987
+ * @example true
5988
+ */
5989
+ cachingEnabled?: boolean;
5684
5990
  /** This is the voice provider that will be used. */
5685
5991
  provider: 'rime-ai';
5686
5992
  /** This is the provider-specific ID that will be used. */
@@ -5807,8 +6113,14 @@ export interface RimeAIVoice {
5807
6113
  }
5808
6114
 
5809
6115
  export interface SmallestAIVoice {
5810
- /** This is the voice provider that will be used. */
5811
- provider: 'smallest-ai';
6116
+ /**
6117
+ * This is the flag to toggle voice caching for the assistant.
6118
+ * @default true
6119
+ * @example true
6120
+ */
6121
+ cachingEnabled?: boolean;
6122
+ /** This is the voice provider that will be used. */
6123
+ provider: 'smallest-ai';
5812
6124
  /** This is the provider-specific ID that will be used. */
5813
6125
  voiceId:
5814
6126
  | 'emily'
@@ -5892,6 +6204,12 @@ export interface TavusConversationProperties {
5892
6204
  }
5893
6205
 
5894
6206
  export interface TavusVoice {
6207
+ /**
6208
+ * This is the flag to toggle voice caching for the assistant.
6209
+ * @default true
6210
+ * @example true
6211
+ */
6212
+ cachingEnabled?: boolean;
5895
6213
  /** This is the voice provider that will be used. */
5896
6214
  provider: 'tavus';
5897
6215
  /** This is the provider-specific ID that will be used. */
@@ -5915,6 +6233,12 @@ export interface TavusVoice {
5915
6233
  }
5916
6234
 
5917
6235
  export interface VapiVoice {
6236
+ /**
6237
+ * This is the flag to toggle voice caching for the assistant.
6238
+ * @default true
6239
+ * @example true
6240
+ */
6241
+ cachingEnabled?: boolean;
5918
6242
  /** This is the voice provider that will be used. */
5919
6243
  provider: 'vapi';
5920
6244
  /** The voices provided by Vapi */
@@ -5991,6 +6315,12 @@ export interface VapiVoice {
5991
6315
  }
5992
6316
 
5993
6317
  export interface FallbackAzureVoice {
6318
+ /**
6319
+ * This is the flag to toggle voice caching for the assistant.
6320
+ * @default true
6321
+ * @example true
6322
+ */
6323
+ cachingEnabled?: boolean;
5994
6324
  /** This is the voice provider that will be used. */
5995
6325
  provider: 'azure';
5996
6326
  /** This is the provider-specific ID that will be used. */
@@ -6006,6 +6336,12 @@ export interface FallbackAzureVoice {
6006
6336
  }
6007
6337
 
6008
6338
  export interface FallbackCartesiaVoice {
6339
+ /**
6340
+ * This is the flag to toggle voice caching for the assistant.
6341
+ * @default true
6342
+ * @example true
6343
+ */
6344
+ cachingEnabled?: boolean;
6009
6345
  /** This is the voice provider that will be used. */
6010
6346
  provider: 'cartesia';
6011
6347
  /** The ID of the particular voice you want to use. */
@@ -6042,6 +6378,12 @@ export interface FallbackCartesiaVoice {
6042
6378
  }
6043
6379
 
6044
6380
  export interface FallbackCustomVoice {
6381
+ /**
6382
+ * This is the flag to toggle voice caching for the assistant.
6383
+ * @default true
6384
+ * @example true
6385
+ */
6386
+ cachingEnabled?: boolean;
6045
6387
  /** This is the voice provider that will be used. Use `custom-voice` for providers that are not natively supported. */
6046
6388
  provider: 'custom-voice';
6047
6389
  /**
@@ -6074,6 +6416,12 @@ export interface FallbackCustomVoice {
6074
6416
  }
6075
6417
 
6076
6418
  export interface FallbackDeepgramVoice {
6419
+ /**
6420
+ * This is the flag to toggle voice caching for the assistant.
6421
+ * @default true
6422
+ * @example true
6423
+ */
6424
+ cachingEnabled?: boolean;
6077
6425
  /** This is the voice provider that will be used. */
6078
6426
  provider: 'deepgram';
6079
6427
  /**
@@ -6146,6 +6494,12 @@ export interface FallbackDeepgramVoice {
6146
6494
  }
6147
6495
 
6148
6496
  export interface FallbackElevenLabsVoice {
6497
+ /**
6498
+ * This is the flag to toggle voice caching for the assistant.
6499
+ * @default true
6500
+ * @example true
6501
+ */
6502
+ cachingEnabled?: boolean;
6149
6503
  /** This is the voice provider that will be used. */
6150
6504
  provider: '11labs';
6151
6505
  /** This is the provider-specific ID that will be used. Ensure the Voice is present in your 11Labs Voice Library. */
@@ -6236,6 +6590,12 @@ export interface FallbackElevenLabsVoice {
6236
6590
  }
6237
6591
 
6238
6592
  export interface FallbackHumeVoice {
6593
+ /**
6594
+ * This is the flag to toggle voice caching for the assistant.
6595
+ * @default true
6596
+ * @example true
6597
+ */
6598
+ cachingEnabled?: boolean;
6239
6599
  /** This is the voice provider that will be used. */
6240
6600
  provider: 'hume';
6241
6601
  /**
@@ -6262,6 +6622,12 @@ export interface FallbackHumeVoice {
6262
6622
  }
6263
6623
 
6264
6624
  export interface FallbackLMNTVoice {
6625
+ /**
6626
+ * This is the flag to toggle voice caching for the assistant.
6627
+ * @default true
6628
+ * @example true
6629
+ */
6630
+ cachingEnabled?: boolean;
6265
6631
  /** This is the voice provider that will be used. */
6266
6632
  provider: 'lmnt';
6267
6633
  /** This is the provider-specific ID that will be used. */
@@ -6278,6 +6644,12 @@ export interface FallbackLMNTVoice {
6278
6644
  }
6279
6645
 
6280
6646
  export interface FallbackNeuphonicVoice {
6647
+ /**
6648
+ * This is the flag to toggle voice caching for the assistant.
6649
+ * @default true
6650
+ * @example true
6651
+ */
6652
+ cachingEnabled?: boolean;
6281
6653
  /** This is the voice provider that will be used. */
6282
6654
  provider: 'neuphonic';
6283
6655
  /** This is the provider-specific ID that will be used. */
@@ -6304,6 +6676,12 @@ export interface FallbackNeuphonicVoice {
6304
6676
  }
6305
6677
 
6306
6678
  export interface FallbackOpenAIVoice {
6679
+ /**
6680
+ * This is the flag to toggle voice caching for the assistant.
6681
+ * @default true
6682
+ * @example true
6683
+ */
6684
+ cachingEnabled?: boolean;
6307
6685
  /** This is the voice provider that will be used. */
6308
6686
  provider: 'openai';
6309
6687
  /**
@@ -6331,6 +6709,12 @@ export interface FallbackOpenAIVoice {
6331
6709
  }
6332
6710
 
6333
6711
  export interface FallbackPlayHTVoice {
6712
+ /**
6713
+ * This is the flag to toggle voice caching for the assistant.
6714
+ * @default true
6715
+ * @example true
6716
+ */
6717
+ cachingEnabled?: boolean;
6334
6718
  /** This is the voice provider that will be used. */
6335
6719
  provider: 'playht';
6336
6720
  /** This is the provider-specific ID that will be used. */
@@ -6444,6 +6828,12 @@ export interface FallbackPlayHTVoice {
6444
6828
  }
6445
6829
 
6446
6830
  export interface FallbackRimeAIVoice {
6831
+ /**
6832
+ * This is the flag to toggle voice caching for the assistant.
6833
+ * @default true
6834
+ * @example true
6835
+ */
6836
+ cachingEnabled?: boolean;
6447
6837
  /** This is the voice provider that will be used. */
6448
6838
  provider: 'rime-ai';
6449
6839
  /** This is the provider-specific ID that will be used. */
@@ -6568,6 +6958,12 @@ export interface FallbackRimeAIVoice {
6568
6958
  }
6569
6959
 
6570
6960
  export interface FallbackSmallestAIVoice {
6961
+ /**
6962
+ * This is the flag to toggle voice caching for the assistant.
6963
+ * @default true
6964
+ * @example true
6965
+ */
6966
+ cachingEnabled?: boolean;
6571
6967
  /** This is the voice provider that will be used. */
6572
6968
  provider: 'smallest-ai';
6573
6969
  /** This is the provider-specific ID that will be used. */
@@ -6610,6 +7006,12 @@ export interface FallbackSmallestAIVoice {
6610
7006
  }
6611
7007
 
6612
7008
  export interface FallbackTavusVoice {
7009
+ /**
7010
+ * This is the flag to toggle voice caching for the assistant.
7011
+ * @default true
7012
+ * @example true
7013
+ */
7014
+ cachingEnabled?: boolean;
6613
7015
  /** This is the voice provider that will be used. */
6614
7016
  provider: 'tavus';
6615
7017
  /** This is the provider-specific ID that will be used. */
@@ -6631,6 +7033,12 @@ export interface FallbackTavusVoice {
6631
7033
  }
6632
7034
 
6633
7035
  export interface FallbackVapiVoice {
7036
+ /**
7037
+ * This is the flag to toggle voice caching for the assistant.
7038
+ * @default true
7039
+ * @example true
7040
+ */
7041
+ cachingEnabled?: boolean;
6634
7042
  /** This is the voice provider that will be used. */
6635
7043
  provider: 'vapi';
6636
7044
  /** The voices provided by Vapi */
@@ -7047,7 +7455,7 @@ export interface CreateCloudflareCredentialDTO {
7047
7455
  }
7048
7456
 
7049
7457
  export interface OAuth2AuthenticationPlan {
7050
- type: 'oauth2';
7458
+ type: 'oauth2' | 'aws-sts';
7051
7459
  /** This is the OAuth2 URL. */
7052
7460
  url: string;
7053
7461
  /** This is the OAuth2 client ID. */
@@ -7498,7 +7906,11 @@ export interface CreateTogetherAICredentialDTO {
7498
7906
  export interface CreateTwilioCredentialDTO {
7499
7907
  provider: 'twilio';
7500
7908
  /** This is not returned in the API. */
7501
- authToken: string;
7909
+ authToken?: string;
7910
+ /** This is not returned in the API. */
7911
+ apiKey?: string;
7912
+ /** This is not returned in the API. */
7913
+ apiSecret?: string;
7502
7914
  accountSid: string;
7503
7915
  /**
7504
7916
  * This is the name of credential. This is just for your reference.
@@ -7602,32 +8014,135 @@ export interface TransferAssistantHookAction {
7602
8014
  destination?: TransferDestinationNumber | TransferDestinationSip;
7603
8015
  }
7604
8016
 
8017
+ export interface FunctionCallAssistantHookAction {
8018
+ /**
8019
+ * This determines if the tool is async.
8020
+ *
8021
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
8022
+ *
8023
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
8024
+ *
8025
+ * Defaults to synchronous (`false`).
8026
+ * @example false
8027
+ */
8028
+ async?: boolean;
8029
+ /**
8030
+ * These are the messages that will be spoken to the user as the tool is running.
8031
+ *
8032
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
8033
+ */
8034
+ messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
8035
+ /** The type of tool. "function" for Function tool. */
8036
+ type: 'function';
8037
+ /**
8038
+ * This is the function definition of the tool.
8039
+ *
8040
+ * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases.
8041
+ *
8042
+ * An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument.
8043
+ */
8044
+ function?: OpenAIFunction;
8045
+ /**
8046
+ * This is the server that will be hit when this tool is requested by the model.
8047
+ *
8048
+ * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
8049
+ *
8050
+ * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl.
8051
+ */
8052
+ server?: Server;
8053
+ }
8054
+
8055
+ export interface AssistantHookFilter {
8056
+ /**
8057
+ * This is the type of filter - currently only "oneOf" is supported
8058
+ * @maxLength 1000
8059
+ */
8060
+ type: 'oneOf';
8061
+ /**
8062
+ * This is the key to filter on (e.g. "call.endedReason")
8063
+ * @maxLength 1000
8064
+ */
8065
+ key: string;
8066
+ /** This is the array of possible values to match against */
8067
+ oneOf: string[];
8068
+ }
8069
+
8070
+ export interface AssistantHookCallEnding {
8071
+ /**
8072
+ * This is the event that triggers this hook
8073
+ * @maxLength 1000
8074
+ */
8075
+ on: 'call.ending';
8076
+ /** This is the set of actions to perform when the hook triggers */
8077
+ do: (TransferAssistantHookAction | FunctionCallAssistantHookAction)[];
8078
+ /** This is the set of filters that must match for the hook to trigger */
8079
+ filters?: AssistantHookFilter[];
8080
+ }
8081
+
8082
+ export interface VoicemailDetectionBackoffPlan {
8083
+ /**
8084
+ * This is the number of seconds to wait before starting the first retry attempt.
8085
+ * @min 0
8086
+ * @default 5
8087
+ */
8088
+ startAtSeconds?: number;
8089
+ /**
8090
+ * This is the interval in seconds between retry attempts.
8091
+ * @min 2.5
8092
+ * @default 5
8093
+ */
8094
+ frequencySeconds?: number;
8095
+ /**
8096
+ * This is the maximum number of retry attempts before giving up.
8097
+ * @min 1
8098
+ * @max 10
8099
+ * @default 6
8100
+ */
8101
+ maxRetries?: number;
8102
+ }
8103
+
7605
8104
  export interface GoogleVoicemailDetectionPlan {
7606
- /** This is the provider to use for voicemail detection. */
7607
- provider: 'google';
7608
8105
  /**
7609
- * This is how long should we listen in order to determine if we were sent to voicemail or not?
8106
+ * This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
7610
8107
  *
7611
- * @default 15
7612
- * @min 5
8108
+ * - If we detect a voicemail beep before this, we will speak the message at that point.
8109
+ *
8110
+ * - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
8111
+ *
8112
+ * @default 30
8113
+ * @min 0
7613
8114
  * @max 60
7614
- * @default 25
8115
+ * @min 0
8116
+ * @max 30
8117
+ * @default 30
7615
8118
  */
7616
- voicemailExpectedDurationSeconds: number;
8119
+ beepMaxAwaitSeconds?: number;
8120
+ /** This is the provider to use for voicemail detection. */
8121
+ provider: 'google';
8122
+ /** This is the backoff plan for the voicemail detection. */
8123
+ backoffPlan?: VoicemailDetectionBackoffPlan;
7617
8124
  }
7618
8125
 
7619
8126
  export interface OpenAIVoicemailDetectionPlan {
7620
- /** This is the provider to use for voicemail detection. */
7621
- provider: 'openai';
7622
8127
  /**
7623
- * This is how long should we listen in order to determine if we were sent to voicemail or not?
8128
+ * This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
7624
8129
  *
7625
- * @default 15
7626
- * @min 5
8130
+ * - If we detect a voicemail beep before this, we will speak the message at that point.
8131
+ *
8132
+ * - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
8133
+ *
8134
+ * @default 30
8135
+ * @min 0
7627
8136
  * @max 60
7628
- * @default 25
8137
+ * @min 0
8138
+ * @max 30
8139
+ * @default 30
7629
8140
  */
7630
- voicemailExpectedDurationSeconds: number;
8141
+ beepMaxAwaitSeconds?: number;
8142
+ /** This is the provider to use for voicemail detection. */
8143
+ provider: 'openai';
8144
+ /** This is the backoff plan for the voicemail detection. */
8145
+ backoffPlan?: VoicemailDetectionBackoffPlan;
7631
8146
  }
7632
8147
 
7633
8148
  export interface TwilioVoicemailDetectionPlan {
@@ -7713,6 +8228,28 @@ export interface TwilioVoicemailDetectionPlan {
7713
8228
  machineDetectionSilenceTimeout?: number;
7714
8229
  }
7715
8230
 
8231
+ export interface VapiVoicemailDetectionPlan {
8232
+ /**
8233
+ * This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
8234
+ *
8235
+ * - If we detect a voicemail beep before this, we will speak the message at that point.
8236
+ *
8237
+ * - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
8238
+ *
8239
+ * @default 30
8240
+ * @min 0
8241
+ * @max 60
8242
+ * @min 0
8243
+ * @max 30
8244
+ * @default 30
8245
+ */
8246
+ beepMaxAwaitSeconds?: number;
8247
+ /** This is the provider to use for voicemail detection. */
8248
+ provider: 'vapi';
8249
+ /** This is the backoff plan for the voicemail detection. */
8250
+ backoffPlan?: VoicemailDetectionBackoffPlan;
8251
+ }
8252
+
7716
8253
  export interface CompliancePlan {
7717
8254
  /**
7718
8255
  * When this is enabled, no logs, recordings, or transcriptions will be stored.
@@ -8125,7 +8662,7 @@ export interface StartSpeakingPlan {
8125
8662
  * @deprecated
8126
8663
  * @example false
8127
8664
  */
8128
- smartEndpointingEnabled?: object;
8665
+ smartEndpointingEnabled?: boolean | 'livekit';
8129
8666
  /**
8130
8667
  * This is the plan for smart endpointing. Pick between Vapi smart endpointing or LiveKit smart endpointing (or nothing). We strongly recommend using livekit endpointing when working in English. LiveKit endpointing is not supported in other languages, yet.
8131
8668
  *
@@ -8253,35 +8790,6 @@ export interface MonitorPlan {
8253
8790
  controlEnabled?: boolean;
8254
8791
  }
8255
8792
 
8256
- export interface AssistantHookFilter {
8257
- /**
8258
- * This is the type of filter - currently only "oneOf" is supported
8259
- * @maxLength 1000
8260
- */
8261
- type: 'oneOf';
8262
- /**
8263
- * This is the key to filter on (e.g. "call.endedReason")
8264
- * @maxLength 1000
8265
- */
8266
- key: string;
8267
- /** This is the array of possible values to match against */
8268
- oneOf: string[];
8269
- }
8270
-
8271
- export type AssistantHookActionBase = object;
8272
-
8273
- export interface AssistantHooks {
8274
- /**
8275
- * This is the event that triggers this hook
8276
- * @maxLength 1000
8277
- */
8278
- on: 'call.ending';
8279
- /** This is the set of filters that must match for the hook to trigger */
8280
- filters?: AssistantHookFilter[];
8281
- /** This is the set of actions to perform when the hook triggers */
8282
- do: AssistantHookActionBase[];
8283
- }
8284
-
8285
8793
  export interface KeypadInputPlan {
8286
8794
  /**
8287
8795
  * This keeps track of whether the user has enabled keypad input.
@@ -8388,50 +8896,10 @@ export interface CreateAssistantDTO {
8388
8896
  voicemailDetection?:
8389
8897
  | GoogleVoicemailDetectionPlan
8390
8898
  | OpenAIVoicemailDetectionPlan
8391
- | TwilioVoicemailDetectionPlan;
8392
- /**
8393
- * These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started. You can check the shape of the messages in ClientMessage schema.
8394
- * @example ["conversation-update","function-call","hang","model-output","speech-update","status-update","transfer-update","transcript","tool-calls","user-interrupted","voice-input","workflow.node.started"]
8395
- */
8396
- clientMessages?:
8397
- | 'conversation-update'
8398
- | 'function-call'
8399
- | 'function-call-result'
8400
- | 'hang'
8401
- | 'language-changed'
8402
- | 'metadata'
8403
- | 'model-output'
8404
- | 'speech-update'
8405
- | 'status-update'
8406
- | 'transcript'
8407
- | 'tool-calls'
8408
- | 'tool-calls-result'
8409
- | 'transfer-update'
8410
- | 'user-interrupted'
8411
- | 'voice-input'
8412
- | 'workflow.node.started';
8413
- /**
8414
- * These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema.
8415
- * @example ["conversation-update","end-of-call-report","function-call","hang","speech-update","status-update","tool-calls","transfer-destination-request","user-interrupted"]
8416
- */
8417
- serverMessages?:
8418
- | 'conversation-update'
8419
- | 'end-of-call-report'
8420
- | 'function-call'
8421
- | 'hang'
8422
- | 'language-changed'
8423
- | 'language-change-detected'
8424
- | 'model-output'
8425
- | 'phone-call-control'
8426
- | 'speech-update'
8427
- | 'status-update'
8428
- | 'transcript'
8429
- | "transcript[transcriptType='final']"
8430
- | 'tool-calls'
8431
- | 'transfer-destination-request'
8432
- | 'transfer-update'
8433
- | 'user-interrupted'
8434
- | 'voice-input';
8899
+ | TwilioVoicemailDetectionPlan
8900
+ | VapiVoicemailDetectionPlan;
8901
+ clientMessages: object[][];
8902
+ serverMessages: object[][];
8435
8903
  /**
8436
8904
  * How many seconds of silence to wait before ending the call. Defaults to 30.
8437
8905
  *
@@ -8625,6 +9093,8 @@ export interface CreateAssistantDTO {
8625
9093
  provider: 'slack.oauth2-authorization';
8626
9094
  } & CreateSlackOAuth2AuthorizationCredentialDTO)
8627
9095
  )[];
9096
+ /** This is a set of actions that will be performed on certain events. */
9097
+ hooks?: AssistantHookCallEnding[];
8628
9098
  /**
8629
9099
  * This is the name of the assistant.
8630
9100
  *
@@ -8707,8 +9177,6 @@ export interface CreateAssistantDTO {
8707
9177
  * 3. org.serverUrl
8708
9178
  */
8709
9179
  server?: Server;
8710
- /** This is a set of actions that will be performed on certain events. */
8711
- hooks?: AssistantHooks[];
8712
9180
  keypadInputPlan?: KeypadInputPlan;
8713
9181
  }
8714
9182
 
@@ -8793,50 +9261,10 @@ export interface AssistantOverrides {
8793
9261
  voicemailDetection?:
8794
9262
  | GoogleVoicemailDetectionPlan
8795
9263
  | OpenAIVoicemailDetectionPlan
8796
- | TwilioVoicemailDetectionPlan;
8797
- /**
8798
- * These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started. You can check the shape of the messages in ClientMessage schema.
8799
- * @example ["conversation-update","function-call","hang","model-output","speech-update","status-update","transfer-update","transcript","tool-calls","user-interrupted","voice-input","workflow.node.started"]
8800
- */
8801
- clientMessages?:
8802
- | 'conversation-update'
8803
- | 'function-call'
8804
- | 'function-call-result'
8805
- | 'hang'
8806
- | 'language-changed'
8807
- | 'metadata'
8808
- | 'model-output'
8809
- | 'speech-update'
8810
- | 'status-update'
8811
- | 'transcript'
8812
- | 'tool-calls'
8813
- | 'tool-calls-result'
8814
- | 'transfer-update'
8815
- | 'user-interrupted'
8816
- | 'voice-input'
8817
- | 'workflow.node.started';
8818
- /**
8819
- * These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema.
8820
- * @example ["conversation-update","end-of-call-report","function-call","hang","speech-update","status-update","tool-calls","transfer-destination-request","user-interrupted"]
8821
- */
8822
- serverMessages?:
8823
- | 'conversation-update'
8824
- | 'end-of-call-report'
8825
- | 'function-call'
8826
- | 'hang'
8827
- | 'language-changed'
8828
- | 'language-change-detected'
8829
- | 'model-output'
8830
- | 'phone-call-control'
8831
- | 'speech-update'
8832
- | 'status-update'
8833
- | 'transcript'
8834
- | "transcript[transcriptType='final']"
8835
- | 'tool-calls'
8836
- | 'transfer-destination-request'
8837
- | 'transfer-update'
8838
- | 'user-interrupted'
8839
- | 'voice-input';
9264
+ | TwilioVoicemailDetectionPlan
9265
+ | VapiVoicemailDetectionPlan;
9266
+ clientMessages: object[][];
9267
+ serverMessages: object[][];
8840
9268
  /**
8841
9269
  * How many seconds of silence to wait before ending the call. Defaults to 30.
8842
9270
  *
@@ -9030,6 +9458,8 @@ export interface AssistantOverrides {
9030
9458
  provider: 'slack.oauth2-authorization';
9031
9459
  } & CreateSlackOAuth2AuthorizationCredentialDTO)
9032
9460
  )[];
9461
+ /** This is a set of actions that will be performed on certain events. */
9462
+ hooks?: AssistantHookCallEnding[];
9033
9463
  /**
9034
9464
  * These are values that will be used to replace the template variables in the assistant messages and other text-based fields.
9035
9465
  * This uses LiquidJS syntax. https://liquidjs.com/tutorials/intro-to-liquid.html
@@ -9122,8 +9552,6 @@ export interface AssistantOverrides {
9122
9552
  * 3. org.serverUrl
9123
9553
  */
9124
9554
  server?: Server;
9125
- /** This is a set of actions that will be performed on certain events. */
9126
- hooks?: AssistantHooks[];
9127
9555
  keypadInputPlan?: KeypadInputPlan;
9128
9556
  }
9129
9557
 
@@ -9159,6 +9587,46 @@ export interface CreateSquadDTO {
9159
9587
  membersOverrides?: AssistantOverrides;
9160
9588
  }
9161
9589
 
9590
+ export interface CreateWorkflowDTO {
9591
+ nodes: (Start | Assistant | Say | Gather | ApiRequest | Hangup | Transfer)[];
9592
+ /** These are the options for the workflow's LLM. */
9593
+ model?:
9594
+ | AnthropicModel
9595
+ | AnyscaleModel
9596
+ | CerebrasModel
9597
+ | CustomLLMModel
9598
+ | DeepInfraModel
9599
+ | DeepSeekModel
9600
+ | GoogleModel
9601
+ | GroqModel
9602
+ | InflectionAIModel
9603
+ | OpenAIModel
9604
+ | OpenRouterModel
9605
+ | PerplexityAIModel
9606
+ | TogetherAIModel
9607
+ | XaiModel;
9608
+ /** @maxLength 80 */
9609
+ name: string;
9610
+ edges: Edge[];
9611
+ }
9612
+
9613
+ export interface TransferPhoneNumberHookAction {
9614
+ /** This is the type of action - must be "transfer" */
9615
+ type: 'transfer';
9616
+ /** This is the destination details for the transfer - can be a phone number or SIP URI */
9617
+ destination?: TransferDestinationNumber | TransferDestinationSip;
9618
+ }
9619
+
9620
+ export interface SayPhoneNumberHookAction {
9621
+ /** This is the type of action - must be "say" */
9622
+ type: 'say';
9623
+ /**
9624
+ * This is the message to say
9625
+ * @maxLength 4000
9626
+ */
9627
+ exact: string;
9628
+ }
9629
+
9162
9630
  export interface PhoneNumberHookCallRinging {
9163
9631
  /**
9164
9632
  * This is the event to trigger the hook on
@@ -9166,7 +9634,7 @@ export interface PhoneNumberHookCallRinging {
9166
9634
  */
9167
9635
  on: 'call.ringing';
9168
9636
  /** This is the set of actions to perform when the hook triggers */
9169
- do: any[];
9637
+ do: (TransferPhoneNumberHookAction | SayPhoneNumberHookAction)[];
9170
9638
  }
9171
9639
 
9172
9640
  export interface ImportTwilioPhoneNumberDTO {
@@ -9182,14 +9650,28 @@ export interface ImportTwilioPhoneNumberDTO {
9182
9650
  /** This is the hooks that will be used for incoming calls to this phone number. */
9183
9651
  hooks?: PhoneNumberHookCallRinging[];
9184
9652
  /**
9185
- * These are the digits of the phone number you own on your Twilio.
9186
- * @deprecated
9187
- */
9188
- twilioPhoneNumber: string;
9189
- /** This is your Twilio Account SID that will be used to handle this phone number. */
9653
+ * Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.
9654
+ *
9655
+ * If set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.
9656
+ * If `true` or omitted (default), Vapi will configure both the voice and messaging URLs.
9657
+ *
9658
+ * @default true
9659
+ * @default true
9660
+ */
9661
+ smsEnabled?: boolean;
9662
+ /**
9663
+ * These are the digits of the phone number you own on your Twilio.
9664
+ * @deprecated
9665
+ */
9666
+ twilioPhoneNumber: string;
9667
+ /** This is your Twilio Account SID that will be used to handle this phone number. */
9190
9668
  twilioAccountSid: string;
9191
9669
  /** This is the Twilio Auth Token that will be used to handle this phone number. */
9192
- twilioAuthToken: string;
9670
+ twilioAuthToken?: string;
9671
+ /** This is the Twilio API Key that will be used to handle this phone number. If AuthToken is provided, this will be ignored. */
9672
+ twilioApiKey?: string;
9673
+ /** This is the Twilio API Secret that will be used to handle this phone number. If AuthToken is provided, this will be ignored. */
9674
+ twilioApiSecret?: string;
9193
9675
  /**
9194
9676
  * This is the name of the phone number. This is just for your own reference.
9195
9677
  * @maxLength 40
@@ -9198,13 +9680,19 @@ export interface ImportTwilioPhoneNumberDTO {
9198
9680
  /**
9199
9681
  * This is the assistant that will be used for incoming calls to this phone number.
9200
9682
  *
9201
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
9683
+ * If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
9202
9684
  */
9203
9685
  assistantId?: string;
9686
+ /**
9687
+ * This is the workflow that will be used for incoming calls to this phone number.
9688
+ *
9689
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
9690
+ */
9691
+ workflowId?: string;
9204
9692
  /**
9205
9693
  * This is the squad that will be used for incoming calls to this phone number.
9206
9694
  *
9207
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
9695
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
9208
9696
  */
9209
9697
  squadId?: string;
9210
9698
  /**
@@ -9286,6 +9774,7 @@ export interface Call {
9286
9774
  | VapiCost
9287
9775
  | VoicemailDetectionCost
9288
9776
  | AnalysisCost
9777
+ | KnowledgeBaseCost
9289
9778
  )[];
9290
9779
  messages?: (UserMessage | SystemMessage | BotMessage | ToolCallMessage | ToolCallResultMessage)[];
9291
9780
  /**
@@ -9392,6 +9881,8 @@ export interface Call {
9392
9881
  | 'vonage-failed-to-connect-call'
9393
9882
  | 'vonage-completed'
9394
9883
  | 'phone-call-provider-bypass-enabled-but-no-call-received'
9884
+ | 'call.in-progress.error-providerfault-transport-never-connected'
9885
+ | 'call.in-progress.error-vapifault-worker-not-available'
9395
9886
  | 'call.in-progress.error-vapifault-transport-never-connected'
9396
9887
  | 'call.in-progress.error-vapifault-transport-connected-but-call-not-active'
9397
9888
  | 'call.in-progress.error-vapifault-call-started-but-connection-to-transport-missing'
@@ -9780,6 +10271,7 @@ export interface Call {
9780
10271
  | 'exceeded-max-duration'
9781
10272
  | 'manually-canceled'
9782
10273
  | 'phone-call-provider-closed-websocket'
10274
+ | 'call.forwarding.operator-busy'
9783
10275
  | 'silence-timed-out'
9784
10276
  | 'call.in-progress.error-sip-telephony-provider-failed-to-connect-call'
9785
10277
  | 'call.ringing.hook-executed-say'
@@ -9832,16 +10324,56 @@ export interface Call {
9832
10324
  * Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
9833
10325
  */
9834
10326
  phoneCallProviderId?: string;
9835
- /** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
10327
+ /**
10328
+ * This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
10329
+ * Usage:
10330
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10331
+ * To start the call with Squad as entrypoint, use squad or squadId
10332
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10333
+ */
9836
10334
  assistantId?: string;
9837
- /** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
10335
+ /**
10336
+ * This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
10337
+ * Usage:
10338
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10339
+ * To start the call with Squad as entrypoint, use squad or squadId
10340
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10341
+ */
9838
10342
  assistant?: CreateAssistantDTO;
9839
10343
  /** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
9840
10344
  assistantOverrides?: AssistantOverrides;
9841
- /** This is the squad that will be used for the call. To use a transient squad, use `squad` instead. */
10345
+ /**
10346
+ * This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
10347
+ * Usage:
10348
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10349
+ * To start the call with Squad as entrypoint, use squad or squadId
10350
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10351
+ */
9842
10352
  squadId?: string;
9843
- /** This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. */
10353
+ /**
10354
+ * This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
10355
+ * Usage:
10356
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10357
+ * To start the call with Squad as entrypoint, use squad or squadId
10358
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10359
+ */
9844
10360
  squad?: CreateSquadDTO;
10361
+ /**
10362
+ * This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
10363
+ * Usage:
10364
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10365
+ * To start the call with Squad as entrypoint, use squad or squadId
10366
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10367
+ */
10368
+ workflowId?: string;
10369
+ /**
10370
+ * This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
10371
+ * Usage:
10372
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10373
+ * To start the call with Squad as entrypoint, use squad or squadId
10374
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10375
+ */
10376
+ workflow?: CreateWorkflowDTO;
9845
10377
  /**
9846
10378
  * This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
9847
10379
  *
@@ -9905,16 +10437,56 @@ export interface CreateCallDTO {
9905
10437
  schedulePlan?: SchedulePlan;
9906
10438
  /** This is the transport of the call. */
9907
10439
  transport?: object;
9908
- /** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
10440
+ /**
10441
+ * This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
10442
+ * Usage:
10443
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10444
+ * To start the call with Squad as entrypoint, use squad or squadId
10445
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10446
+ */
9909
10447
  assistantId?: string;
9910
- /** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
10448
+ /**
10449
+ * This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
10450
+ * Usage:
10451
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10452
+ * To start the call with Squad as entrypoint, use squad or squadId
10453
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10454
+ */
9911
10455
  assistant?: CreateAssistantDTO;
9912
10456
  /** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
9913
10457
  assistantOverrides?: AssistantOverrides;
9914
- /** This is the squad that will be used for the call. To use a transient squad, use `squad` instead. */
10458
+ /**
10459
+ * This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
10460
+ * Usage:
10461
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10462
+ * To start the call with Squad as entrypoint, use squad or squadId
10463
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10464
+ */
9915
10465
  squadId?: string;
9916
- /** This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. */
10466
+ /**
10467
+ * This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
10468
+ * Usage:
10469
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10470
+ * To start the call with Squad as entrypoint, use squad or squadId
10471
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10472
+ */
9917
10473
  squad?: CreateSquadDTO;
10474
+ /**
10475
+ * This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
10476
+ * Usage:
10477
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10478
+ * To start the call with Squad as entrypoint, use squad or squadId
10479
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10480
+ */
10481
+ workflowId?: string;
10482
+ /**
10483
+ * This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
10484
+ * Usage:
10485
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10486
+ * To start the call with Squad as entrypoint, use squad or squadId
10487
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10488
+ */
10489
+ workflow?: CreateWorkflowDTO;
9918
10490
  /**
9919
10491
  * This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
9920
10492
  *
@@ -9968,16 +10540,56 @@ export interface CreateOutboundCallDTO {
9968
10540
  schedulePlan?: SchedulePlan;
9969
10541
  /** This is the transport of the call. */
9970
10542
  transport?: object;
9971
- /** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
10543
+ /**
10544
+ * This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
10545
+ * Usage:
10546
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10547
+ * To start the call with Squad as entrypoint, use squad or squadId
10548
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10549
+ */
9972
10550
  assistantId?: string;
9973
- /** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
10551
+ /**
10552
+ * This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
10553
+ * Usage:
10554
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10555
+ * To start the call with Squad as entrypoint, use squad or squadId
10556
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10557
+ */
9974
10558
  assistant?: CreateAssistantDTO;
9975
10559
  /** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
9976
10560
  assistantOverrides?: AssistantOverrides;
9977
- /** This is the squad that will be used for the call. To use a transient squad, use `squad` instead. */
10561
+ /**
10562
+ * This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
10563
+ * Usage:
10564
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10565
+ * To start the call with Squad as entrypoint, use squad or squadId
10566
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10567
+ */
9978
10568
  squadId?: string;
9979
- /** This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. */
10569
+ /**
10570
+ * This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
10571
+ * Usage:
10572
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10573
+ * To start the call with Squad as entrypoint, use squad or squadId
10574
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10575
+ */
9980
10576
  squad?: CreateSquadDTO;
10577
+ /**
10578
+ * This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
10579
+ * Usage:
10580
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10581
+ * To start the call with Squad as entrypoint, use squad or squadId
10582
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10583
+ */
10584
+ workflowId?: string;
10585
+ /**
10586
+ * This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
10587
+ * Usage:
10588
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10589
+ * To start the call with Squad as entrypoint, use squad or squadId
10590
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10591
+ */
10592
+ workflow?: CreateWorkflowDTO;
9981
10593
  /**
9982
10594
  * This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
9983
10595
  *
@@ -10005,590 +10617,86 @@ export interface CreateOutboundCallDTO {
10005
10617
  }
10006
10618
 
10007
10619
  export interface CreateWebCallDTO {
10008
- /** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
10009
- assistantId?: string;
10010
- /** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
10011
- assistant?: CreateAssistantDTO;
10012
- /** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
10013
- assistantOverrides?: AssistantOverrides;
10014
- /** This is the squad that will be used for the call. To use a transient squad, use `squad` instead. */
10015
- squadId?: string;
10016
- /** This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. */
10017
- squad?: CreateSquadDTO;
10018
- }
10019
-
10020
- export interface UpdateCallDTO {
10021
- /**
10022
- * This is the name of the call. This is just for your own reference.
10023
- * @maxLength 40
10024
- */
10025
- name?: string;
10026
- }
10027
-
10028
- export type ChatServiceResponse = object;
10029
-
10030
- export interface ChatCompletionMessageMetadata {
10031
- taskName: string;
10032
- taskType: string;
10033
- taskOutput: string;
10034
- taskState?: object;
10035
- nodeTrace?: string[];
10036
- }
10037
-
10038
- export interface ChatCompletionMessageWorkflows {
10039
- role: object;
10040
- content: string | null;
10041
- metadata?: ChatCompletionMessageMetadata;
10042
- }
10043
-
10044
- export interface Say {
10045
- type: 'say';
10046
- /** @maxLength 1000 */
10047
- exact?: string;
10048
- /** @maxLength 1000 */
10049
- prompt?: string;
10050
- /** @maxLength 80 */
10051
- name: string;
10052
- /** This is for metadata you want to store on the task. */
10053
- metadata?: object;
10054
- }
10055
-
10056
- export interface SayHook {
10057
- type: 'say';
10058
- /** This is for metadata you want to store on the task. */
10059
- metadata?: object;
10060
- /** @maxLength 1000 */
10061
- exact?: string;
10062
- /** @maxLength 1000 */
10063
- prompt?: string;
10064
- }
10065
-
10066
- export interface Hook {
10067
- /** @maxLength 80 */
10068
- on: 'task.start' | 'task.output.confirmation' | 'task.delayed';
10069
- do: SayHook[];
10070
- }
10071
-
10072
- export interface Gather {
10073
- type: 'gather';
10074
- output: JsonSchema;
10075
- /** This is whether or not the workflow should read back the gathered data to the user, and ask about its correctness. */
10076
- confirmContent?: boolean;
10077
- /**
10078
- * This is a list of hooks for a task.
10079
- * Each hook is a list of tasks to run on a trigger (such as on start, on failure, etc).
10080
- * Only Say is supported for now.
10081
- */
10082
- hooks?: Hook[];
10083
- /** This is the number of times we should try to gather the information from the user before we failover to the fail path. An example of this would be a user refusing to give their phone number for privacy reasons, and then going down a different path on account of this */
10084
- maxRetries?: number;
10085
- /** This is a liquid templating string. On the first call to Gather, the template will be filled out with variables from the context, and will be spoken verbatim to the user. An example would be "Base on your zipcode, it looks like you could be in one of these counties: {{ counties | join: ", " }}. Which one do you live in?" */
10086
- literalTemplate?: string;
10087
- /** @maxLength 80 */
10088
- name: string;
10089
- /** This is for metadata you want to store on the task. */
10090
- metadata?: object;
10091
- }
10092
-
10093
- export interface ApiRequest {
10094
- type: 'apiRequest';
10095
- method: 'POST' | 'GET';
10096
- /** Api endpoint to send requests to. */
10097
- url: string;
10098
- /**
10099
- * These are the custom headers to include in the Api Request sent.
10100
- *
10101
- * Each key-value pair represents a header name and its value.
10102
- */
10103
- headers?: JsonSchema;
10104
- /**
10105
- * This defined the JSON body of your Api Request. For example, if `body_schema`
10106
- * included "my_field": "my_gather_statement.user_age", then the json body sent to the server would have that particular value assign to it.
10107
- * Right now, only data from gather statements are supported.
10108
- */
10109
- body?: JsonSchema;
10110
10620
  /**
10111
- * This is the mode of the Api Request.
10112
- * We only support BLOCKING and BACKGROUND for now.
10621
+ * This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
10622
+ * Usage:
10623
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10624
+ * To start the call with Squad as entrypoint, use squad or squadId
10625
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10113
10626
  */
10114
- mode: 'blocking' | 'background';
10627
+ assistantId?: string;
10115
10628
  /**
10116
- * This is a list of hooks for a task.
10117
- * Each hook is a list of tasks to run on a trigger (such as on start, on failure, etc).
10118
- * Only Say is supported for now.
10119
- */
10120
- hooks?: Hook[];
10121
- /** This is the schema for the outputs of the Api Request. */
10122
- output?: JsonSchema;
10123
- /** @maxLength 80 */
10124
- name: string;
10125
- /** This is for metadata you want to store on the task. */
10126
- metadata?: object;
10127
- }
10128
-
10129
- export interface Hangup {
10130
- type: 'hangup';
10131
- /** @maxLength 80 */
10132
- name: string;
10133
- /** This is for metadata you want to store on the task. */
10134
- metadata?: object;
10135
- }
10136
-
10137
- export interface Transfer {
10138
- type: 'transfer';
10139
- destination: object;
10140
- /** @maxLength 80 */
10141
- name: string;
10142
- /** This is for metadata you want to store on the task. */
10143
- metadata?: object;
10144
- }
10145
-
10146
- export interface CreateWorkflowDTO {
10147
- nodes: (Say | Gather | ApiRequest | Hangup | Transfer)[];
10148
- /** These are the options for the workflow's LLM. */
10149
- model?:
10150
- | AnthropicModel
10151
- | AnyscaleModel
10152
- | CerebrasModel
10153
- | CustomLLMModel
10154
- | DeepInfraModel
10155
- | DeepSeekModel
10156
- | GoogleModel
10157
- | GroqModel
10158
- | InflectionAIModel
10159
- | OpenAIModel
10160
- | OpenRouterModel
10161
- | PerplexityAIModel
10162
- | TogetherAIModel
10163
- | XaiModel;
10164
- /** @maxLength 80 */
10165
- name: string;
10166
- edges: Edge[];
10167
- }
10168
-
10169
- export interface ChatCompletionsDTO {
10170
- messages: ChatCompletionMessageWorkflows[];
10171
- workflowId?: string;
10172
- workflow?: CreateWorkflowDTO;
10173
- }
10174
-
10175
- export interface Assistant {
10176
- /** These are the options for the assistant's transcriber. */
10177
- transcriber?:
10178
- | AssemblyAITranscriber
10179
- | AzureSpeechTranscriber
10180
- | CustomTranscriber
10181
- | DeepgramTranscriber
10182
- | ElevenLabsTranscriber
10183
- | GladiaTranscriber
10184
- | SpeechmaticsTranscriber
10185
- | TalkscriberTranscriber
10186
- | GoogleTranscriber
10187
- | OpenAITranscriber;
10188
- /** These are the options for the assistant's LLM. */
10189
- model?:
10190
- | AnyscaleModel
10191
- | AnthropicModel
10192
- | CerebrasModel
10193
- | CustomLLMModel
10194
- | DeepInfraModel
10195
- | DeepSeekModel
10196
- | GoogleModel
10197
- | GroqModel
10198
- | InflectionAIModel
10199
- | OpenAIModel
10200
- | OpenRouterModel
10201
- | PerplexityAIModel
10202
- | TogetherAIModel
10203
- | VapiModel
10204
- | XaiModel;
10205
- /**
10206
- * These are the options for the assistant's voice.
10207
- * @default {"provider":"playht","voiceId":"jennifer"}
10208
- */
10209
- voice?:
10210
- | AzureVoice
10211
- | CartesiaVoice
10212
- | CustomVoice
10213
- | DeepgramVoice
10214
- | ElevenLabsVoice
10215
- | HumeVoice
10216
- | LMNTVoice
10217
- | NeuphonicVoice
10218
- | OpenAIVoice
10219
- | PlayHTVoice
10220
- | RimeAIVoice
10221
- | SmallestAIVoice
10222
- | TavusVoice
10223
- | VapiVoice;
10224
- /**
10225
- * This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
10226
- *
10227
- * If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
10228
- * @example "Hello! How can I help you today?"
10229
- */
10230
- firstMessage?: string;
10231
- /** @default false */
10232
- firstMessageInterruptionsEnabled?: boolean;
10233
- /**
10234
- * This is the mode for the first message. Default is 'assistant-speaks-first'.
10235
- *
10236
- * Use:
10237
- * - 'assistant-speaks-first' to have the assistant speak first.
10238
- * - 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
10239
- * - 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points).
10240
- *
10241
- * @default 'assistant-speaks-first'
10242
- * @example "assistant-speaks-first"
10243
- */
10244
- firstMessageMode?:
10245
- | 'assistant-speaks-first'
10246
- | 'assistant-speaks-first-with-model-generated-message'
10247
- | 'assistant-waits-for-user';
10248
- /**
10249
- * These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool].
10250
- * This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached.
10251
- * You can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not.
10252
- */
10253
- voicemailDetection?:
10254
- | GoogleVoicemailDetectionPlan
10255
- | OpenAIVoicemailDetectionPlan
10256
- | TwilioVoicemailDetectionPlan;
10257
- /**
10258
- * These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started. You can check the shape of the messages in ClientMessage schema.
10259
- * @example ["conversation-update","function-call","hang","model-output","speech-update","status-update","transfer-update","transcript","tool-calls","user-interrupted","voice-input","workflow.node.started"]
10260
- */
10261
- clientMessages?:
10262
- | 'conversation-update'
10263
- | 'function-call'
10264
- | 'function-call-result'
10265
- | 'hang'
10266
- | 'language-changed'
10267
- | 'metadata'
10268
- | 'model-output'
10269
- | 'speech-update'
10270
- | 'status-update'
10271
- | 'transcript'
10272
- | 'tool-calls'
10273
- | 'tool-calls-result'
10274
- | 'transfer-update'
10275
- | 'user-interrupted'
10276
- | 'voice-input'
10277
- | 'workflow.node.started';
10278
- /**
10279
- * These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema.
10280
- * @example ["conversation-update","end-of-call-report","function-call","hang","speech-update","status-update","tool-calls","transfer-destination-request","user-interrupted"]
10281
- */
10282
- serverMessages?:
10283
- | 'conversation-update'
10284
- | 'end-of-call-report'
10285
- | 'function-call'
10286
- | 'hang'
10287
- | 'language-changed'
10288
- | 'language-change-detected'
10289
- | 'model-output'
10290
- | 'phone-call-control'
10291
- | 'speech-update'
10292
- | 'status-update'
10293
- | 'transcript'
10294
- | "transcript[transcriptType='final']"
10295
- | 'tool-calls'
10296
- | 'transfer-destination-request'
10297
- | 'transfer-update'
10298
- | 'user-interrupted'
10299
- | 'voice-input';
10300
- /**
10301
- * How many seconds of silence to wait before ending the call. Defaults to 30.
10302
- *
10303
- * @default 30
10304
- * @min 10
10305
- * @max 3600
10306
- * @example 30
10307
- */
10308
- silenceTimeoutSeconds?: number;
10309
- /**
10310
- * This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
10311
- *
10312
- * @default 600 (10 minutes)
10313
- * @min 10
10314
- * @max 43200
10315
- * @example 600
10316
- */
10317
- maxDurationSeconds?: number;
10318
- /**
10319
- * This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
10320
- * You can also provide a custom sound by providing a URL to an audio file.
10321
- * @maxLength 1000
10322
- */
10323
- backgroundSound?: 'off' | 'office' | string;
10324
- /**
10325
- * This enables filtering of noise and background speech while the user is talking.
10326
- *
10327
- * Default `false` while in beta.
10328
- *
10329
- * @default false
10330
- * @example false
10331
- */
10332
- backgroundDenoisingEnabled?: boolean;
10333
- /**
10334
- * This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech.
10335
- *
10336
- * Default `false` while in beta.
10337
- *
10338
- * @default false
10339
- * @example false
10340
- */
10341
- modelOutputInMessagesEnabled?: boolean;
10342
- /** These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used. */
10343
- transportConfigurations?: TransportConfigurationTwilio[];
10344
- /**
10345
- * This is the plan for observability configuration of assistant's calls.
10346
- * Currently supports Langfuse for tracing and monitoring.
10347
- */
10348
- observabilityPlan?: LangfuseObservabilityPlan;
10349
- /** These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. */
10350
- credentials?: (
10351
- | ({
10352
- provider: '11labs';
10353
- } & CreateElevenLabsCredentialDTO)
10354
- | ({
10355
- provider: 'anthropic';
10356
- } & CreateAnthropicCredentialDTO)
10357
- | ({
10358
- provider: 'anyscale';
10359
- } & CreateAnyscaleCredentialDTO)
10360
- | ({
10361
- provider: 'assembly-ai';
10362
- } & CreateAssemblyAICredentialDTO)
10363
- | ({
10364
- provider: 'azure-openai';
10365
- } & CreateAzureOpenAICredentialDTO)
10366
- | ({
10367
- provider: 'azure';
10368
- } & CreateAzureCredentialDTO)
10369
- | ({
10370
- provider: 'byo-sip-trunk';
10371
- } & CreateByoSipTrunkCredentialDTO)
10372
- | ({
10373
- provider: 'cartesia';
10374
- } & CreateCartesiaCredentialDTO)
10375
- | ({
10376
- provider: 'cerebras';
10377
- } & CreateCerebrasCredentialDTO)
10378
- | ({
10379
- provider: 'cloudflare';
10380
- } & CreateCloudflareCredentialDTO)
10381
- | ({
10382
- provider: 'custom-llm';
10383
- } & CreateCustomLLMCredentialDTO)
10384
- | ({
10385
- provider: 'deepgram';
10386
- } & CreateDeepgramCredentialDTO)
10387
- | ({
10388
- provider: 'deepinfra';
10389
- } & CreateDeepInfraCredentialDTO)
10390
- | ({
10391
- provider: 'deep-seek';
10392
- } & CreateDeepSeekCredentialDTO)
10393
- | ({
10394
- provider: 'gcp';
10395
- } & CreateGcpCredentialDTO)
10396
- | ({
10397
- provider: 'gladia';
10398
- } & CreateGladiaCredentialDTO)
10399
- | ({
10400
- provider: 'gohighlevel';
10401
- } & CreateGoHighLevelCredentialDTO)
10402
- | ({
10403
- provider: 'google';
10404
- } & CreateGoogleCredentialDTO)
10405
- | ({
10406
- provider: 'groq';
10407
- } & CreateGroqCredentialDTO)
10408
- | ({
10409
- provider: 'inflection-ai';
10410
- } & CreateInflectionAICredentialDTO)
10411
- | ({
10412
- provider: 'langfuse';
10413
- } & CreateLangfuseCredentialDTO)
10414
- | ({
10415
- provider: 'lmnt';
10416
- } & CreateLmntCredentialDTO)
10417
- | ({
10418
- provider: 'make';
10419
- } & CreateMakeCredentialDTO)
10420
- | ({
10421
- provider: 'openai';
10422
- } & CreateOpenAICredentialDTO)
10423
- | ({
10424
- provider: 'openrouter';
10425
- } & CreateOpenRouterCredentialDTO)
10426
- | ({
10427
- provider: 'perplexity-ai';
10428
- } & CreatePerplexityAICredentialDTO)
10429
- | ({
10430
- provider: 'playht';
10431
- } & CreatePlayHTCredentialDTO)
10432
- | ({
10433
- provider: 'rime-ai';
10434
- } & CreateRimeAICredentialDTO)
10435
- | ({
10436
- provider: 'runpod';
10437
- } & CreateRunpodCredentialDTO)
10438
- | ({
10439
- provider: 's3';
10440
- } & CreateS3CredentialDTO)
10441
- | ({
10442
- provider: 'supabase';
10443
- } & CreateSupabaseCredentialDTO)
10444
- | ({
10445
- provider: 'smallest-ai';
10446
- } & CreateSmallestAICredentialDTO)
10447
- | ({
10448
- provider: 'tavus';
10449
- } & CreateTavusCredentialDTO)
10450
- | ({
10451
- provider: 'together-ai';
10452
- } & CreateTogetherAICredentialDTO)
10453
- | ({
10454
- provider: 'twilio';
10455
- } & CreateTwilioCredentialDTO)
10456
- | ({
10457
- provider: 'vonage';
10458
- } & CreateVonageCredentialDTO)
10459
- | ({
10460
- provider: 'webhook';
10461
- } & CreateWebhookCredentialDTO)
10462
- | ({
10463
- provider: 'xai';
10464
- } & CreateXAiCredentialDTO)
10465
- | ({
10466
- provider: 'neuphonic';
10467
- } & CreateNeuphonicCredentialDTO)
10468
- | ({
10469
- provider: 'hume';
10470
- } & CreateHumeCredentialDTO)
10471
- | ({
10472
- provider: 'mistral';
10473
- } & CreateMistralCredentialDTO)
10474
- | ({
10475
- provider: 'speechmatics';
10476
- } & CreateSpeechmaticsCredentialDTO)
10477
- | ({
10478
- provider: 'trieve';
10479
- } & CreateTrieveCredentialDTO)
10480
- | ({
10481
- provider: 'google.calendar.oauth2-client';
10482
- } & CreateGoogleCalendarOAuth2ClientCredentialDTO)
10483
- | ({
10484
- provider: 'google.calendar.oauth2-authorization';
10485
- } & CreateGoogleCalendarOAuth2AuthorizationCredentialDTO)
10486
- | ({
10487
- provider: 'google.sheets.oauth2-authorization';
10488
- } & CreateGoogleSheetsOAuth2AuthorizationCredentialDTO)
10489
- | ({
10490
- provider: 'slack.oauth2-authorization';
10491
- } & CreateSlackOAuth2AuthorizationCredentialDTO)
10492
- )[];
10493
- /**
10494
- * This is the name of the assistant.
10495
- *
10496
- * This is required when you want to transfer between assistants in a call.
10497
- * @maxLength 40
10498
- */
10499
- name?: string;
10500
- /**
10501
- * This is the message that the assistant will say if the call is forwarded to voicemail.
10502
- *
10503
- * If unspecified, it will hang up.
10504
- * @maxLength 1000
10505
- */
10506
- voicemailMessage?: string;
10507
- /**
10508
- * This is the message that the assistant will say if it ends the call.
10509
- *
10510
- * If unspecified, it will hang up without saying anything.
10511
- * @maxLength 1000
10512
- */
10513
- endCallMessage?: string;
10514
- /** This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. */
10515
- endCallPhrases?: string[];
10516
- compliancePlan?: CompliancePlan;
10517
- /** This is for metadata you want to store on the assistant. */
10518
- metadata?: object;
10519
- /** This is the plan for analysis of assistant's calls. Stored in `call.analysis`. */
10520
- analysisPlan?: AnalysisPlan;
10521
- /**
10522
- * This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`.
10523
- *
10524
- * Note: `recordingEnabled` is currently at the root level. It will be moved to `artifactPlan` in the future, but will remain backwards compatible.
10525
- */
10526
- artifactPlan?: ArtifactPlan;
10527
- /**
10528
- * This is the plan for static predefined messages that can be spoken by the assistant during the call, like `idleMessages`.
10529
- *
10530
- * Note: `firstMessage`, `voicemailMessage`, and `endCallMessage` are currently at the root level. They will be moved to `messagePlan` in the future, but will remain backwards compatible.
10531
- */
10532
- messagePlan?: MessagePlan;
10533
- /**
10534
- * This is the plan for when the assistant should start talking.
10535
- *
10536
- * You should configure this if you're running into these issues:
10537
- * - The assistant is too slow to start talking after the customer is done speaking.
10538
- * - The assistant is too fast to start talking after the customer is done speaking.
10539
- * - The assistant is so fast that it's actually interrupting the customer.
10629
+ * This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
10630
+ * Usage:
10631
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10632
+ * To start the call with Squad as entrypoint, use squad or squadId
10633
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10540
10634
  */
10541
- startSpeakingPlan?: StartSpeakingPlan;
10635
+ assistant?: CreateAssistantDTO;
10636
+ /** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
10637
+ assistantOverrides?: AssistantOverrides;
10542
10638
  /**
10543
- * This is the plan for when assistant should stop talking on customer interruption.
10544
- *
10545
- * You should configure this if you're running into these issues:
10546
- * - The assistant is too slow to recognize customer's interruption.
10547
- * - The assistant is too fast to recognize customer's interruption.
10548
- * - The assistant is getting interrupted by phrases that are just acknowledgments.
10549
- * - The assistant is getting interrupted by background noises.
10550
- * - The assistant is not properly stopping -- it starts talking right after getting interrupted.
10639
+ * This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
10640
+ * Usage:
10641
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10642
+ * To start the call with Squad as entrypoint, use squad or squadId
10643
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10551
10644
  */
10552
- stopSpeakingPlan?: StopSpeakingPlan;
10645
+ squadId?: string;
10553
10646
  /**
10554
- * This is the plan for real-time monitoring of the assistant's calls.
10555
- *
10647
+ * This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
10556
10648
  * Usage:
10557
- * - To enable live listening of the assistant's calls, set `monitorPlan.listenEnabled` to `true`.
10558
- * - To enable live control of the assistant's calls, set `monitorPlan.controlEnabled` to `true`.
10559
- *
10560
- * Note, `serverMessages`, `clientMessages`, `serverUrl` and `serverUrlSecret` are currently at the root level but will be moved to `monitorPlan` in the future. Will remain backwards compatible
10649
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10650
+ * To start the call with Squad as entrypoint, use squad or squadId
10651
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10561
10652
  */
10562
- monitorPlan?: MonitorPlan;
10563
- /** These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this. */
10564
- credentialIds?: string[];
10653
+ squad?: CreateSquadDTO;
10565
10654
  /**
10566
- * This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema.
10567
- *
10568
- * The order of precedence is:
10569
- *
10570
- * 1. assistant.server.url
10571
- * 2. phoneNumber.serverUrl
10572
- * 3. org.serverUrl
10655
+ * This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
10656
+ * Usage:
10657
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10658
+ * To start the call with Squad as entrypoint, use squad or squadId
10659
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10573
10660
  */
10574
- server?: Server;
10575
- /** This is a set of actions that will be performed on certain events. */
10576
- hooks?: AssistantHooks[];
10577
- keypadInputPlan?: KeypadInputPlan;
10578
- /** This is the unique identifier for the assistant. */
10579
- id: string;
10580
- /** This is the unique identifier for the org that this assistant belongs to. */
10581
- orgId: string;
10661
+ workflowId?: string;
10582
10662
  /**
10583
- * This is the ISO 8601 date-time string of when the assistant was created.
10584
- * @format date-time
10663
+ * This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
10664
+ * Usage:
10665
+ * To start the call with Assistant as entrypoint, use assistant or assistantId
10666
+ * To start the call with Squad as entrypoint, use squad or squadId
10667
+ * To start the call with Workflow as entrypoint, use workflow or workflowId
10585
10668
  */
10586
- createdAt: string;
10669
+ workflow?: CreateWorkflowDTO;
10670
+ }
10671
+
10672
+ export interface UpdateCallDTO {
10587
10673
  /**
10588
- * This is the ISO 8601 date-time string of when the assistant was last updated.
10589
- * @format date-time
10674
+ * This is the name of the call. This is just for your own reference.
10675
+ * @maxLength 40
10590
10676
  */
10591
- updatedAt: string;
10677
+ name?: string;
10678
+ }
10679
+
10680
+ export type ChatServiceResponse = object;
10681
+
10682
+ export interface ChatCompletionMessageMetadata {
10683
+ taskName: string;
10684
+ taskType: string;
10685
+ taskOutput: string;
10686
+ taskState?: object;
10687
+ nodeTrace?: string[];
10688
+ }
10689
+
10690
+ export interface ChatCompletionMessageWorkflows {
10691
+ role: object;
10692
+ content: string | null;
10693
+ metadata?: ChatCompletionMessageMetadata;
10694
+ }
10695
+
10696
+ export interface ChatCompletionsDTO {
10697
+ messages: ChatCompletionMessageWorkflows[];
10698
+ workflowId?: string;
10699
+ workflow?: CreateWorkflowDTO;
10592
10700
  }
10593
10701
 
10594
10702
  export interface AssistantPaginatedResponse {
@@ -10596,6 +10704,12 @@ export interface AssistantPaginatedResponse {
10596
10704
  metadata: PaginationMeta;
10597
10705
  }
10598
10706
 
10707
+ export interface AssistantVersionPaginatedResponse {
10708
+ results: any[];
10709
+ metadata: PaginationMeta;
10710
+ nextPageState?: string;
10711
+ }
10712
+
10599
10713
  export interface UpdateAssistantDTO {
10600
10714
  /** These are the options for the assistant's transcriber. */
10601
10715
  transcriber?:
@@ -10677,50 +10791,10 @@ export interface UpdateAssistantDTO {
10677
10791
  voicemailDetection?:
10678
10792
  | GoogleVoicemailDetectionPlan
10679
10793
  | OpenAIVoicemailDetectionPlan
10680
- | TwilioVoicemailDetectionPlan;
10681
- /**
10682
- * These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started. You can check the shape of the messages in ClientMessage schema.
10683
- * @example ["conversation-update","function-call","hang","model-output","speech-update","status-update","transfer-update","transcript","tool-calls","user-interrupted","voice-input","workflow.node.started"]
10684
- */
10685
- clientMessages?:
10686
- | 'conversation-update'
10687
- | 'function-call'
10688
- | 'function-call-result'
10689
- | 'hang'
10690
- | 'language-changed'
10691
- | 'metadata'
10692
- | 'model-output'
10693
- | 'speech-update'
10694
- | 'status-update'
10695
- | 'transcript'
10696
- | 'tool-calls'
10697
- | 'tool-calls-result'
10698
- | 'transfer-update'
10699
- | 'user-interrupted'
10700
- | 'voice-input'
10701
- | 'workflow.node.started';
10702
- /**
10703
- * These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema.
10704
- * @example ["conversation-update","end-of-call-report","function-call","hang","speech-update","status-update","tool-calls","transfer-destination-request","user-interrupted"]
10705
- */
10706
- serverMessages?:
10707
- | 'conversation-update'
10708
- | 'end-of-call-report'
10709
- | 'function-call'
10710
- | 'hang'
10711
- | 'language-changed'
10712
- | 'language-change-detected'
10713
- | 'model-output'
10714
- | 'phone-call-control'
10715
- | 'speech-update'
10716
- | 'status-update'
10717
- | 'transcript'
10718
- | "transcript[transcriptType='final']"
10719
- | 'tool-calls'
10720
- | 'transfer-destination-request'
10721
- | 'transfer-update'
10722
- | 'user-interrupted'
10723
- | 'voice-input';
10794
+ | TwilioVoicemailDetectionPlan
10795
+ | VapiVoicemailDetectionPlan;
10796
+ clientMessages: object[][];
10797
+ serverMessages: object[][];
10724
10798
  /**
10725
10799
  * How many seconds of silence to wait before ending the call. Defaults to 30.
10726
10800
  *
@@ -10914,6 +10988,8 @@ export interface UpdateAssistantDTO {
10914
10988
  provider: 'slack.oauth2-authorization';
10915
10989
  } & CreateSlackOAuth2AuthorizationCredentialDTO)
10916
10990
  )[];
10991
+ /** This is a set of actions that will be performed on certain events. */
10992
+ hooks?: AssistantHookCallEnding[];
10917
10993
  /**
10918
10994
  * This is the name of the assistant.
10919
10995
  *
@@ -10996,8 +11072,6 @@ export interface UpdateAssistantDTO {
10996
11072
  * 3. org.serverUrl
10997
11073
  */
10998
11074
  server?: Server;
10999
- /** This is a set of actions that will be performed on certain events. */
11000
- hooks?: AssistantHooks[];
11001
11075
  keypadInputPlan?: KeypadInputPlan;
11002
11076
  }
11003
11077
 
@@ -11052,13 +11126,19 @@ export interface ByoPhoneNumber {
11052
11126
  /**
11053
11127
  * This is the assistant that will be used for incoming calls to this phone number.
11054
11128
  *
11055
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11129
+ * If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11056
11130
  */
11057
11131
  assistantId?: string;
11132
+ /**
11133
+ * This is the workflow that will be used for incoming calls to this phone number.
11134
+ *
11135
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11136
+ */
11137
+ workflowId?: string;
11058
11138
  /**
11059
11139
  * This is the squad that will be used for incoming calls to this phone number.
11060
11140
  *
11061
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11141
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11062
11142
  */
11063
11143
  squadId?: string;
11064
11144
  /**
@@ -11099,6 +11179,16 @@ export interface TwilioPhoneNumber {
11099
11179
  hooks?: PhoneNumberHookCallRinging[];
11100
11180
  /** This is to use numbers bought on Twilio. */
11101
11181
  provider: 'twilio';
11182
+ /**
11183
+ * Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.
11184
+ *
11185
+ * If set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.
11186
+ * If `true` or omitted (default), Vapi will configure both the voice and messaging URLs.
11187
+ *
11188
+ * @default true
11189
+ * @default true
11190
+ */
11191
+ smsEnabled?: boolean;
11102
11192
  /** This is the unique identifier for the phone number. */
11103
11193
  id: string;
11104
11194
  /** This is the unique identifier for the org that this phone number belongs to. */
@@ -11115,6 +11205,12 @@ export interface TwilioPhoneNumber {
11115
11205
  updatedAt: string;
11116
11206
  /** This is the status of the phone number. */
11117
11207
  status?: 'active' | 'activating' | 'blocked';
11208
+ /** This is the Twilio Auth Token for the phone number. */
11209
+ twilioAuthToken?: string;
11210
+ /** This is the Twilio API Key for the phone number. */
11211
+ twilioApiKey?: string;
11212
+ /** This is the Twilio API Secret for the phone number. */
11213
+ twilioApiSecret?: string;
11118
11214
  /**
11119
11215
  * This is the name of the phone number. This is just for your own reference.
11120
11216
  * @maxLength 40
@@ -11123,13 +11219,19 @@ export interface TwilioPhoneNumber {
11123
11219
  /**
11124
11220
  * This is the assistant that will be used for incoming calls to this phone number.
11125
11221
  *
11126
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11222
+ * If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11127
11223
  */
11128
11224
  assistantId?: string;
11225
+ /**
11226
+ * This is the workflow that will be used for incoming calls to this phone number.
11227
+ *
11228
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11229
+ */
11230
+ workflowId?: string;
11129
11231
  /**
11130
11232
  * This is the squad that will be used for incoming calls to this phone number.
11131
11233
  *
11132
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11234
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11133
11235
  */
11134
11236
  squadId?: string;
11135
11237
  /**
@@ -11146,8 +11248,6 @@ export interface TwilioPhoneNumber {
11146
11248
  number: string;
11147
11249
  /** This is the Twilio Account SID for the phone number. */
11148
11250
  twilioAccountSid: string;
11149
- /** This is the Twilio Auth Token for the phone number. */
11150
- twilioAuthToken: string;
11151
11251
  }
11152
11252
 
11153
11253
  export interface VonagePhoneNumber {
@@ -11188,13 +11288,19 @@ export interface VonagePhoneNumber {
11188
11288
  /**
11189
11289
  * This is the assistant that will be used for incoming calls to this phone number.
11190
11290
  *
11191
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11291
+ * If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11192
11292
  */
11193
11293
  assistantId?: string;
11294
+ /**
11295
+ * This is the workflow that will be used for incoming calls to this phone number.
11296
+ *
11297
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11298
+ */
11299
+ workflowId?: string;
11194
11300
  /**
11195
11301
  * This is the squad that will be used for incoming calls to this phone number.
11196
11302
  *
11197
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11303
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11198
11304
  */
11199
11305
  squadId?: string;
11200
11306
  /**
@@ -11270,13 +11376,19 @@ export interface VapiPhoneNumber {
11270
11376
  /**
11271
11377
  * This is the assistant that will be used for incoming calls to this phone number.
11272
11378
  *
11273
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11379
+ * If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11274
11380
  */
11275
11381
  assistantId?: string;
11382
+ /**
11383
+ * This is the workflow that will be used for incoming calls to this phone number.
11384
+ *
11385
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11386
+ */
11387
+ workflowId?: string;
11276
11388
  /**
11277
11389
  * This is the squad that will be used for incoming calls to this phone number.
11278
11390
  *
11279
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11391
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11280
11392
  */
11281
11393
  squadId?: string;
11282
11394
  /**
@@ -11347,13 +11459,19 @@ export interface TelnyxPhoneNumber {
11347
11459
  /**
11348
11460
  * This is the assistant that will be used for incoming calls to this phone number.
11349
11461
  *
11350
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11462
+ * If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11351
11463
  */
11352
11464
  assistantId?: string;
11465
+ /**
11466
+ * This is the workflow that will be used for incoming calls to this phone number.
11467
+ *
11468
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11469
+ */
11470
+ workflowId?: string;
11353
11471
  /**
11354
11472
  * This is the squad that will be used for incoming calls to this phone number.
11355
11473
  *
11356
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11474
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11357
11475
  */
11358
11476
  squadId?: string;
11359
11477
  /**
@@ -11419,13 +11537,19 @@ export interface CreateByoPhoneNumberDTO {
11419
11537
  /**
11420
11538
  * This is the assistant that will be used for incoming calls to this phone number.
11421
11539
  *
11422
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11540
+ * If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11423
11541
  */
11424
11542
  assistantId?: string;
11543
+ /**
11544
+ * This is the workflow that will be used for incoming calls to this phone number.
11545
+ *
11546
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11547
+ */
11548
+ workflowId?: string;
11425
11549
  /**
11426
11550
  * This is the squad that will be used for incoming calls to this phone number.
11427
11551
  *
11428
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11552
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11429
11553
  */
11430
11554
  squadId?: string;
11431
11555
  /**
@@ -11454,12 +11578,26 @@ export interface CreateTwilioPhoneNumberDTO {
11454
11578
  hooks?: PhoneNumberHookCallRinging[];
11455
11579
  /** This is to use numbers bought on Twilio. */
11456
11580
  provider: 'twilio';
11581
+ /**
11582
+ * Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.
11583
+ *
11584
+ * If set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.
11585
+ * If `true` or omitted (default), Vapi will configure both the voice and messaging URLs.
11586
+ *
11587
+ * @default true
11588
+ * @default true
11589
+ */
11590
+ smsEnabled?: boolean;
11457
11591
  /** These are the digits of the phone number you own on your Twilio. */
11458
11592
  number: string;
11459
11593
  /** This is the Twilio Account SID for the phone number. */
11460
11594
  twilioAccountSid: string;
11461
11595
  /** This is the Twilio Auth Token for the phone number. */
11462
- twilioAuthToken: string;
11596
+ twilioAuthToken?: string;
11597
+ /** This is the Twilio API Key for the phone number. */
11598
+ twilioApiKey?: string;
11599
+ /** This is the Twilio API Secret for the phone number. */
11600
+ twilioApiSecret?: string;
11463
11601
  /**
11464
11602
  * This is the name of the phone number. This is just for your own reference.
11465
11603
  * @maxLength 40
@@ -11468,13 +11606,19 @@ export interface CreateTwilioPhoneNumberDTO {
11468
11606
  /**
11469
11607
  * This is the assistant that will be used for incoming calls to this phone number.
11470
11608
  *
11471
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11609
+ * If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11472
11610
  */
11473
11611
  assistantId?: string;
11612
+ /**
11613
+ * This is the workflow that will be used for incoming calls to this phone number.
11614
+ *
11615
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11616
+ */
11617
+ workflowId?: string;
11474
11618
  /**
11475
11619
  * This is the squad that will be used for incoming calls to this phone number.
11476
11620
  *
11477
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11621
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11478
11622
  */
11479
11623
  squadId?: string;
11480
11624
  /**
@@ -11515,13 +11659,19 @@ export interface CreateVonagePhoneNumberDTO {
11515
11659
  /**
11516
11660
  * This is the assistant that will be used for incoming calls to this phone number.
11517
11661
  *
11518
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11662
+ * If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11519
11663
  */
11520
11664
  assistantId?: string;
11665
+ /**
11666
+ * This is the workflow that will be used for incoming calls to this phone number.
11667
+ *
11668
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11669
+ */
11670
+ workflowId?: string;
11521
11671
  /**
11522
11672
  * This is the squad that will be used for incoming calls to this phone number.
11523
11673
  *
11524
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11674
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11525
11675
  */
11526
11676
  squadId?: string;
11527
11677
  /**
@@ -11576,13 +11726,19 @@ export interface CreateVapiPhoneNumberDTO {
11576
11726
  /**
11577
11727
  * This is the assistant that will be used for incoming calls to this phone number.
11578
11728
  *
11579
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11729
+ * If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11580
11730
  */
11581
11731
  assistantId?: string;
11732
+ /**
11733
+ * This is the workflow that will be used for incoming calls to this phone number.
11734
+ *
11735
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11736
+ */
11737
+ workflowId?: string;
11582
11738
  /**
11583
11739
  * This is the squad that will be used for incoming calls to this phone number.
11584
11740
  *
11585
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11741
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11586
11742
  */
11587
11743
  squadId?: string;
11588
11744
  /**
@@ -11623,13 +11779,19 @@ export interface CreateTelnyxPhoneNumberDTO {
11623
11779
  /**
11624
11780
  * This is the assistant that will be used for incoming calls to this phone number.
11625
11781
  *
11626
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11782
+ * If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11627
11783
  */
11628
11784
  assistantId?: string;
11785
+ /**
11786
+ * This is the workflow that will be used for incoming calls to this phone number.
11787
+ *
11788
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11789
+ */
11790
+ workflowId?: string;
11629
11791
  /**
11630
11792
  * This is the squad that will be used for incoming calls to this phone number.
11631
11793
  *
11632
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11794
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11633
11795
  */
11634
11796
  squadId?: string;
11635
11797
  /**
@@ -11677,13 +11839,19 @@ export interface UpdateByoPhoneNumberDTO {
11677
11839
  /**
11678
11840
  * This is the assistant that will be used for incoming calls to this phone number.
11679
11841
  *
11680
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11842
+ * If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11681
11843
  */
11682
11844
  assistantId?: string;
11845
+ /**
11846
+ * This is the workflow that will be used for incoming calls to this phone number.
11847
+ *
11848
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11849
+ */
11850
+ workflowId?: string;
11683
11851
  /**
11684
11852
  * This is the squad that will be used for incoming calls to this phone number.
11685
11853
  *
11686
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11854
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11687
11855
  */
11688
11856
  squadId?: string;
11689
11857
  /**
@@ -11722,6 +11890,16 @@ export interface UpdateTwilioPhoneNumberDTO {
11722
11890
  fallbackDestination?: TransferDestinationNumber | TransferDestinationSip;
11723
11891
  /** This is the hooks that will be used for incoming calls to this phone number. */
11724
11892
  hooks?: PhoneNumberHookCallRinging[];
11893
+ /**
11894
+ * Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.
11895
+ *
11896
+ * If set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.
11897
+ * If `true` or omitted (default), Vapi will configure both the voice and messaging URLs.
11898
+ *
11899
+ * @default true
11900
+ * @default true
11901
+ */
11902
+ smsEnabled?: boolean;
11725
11903
  /**
11726
11904
  * This is the name of the phone number. This is just for your own reference.
11727
11905
  * @maxLength 40
@@ -11730,13 +11908,19 @@ export interface UpdateTwilioPhoneNumberDTO {
11730
11908
  /**
11731
11909
  * This is the assistant that will be used for incoming calls to this phone number.
11732
11910
  *
11733
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11911
+ * If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11734
11912
  */
11735
11913
  assistantId?: string;
11914
+ /**
11915
+ * This is the workflow that will be used for incoming calls to this phone number.
11916
+ *
11917
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11918
+ */
11919
+ workflowId?: string;
11736
11920
  /**
11737
11921
  * This is the squad that will be used for incoming calls to this phone number.
11738
11922
  *
11739
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11923
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11740
11924
  */
11741
11925
  squadId?: string;
11742
11926
  /**
@@ -11755,6 +11939,10 @@ export interface UpdateTwilioPhoneNumberDTO {
11755
11939
  twilioAccountSid?: string;
11756
11940
  /** This is the Twilio Auth Token for the phone number. */
11757
11941
  twilioAuthToken?: string;
11942
+ /** This is the Twilio API Key for the phone number. */
11943
+ twilioApiKey?: string;
11944
+ /** This is the Twilio API Secret for the phone number. */
11945
+ twilioApiSecret?: string;
11758
11946
  }
11759
11947
 
11760
11948
  export interface UpdateVonagePhoneNumberDTO {
@@ -11777,13 +11965,19 @@ export interface UpdateVonagePhoneNumberDTO {
11777
11965
  /**
11778
11966
  * This is the assistant that will be used for incoming calls to this phone number.
11779
11967
  *
11780
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11968
+ * If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11781
11969
  */
11782
11970
  assistantId?: string;
11971
+ /**
11972
+ * This is the workflow that will be used for incoming calls to this phone number.
11973
+ *
11974
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11975
+ */
11976
+ workflowId?: string;
11783
11977
  /**
11784
11978
  * This is the squad that will be used for incoming calls to this phone number.
11785
11979
  *
11786
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11980
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11787
11981
  */
11788
11982
  squadId?: string;
11789
11983
  /**
@@ -11822,13 +12016,19 @@ export interface UpdateVapiPhoneNumberDTO {
11822
12016
  /**
11823
12017
  * This is the assistant that will be used for incoming calls to this phone number.
11824
12018
  *
11825
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
12019
+ * If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11826
12020
  */
11827
12021
  assistantId?: string;
12022
+ /**
12023
+ * This is the workflow that will be used for incoming calls to this phone number.
12024
+ *
12025
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
12026
+ */
12027
+ workflowId?: string;
11828
12028
  /**
11829
12029
  * This is the squad that will be used for incoming calls to this phone number.
11830
12030
  *
11831
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
12031
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11832
12032
  */
11833
12033
  squadId?: string;
11834
12034
  /**
@@ -11875,13 +12075,19 @@ export interface UpdateTelnyxPhoneNumberDTO {
11875
12075
  /**
11876
12076
  * This is the assistant that will be used for incoming calls to this phone number.
11877
12077
  *
11878
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
12078
+ * If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11879
12079
  */
11880
12080
  assistantId?: string;
12081
+ /**
12082
+ * This is the workflow that will be used for incoming calls to this phone number.
12083
+ *
12084
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
12085
+ */
12086
+ workflowId?: string;
11881
12087
  /**
11882
12088
  * This is the squad that will be used for incoming calls to this phone number.
11883
12089
  *
11884
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
12090
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11885
12091
  */
11886
12092
  squadId?: string;
11887
12093
  /**
@@ -11927,13 +12133,19 @@ export interface ImportVonagePhoneNumberDTO {
11927
12133
  /**
11928
12134
  * This is the assistant that will be used for incoming calls to this phone number.
11929
12135
  *
11930
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
12136
+ * If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11931
12137
  */
11932
12138
  assistantId?: string;
12139
+ /**
12140
+ * This is the workflow that will be used for incoming calls to this phone number.
12141
+ *
12142
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
12143
+ */
12144
+ workflowId?: string;
11933
12145
  /**
11934
12146
  * This is the squad that will be used for incoming calls to this phone number.
11935
12147
  *
11936
- * If neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
12148
+ * If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
11937
12149
  */
11938
12150
  squadId?: string;
11939
12151
  /**
@@ -14034,8 +14246,37 @@ export interface TrieveKnowledgeBaseImport {
14034
14246
  providerId: string;
14035
14247
  }
14036
14248
 
14249
+ export interface Workflow {
14250
+ nodes: (Start | Assistant | Say | Gather | ApiRequest | Hangup | Transfer)[];
14251
+ /** These are the options for the workflow's LLM. */
14252
+ model?:
14253
+ | AnthropicModel
14254
+ | AnyscaleModel
14255
+ | CerebrasModel
14256
+ | CustomLLMModel
14257
+ | DeepInfraModel
14258
+ | DeepSeekModel
14259
+ | GoogleModel
14260
+ | GroqModel
14261
+ | InflectionAIModel
14262
+ | OpenAIModel
14263
+ | OpenRouterModel
14264
+ | PerplexityAIModel
14265
+ | TogetherAIModel
14266
+ | XaiModel;
14267
+ id: string;
14268
+ orgId: string;
14269
+ /** @format date-time */
14270
+ createdAt: string;
14271
+ /** @format date-time */
14272
+ updatedAt: string;
14273
+ /** @maxLength 80 */
14274
+ name: string;
14275
+ edges: Edge[];
14276
+ }
14277
+
14037
14278
  export interface UpdateWorkflowDTO {
14038
- nodes?: (Say | Gather | ApiRequest | Hangup | Transfer)[];
14279
+ nodes?: (Start | Assistant | Say | Gather | ApiRequest | Hangup | Transfer)[];
14039
14280
  /** These are the options for the workflow's LLM. */
14040
14281
  model?:
14041
14282
  | AnthropicModel
@@ -14438,7 +14679,7 @@ export interface TestSuiteTestScorerAI {
14438
14679
  type: 'ai';
14439
14680
  /**
14440
14681
  * This is the rubric used by the AI scorer.
14441
- * @maxLength 1000
14682
+ * @maxLength 10000
14442
14683
  */
14443
14684
  rubric: string;
14444
14685
  }
@@ -14468,7 +14709,7 @@ export interface TestSuiteRunScorerAI {
14468
14709
  reasoning: string;
14469
14710
  /**
14470
14711
  * This is the rubric used by the AI scorer.
14471
- * @maxLength 1000
14712
+ * @maxLength 10000
14472
14713
  */
14473
14714
  rubric: string;
14474
14715
  }
@@ -15015,6 +15256,8 @@ export interface Org {
15015
15256
  stripeSubscriptionStatus?: string;
15016
15257
  /** This is the plan for the org. */
15017
15258
  plan?: OrgPlan;
15259
+ /** This is the secret key used for signing JWT tokens for the org. */
15260
+ jwtSecret?: string;
15018
15261
  /**
15019
15262
  * This is the name of the org. This is just for your own reference.
15020
15263
  * @maxLength 40
@@ -15136,6 +15379,11 @@ export interface UpdateUserRoleDTO {
15136
15379
  role: 'admin' | 'editor' | 'viewer';
15137
15380
  }
15138
15381
 
15382
+ export interface JwtResponse {
15383
+ accessToken: string;
15384
+ aud: object;
15385
+ }
15386
+
15139
15387
  export interface TokenRestrictions {
15140
15388
  /** This determines whether the token is enabled or disabled. Default is true, it's enabled. */
15141
15389
  enabled?: boolean;
@@ -16398,7 +16646,11 @@ export interface TrieveCredential {
16398
16646
  export interface TwilioCredential {
16399
16647
  provider: 'twilio';
16400
16648
  /** This is not returned in the API. */
16401
- authToken: string;
16649
+ authToken?: string;
16650
+ /** This is not returned in the API. */
16651
+ apiKey?: string;
16652
+ /** This is not returned in the API. */
16653
+ apiSecret?: string;
16402
16654
  /** This is the unique identifier for the credential. */
16403
16655
  id: string;
16404
16656
  /** This is the unique identifier for the org that this credential belongs to. */
@@ -17316,6 +17568,10 @@ export interface UpdateTrieveCredentialDTO {
17316
17568
  export interface UpdateTwilioCredentialDTO {
17317
17569
  /** This is not returned in the API. */
17318
17570
  authToken?: string;
17571
+ /** This is not returned in the API. */
17572
+ apiKey?: string;
17573
+ /** This is not returned in the API. */
17574
+ apiSecret?: string;
17319
17575
  /**
17320
17576
  * This is the name of credential. This is just for your reference.
17321
17577
  * @minLength 1
@@ -18105,6 +18361,8 @@ export interface ServerMessageEndOfCallReport {
18105
18361
  | 'vonage-failed-to-connect-call'
18106
18362
  | 'vonage-completed'
18107
18363
  | 'phone-call-provider-bypass-enabled-but-no-call-received'
18364
+ | 'call.in-progress.error-providerfault-transport-never-connected'
18365
+ | 'call.in-progress.error-vapifault-worker-not-available'
18108
18366
  | 'call.in-progress.error-vapifault-transport-never-connected'
18109
18367
  | 'call.in-progress.error-vapifault-transport-connected-but-call-not-active'
18110
18368
  | 'call.in-progress.error-vapifault-call-started-but-connection-to-transport-missing'
@@ -18493,6 +18751,7 @@ export interface ServerMessageEndOfCallReport {
18493
18751
  | 'exceeded-max-duration'
18494
18752
  | 'manually-canceled'
18495
18753
  | 'phone-call-provider-closed-websocket'
18754
+ | 'call.forwarding.operator-busy'
18496
18755
  | 'silence-timed-out'
18497
18756
  | 'call.in-progress.error-sip-telephony-provider-failed-to-connect-call'
18498
18757
  | 'call.ringing.hook-executed-say'
@@ -18957,6 +19216,8 @@ export interface ServerMessageStatusUpdate {
18957
19216
  | 'vonage-failed-to-connect-call'
18958
19217
  | 'vonage-completed'
18959
19218
  | 'phone-call-provider-bypass-enabled-but-no-call-received'
19219
+ | 'call.in-progress.error-providerfault-transport-never-connected'
19220
+ | 'call.in-progress.error-vapifault-worker-not-available'
18960
19221
  | 'call.in-progress.error-vapifault-transport-never-connected'
18961
19222
  | 'call.in-progress.error-vapifault-transport-connected-but-call-not-active'
18962
19223
  | 'call.in-progress.error-vapifault-call-started-but-connection-to-transport-missing'
@@ -19345,6 +19606,7 @@ export interface ServerMessageStatusUpdate {
19345
19606
  | 'exceeded-max-duration'
19346
19607
  | 'manually-canceled'
19347
19608
  | 'phone-call-provider-closed-websocket'
19609
+ | 'call.forwarding.operator-busy'
19348
19610
  | 'silence-timed-out'
19349
19611
  | 'call.in-progress.error-sip-telephony-provider-failed-to-connect-call'
19350
19612
  | 'call.ringing.hook-executed-say'
@@ -20001,6 +20263,8 @@ export interface ToolCallResult {
20001
20263
  * 3. a response generated by the model, if neither exist
20002
20264
  */
20003
20265
  error?: string;
20266
+ /** This is optional metadata for the tool call result to be sent to the client. */
20267
+ metadata?: object;
20004
20268
  }
20005
20269
 
20006
20270
  export interface ServerMessageResponseToolCalls {
@@ -20197,6 +20461,8 @@ export interface ToolCallResultMessage {
20197
20461
  time: number;
20198
20462
  /** The number of seconds from the start of the conversation. */
20199
20463
  secondsFromStart: number;
20464
+ /** The metadata for the tool call result. */
20465
+ metadata?: object;
20200
20466
  }
20201
20467
 
20202
20468
  export interface TransportCost {
@@ -20306,7 +20572,7 @@ export interface VoicemailDetectionCost {
20306
20572
  /** This is the model that was used to perform the analysis. */
20307
20573
  model: object;
20308
20574
  /** This is the provider that was used to detect the voicemail. */
20309
- provider: 'twilio' | 'google' | 'openai';
20575
+ provider: 'twilio' | 'google' | 'openai' | 'vapi';
20310
20576
  /** This is the number of prompt text tokens used in the voicemail detection. */
20311
20577
  promptTextTokens: number;
20312
20578
  /** This is the number of prompt audio tokens used in the voicemail detection. */
@@ -20319,6 +20585,19 @@ export interface VoicemailDetectionCost {
20319
20585
  cost: number;
20320
20586
  }
20321
20587
 
20588
+ export interface KnowledgeBaseCost {
20589
+ /** This is the type of cost, always 'knowledge-base' for this class. */
20590
+ type: 'knowledge-base';
20591
+ /** This is the model that was used for processing the knowledge base. */
20592
+ model: object;
20593
+ /** This is the number of prompt tokens used in the knowledge base query. */
20594
+ promptTokens: number;
20595
+ /** This is the number of completion tokens generated in the knowledge base query. */
20596
+ completionTokens: number;
20597
+ /** This is the cost of the component in USD. */
20598
+ cost: number;
20599
+ }
20600
+
20322
20601
  export interface FunctionToolWithToolCall {
20323
20602
  /**
20324
20603
  * This determines if the tool is async.
@@ -21642,6 +21921,33 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
21642
21921
  format: 'json',
21643
21922
  ...params,
21644
21923
  }),
21924
+
21925
+ /**
21926
+ * No description
21927
+ *
21928
+ * @tags Assistants
21929
+ * @name AssistantControllerFindVersions
21930
+ * @summary List Assistant Versions
21931
+ * @request GET:/assistant/{id}/version
21932
+ * @secure
21933
+ */
21934
+ assistantControllerFindVersions: (
21935
+ id: string,
21936
+ query?: {
21937
+ page?: number;
21938
+ limit?: number;
21939
+ pageState?: string;
21940
+ },
21941
+ params: RequestParams = {},
21942
+ ) =>
21943
+ this.request<AssistantVersionPaginatedResponse, any>({
21944
+ path: `/assistant/${id}/version`,
21945
+ method: 'GET',
21946
+ query: query,
21947
+ secure: true,
21948
+ format: 'json',
21949
+ ...params,
21950
+ }),
21645
21951
  };
21646
21952
  phoneNumber = {
21647
21953
  /**
@@ -24077,6 +24383,24 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
24077
24383
  type: ContentType.Json,
24078
24384
  ...params,
24079
24385
  }),
24386
+
24387
+ /**
24388
+ * No description
24389
+ *
24390
+ * @tags Orgs
24391
+ * @name OrgControllerOrgToken
24392
+ * @summary Generate User Org JWT
24393
+ * @request GET:/org/{id}/auth
24394
+ * @secure
24395
+ */
24396
+ orgControllerOrgToken: (id: string, params: RequestParams = {}) =>
24397
+ this.request<JwtResponse, any>({
24398
+ path: `/org/${id}/auth`,
24399
+ method: 'GET',
24400
+ secure: true,
24401
+ format: 'json',
24402
+ ...params,
24403
+ }),
24080
24404
  };
24081
24405
  token = {
24082
24406
  /**
@@ -24523,7 +24847,10 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
24523
24847
  } & GoogleSheetsOAuth2AuthorizationCredential)
24524
24848
  | ({
24525
24849
  provider: 'slack.oauth2-authorization';
24526
- } & SlackOAuth2AuthorizationCredential),
24850
+ } & SlackOAuth2AuthorizationCredential)
24851
+ | ({
24852
+ provider: 'aws';
24853
+ } & any),
24527
24854
  any
24528
24855
  >({
24529
24856
  path: `/credential`,
@@ -24741,6 +25068,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
24741
25068
  | ({
24742
25069
  provider: 'slack.oauth2-authorization';
24743
25070
  } & SlackOAuth2AuthorizationCredential)
25071
+ | ({
25072
+ provider: 'aws';
25073
+ } & any)
24744
25074
  )[],
24745
25075
  any
24746
25076
  >({
@@ -24906,7 +25236,10 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
24906
25236
  } & GoogleSheetsOAuth2AuthorizationCredential)
24907
25237
  | ({
24908
25238
  provider: 'slack.oauth2-authorization';
24909
- } & SlackOAuth2AuthorizationCredential),
25239
+ } & SlackOAuth2AuthorizationCredential)
25240
+ | ({
25241
+ provider: 'aws';
25242
+ } & any),
24910
25243
  any
24911
25244
  >({
24912
25245
  path: `/credential/${id}`,
@@ -25191,7 +25524,10 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
25191
25524
  } & GoogleSheetsOAuth2AuthorizationCredential)
25192
25525
  | ({
25193
25526
  provider: 'slack.oauth2-authorization';
25194
- } & SlackOAuth2AuthorizationCredential),
25527
+ } & SlackOAuth2AuthorizationCredential)
25528
+ | ({
25529
+ provider: 'aws';
25530
+ } & any),
25195
25531
  any
25196
25532
  >({
25197
25533
  path: `/credential/${id}`,
@@ -25357,7 +25693,10 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
25357
25693
  } & GoogleSheetsOAuth2AuthorizationCredential)
25358
25694
  | ({
25359
25695
  provider: 'slack.oauth2-authorization';
25360
- } & SlackOAuth2AuthorizationCredential),
25696
+ } & SlackOAuth2AuthorizationCredential)
25697
+ | ({
25698
+ provider: 'aws';
25699
+ } & any),
25361
25700
  any
25362
25701
  >({
25363
25702
  path: `/credential/${id}`,