@vapi-ai/web 2.2.7 → 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.
- package/api.ts +959 -893
- package/dist/api.d.ts +830 -582
- package/dist/api.js +17 -0
- package/package.json +3 -2
package/dist/api.d.ts
CHANGED
|
@@ -166,19 +166,51 @@ export interface OpenAIMessage {
|
|
|
166
166
|
content: string | null;
|
|
167
167
|
role: 'assistant' | 'function' | 'user' | 'system' | 'tool';
|
|
168
168
|
}
|
|
169
|
+
export interface Mono {
|
|
170
|
+
/** This is the combined recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. */
|
|
171
|
+
combinedUrl?: string;
|
|
172
|
+
/** This is the mono recording url for the assistant. To enable, set `assistant.artifactPlan.recordingEnabled`. */
|
|
173
|
+
assistantUrl?: string;
|
|
174
|
+
/** This is the mono recording url for the customer. To enable, set `assistant.artifactPlan.recordingEnabled`. */
|
|
175
|
+
customerUrl?: string;
|
|
176
|
+
}
|
|
177
|
+
export interface Recording {
|
|
178
|
+
/** This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. */
|
|
179
|
+
stereoUrl?: string;
|
|
180
|
+
/** This is the video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. */
|
|
181
|
+
videoUrl?: string;
|
|
182
|
+
/** 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. */
|
|
183
|
+
videoRecordingStartDelaySeconds?: number;
|
|
184
|
+
/** This is the mono recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. */
|
|
185
|
+
mono?: Mono;
|
|
186
|
+
}
|
|
169
187
|
export interface Artifact {
|
|
170
188
|
/** These are the messages that were spoken during the call. */
|
|
171
189
|
messages?: (UserMessage | SystemMessage | BotMessage | ToolCallMessage | ToolCallResultMessage)[];
|
|
172
190
|
/** These are the messages that were spoken during the call, formatted for OpenAI. */
|
|
173
191
|
messagesOpenAIFormatted?: OpenAIMessage[];
|
|
174
|
-
/**
|
|
192
|
+
/**
|
|
193
|
+
* This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.
|
|
194
|
+
* @deprecated
|
|
195
|
+
*/
|
|
175
196
|
recordingUrl?: string;
|
|
176
|
-
/**
|
|
197
|
+
/**
|
|
198
|
+
* This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.
|
|
199
|
+
* @deprecated
|
|
200
|
+
*/
|
|
177
201
|
stereoRecordingUrl?: string;
|
|
178
|
-
/**
|
|
202
|
+
/**
|
|
203
|
+
* This is video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`.
|
|
204
|
+
* @deprecated
|
|
205
|
+
*/
|
|
179
206
|
videoRecordingUrl?: string;
|
|
180
|
-
/**
|
|
207
|
+
/**
|
|
208
|
+
* 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.
|
|
209
|
+
* @deprecated
|
|
210
|
+
*/
|
|
181
211
|
videoRecordingStartDelaySeconds?: number;
|
|
212
|
+
/** This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. */
|
|
213
|
+
recording?: Recording;
|
|
182
214
|
/** This is the transcript of the call. This is derived from `artifact.messages` but provided for convenience. */
|
|
183
215
|
transcript?: string;
|
|
184
216
|
/** 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`. */
|
|
@@ -485,7 +517,7 @@ export interface GoogleTranscriber {
|
|
|
485
517
|
/** This is the transcription provider that will be used. */
|
|
486
518
|
provider: 'google';
|
|
487
519
|
/** This is the model that will be used for the transcription. */
|
|
488
|
-
model?: 'gemini-2.0-flash-thinking-exp' | 'gemini-2.0-pro-exp-02-05' | 'gemini-2.0-flash' | 'gemini-2.0-flash-lite' | 'gemini-2.0-flash-lite-preview-02-05' | 'gemini-2.0-flash-exp' | 'gemini-2.0-flash-realtime-exp' | 'gemini-1.5-flash' | 'gemini-1.5-flash-002' | 'gemini-1.5-pro' | 'gemini-1.5-pro-002' | 'gemini-1.0-pro';
|
|
520
|
+
model?: 'gemini-2.5-flash-preview-04-17' | 'gemini-2.0-flash-thinking-exp' | 'gemini-2.0-pro-exp-02-05' | 'gemini-2.0-flash' | 'gemini-2.0-flash-lite' | 'gemini-2.0-flash-lite-preview-02-05' | 'gemini-2.0-flash-exp' | 'gemini-2.0-flash-realtime-exp' | 'gemini-1.5-flash' | 'gemini-1.5-flash-002' | 'gemini-1.5-pro' | 'gemini-1.5-pro-002' | 'gemini-1.0-pro';
|
|
489
521
|
/** This is the language that will be set for the transcription. */
|
|
490
522
|
language?: 'Multilingual' | 'Arabic' | 'Bengali' | 'Bulgarian' | 'Chinese' | 'Croatian' | 'Czech' | 'Danish' | 'Dutch' | 'English' | 'Estonian' | 'Finnish' | 'French' | 'German' | 'Greek' | 'Hebrew' | 'Hindi' | 'Hungarian' | 'Indonesian' | 'Italian' | 'Japanese' | 'Korean' | 'Latvian' | 'Lithuanian' | 'Norwegian' | 'Polish' | 'Portuguese' | 'Romanian' | 'Russian' | 'Serbian' | 'Slovak' | 'Slovenian' | 'Spanish' | 'Swahili' | 'Swedish' | 'Thai' | 'Turkish' | 'Ukrainian' | 'Vietnamese';
|
|
491
523
|
/** This is the plan for voice provider fallbacks in the event that the primary voice provider fails. */
|
|
@@ -731,7 +763,7 @@ export interface FallbackGoogleTranscriber {
|
|
|
731
763
|
/** This is the transcription provider that will be used. */
|
|
732
764
|
provider: 'google';
|
|
733
765
|
/** This is the model that will be used for the transcription. */
|
|
734
|
-
model?: 'gemini-2.0-flash-thinking-exp' | 'gemini-2.0-pro-exp-02-05' | 'gemini-2.0-flash' | 'gemini-2.0-flash-lite' | 'gemini-2.0-flash-lite-preview-02-05' | 'gemini-2.0-flash-exp' | 'gemini-2.0-flash-realtime-exp' | 'gemini-1.5-flash' | 'gemini-1.5-flash-002' | 'gemini-1.5-pro' | 'gemini-1.5-pro-002' | 'gemini-1.0-pro';
|
|
766
|
+
model?: 'gemini-2.5-flash-preview-04-17' | 'gemini-2.0-flash-thinking-exp' | 'gemini-2.0-pro-exp-02-05' | 'gemini-2.0-flash' | 'gemini-2.0-flash-lite' | 'gemini-2.0-flash-lite-preview-02-05' | 'gemini-2.0-flash-exp' | 'gemini-2.0-flash-realtime-exp' | 'gemini-1.5-flash' | 'gemini-1.5-flash-002' | 'gemini-1.5-pro' | 'gemini-1.5-pro-002' | 'gemini-1.0-pro';
|
|
735
767
|
/** This is the language that will be set for the transcription. */
|
|
736
768
|
language?: 'Multilingual' | 'Arabic' | 'Bengali' | 'Bulgarian' | 'Chinese' | 'Croatian' | 'Czech' | 'Danish' | 'Dutch' | 'English' | 'Estonian' | 'Finnish' | 'French' | 'German' | 'Greek' | 'Hebrew' | 'Hindi' | 'Hungarian' | 'Indonesian' | 'Italian' | 'Japanese' | 'Korean' | 'Latvian' | 'Lithuanian' | 'Norwegian' | 'Polish' | 'Portuguese' | 'Romanian' | 'Russian' | 'Serbian' | 'Slovak' | 'Slovenian' | 'Spanish' | 'Swahili' | 'Swedish' | 'Thai' | 'Turkish' | 'Ukrainian' | 'Vietnamese';
|
|
737
769
|
}
|
|
@@ -1397,6 +1429,19 @@ export interface TransferDestinationStep {
|
|
|
1397
1429
|
/** This is the description of the destination, used by the AI to choose when and how to transfer the call. */
|
|
1398
1430
|
description?: string;
|
|
1399
1431
|
}
|
|
1432
|
+
export interface TransferFallbackPlan {
|
|
1433
|
+
/** This is the message the assistant will deliver to the customer if the transfer fails. */
|
|
1434
|
+
message: string | CustomMessage;
|
|
1435
|
+
/**
|
|
1436
|
+
* This controls what happens after delivering the failure message to the customer.
|
|
1437
|
+
* - true: End the call after delivering the failure message (default)
|
|
1438
|
+
* - false: Keep the assistant on the call to continue handling the customer's request
|
|
1439
|
+
*
|
|
1440
|
+
* @default true
|
|
1441
|
+
* @default true
|
|
1442
|
+
*/
|
|
1443
|
+
endCallEnabled?: boolean;
|
|
1444
|
+
}
|
|
1400
1445
|
export interface SummaryPlan {
|
|
1401
1446
|
/**
|
|
1402
1447
|
* These are the messages used to generate the summary.
|
|
@@ -1452,15 +1497,16 @@ export interface TransferPlan {
|
|
|
1452
1497
|
* - `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.
|
|
1453
1498
|
* - `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.
|
|
1454
1499
|
* - `warm-transfer-twiml`: The assistant dials the destination, executes the twiml instructions on the destination call leg, connects the customer, and leaves the call.
|
|
1500
|
+
* - `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.
|
|
1455
1501
|
*
|
|
1456
1502
|
* @default 'blind-transfer'
|
|
1457
1503
|
*/
|
|
1458
|
-
mode: 'blind-transfer' | 'blind-transfer-add-summary-to-sip-header' | 'warm-transfer-say-message' | 'warm-transfer-say-summary' | 'warm-transfer-twiml' | 'warm-transfer-wait-for-operator-to-speak-first-and-then-say-message' | 'warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary';
|
|
1504
|
+
mode: 'blind-transfer' | 'blind-transfer-add-summary-to-sip-header' | 'warm-transfer-say-message' | 'warm-transfer-say-summary' | 'warm-transfer-twiml' | 'warm-transfer-wait-for-operator-to-speak-first-and-then-say-message' | 'warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary' | 'warm-transfer-experimental';
|
|
1459
1505
|
/**
|
|
1460
1506
|
* This is the message the assistant will deliver to the destination party before connecting the customer.
|
|
1461
1507
|
*
|
|
1462
1508
|
* Usage:
|
|
1463
|
-
* - Used only when `mode` is `blind-transfer-add-summary-to-sip-header`, `warm-transfer-say-message
|
|
1509
|
+
* - 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`.
|
|
1464
1510
|
*/
|
|
1465
1511
|
message?: string | CustomMessage;
|
|
1466
1512
|
/**
|
|
@@ -1471,6 +1517,17 @@ export interface TransferPlan {
|
|
|
1471
1517
|
* @default "refer"
|
|
1472
1518
|
*/
|
|
1473
1519
|
sipVerb?: 'refer' | 'bye' | 'dial';
|
|
1520
|
+
/**
|
|
1521
|
+
* This is the URL to an audio file played while the customer is on hold during transfer.
|
|
1522
|
+
*
|
|
1523
|
+
* Usage:
|
|
1524
|
+
* - Used only when `mode` is `warm-transfer-experimental`.
|
|
1525
|
+
* - Used when transferring calls to play hold audio for the customer.
|
|
1526
|
+
* - Must be a publicly accessible URL to an audio file.
|
|
1527
|
+
* - Supported formats: MP3 and WAV.
|
|
1528
|
+
* - If not provided, the default hold audio will be used.
|
|
1529
|
+
*/
|
|
1530
|
+
holdAudioUrl?: string;
|
|
1474
1531
|
/**
|
|
1475
1532
|
* This is the TwiML instructions to execute on the destination call leg before connecting the customer.
|
|
1476
1533
|
*
|
|
@@ -1492,9 +1549,23 @@ export interface TransferPlan {
|
|
|
1492
1549
|
* This is the plan for generating a summary of the call to present to the destination party.
|
|
1493
1550
|
*
|
|
1494
1551
|
* Usage:
|
|
1495
|
-
* - 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`.
|
|
1552
|
+
* - 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`.
|
|
1496
1553
|
*/
|
|
1497
1554
|
summaryPlan?: SummaryPlan;
|
|
1555
|
+
/**
|
|
1556
|
+
* This flag includes the sipHeaders from above in the refer to sip uri as url encoded query params.
|
|
1557
|
+
*
|
|
1558
|
+
* @default false
|
|
1559
|
+
*/
|
|
1560
|
+
sipHeadersInReferToEnabled?: boolean;
|
|
1561
|
+
/**
|
|
1562
|
+
* This configures the fallback plan when the transfer fails (destination unreachable, busy, or not human).
|
|
1563
|
+
*
|
|
1564
|
+
* Usage:
|
|
1565
|
+
* - Used only when `mode` is `warm-transfer-experimental`.
|
|
1566
|
+
* - If not provided when using `warm-transfer-experimental`, a default message will be used.
|
|
1567
|
+
*/
|
|
1568
|
+
fallbackPlan?: TransferFallbackPlan;
|
|
1498
1569
|
}
|
|
1499
1570
|
export interface TransferDestinationNumber {
|
|
1500
1571
|
/**
|
|
@@ -1677,7 +1748,7 @@ export interface KnowledgeBase {
|
|
|
1677
1748
|
*/
|
|
1678
1749
|
provider: 'google';
|
|
1679
1750
|
/** The model to use for the knowledge base */
|
|
1680
|
-
model?: 'gemini-2.0-flash-thinking-exp' | 'gemini-2.0-pro-exp-02-05' | 'gemini-2.0-flash' | 'gemini-2.0-flash-lite' | 'gemini-2.0-flash-lite-preview-02-05' | 'gemini-2.0-flash-exp' | 'gemini-2.0-flash-realtime-exp' | 'gemini-1.5-flash' | 'gemini-1.5-flash-002' | 'gemini-1.5-pro' | 'gemini-1.5-pro-002' | 'gemini-1.0-pro';
|
|
1751
|
+
model?: 'gemini-2.5-flash-preview-04-17' | 'gemini-2.0-flash-thinking-exp' | 'gemini-2.0-pro-exp-02-05' | 'gemini-2.0-flash' | 'gemini-2.0-flash-lite' | 'gemini-2.0-flash-lite-preview-02-05' | 'gemini-2.0-flash-exp' | 'gemini-2.0-flash-realtime-exp' | 'gemini-1.5-flash' | 'gemini-1.5-flash-002' | 'gemini-1.5-pro' | 'gemini-1.5-pro-002' | 'gemini-1.0-pro';
|
|
1681
1752
|
/** A description of the knowledge base */
|
|
1682
1753
|
description: string;
|
|
1683
1754
|
/** The file IDs associated with this knowledge base */
|
|
@@ -2276,7 +2347,7 @@ export interface GoogleModel {
|
|
|
2276
2347
|
/** This is the ID of the knowledge base the model will use. */
|
|
2277
2348
|
knowledgeBaseId?: string;
|
|
2278
2349
|
/** This is the Google model that will be used. */
|
|
2279
|
-
model: 'gemini-2.0-flash-thinking-exp' | 'gemini-2.0-pro-exp-02-05' | 'gemini-2.0-flash' | 'gemini-2.0-flash-lite' | 'gemini-2.0-flash-lite-preview-02-05' | 'gemini-2.0-flash-exp' | 'gemini-2.0-flash-realtime-exp' | 'gemini-1.5-flash' | 'gemini-1.5-flash-002' | 'gemini-1.5-pro' | 'gemini-1.5-pro-002' | 'gemini-1.0-pro';
|
|
2350
|
+
model: 'gemini-2.5-flash-preview-04-17' | 'gemini-2.0-flash-thinking-exp' | 'gemini-2.0-pro-exp-02-05' | 'gemini-2.0-flash' | 'gemini-2.0-flash-lite' | 'gemini-2.0-flash-lite-preview-02-05' | 'gemini-2.0-flash-exp' | 'gemini-2.0-flash-realtime-exp' | 'gemini-1.5-flash' | 'gemini-1.5-flash-002' | 'gemini-1.5-pro' | 'gemini-1.5-pro-002' | 'gemini-1.0-pro';
|
|
2280
2351
|
provider: 'google';
|
|
2281
2352
|
/**
|
|
2282
2353
|
* This is the session configuration for the Gemini Flash 2.0 Multimodal Live API.
|
|
@@ -2631,6 +2702,116 @@ export interface TogetherAIModel {
|
|
|
2631
2702
|
*/
|
|
2632
2703
|
numFastTurns?: number;
|
|
2633
2704
|
}
|
|
2705
|
+
export interface Start {
|
|
2706
|
+
type: 'start';
|
|
2707
|
+
/** @maxLength 80 */
|
|
2708
|
+
name: string;
|
|
2709
|
+
/** This is for metadata you want to store on the task. */
|
|
2710
|
+
metadata?: object;
|
|
2711
|
+
}
|
|
2712
|
+
export interface Assistant {
|
|
2713
|
+
type: 'assistant';
|
|
2714
|
+
assistantId: string;
|
|
2715
|
+
/** @maxLength 80 */
|
|
2716
|
+
name: string;
|
|
2717
|
+
/** This is for metadata you want to store on the task. */
|
|
2718
|
+
metadata?: object;
|
|
2719
|
+
}
|
|
2720
|
+
export interface Say {
|
|
2721
|
+
type: 'say';
|
|
2722
|
+
/** @maxLength 1000 */
|
|
2723
|
+
exact?: string;
|
|
2724
|
+
/** @maxLength 1000 */
|
|
2725
|
+
prompt?: string;
|
|
2726
|
+
/** @maxLength 80 */
|
|
2727
|
+
name: string;
|
|
2728
|
+
/** This is for metadata you want to store on the task. */
|
|
2729
|
+
metadata?: object;
|
|
2730
|
+
}
|
|
2731
|
+
export interface SayHook {
|
|
2732
|
+
type: 'say';
|
|
2733
|
+
/** This is for metadata you want to store on the task. */
|
|
2734
|
+
metadata?: object;
|
|
2735
|
+
/** @maxLength 1000 */
|
|
2736
|
+
exact?: string;
|
|
2737
|
+
/** @maxLength 1000 */
|
|
2738
|
+
prompt?: string;
|
|
2739
|
+
}
|
|
2740
|
+
export interface Hook {
|
|
2741
|
+
/** @maxLength 80 */
|
|
2742
|
+
on: 'task.start' | 'task.output.confirmation' | 'task.delayed';
|
|
2743
|
+
do: SayHook[];
|
|
2744
|
+
}
|
|
2745
|
+
export interface Gather {
|
|
2746
|
+
type: 'gather';
|
|
2747
|
+
output: JsonSchema;
|
|
2748
|
+
/** This is whether or not the workflow should read back the gathered data to the user, and ask about its correctness. */
|
|
2749
|
+
confirmContent?: boolean;
|
|
2750
|
+
/**
|
|
2751
|
+
* This is a list of hooks for a task.
|
|
2752
|
+
* Each hook is a list of tasks to run on a trigger (such as on start, on failure, etc).
|
|
2753
|
+
* Only Say is supported for now.
|
|
2754
|
+
*/
|
|
2755
|
+
hooks?: Hook[];
|
|
2756
|
+
/** 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 */
|
|
2757
|
+
maxRetries?: number;
|
|
2758
|
+
/** 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?" */
|
|
2759
|
+
literalTemplate?: string;
|
|
2760
|
+
/** @maxLength 80 */
|
|
2761
|
+
name: string;
|
|
2762
|
+
/** This is for metadata you want to store on the task. */
|
|
2763
|
+
metadata?: object;
|
|
2764
|
+
}
|
|
2765
|
+
export interface ApiRequest {
|
|
2766
|
+
type: 'apiRequest';
|
|
2767
|
+
method: 'POST' | 'GET';
|
|
2768
|
+
/** Api endpoint to send requests to. */
|
|
2769
|
+
url: string;
|
|
2770
|
+
/**
|
|
2771
|
+
* These are the custom headers to include in the Api Request sent.
|
|
2772
|
+
*
|
|
2773
|
+
* Each key-value pair represents a header name and its value.
|
|
2774
|
+
*/
|
|
2775
|
+
headers?: JsonSchema;
|
|
2776
|
+
/**
|
|
2777
|
+
* This defined the JSON body of your Api Request. For example, if `body_schema`
|
|
2778
|
+
* included "my_field": "my_gather_statement.user_age", then the json body sent to the server would have that particular value assign to it.
|
|
2779
|
+
* Right now, only data from gather statements are supported.
|
|
2780
|
+
*/
|
|
2781
|
+
body?: JsonSchema;
|
|
2782
|
+
/**
|
|
2783
|
+
* This is the mode of the Api Request.
|
|
2784
|
+
* We only support BLOCKING and BACKGROUND for now.
|
|
2785
|
+
*/
|
|
2786
|
+
mode: 'blocking' | 'background';
|
|
2787
|
+
/**
|
|
2788
|
+
* This is a list of hooks for a task.
|
|
2789
|
+
* Each hook is a list of tasks to run on a trigger (such as on start, on failure, etc).
|
|
2790
|
+
* Only Say is supported for now.
|
|
2791
|
+
*/
|
|
2792
|
+
hooks?: Hook[];
|
|
2793
|
+
/** This is the schema for the outputs of the Api Request. */
|
|
2794
|
+
output?: JsonSchema;
|
|
2795
|
+
/** @maxLength 80 */
|
|
2796
|
+
name: string;
|
|
2797
|
+
/** This is for metadata you want to store on the task. */
|
|
2798
|
+
metadata?: object;
|
|
2799
|
+
}
|
|
2800
|
+
export interface Hangup {
|
|
2801
|
+
type: 'hangup';
|
|
2802
|
+
/** @maxLength 80 */
|
|
2803
|
+
name: string;
|
|
2804
|
+
/** This is for metadata you want to store on the task. */
|
|
2805
|
+
metadata?: object;
|
|
2806
|
+
}
|
|
2807
|
+
export interface Transfer {
|
|
2808
|
+
type: 'transfer';
|
|
2809
|
+
destination: object;
|
|
2810
|
+
/** @maxLength 80 */
|
|
2811
|
+
name: string;
|
|
2812
|
+
/** This is for metadata you want to store on the task. */
|
|
2813
|
+
metadata?: object;
|
|
2814
|
+
}
|
|
2634
2815
|
export interface AIEdgeCondition {
|
|
2635
2816
|
type: 'ai';
|
|
2636
2817
|
/**
|
|
@@ -2641,7 +2822,7 @@ export interface AIEdgeCondition {
|
|
|
2641
2822
|
}
|
|
2642
2823
|
export interface LogicEdgeCondition {
|
|
2643
2824
|
type: 'logic';
|
|
2644
|
-
/** @maxLength
|
|
2825
|
+
/** @maxLength 1000 */
|
|
2645
2826
|
liquid: string;
|
|
2646
2827
|
}
|
|
2647
2828
|
export interface FailedEdgeCondition {
|
|
@@ -2656,16 +2837,10 @@ export interface Edge {
|
|
|
2656
2837
|
/** This is for metadata you want to store on the edge. */
|
|
2657
2838
|
metadata?: object;
|
|
2658
2839
|
}
|
|
2659
|
-
export interface
|
|
2660
|
-
nodes: (Say | Gather | ApiRequest | Hangup | Transfer)[];
|
|
2840
|
+
export interface WorkflowUserEditable {
|
|
2841
|
+
nodes: (Start | Assistant | Say | Gather | ApiRequest | Hangup | Transfer)[];
|
|
2661
2842
|
/** These are the options for the workflow's LLM. */
|
|
2662
2843
|
model?: AnthropicModel | AnyscaleModel | CerebrasModel | CustomLLMModel | DeepInfraModel | DeepSeekModel | GoogleModel | GroqModel | InflectionAIModel | OpenAIModel | OpenRouterModel | PerplexityAIModel | TogetherAIModel | XaiModel;
|
|
2663
|
-
id: string;
|
|
2664
|
-
orgId: string;
|
|
2665
|
-
/** @format date-time */
|
|
2666
|
-
createdAt: string;
|
|
2667
|
-
/** @format date-time */
|
|
2668
|
-
updatedAt: string;
|
|
2669
2844
|
/** @maxLength 80 */
|
|
2670
2845
|
name: string;
|
|
2671
2846
|
edges: Edge[];
|
|
@@ -2693,7 +2868,7 @@ export interface VapiModel {
|
|
|
2693
2868
|
/** This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead. */
|
|
2694
2869
|
workflowId?: string;
|
|
2695
2870
|
/** This is the workflow that will be used for the call. To use an existing workflow, use `workflowId` instead. */
|
|
2696
|
-
workflow?:
|
|
2871
|
+
workflow?: WorkflowUserEditable;
|
|
2697
2872
|
/** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
2698
2873
|
model: string;
|
|
2699
2874
|
/**
|
|
@@ -4676,7 +4851,11 @@ export interface CreateTogetherAICredentialDTO {
|
|
|
4676
4851
|
export interface CreateTwilioCredentialDTO {
|
|
4677
4852
|
provider: 'twilio';
|
|
4678
4853
|
/** This is not returned in the API. */
|
|
4679
|
-
authToken
|
|
4854
|
+
authToken?: string;
|
|
4855
|
+
/** This is not returned in the API. */
|
|
4856
|
+
apiKey?: string;
|
|
4857
|
+
/** This is not returned in the API. */
|
|
4858
|
+
apiSecret?: string;
|
|
4680
4859
|
accountSid: string;
|
|
4681
4860
|
/**
|
|
4682
4861
|
* This is the name of credential. This is just for your reference.
|
|
@@ -4771,31 +4950,130 @@ export interface TransferAssistantHookAction {
|
|
|
4771
4950
|
/** This is the destination details for the transfer - can be a phone number or SIP URI */
|
|
4772
4951
|
destination?: TransferDestinationNumber | TransferDestinationSip;
|
|
4773
4952
|
}
|
|
4953
|
+
export interface FunctionCallAssistantHookAction {
|
|
4954
|
+
/**
|
|
4955
|
+
* This determines if the tool is async.
|
|
4956
|
+
*
|
|
4957
|
+
* 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.
|
|
4958
|
+
*
|
|
4959
|
+
* 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.
|
|
4960
|
+
*
|
|
4961
|
+
* Defaults to synchronous (`false`).
|
|
4962
|
+
* @example false
|
|
4963
|
+
*/
|
|
4964
|
+
async?: boolean;
|
|
4965
|
+
/**
|
|
4966
|
+
* These are the messages that will be spoken to the user as the tool is running.
|
|
4967
|
+
*
|
|
4968
|
+
* 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.
|
|
4969
|
+
*/
|
|
4970
|
+
messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
|
|
4971
|
+
/** The type of tool. "function" for Function tool. */
|
|
4972
|
+
type: 'function';
|
|
4973
|
+
/**
|
|
4974
|
+
* This is the function definition of the tool.
|
|
4975
|
+
*
|
|
4976
|
+
* 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.
|
|
4977
|
+
*
|
|
4978
|
+
* 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.
|
|
4979
|
+
*/
|
|
4980
|
+
function?: OpenAIFunction;
|
|
4981
|
+
/**
|
|
4982
|
+
* This is the server that will be hit when this tool is requested by the model.
|
|
4983
|
+
*
|
|
4984
|
+
* All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
|
|
4985
|
+
*
|
|
4986
|
+
* 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.
|
|
4987
|
+
*/
|
|
4988
|
+
server?: Server;
|
|
4989
|
+
}
|
|
4990
|
+
export interface AssistantHookFilter {
|
|
4991
|
+
/**
|
|
4992
|
+
* This is the type of filter - currently only "oneOf" is supported
|
|
4993
|
+
* @maxLength 1000
|
|
4994
|
+
*/
|
|
4995
|
+
type: 'oneOf';
|
|
4996
|
+
/**
|
|
4997
|
+
* This is the key to filter on (e.g. "call.endedReason")
|
|
4998
|
+
* @maxLength 1000
|
|
4999
|
+
*/
|
|
5000
|
+
key: string;
|
|
5001
|
+
/** This is the array of possible values to match against */
|
|
5002
|
+
oneOf: string[];
|
|
5003
|
+
}
|
|
5004
|
+
export interface AssistantHookCallEnding {
|
|
5005
|
+
/**
|
|
5006
|
+
* This is the event that triggers this hook
|
|
5007
|
+
* @maxLength 1000
|
|
5008
|
+
*/
|
|
5009
|
+
on: 'call.ending';
|
|
5010
|
+
/** This is the set of actions to perform when the hook triggers */
|
|
5011
|
+
do: (TransferAssistantHookAction | FunctionCallAssistantHookAction)[];
|
|
5012
|
+
/** This is the set of filters that must match for the hook to trigger */
|
|
5013
|
+
filters?: AssistantHookFilter[];
|
|
5014
|
+
}
|
|
5015
|
+
export interface VoicemailDetectionBackoffPlan {
|
|
5016
|
+
/**
|
|
5017
|
+
* This is the number of seconds to wait before starting the first retry attempt.
|
|
5018
|
+
* @min 0
|
|
5019
|
+
* @default 5
|
|
5020
|
+
*/
|
|
5021
|
+
startAtSeconds?: number;
|
|
5022
|
+
/**
|
|
5023
|
+
* This is the interval in seconds between retry attempts.
|
|
5024
|
+
* @min 2.5
|
|
5025
|
+
* @default 5
|
|
5026
|
+
*/
|
|
5027
|
+
frequencySeconds?: number;
|
|
5028
|
+
/**
|
|
5029
|
+
* This is the maximum number of retry attempts before giving up.
|
|
5030
|
+
* @min 1
|
|
5031
|
+
* @max 10
|
|
5032
|
+
* @default 6
|
|
5033
|
+
*/
|
|
5034
|
+
maxRetries?: number;
|
|
5035
|
+
}
|
|
4774
5036
|
export interface GoogleVoicemailDetectionPlan {
|
|
4775
|
-
/** This is the provider to use for voicemail detection. */
|
|
4776
|
-
provider: 'google';
|
|
4777
5037
|
/**
|
|
4778
|
-
* This is
|
|
5038
|
+
* This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
|
|
4779
5039
|
*
|
|
4780
|
-
*
|
|
4781
|
-
*
|
|
5040
|
+
* - If we detect a voicemail beep before this, we will speak the message at that point.
|
|
5041
|
+
*
|
|
5042
|
+
* - 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.
|
|
5043
|
+
*
|
|
5044
|
+
* @default 30
|
|
5045
|
+
* @min 0
|
|
4782
5046
|
* @max 60
|
|
4783
|
-
* @
|
|
5047
|
+
* @min 0
|
|
5048
|
+
* @max 30
|
|
5049
|
+
* @default 30
|
|
4784
5050
|
*/
|
|
4785
|
-
|
|
5051
|
+
beepMaxAwaitSeconds?: number;
|
|
5052
|
+
/** This is the provider to use for voicemail detection. */
|
|
5053
|
+
provider: 'google';
|
|
5054
|
+
/** This is the backoff plan for the voicemail detection. */
|
|
5055
|
+
backoffPlan?: VoicemailDetectionBackoffPlan;
|
|
4786
5056
|
}
|
|
4787
5057
|
export interface OpenAIVoicemailDetectionPlan {
|
|
4788
|
-
/** This is the provider to use for voicemail detection. */
|
|
4789
|
-
provider: 'openai';
|
|
4790
5058
|
/**
|
|
4791
|
-
* This is
|
|
5059
|
+
* This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
|
|
4792
5060
|
*
|
|
4793
|
-
*
|
|
4794
|
-
*
|
|
5061
|
+
* - If we detect a voicemail beep before this, we will speak the message at that point.
|
|
5062
|
+
*
|
|
5063
|
+
* - 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.
|
|
5064
|
+
*
|
|
5065
|
+
* @default 30
|
|
5066
|
+
* @min 0
|
|
4795
5067
|
* @max 60
|
|
4796
|
-
* @
|
|
5068
|
+
* @min 0
|
|
5069
|
+
* @max 30
|
|
5070
|
+
* @default 30
|
|
4797
5071
|
*/
|
|
4798
|
-
|
|
5072
|
+
beepMaxAwaitSeconds?: number;
|
|
5073
|
+
/** This is the provider to use for voicemail detection. */
|
|
5074
|
+
provider: 'openai';
|
|
5075
|
+
/** This is the backoff plan for the voicemail detection. */
|
|
5076
|
+
backoffPlan?: VoicemailDetectionBackoffPlan;
|
|
4799
5077
|
}
|
|
4800
5078
|
export interface TwilioVoicemailDetectionPlan {
|
|
4801
5079
|
/** This is the provider to use for voicemail detection. */
|
|
@@ -4872,10 +5150,31 @@ export interface TwilioVoicemailDetectionPlan {
|
|
|
4872
5150
|
*/
|
|
4873
5151
|
machineDetectionSilenceTimeout?: number;
|
|
4874
5152
|
}
|
|
4875
|
-
export interface
|
|
5153
|
+
export interface VapiVoicemailDetectionPlan {
|
|
4876
5154
|
/**
|
|
4877
|
-
*
|
|
4878
|
-
*
|
|
5155
|
+
* This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
|
|
5156
|
+
*
|
|
5157
|
+
* - If we detect a voicemail beep before this, we will speak the message at that point.
|
|
5158
|
+
*
|
|
5159
|
+
* - 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.
|
|
5160
|
+
*
|
|
5161
|
+
* @default 30
|
|
5162
|
+
* @min 0
|
|
5163
|
+
* @max 60
|
|
5164
|
+
* @min 0
|
|
5165
|
+
* @max 30
|
|
5166
|
+
* @default 30
|
|
5167
|
+
*/
|
|
5168
|
+
beepMaxAwaitSeconds?: number;
|
|
5169
|
+
/** This is the provider to use for voicemail detection. */
|
|
5170
|
+
provider: 'vapi';
|
|
5171
|
+
/** This is the backoff plan for the voicemail detection. */
|
|
5172
|
+
backoffPlan?: VoicemailDetectionBackoffPlan;
|
|
5173
|
+
}
|
|
5174
|
+
export interface CompliancePlan {
|
|
5175
|
+
/**
|
|
5176
|
+
* When this is enabled, no logs, recordings, or transcriptions will be stored.
|
|
5177
|
+
* At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.
|
|
4879
5178
|
* @example {"hipaaEnabled":false}
|
|
4880
5179
|
*/
|
|
4881
5180
|
hipaaEnabled?: boolean;
|
|
@@ -5264,7 +5563,7 @@ export interface StartSpeakingPlan {
|
|
|
5264
5563
|
* @deprecated
|
|
5265
5564
|
* @example false
|
|
5266
5565
|
*/
|
|
5267
|
-
smartEndpointingEnabled?:
|
|
5566
|
+
smartEndpointingEnabled?: boolean | 'livekit';
|
|
5268
5567
|
/**
|
|
5269
5568
|
* 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.
|
|
5270
5569
|
*
|
|
@@ -5385,32 +5684,6 @@ export interface MonitorPlan {
|
|
|
5385
5684
|
*/
|
|
5386
5685
|
controlEnabled?: boolean;
|
|
5387
5686
|
}
|
|
5388
|
-
export interface AssistantHookFilter {
|
|
5389
|
-
/**
|
|
5390
|
-
* This is the type of filter - currently only "oneOf" is supported
|
|
5391
|
-
* @maxLength 1000
|
|
5392
|
-
*/
|
|
5393
|
-
type: 'oneOf';
|
|
5394
|
-
/**
|
|
5395
|
-
* This is the key to filter on (e.g. "call.endedReason")
|
|
5396
|
-
* @maxLength 1000
|
|
5397
|
-
*/
|
|
5398
|
-
key: string;
|
|
5399
|
-
/** This is the array of possible values to match against */
|
|
5400
|
-
oneOf: string[];
|
|
5401
|
-
}
|
|
5402
|
-
export type AssistantHookActionBase = object;
|
|
5403
|
-
export interface AssistantHooks {
|
|
5404
|
-
/**
|
|
5405
|
-
* This is the event that triggers this hook
|
|
5406
|
-
* @maxLength 1000
|
|
5407
|
-
*/
|
|
5408
|
-
on: 'call.ending';
|
|
5409
|
-
/** This is the set of filters that must match for the hook to trigger */
|
|
5410
|
-
filters?: AssistantHookFilter[];
|
|
5411
|
-
/** This is the set of actions to perform when the hook triggers */
|
|
5412
|
-
do: AssistantHookActionBase[];
|
|
5413
|
-
}
|
|
5414
5687
|
export interface KeypadInputPlan {
|
|
5415
5688
|
/**
|
|
5416
5689
|
* This keeps track of whether the user has enabled keypad input.
|
|
@@ -5471,17 +5744,9 @@ export interface CreateAssistantDTO {
|
|
|
5471
5744
|
* This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached.
|
|
5472
5745
|
* 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.
|
|
5473
5746
|
*/
|
|
5474
|
-
voicemailDetection?: GoogleVoicemailDetectionPlan | OpenAIVoicemailDetectionPlan | TwilioVoicemailDetectionPlan;
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
* @example ["conversation-update","function-call","hang","model-output","speech-update","status-update","transfer-update","transcript","tool-calls","user-interrupted","voice-input","workflow.node.started"]
|
|
5478
|
-
*/
|
|
5479
|
-
clientMessages?: 'conversation-update' | 'function-call' | 'function-call-result' | 'hang' | 'language-changed' | 'metadata' | 'model-output' | 'speech-update' | 'status-update' | 'transcript' | 'tool-calls' | 'tool-calls-result' | 'tool.completed' | 'transfer-update' | 'user-interrupted' | 'voice-input' | 'workflow.node.started';
|
|
5480
|
-
/**
|
|
5481
|
-
* 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.
|
|
5482
|
-
* @example ["conversation-update","end-of-call-report","function-call","hang","speech-update","status-update","tool-calls","transfer-destination-request","user-interrupted"]
|
|
5483
|
-
*/
|
|
5484
|
-
serverMessages?: 'conversation-update' | 'end-of-call-report' | 'function-call' | 'hang' | 'language-changed' | 'language-change-detected' | 'model-output' | 'phone-call-control' | 'speech-update' | 'status-update' | 'transcript' | "transcript[transcriptType='final']" | 'tool-calls' | 'transfer-destination-request' | 'transfer-update' | 'user-interrupted' | 'voice-input';
|
|
5747
|
+
voicemailDetection?: GoogleVoicemailDetectionPlan | OpenAIVoicemailDetectionPlan | TwilioVoicemailDetectionPlan | VapiVoicemailDetectionPlan;
|
|
5748
|
+
clientMessages: object[][];
|
|
5749
|
+
serverMessages: object[][];
|
|
5485
5750
|
/**
|
|
5486
5751
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
5487
5752
|
*
|
|
@@ -5627,6 +5892,8 @@ export interface CreateAssistantDTO {
|
|
|
5627
5892
|
} & CreateGoogleSheetsOAuth2AuthorizationCredentialDTO) | ({
|
|
5628
5893
|
provider: 'slack.oauth2-authorization';
|
|
5629
5894
|
} & CreateSlackOAuth2AuthorizationCredentialDTO))[];
|
|
5895
|
+
/** This is a set of actions that will be performed on certain events. */
|
|
5896
|
+
hooks?: AssistantHookCallEnding[];
|
|
5630
5897
|
/**
|
|
5631
5898
|
* This is the name of the assistant.
|
|
5632
5899
|
*
|
|
@@ -5709,8 +5976,6 @@ export interface CreateAssistantDTO {
|
|
|
5709
5976
|
* 3. org.serverUrl
|
|
5710
5977
|
*/
|
|
5711
5978
|
server?: Server;
|
|
5712
|
-
/** This is a set of actions that will be performed on certain events. */
|
|
5713
|
-
hooks?: AssistantHooks[];
|
|
5714
5979
|
keypadInputPlan?: KeypadInputPlan;
|
|
5715
5980
|
}
|
|
5716
5981
|
export interface AssistantOverrides {
|
|
@@ -5749,17 +6014,9 @@ export interface AssistantOverrides {
|
|
|
5749
6014
|
* This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached.
|
|
5750
6015
|
* 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.
|
|
5751
6016
|
*/
|
|
5752
|
-
voicemailDetection?: GoogleVoicemailDetectionPlan | OpenAIVoicemailDetectionPlan | TwilioVoicemailDetectionPlan;
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
* @example ["conversation-update","function-call","hang","model-output","speech-update","status-update","transfer-update","transcript","tool-calls","user-interrupted","voice-input","workflow.node.started"]
|
|
5756
|
-
*/
|
|
5757
|
-
clientMessages?: 'conversation-update' | 'function-call' | 'function-call-result' | 'hang' | 'language-changed' | 'metadata' | 'model-output' | 'speech-update' | 'status-update' | 'transcript' | 'tool-calls' | 'tool-calls-result' | 'tool.completed' | 'transfer-update' | 'user-interrupted' | 'voice-input' | 'workflow.node.started';
|
|
5758
|
-
/**
|
|
5759
|
-
* 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.
|
|
5760
|
-
* @example ["conversation-update","end-of-call-report","function-call","hang","speech-update","status-update","tool-calls","transfer-destination-request","user-interrupted"]
|
|
5761
|
-
*/
|
|
5762
|
-
serverMessages?: 'conversation-update' | 'end-of-call-report' | 'function-call' | 'hang' | 'language-changed' | 'language-change-detected' | 'model-output' | 'phone-call-control' | 'speech-update' | 'status-update' | 'transcript' | "transcript[transcriptType='final']" | 'tool-calls' | 'transfer-destination-request' | 'transfer-update' | 'user-interrupted' | 'voice-input';
|
|
6017
|
+
voicemailDetection?: GoogleVoicemailDetectionPlan | OpenAIVoicemailDetectionPlan | TwilioVoicemailDetectionPlan | VapiVoicemailDetectionPlan;
|
|
6018
|
+
clientMessages: object[][];
|
|
6019
|
+
serverMessages: object[][];
|
|
5763
6020
|
/**
|
|
5764
6021
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
5765
6022
|
*
|
|
@@ -5905,6 +6162,8 @@ export interface AssistantOverrides {
|
|
|
5905
6162
|
} & CreateGoogleSheetsOAuth2AuthorizationCredentialDTO) | ({
|
|
5906
6163
|
provider: 'slack.oauth2-authorization';
|
|
5907
6164
|
} & CreateSlackOAuth2AuthorizationCredentialDTO))[];
|
|
6165
|
+
/** This is a set of actions that will be performed on certain events. */
|
|
6166
|
+
hooks?: AssistantHookCallEnding[];
|
|
5908
6167
|
/**
|
|
5909
6168
|
* These are values that will be used to replace the template variables in the assistant messages and other text-based fields.
|
|
5910
6169
|
* This uses LiquidJS syntax. https://liquidjs.com/tutorials/intro-to-liquid.html
|
|
@@ -5997,8 +6256,6 @@ export interface AssistantOverrides {
|
|
|
5997
6256
|
* 3. org.serverUrl
|
|
5998
6257
|
*/
|
|
5999
6258
|
server?: Server;
|
|
6000
|
-
/** This is a set of actions that will be performed on certain events. */
|
|
6001
|
-
hooks?: AssistantHooks[];
|
|
6002
6259
|
keypadInputPlan?: KeypadInputPlan;
|
|
6003
6260
|
}
|
|
6004
6261
|
export interface SquadMemberDTO {
|
|
@@ -6031,6 +6288,29 @@ export interface CreateSquadDTO {
|
|
|
6031
6288
|
*/
|
|
6032
6289
|
membersOverrides?: AssistantOverrides;
|
|
6033
6290
|
}
|
|
6291
|
+
export interface CreateWorkflowDTO {
|
|
6292
|
+
nodes: (Start | Assistant | Say | Gather | ApiRequest | Hangup | Transfer)[];
|
|
6293
|
+
/** These are the options for the workflow's LLM. */
|
|
6294
|
+
model?: AnthropicModel | AnyscaleModel | CerebrasModel | CustomLLMModel | DeepInfraModel | DeepSeekModel | GoogleModel | GroqModel | InflectionAIModel | OpenAIModel | OpenRouterModel | PerplexityAIModel | TogetherAIModel | XaiModel;
|
|
6295
|
+
/** @maxLength 80 */
|
|
6296
|
+
name: string;
|
|
6297
|
+
edges: Edge[];
|
|
6298
|
+
}
|
|
6299
|
+
export interface TransferPhoneNumberHookAction {
|
|
6300
|
+
/** This is the type of action - must be "transfer" */
|
|
6301
|
+
type: 'transfer';
|
|
6302
|
+
/** This is the destination details for the transfer - can be a phone number or SIP URI */
|
|
6303
|
+
destination?: TransferDestinationNumber | TransferDestinationSip;
|
|
6304
|
+
}
|
|
6305
|
+
export interface SayPhoneNumberHookAction {
|
|
6306
|
+
/** This is the type of action - must be "say" */
|
|
6307
|
+
type: 'say';
|
|
6308
|
+
/**
|
|
6309
|
+
* This is the message to say
|
|
6310
|
+
* @maxLength 4000
|
|
6311
|
+
*/
|
|
6312
|
+
exact: string;
|
|
6313
|
+
}
|
|
6034
6314
|
export interface PhoneNumberHookCallRinging {
|
|
6035
6315
|
/**
|
|
6036
6316
|
* This is the event to trigger the hook on
|
|
@@ -6038,7 +6318,7 @@ export interface PhoneNumberHookCallRinging {
|
|
|
6038
6318
|
*/
|
|
6039
6319
|
on: 'call.ringing';
|
|
6040
6320
|
/** This is the set of actions to perform when the hook triggers */
|
|
6041
|
-
do:
|
|
6321
|
+
do: (TransferPhoneNumberHookAction | SayPhoneNumberHookAction)[];
|
|
6042
6322
|
}
|
|
6043
6323
|
export interface ImportTwilioPhoneNumberDTO {
|
|
6044
6324
|
/**
|
|
@@ -6052,6 +6332,16 @@ export interface ImportTwilioPhoneNumberDTO {
|
|
|
6052
6332
|
fallbackDestination?: TransferDestinationNumber | TransferDestinationSip;
|
|
6053
6333
|
/** This is the hooks that will be used for incoming calls to this phone number. */
|
|
6054
6334
|
hooks?: PhoneNumberHookCallRinging[];
|
|
6335
|
+
/**
|
|
6336
|
+
* Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.
|
|
6337
|
+
*
|
|
6338
|
+
* If set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.
|
|
6339
|
+
* If `true` or omitted (default), Vapi will configure both the voice and messaging URLs.
|
|
6340
|
+
*
|
|
6341
|
+
* @default true
|
|
6342
|
+
* @default true
|
|
6343
|
+
*/
|
|
6344
|
+
smsEnabled?: boolean;
|
|
6055
6345
|
/**
|
|
6056
6346
|
* These are the digits of the phone number you own on your Twilio.
|
|
6057
6347
|
* @deprecated
|
|
@@ -6060,7 +6350,11 @@ export interface ImportTwilioPhoneNumberDTO {
|
|
|
6060
6350
|
/** This is your Twilio Account SID that will be used to handle this phone number. */
|
|
6061
6351
|
twilioAccountSid: string;
|
|
6062
6352
|
/** This is the Twilio Auth Token that will be used to handle this phone number. */
|
|
6063
|
-
twilioAuthToken
|
|
6353
|
+
twilioAuthToken?: string;
|
|
6354
|
+
/** This is the Twilio API Key that will be used to handle this phone number. If AuthToken is provided, this will be ignored. */
|
|
6355
|
+
twilioApiKey?: string;
|
|
6356
|
+
/** This is the Twilio API Secret that will be used to handle this phone number. If AuthToken is provided, this will be ignored. */
|
|
6357
|
+
twilioApiSecret?: string;
|
|
6064
6358
|
/**
|
|
6065
6359
|
* This is the name of the phone number. This is just for your own reference.
|
|
6066
6360
|
* @maxLength 40
|
|
@@ -6069,13 +6363,19 @@ export interface ImportTwilioPhoneNumberDTO {
|
|
|
6069
6363
|
/**
|
|
6070
6364
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
6071
6365
|
*
|
|
6072
|
-
* If neither `assistantId` nor `
|
|
6366
|
+
* 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.
|
|
6073
6367
|
*/
|
|
6074
6368
|
assistantId?: string;
|
|
6369
|
+
/**
|
|
6370
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
6371
|
+
*
|
|
6372
|
+
* 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.
|
|
6373
|
+
*/
|
|
6374
|
+
workflowId?: string;
|
|
6075
6375
|
/**
|
|
6076
6376
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
6077
6377
|
*
|
|
6078
|
-
* If neither `assistantId` nor `
|
|
6378
|
+
* 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.
|
|
6079
6379
|
*/
|
|
6080
6380
|
squadId?: string;
|
|
6081
6381
|
/**
|
|
@@ -6146,7 +6446,7 @@ export interface Call {
|
|
|
6146
6446
|
/** This is the type of call. */
|
|
6147
6447
|
type?: 'inboundPhoneCall' | 'outboundPhoneCall' | 'webCall' | 'vapi.websocketCall';
|
|
6148
6448
|
/** These are the costs of individual components of the call in USD. */
|
|
6149
|
-
costs?: (TransportCost | TranscriberCost | ModelCost | VoiceCost | VapiCost | VoicemailDetectionCost | AnalysisCost)[];
|
|
6449
|
+
costs?: (TransportCost | TranscriberCost | ModelCost | VoiceCost | VapiCost | VoicemailDetectionCost | AnalysisCost | KnowledgeBaseCost)[];
|
|
6150
6450
|
messages?: (UserMessage | SystemMessage | BotMessage | ToolCallMessage | ToolCallResultMessage)[];
|
|
6151
6451
|
/**
|
|
6152
6452
|
* This is the provider of the call.
|
|
@@ -6208,16 +6508,56 @@ export interface Call {
|
|
|
6208
6508
|
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
6209
6509
|
*/
|
|
6210
6510
|
phoneCallProviderId?: string;
|
|
6211
|
-
/**
|
|
6511
|
+
/**
|
|
6512
|
+
* This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
|
|
6513
|
+
* Usage:
|
|
6514
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6515
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6516
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6517
|
+
*/
|
|
6212
6518
|
assistantId?: string;
|
|
6213
|
-
/**
|
|
6519
|
+
/**
|
|
6520
|
+
* This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
|
|
6521
|
+
* Usage:
|
|
6522
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6523
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6524
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6525
|
+
*/
|
|
6214
6526
|
assistant?: CreateAssistantDTO;
|
|
6215
6527
|
/** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
|
|
6216
6528
|
assistantOverrides?: AssistantOverrides;
|
|
6217
|
-
/**
|
|
6529
|
+
/**
|
|
6530
|
+
* This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
|
|
6531
|
+
* Usage:
|
|
6532
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6533
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6534
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6535
|
+
*/
|
|
6218
6536
|
squadId?: string;
|
|
6219
|
-
/**
|
|
6537
|
+
/**
|
|
6538
|
+
* This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
|
|
6539
|
+
* Usage:
|
|
6540
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6541
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6542
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6543
|
+
*/
|
|
6220
6544
|
squad?: CreateSquadDTO;
|
|
6545
|
+
/**
|
|
6546
|
+
* This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
|
|
6547
|
+
* Usage:
|
|
6548
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6549
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6550
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6551
|
+
*/
|
|
6552
|
+
workflowId?: string;
|
|
6553
|
+
/**
|
|
6554
|
+
* This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
|
|
6555
|
+
* Usage:
|
|
6556
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6557
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6558
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6559
|
+
*/
|
|
6560
|
+
workflow?: CreateWorkflowDTO;
|
|
6221
6561
|
/**
|
|
6222
6562
|
* This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
|
|
6223
6563
|
*
|
|
@@ -6278,16 +6618,56 @@ export interface CreateCallDTO {
|
|
|
6278
6618
|
schedulePlan?: SchedulePlan;
|
|
6279
6619
|
/** This is the transport of the call. */
|
|
6280
6620
|
transport?: object;
|
|
6281
|
-
/**
|
|
6621
|
+
/**
|
|
6622
|
+
* This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
|
|
6623
|
+
* Usage:
|
|
6624
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6625
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6626
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6627
|
+
*/
|
|
6282
6628
|
assistantId?: string;
|
|
6283
|
-
/**
|
|
6629
|
+
/**
|
|
6630
|
+
* This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
|
|
6631
|
+
* Usage:
|
|
6632
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6633
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6634
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6635
|
+
*/
|
|
6284
6636
|
assistant?: CreateAssistantDTO;
|
|
6285
6637
|
/** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
|
|
6286
6638
|
assistantOverrides?: AssistantOverrides;
|
|
6287
|
-
/**
|
|
6639
|
+
/**
|
|
6640
|
+
* This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
|
|
6641
|
+
* Usage:
|
|
6642
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6643
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6644
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6645
|
+
*/
|
|
6288
6646
|
squadId?: string;
|
|
6289
|
-
/**
|
|
6647
|
+
/**
|
|
6648
|
+
* This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
|
|
6649
|
+
* Usage:
|
|
6650
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6651
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6652
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6653
|
+
*/
|
|
6290
6654
|
squad?: CreateSquadDTO;
|
|
6655
|
+
/**
|
|
6656
|
+
* This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
|
|
6657
|
+
* Usage:
|
|
6658
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6659
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6660
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6661
|
+
*/
|
|
6662
|
+
workflowId?: string;
|
|
6663
|
+
/**
|
|
6664
|
+
* This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
|
|
6665
|
+
* Usage:
|
|
6666
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6667
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6668
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6669
|
+
*/
|
|
6670
|
+
workflow?: CreateWorkflowDTO;
|
|
6291
6671
|
/**
|
|
6292
6672
|
* This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
|
|
6293
6673
|
*
|
|
@@ -6338,477 +6718,167 @@ export interface CreateOutboundCallDTO {
|
|
|
6338
6718
|
schedulePlan?: SchedulePlan;
|
|
6339
6719
|
/** This is the transport of the call. */
|
|
6340
6720
|
transport?: object;
|
|
6341
|
-
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
6342
|
-
assistantId?: string;
|
|
6343
|
-
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
6344
|
-
assistant?: CreateAssistantDTO;
|
|
6345
|
-
/** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
|
|
6346
|
-
assistantOverrides?: AssistantOverrides;
|
|
6347
|
-
/** This is the squad that will be used for the call. To use a transient squad, use `squad` instead. */
|
|
6348
|
-
squadId?: string;
|
|
6349
|
-
/** This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. */
|
|
6350
|
-
squad?: CreateSquadDTO;
|
|
6351
|
-
/**
|
|
6352
|
-
* This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
|
|
6353
|
-
*
|
|
6354
|
-
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
6355
|
-
*/
|
|
6356
|
-
phoneNumberId?: string;
|
|
6357
|
-
/**
|
|
6358
|
-
* This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.
|
|
6359
|
-
*
|
|
6360
|
-
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
6361
|
-
*/
|
|
6362
|
-
phoneNumber?: ImportTwilioPhoneNumberDTO;
|
|
6363
6721
|
/**
|
|
6364
|
-
* This is the
|
|
6365
|
-
*
|
|
6366
|
-
*
|
|
6722
|
+
* This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
|
|
6723
|
+
* Usage:
|
|
6724
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6725
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6726
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6367
6727
|
*/
|
|
6368
|
-
|
|
6728
|
+
assistantId?: string;
|
|
6369
6729
|
/**
|
|
6370
|
-
* This is the
|
|
6371
|
-
*
|
|
6372
|
-
*
|
|
6730
|
+
* This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
|
|
6731
|
+
* Usage:
|
|
6732
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6733
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6734
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6373
6735
|
*/
|
|
6374
|
-
customer?: CreateCustomerDTO;
|
|
6375
|
-
}
|
|
6376
|
-
export interface CreateWebCallDTO {
|
|
6377
|
-
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
6378
|
-
assistantId?: string;
|
|
6379
|
-
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
6380
6736
|
assistant?: CreateAssistantDTO;
|
|
6381
6737
|
/** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
|
|
6382
6738
|
assistantOverrides?: AssistantOverrides;
|
|
6383
|
-
/** This is the squad that will be used for the call. To use a transient squad, use `squad` instead. */
|
|
6384
|
-
squadId?: string;
|
|
6385
|
-
/** This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. */
|
|
6386
|
-
squad?: CreateSquadDTO;
|
|
6387
|
-
}
|
|
6388
|
-
export interface UpdateCallDTO {
|
|
6389
6739
|
/**
|
|
6390
|
-
* This is the
|
|
6391
|
-
*
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
export type ChatServiceResponse = object;
|
|
6396
|
-
export interface ChatCompletionMessageMetadata {
|
|
6397
|
-
taskName: string;
|
|
6398
|
-
taskType: string;
|
|
6399
|
-
taskOutput: string;
|
|
6400
|
-
taskState?: object;
|
|
6401
|
-
nodeTrace?: string[];
|
|
6402
|
-
}
|
|
6403
|
-
export interface ChatCompletionMessageWorkflows {
|
|
6404
|
-
role: object;
|
|
6405
|
-
content: string | null;
|
|
6406
|
-
metadata?: ChatCompletionMessageMetadata;
|
|
6407
|
-
}
|
|
6408
|
-
export interface Say {
|
|
6409
|
-
type: 'say';
|
|
6410
|
-
/** @maxLength 1000 */
|
|
6411
|
-
exact?: string;
|
|
6412
|
-
/** @maxLength 1000 */
|
|
6413
|
-
prompt?: string;
|
|
6414
|
-
/** @maxLength 80 */
|
|
6415
|
-
name: string;
|
|
6416
|
-
/** This is for metadata you want to store on the task. */
|
|
6417
|
-
metadata?: object;
|
|
6418
|
-
}
|
|
6419
|
-
export interface SayHook {
|
|
6420
|
-
type: 'say';
|
|
6421
|
-
/** This is for metadata you want to store on the task. */
|
|
6422
|
-
metadata?: object;
|
|
6423
|
-
/** @maxLength 1000 */
|
|
6424
|
-
exact?: string;
|
|
6425
|
-
/** @maxLength 1000 */
|
|
6426
|
-
prompt?: string;
|
|
6427
|
-
}
|
|
6428
|
-
export interface Hook {
|
|
6429
|
-
/** @maxLength 80 */
|
|
6430
|
-
on: 'task.start' | 'task.output.confirmation' | 'task.delayed';
|
|
6431
|
-
do: SayHook[];
|
|
6432
|
-
}
|
|
6433
|
-
export interface Gather {
|
|
6434
|
-
type: 'gather';
|
|
6435
|
-
output: JsonSchema;
|
|
6436
|
-
/** This is whether or not the workflow should read back the gathered data to the user, and ask about its correctness. */
|
|
6437
|
-
confirmContent?: boolean;
|
|
6438
|
-
/**
|
|
6439
|
-
* This is a list of hooks for a task.
|
|
6440
|
-
* Each hook is a list of tasks to run on a trigger (such as on start, on failure, etc).
|
|
6441
|
-
* Only Say is supported for now.
|
|
6442
|
-
*/
|
|
6443
|
-
hooks?: Hook[];
|
|
6444
|
-
/** 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 */
|
|
6445
|
-
maxRetries?: number;
|
|
6446
|
-
/** 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?" */
|
|
6447
|
-
literalTemplate?: string;
|
|
6448
|
-
/** @maxLength 80 */
|
|
6449
|
-
name: string;
|
|
6450
|
-
/** This is for metadata you want to store on the task. */
|
|
6451
|
-
metadata?: object;
|
|
6452
|
-
}
|
|
6453
|
-
export interface ApiRequest {
|
|
6454
|
-
type: 'apiRequest';
|
|
6455
|
-
method: 'POST' | 'GET';
|
|
6456
|
-
/** Api endpoint to send requests to. */
|
|
6457
|
-
url: string;
|
|
6458
|
-
/**
|
|
6459
|
-
* These are the custom headers to include in the Api Request sent.
|
|
6460
|
-
*
|
|
6461
|
-
* Each key-value pair represents a header name and its value.
|
|
6462
|
-
*/
|
|
6463
|
-
headers?: JsonSchema;
|
|
6464
|
-
/**
|
|
6465
|
-
* This defined the JSON body of your Api Request. For example, if `body_schema`
|
|
6466
|
-
* included "my_field": "my_gather_statement.user_age", then the json body sent to the server would have that particular value assign to it.
|
|
6467
|
-
* Right now, only data from gather statements are supported.
|
|
6740
|
+
* This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
|
|
6741
|
+
* Usage:
|
|
6742
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6743
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6744
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6468
6745
|
*/
|
|
6469
|
-
|
|
6746
|
+
squadId?: string;
|
|
6470
6747
|
/**
|
|
6471
|
-
* This is
|
|
6472
|
-
*
|
|
6748
|
+
* This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
|
|
6749
|
+
* Usage:
|
|
6750
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6751
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6752
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6473
6753
|
*/
|
|
6474
|
-
|
|
6754
|
+
squad?: CreateSquadDTO;
|
|
6475
6755
|
/**
|
|
6476
|
-
* This is
|
|
6477
|
-
*
|
|
6478
|
-
*
|
|
6756
|
+
* This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
|
|
6757
|
+
* Usage:
|
|
6758
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6759
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6760
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6479
6761
|
*/
|
|
6480
|
-
hooks?: Hook[];
|
|
6481
|
-
/** This is the schema for the outputs of the Api Request. */
|
|
6482
|
-
output?: JsonSchema;
|
|
6483
|
-
/** @maxLength 80 */
|
|
6484
|
-
name: string;
|
|
6485
|
-
/** This is for metadata you want to store on the task. */
|
|
6486
|
-
metadata?: object;
|
|
6487
|
-
}
|
|
6488
|
-
export interface Hangup {
|
|
6489
|
-
type: 'hangup';
|
|
6490
|
-
/** @maxLength 80 */
|
|
6491
|
-
name: string;
|
|
6492
|
-
/** This is for metadata you want to store on the task. */
|
|
6493
|
-
metadata?: object;
|
|
6494
|
-
}
|
|
6495
|
-
export interface Transfer {
|
|
6496
|
-
type: 'transfer';
|
|
6497
|
-
destination: object;
|
|
6498
|
-
/** @maxLength 80 */
|
|
6499
|
-
name: string;
|
|
6500
|
-
/** This is for metadata you want to store on the task. */
|
|
6501
|
-
metadata?: object;
|
|
6502
|
-
}
|
|
6503
|
-
export interface CreateWorkflowDTO {
|
|
6504
|
-
nodes: (Say | Gather | ApiRequest | Hangup | Transfer)[];
|
|
6505
|
-
/** These are the options for the workflow's LLM. */
|
|
6506
|
-
model?: AnthropicModel | AnyscaleModel | CerebrasModel | CustomLLMModel | DeepInfraModel | DeepSeekModel | GoogleModel | GroqModel | InflectionAIModel | OpenAIModel | OpenRouterModel | PerplexityAIModel | TogetherAIModel | XaiModel;
|
|
6507
|
-
/** @maxLength 80 */
|
|
6508
|
-
name: string;
|
|
6509
|
-
edges: Edge[];
|
|
6510
|
-
}
|
|
6511
|
-
export interface ChatCompletionsDTO {
|
|
6512
|
-
messages: ChatCompletionMessageWorkflows[];
|
|
6513
6762
|
workflowId?: string;
|
|
6514
|
-
workflow?: CreateWorkflowDTO;
|
|
6515
|
-
}
|
|
6516
|
-
export interface Assistant {
|
|
6517
|
-
/** These are the options for the assistant's transcriber. */
|
|
6518
|
-
transcriber?: AssemblyAITranscriber | AzureSpeechTranscriber | CustomTranscriber | DeepgramTranscriber | ElevenLabsTranscriber | GladiaTranscriber | SpeechmaticsTranscriber | TalkscriberTranscriber | GoogleTranscriber | OpenAITranscriber;
|
|
6519
|
-
/** These are the options for the assistant's LLM. */
|
|
6520
|
-
model?: AnyscaleModel | AnthropicModel | CerebrasModel | CustomLLMModel | DeepInfraModel | DeepSeekModel | GoogleModel | GroqModel | InflectionAIModel | OpenAIModel | OpenRouterModel | PerplexityAIModel | TogetherAIModel | VapiModel | XaiModel;
|
|
6521
|
-
/**
|
|
6522
|
-
* These are the options for the assistant's voice.
|
|
6523
|
-
* @default {"provider":"playht","voiceId":"jennifer"}
|
|
6524
|
-
*/
|
|
6525
|
-
voice?: AzureVoice | CartesiaVoice | CustomVoice | DeepgramVoice | ElevenLabsVoice | HumeVoice | LMNTVoice | NeuphonicVoice | OpenAIVoice | PlayHTVoice | RimeAIVoice | SmallestAIVoice | TavusVoice | VapiVoice;
|
|
6526
|
-
/**
|
|
6527
|
-
* This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
|
|
6528
|
-
*
|
|
6529
|
-
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
6530
|
-
* @example "Hello! How can I help you today?"
|
|
6531
|
-
*/
|
|
6532
|
-
firstMessage?: string;
|
|
6533
|
-
/** @default false */
|
|
6534
|
-
firstMessageInterruptionsEnabled?: boolean;
|
|
6535
|
-
/**
|
|
6536
|
-
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
6537
|
-
*
|
|
6538
|
-
* Use:
|
|
6539
|
-
* - 'assistant-speaks-first' to have the assistant speak first.
|
|
6540
|
-
* - 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
6541
|
-
* - '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).
|
|
6542
|
-
*
|
|
6543
|
-
* @default 'assistant-speaks-first'
|
|
6544
|
-
* @example "assistant-speaks-first"
|
|
6545
|
-
*/
|
|
6546
|
-
firstMessageMode?: 'assistant-speaks-first' | 'assistant-speaks-first-with-model-generated-message' | 'assistant-waits-for-user';
|
|
6547
|
-
/**
|
|
6548
|
-
* These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool].
|
|
6549
|
-
* This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached.
|
|
6550
|
-
* 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.
|
|
6551
|
-
*/
|
|
6552
|
-
voicemailDetection?: GoogleVoicemailDetectionPlan | OpenAIVoicemailDetectionPlan | TwilioVoicemailDetectionPlan;
|
|
6553
|
-
/**
|
|
6554
|
-
* 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.
|
|
6555
|
-
* @example ["conversation-update","function-call","hang","model-output","speech-update","status-update","transfer-update","transcript","tool-calls","user-interrupted","voice-input","workflow.node.started"]
|
|
6556
|
-
*/
|
|
6557
|
-
clientMessages?: 'conversation-update' | 'function-call' | 'function-call-result' | 'hang' | 'language-changed' | 'metadata' | 'model-output' | 'speech-update' | 'status-update' | 'transcript' | 'tool-calls' | 'tool-calls-result' | 'tool.completed' | 'transfer-update' | 'user-interrupted' | 'voice-input' | 'workflow.node.started';
|
|
6558
|
-
/**
|
|
6559
|
-
* 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.
|
|
6560
|
-
* @example ["conversation-update","end-of-call-report","function-call","hang","speech-update","status-update","tool-calls","transfer-destination-request","user-interrupted"]
|
|
6561
|
-
*/
|
|
6562
|
-
serverMessages?: 'conversation-update' | 'end-of-call-report' | 'function-call' | 'hang' | 'language-changed' | 'language-change-detected' | 'model-output' | 'phone-call-control' | 'speech-update' | 'status-update' | 'transcript' | "transcript[transcriptType='final']" | 'tool-calls' | 'transfer-destination-request' | 'transfer-update' | 'user-interrupted' | 'voice-input';
|
|
6563
|
-
/**
|
|
6564
|
-
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
6565
|
-
*
|
|
6566
|
-
* @default 30
|
|
6567
|
-
* @min 10
|
|
6568
|
-
* @max 3600
|
|
6569
|
-
* @example 30
|
|
6570
|
-
*/
|
|
6571
|
-
silenceTimeoutSeconds?: number;
|
|
6572
|
-
/**
|
|
6573
|
-
* This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
|
|
6574
|
-
*
|
|
6575
|
-
* @default 600 (10 minutes)
|
|
6576
|
-
* @min 10
|
|
6577
|
-
* @max 43200
|
|
6578
|
-
* @example 600
|
|
6579
|
-
*/
|
|
6580
|
-
maxDurationSeconds?: number;
|
|
6581
|
-
/**
|
|
6582
|
-
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
6583
|
-
* You can also provide a custom sound by providing a URL to an audio file.
|
|
6584
|
-
* @maxLength 1000
|
|
6585
|
-
*/
|
|
6586
|
-
backgroundSound?: 'off' | 'office' | string;
|
|
6587
6763
|
/**
|
|
6588
|
-
* This
|
|
6589
|
-
*
|
|
6590
|
-
*
|
|
6591
|
-
*
|
|
6592
|
-
*
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
backgroundDenoisingEnabled?: boolean;
|
|
6596
|
-
/**
|
|
6597
|
-
* This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech.
|
|
6598
|
-
*
|
|
6599
|
-
* Default `false` while in beta.
|
|
6600
|
-
*
|
|
6601
|
-
* @default false
|
|
6602
|
-
* @example false
|
|
6603
|
-
*/
|
|
6604
|
-
modelOutputInMessagesEnabled?: boolean;
|
|
6605
|
-
/** 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. */
|
|
6606
|
-
transportConfigurations?: TransportConfigurationTwilio[];
|
|
6607
|
-
/**
|
|
6608
|
-
* This is the plan for observability configuration of assistant's calls.
|
|
6609
|
-
* Currently supports Langfuse for tracing and monitoring.
|
|
6610
|
-
*/
|
|
6611
|
-
observabilityPlan?: LangfuseObservabilityPlan;
|
|
6612
|
-
/** 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. */
|
|
6613
|
-
credentials?: (({
|
|
6614
|
-
provider: '11labs';
|
|
6615
|
-
} & CreateElevenLabsCredentialDTO) | ({
|
|
6616
|
-
provider: 'anthropic';
|
|
6617
|
-
} & CreateAnthropicCredentialDTO) | ({
|
|
6618
|
-
provider: 'anyscale';
|
|
6619
|
-
} & CreateAnyscaleCredentialDTO) | ({
|
|
6620
|
-
provider: 'assembly-ai';
|
|
6621
|
-
} & CreateAssemblyAICredentialDTO) | ({
|
|
6622
|
-
provider: 'azure-openai';
|
|
6623
|
-
} & CreateAzureOpenAICredentialDTO) | ({
|
|
6624
|
-
provider: 'azure';
|
|
6625
|
-
} & CreateAzureCredentialDTO) | ({
|
|
6626
|
-
provider: 'byo-sip-trunk';
|
|
6627
|
-
} & CreateByoSipTrunkCredentialDTO) | ({
|
|
6628
|
-
provider: 'cartesia';
|
|
6629
|
-
} & CreateCartesiaCredentialDTO) | ({
|
|
6630
|
-
provider: 'cerebras';
|
|
6631
|
-
} & CreateCerebrasCredentialDTO) | ({
|
|
6632
|
-
provider: 'cloudflare';
|
|
6633
|
-
} & CreateCloudflareCredentialDTO) | ({
|
|
6634
|
-
provider: 'custom-llm';
|
|
6635
|
-
} & CreateCustomLLMCredentialDTO) | ({
|
|
6636
|
-
provider: 'deepgram';
|
|
6637
|
-
} & CreateDeepgramCredentialDTO) | ({
|
|
6638
|
-
provider: 'deepinfra';
|
|
6639
|
-
} & CreateDeepInfraCredentialDTO) | ({
|
|
6640
|
-
provider: 'deep-seek';
|
|
6641
|
-
} & CreateDeepSeekCredentialDTO) | ({
|
|
6642
|
-
provider: 'gcp';
|
|
6643
|
-
} & CreateGcpCredentialDTO) | ({
|
|
6644
|
-
provider: 'gladia';
|
|
6645
|
-
} & CreateGladiaCredentialDTO) | ({
|
|
6646
|
-
provider: 'gohighlevel';
|
|
6647
|
-
} & CreateGoHighLevelCredentialDTO) | ({
|
|
6648
|
-
provider: 'google';
|
|
6649
|
-
} & CreateGoogleCredentialDTO) | ({
|
|
6650
|
-
provider: 'groq';
|
|
6651
|
-
} & CreateGroqCredentialDTO) | ({
|
|
6652
|
-
provider: 'inflection-ai';
|
|
6653
|
-
} & CreateInflectionAICredentialDTO) | ({
|
|
6654
|
-
provider: 'langfuse';
|
|
6655
|
-
} & CreateLangfuseCredentialDTO) | ({
|
|
6656
|
-
provider: 'lmnt';
|
|
6657
|
-
} & CreateLmntCredentialDTO) | ({
|
|
6658
|
-
provider: 'make';
|
|
6659
|
-
} & CreateMakeCredentialDTO) | ({
|
|
6660
|
-
provider: 'openai';
|
|
6661
|
-
} & CreateOpenAICredentialDTO) | ({
|
|
6662
|
-
provider: 'openrouter';
|
|
6663
|
-
} & CreateOpenRouterCredentialDTO) | ({
|
|
6664
|
-
provider: 'perplexity-ai';
|
|
6665
|
-
} & CreatePerplexityAICredentialDTO) | ({
|
|
6666
|
-
provider: 'playht';
|
|
6667
|
-
} & CreatePlayHTCredentialDTO) | ({
|
|
6668
|
-
provider: 'rime-ai';
|
|
6669
|
-
} & CreateRimeAICredentialDTO) | ({
|
|
6670
|
-
provider: 'runpod';
|
|
6671
|
-
} & CreateRunpodCredentialDTO) | ({
|
|
6672
|
-
provider: 's3';
|
|
6673
|
-
} & CreateS3CredentialDTO) | ({
|
|
6674
|
-
provider: 'supabase';
|
|
6675
|
-
} & CreateSupabaseCredentialDTO) | ({
|
|
6676
|
-
provider: 'smallest-ai';
|
|
6677
|
-
} & CreateSmallestAICredentialDTO) | ({
|
|
6678
|
-
provider: 'tavus';
|
|
6679
|
-
} & CreateTavusCredentialDTO) | ({
|
|
6680
|
-
provider: 'together-ai';
|
|
6681
|
-
} & CreateTogetherAICredentialDTO) | ({
|
|
6682
|
-
provider: 'twilio';
|
|
6683
|
-
} & CreateTwilioCredentialDTO) | ({
|
|
6684
|
-
provider: 'vonage';
|
|
6685
|
-
} & CreateVonageCredentialDTO) | ({
|
|
6686
|
-
provider: 'webhook';
|
|
6687
|
-
} & CreateWebhookCredentialDTO) | ({
|
|
6688
|
-
provider: 'xai';
|
|
6689
|
-
} & CreateXAiCredentialDTO) | ({
|
|
6690
|
-
provider: 'neuphonic';
|
|
6691
|
-
} & CreateNeuphonicCredentialDTO) | ({
|
|
6692
|
-
provider: 'hume';
|
|
6693
|
-
} & CreateHumeCredentialDTO) | ({
|
|
6694
|
-
provider: 'mistral';
|
|
6695
|
-
} & CreateMistralCredentialDTO) | ({
|
|
6696
|
-
provider: 'speechmatics';
|
|
6697
|
-
} & CreateSpeechmaticsCredentialDTO) | ({
|
|
6698
|
-
provider: 'trieve';
|
|
6699
|
-
} & CreateTrieveCredentialDTO) | ({
|
|
6700
|
-
provider: 'google.calendar.oauth2-client';
|
|
6701
|
-
} & CreateGoogleCalendarOAuth2ClientCredentialDTO) | ({
|
|
6702
|
-
provider: 'google.calendar.oauth2-authorization';
|
|
6703
|
-
} & CreateGoogleCalendarOAuth2AuthorizationCredentialDTO) | ({
|
|
6704
|
-
provider: 'google.sheets.oauth2-authorization';
|
|
6705
|
-
} & CreateGoogleSheetsOAuth2AuthorizationCredentialDTO) | ({
|
|
6706
|
-
provider: 'slack.oauth2-authorization';
|
|
6707
|
-
} & CreateSlackOAuth2AuthorizationCredentialDTO))[];
|
|
6764
|
+
* This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
|
|
6765
|
+
* Usage:
|
|
6766
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6767
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6768
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6769
|
+
*/
|
|
6770
|
+
workflow?: CreateWorkflowDTO;
|
|
6708
6771
|
/**
|
|
6709
|
-
* This is the
|
|
6772
|
+
* This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
|
|
6710
6773
|
*
|
|
6711
|
-
*
|
|
6712
|
-
* @maxLength 40
|
|
6774
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
6713
6775
|
*/
|
|
6714
|
-
|
|
6776
|
+
phoneNumberId?: string;
|
|
6715
6777
|
/**
|
|
6716
|
-
* This is the
|
|
6778
|
+
* This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.
|
|
6717
6779
|
*
|
|
6718
|
-
*
|
|
6719
|
-
* @maxLength 1000
|
|
6780
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
6720
6781
|
*/
|
|
6721
|
-
|
|
6782
|
+
phoneNumber?: ImportTwilioPhoneNumberDTO;
|
|
6722
6783
|
/**
|
|
6723
|
-
* This is the
|
|
6784
|
+
* This is the customer that will be called. To call a transient customer , use `customer` instead.
|
|
6724
6785
|
*
|
|
6725
|
-
*
|
|
6726
|
-
* @maxLength 1000
|
|
6786
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
6727
6787
|
*/
|
|
6728
|
-
|
|
6729
|
-
/** This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. */
|
|
6730
|
-
endCallPhrases?: string[];
|
|
6731
|
-
compliancePlan?: CompliancePlan;
|
|
6732
|
-
/** This is for metadata you want to store on the assistant. */
|
|
6733
|
-
metadata?: object;
|
|
6734
|
-
/** This is the plan for analysis of assistant's calls. Stored in `call.analysis`. */
|
|
6735
|
-
analysisPlan?: AnalysisPlan;
|
|
6788
|
+
customerId?: string;
|
|
6736
6789
|
/**
|
|
6737
|
-
* This is the
|
|
6790
|
+
* This is the customer that will be called. To call an existing customer, use `customerId` instead.
|
|
6738
6791
|
*
|
|
6739
|
-
*
|
|
6792
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
6740
6793
|
*/
|
|
6741
|
-
|
|
6794
|
+
customer?: CreateCustomerDTO;
|
|
6795
|
+
}
|
|
6796
|
+
export interface CreateWebCallDTO {
|
|
6742
6797
|
/**
|
|
6743
|
-
* This is the
|
|
6744
|
-
*
|
|
6745
|
-
*
|
|
6798
|
+
* This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
|
|
6799
|
+
* Usage:
|
|
6800
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6801
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6802
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6746
6803
|
*/
|
|
6747
|
-
|
|
6804
|
+
assistantId?: string;
|
|
6748
6805
|
/**
|
|
6749
|
-
* This is the
|
|
6750
|
-
*
|
|
6751
|
-
*
|
|
6752
|
-
*
|
|
6753
|
-
*
|
|
6754
|
-
* - The assistant is so fast that it's actually interrupting the customer.
|
|
6806
|
+
* This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
|
|
6807
|
+
* Usage:
|
|
6808
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6809
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6810
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6755
6811
|
*/
|
|
6756
|
-
|
|
6812
|
+
assistant?: CreateAssistantDTO;
|
|
6813
|
+
/** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
|
|
6814
|
+
assistantOverrides?: AssistantOverrides;
|
|
6757
6815
|
/**
|
|
6758
|
-
* This is the
|
|
6759
|
-
*
|
|
6760
|
-
*
|
|
6761
|
-
*
|
|
6762
|
-
*
|
|
6763
|
-
* - The assistant is getting interrupted by phrases that are just acknowledgments.
|
|
6764
|
-
* - The assistant is getting interrupted by background noises.
|
|
6765
|
-
* - The assistant is not properly stopping -- it starts talking right after getting interrupted.
|
|
6816
|
+
* This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
|
|
6817
|
+
* Usage:
|
|
6818
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6819
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6820
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6766
6821
|
*/
|
|
6767
|
-
|
|
6822
|
+
squadId?: string;
|
|
6768
6823
|
/**
|
|
6769
|
-
* This is
|
|
6770
|
-
*
|
|
6824
|
+
* This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
|
|
6771
6825
|
* Usage:
|
|
6772
|
-
*
|
|
6773
|
-
*
|
|
6774
|
-
*
|
|
6775
|
-
* 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
|
|
6826
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6827
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6828
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6776
6829
|
*/
|
|
6777
|
-
|
|
6778
|
-
/** 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. */
|
|
6779
|
-
credentialIds?: string[];
|
|
6830
|
+
squad?: CreateSquadDTO;
|
|
6780
6831
|
/**
|
|
6781
|
-
* This is
|
|
6782
|
-
*
|
|
6783
|
-
*
|
|
6784
|
-
*
|
|
6785
|
-
*
|
|
6786
|
-
* 2. phoneNumber.serverUrl
|
|
6787
|
-
* 3. org.serverUrl
|
|
6832
|
+
* This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
|
|
6833
|
+
* Usage:
|
|
6834
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6835
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6836
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6788
6837
|
*/
|
|
6789
|
-
|
|
6790
|
-
/** This is a set of actions that will be performed on certain events. */
|
|
6791
|
-
hooks?: AssistantHooks[];
|
|
6792
|
-
keypadInputPlan?: KeypadInputPlan;
|
|
6793
|
-
/** This is the unique identifier for the assistant. */
|
|
6794
|
-
id: string;
|
|
6795
|
-
/** This is the unique identifier for the org that this assistant belongs to. */
|
|
6796
|
-
orgId: string;
|
|
6838
|
+
workflowId?: string;
|
|
6797
6839
|
/**
|
|
6798
|
-
* This is
|
|
6799
|
-
*
|
|
6840
|
+
* This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
|
|
6841
|
+
* Usage:
|
|
6842
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
6843
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
6844
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
6800
6845
|
*/
|
|
6801
|
-
|
|
6846
|
+
workflow?: CreateWorkflowDTO;
|
|
6847
|
+
}
|
|
6848
|
+
export interface UpdateCallDTO {
|
|
6802
6849
|
/**
|
|
6803
|
-
* This is the
|
|
6804
|
-
* @
|
|
6850
|
+
* This is the name of the call. This is just for your own reference.
|
|
6851
|
+
* @maxLength 40
|
|
6805
6852
|
*/
|
|
6806
|
-
|
|
6853
|
+
name?: string;
|
|
6854
|
+
}
|
|
6855
|
+
export type ChatServiceResponse = object;
|
|
6856
|
+
export interface ChatCompletionMessageMetadata {
|
|
6857
|
+
taskName: string;
|
|
6858
|
+
taskType: string;
|
|
6859
|
+
taskOutput: string;
|
|
6860
|
+
taskState?: object;
|
|
6861
|
+
nodeTrace?: string[];
|
|
6862
|
+
}
|
|
6863
|
+
export interface ChatCompletionMessageWorkflows {
|
|
6864
|
+
role: object;
|
|
6865
|
+
content: string | null;
|
|
6866
|
+
metadata?: ChatCompletionMessageMetadata;
|
|
6867
|
+
}
|
|
6868
|
+
export interface ChatCompletionsDTO {
|
|
6869
|
+
messages: ChatCompletionMessageWorkflows[];
|
|
6870
|
+
workflowId?: string;
|
|
6871
|
+
workflow?: CreateWorkflowDTO;
|
|
6807
6872
|
}
|
|
6808
6873
|
export interface AssistantPaginatedResponse {
|
|
6809
6874
|
results: Assistant[];
|
|
6810
6875
|
metadata: PaginationMeta;
|
|
6811
6876
|
}
|
|
6877
|
+
export interface AssistantVersionPaginatedResponse {
|
|
6878
|
+
results: any[];
|
|
6879
|
+
metadata: PaginationMeta;
|
|
6880
|
+
nextPageState?: string;
|
|
6881
|
+
}
|
|
6812
6882
|
export interface UpdateAssistantDTO {
|
|
6813
6883
|
/** These are the options for the assistant's transcriber. */
|
|
6814
6884
|
transcriber?: AssemblyAITranscriber | AzureSpeechTranscriber | CustomTranscriber | DeepgramTranscriber | ElevenLabsTranscriber | GladiaTranscriber | SpeechmaticsTranscriber | TalkscriberTranscriber | GoogleTranscriber | OpenAITranscriber;
|
|
@@ -6845,17 +6915,9 @@ export interface UpdateAssistantDTO {
|
|
|
6845
6915
|
* This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached.
|
|
6846
6916
|
* 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.
|
|
6847
6917
|
*/
|
|
6848
|
-
voicemailDetection?: GoogleVoicemailDetectionPlan | OpenAIVoicemailDetectionPlan | TwilioVoicemailDetectionPlan;
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
* @example ["conversation-update","function-call","hang","model-output","speech-update","status-update","transfer-update","transcript","tool-calls","user-interrupted","voice-input","workflow.node.started"]
|
|
6852
|
-
*/
|
|
6853
|
-
clientMessages?: 'conversation-update' | 'function-call' | 'function-call-result' | 'hang' | 'language-changed' | 'metadata' | 'model-output' | 'speech-update' | 'status-update' | 'transcript' | 'tool-calls' | 'tool-calls-result' | 'tool.completed' | 'transfer-update' | 'user-interrupted' | 'voice-input' | 'workflow.node.started';
|
|
6854
|
-
/**
|
|
6855
|
-
* 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.
|
|
6856
|
-
* @example ["conversation-update","end-of-call-report","function-call","hang","speech-update","status-update","tool-calls","transfer-destination-request","user-interrupted"]
|
|
6857
|
-
*/
|
|
6858
|
-
serverMessages?: 'conversation-update' | 'end-of-call-report' | 'function-call' | 'hang' | 'language-changed' | 'language-change-detected' | 'model-output' | 'phone-call-control' | 'speech-update' | 'status-update' | 'transcript' | "transcript[transcriptType='final']" | 'tool-calls' | 'transfer-destination-request' | 'transfer-update' | 'user-interrupted' | 'voice-input';
|
|
6918
|
+
voicemailDetection?: GoogleVoicemailDetectionPlan | OpenAIVoicemailDetectionPlan | TwilioVoicemailDetectionPlan | VapiVoicemailDetectionPlan;
|
|
6919
|
+
clientMessages: object[][];
|
|
6920
|
+
serverMessages: object[][];
|
|
6859
6921
|
/**
|
|
6860
6922
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
6861
6923
|
*
|
|
@@ -7001,6 +7063,8 @@ export interface UpdateAssistantDTO {
|
|
|
7001
7063
|
} & CreateGoogleSheetsOAuth2AuthorizationCredentialDTO) | ({
|
|
7002
7064
|
provider: 'slack.oauth2-authorization';
|
|
7003
7065
|
} & CreateSlackOAuth2AuthorizationCredentialDTO))[];
|
|
7066
|
+
/** This is a set of actions that will be performed on certain events. */
|
|
7067
|
+
hooks?: AssistantHookCallEnding[];
|
|
7004
7068
|
/**
|
|
7005
7069
|
* This is the name of the assistant.
|
|
7006
7070
|
*
|
|
@@ -7083,8 +7147,6 @@ export interface UpdateAssistantDTO {
|
|
|
7083
7147
|
* 3. org.serverUrl
|
|
7084
7148
|
*/
|
|
7085
7149
|
server?: Server;
|
|
7086
|
-
/** This is a set of actions that will be performed on certain events. */
|
|
7087
|
-
hooks?: AssistantHooks[];
|
|
7088
7150
|
keypadInputPlan?: KeypadInputPlan;
|
|
7089
7151
|
}
|
|
7090
7152
|
export interface ByoPhoneNumber {
|
|
@@ -7138,13 +7200,19 @@ export interface ByoPhoneNumber {
|
|
|
7138
7200
|
/**
|
|
7139
7201
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
7140
7202
|
*
|
|
7141
|
-
* If neither `assistantId` nor `
|
|
7203
|
+
* 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.
|
|
7142
7204
|
*/
|
|
7143
7205
|
assistantId?: string;
|
|
7206
|
+
/**
|
|
7207
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
7208
|
+
*
|
|
7209
|
+
* 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.
|
|
7210
|
+
*/
|
|
7211
|
+
workflowId?: string;
|
|
7144
7212
|
/**
|
|
7145
7213
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
7146
7214
|
*
|
|
7147
|
-
* If neither `assistantId` nor `
|
|
7215
|
+
* 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.
|
|
7148
7216
|
*/
|
|
7149
7217
|
squadId?: string;
|
|
7150
7218
|
/**
|
|
@@ -7184,6 +7252,16 @@ export interface TwilioPhoneNumber {
|
|
|
7184
7252
|
hooks?: PhoneNumberHookCallRinging[];
|
|
7185
7253
|
/** This is to use numbers bought on Twilio. */
|
|
7186
7254
|
provider: 'twilio';
|
|
7255
|
+
/**
|
|
7256
|
+
* Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.
|
|
7257
|
+
*
|
|
7258
|
+
* If set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.
|
|
7259
|
+
* If `true` or omitted (default), Vapi will configure both the voice and messaging URLs.
|
|
7260
|
+
*
|
|
7261
|
+
* @default true
|
|
7262
|
+
* @default true
|
|
7263
|
+
*/
|
|
7264
|
+
smsEnabled?: boolean;
|
|
7187
7265
|
/** This is the unique identifier for the phone number. */
|
|
7188
7266
|
id: string;
|
|
7189
7267
|
/** This is the unique identifier for the org that this phone number belongs to. */
|
|
@@ -7200,6 +7278,12 @@ export interface TwilioPhoneNumber {
|
|
|
7200
7278
|
updatedAt: string;
|
|
7201
7279
|
/** This is the status of the phone number. */
|
|
7202
7280
|
status?: 'active' | 'activating' | 'blocked';
|
|
7281
|
+
/** This is the Twilio Auth Token for the phone number. */
|
|
7282
|
+
twilioAuthToken?: string;
|
|
7283
|
+
/** This is the Twilio API Key for the phone number. */
|
|
7284
|
+
twilioApiKey?: string;
|
|
7285
|
+
/** This is the Twilio API Secret for the phone number. */
|
|
7286
|
+
twilioApiSecret?: string;
|
|
7203
7287
|
/**
|
|
7204
7288
|
* This is the name of the phone number. This is just for your own reference.
|
|
7205
7289
|
* @maxLength 40
|
|
@@ -7208,13 +7292,19 @@ export interface TwilioPhoneNumber {
|
|
|
7208
7292
|
/**
|
|
7209
7293
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
7210
7294
|
*
|
|
7211
|
-
* If neither `assistantId` nor `
|
|
7295
|
+
* 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.
|
|
7212
7296
|
*/
|
|
7213
7297
|
assistantId?: string;
|
|
7298
|
+
/**
|
|
7299
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
7300
|
+
*
|
|
7301
|
+
* 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.
|
|
7302
|
+
*/
|
|
7303
|
+
workflowId?: string;
|
|
7214
7304
|
/**
|
|
7215
7305
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
7216
7306
|
*
|
|
7217
|
-
* If neither `assistantId` nor `
|
|
7307
|
+
* 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.
|
|
7218
7308
|
*/
|
|
7219
7309
|
squadId?: string;
|
|
7220
7310
|
/**
|
|
@@ -7231,8 +7321,6 @@ export interface TwilioPhoneNumber {
|
|
|
7231
7321
|
number: string;
|
|
7232
7322
|
/** This is the Twilio Account SID for the phone number. */
|
|
7233
7323
|
twilioAccountSid: string;
|
|
7234
|
-
/** This is the Twilio Auth Token for the phone number. */
|
|
7235
|
-
twilioAuthToken: string;
|
|
7236
7324
|
}
|
|
7237
7325
|
export interface VonagePhoneNumber {
|
|
7238
7326
|
/**
|
|
@@ -7272,13 +7360,19 @@ export interface VonagePhoneNumber {
|
|
|
7272
7360
|
/**
|
|
7273
7361
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
7274
7362
|
*
|
|
7275
|
-
* If neither `assistantId` nor `
|
|
7363
|
+
* 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.
|
|
7276
7364
|
*/
|
|
7277
7365
|
assistantId?: string;
|
|
7366
|
+
/**
|
|
7367
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
7368
|
+
*
|
|
7369
|
+
* 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.
|
|
7370
|
+
*/
|
|
7371
|
+
workflowId?: string;
|
|
7278
7372
|
/**
|
|
7279
7373
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
7280
7374
|
*
|
|
7281
|
-
* If neither `assistantId` nor `
|
|
7375
|
+
* 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.
|
|
7282
7376
|
*/
|
|
7283
7377
|
squadId?: string;
|
|
7284
7378
|
/**
|
|
@@ -7352,13 +7446,19 @@ export interface VapiPhoneNumber {
|
|
|
7352
7446
|
/**
|
|
7353
7447
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
7354
7448
|
*
|
|
7355
|
-
* If neither `assistantId` nor `
|
|
7449
|
+
* 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.
|
|
7356
7450
|
*/
|
|
7357
7451
|
assistantId?: string;
|
|
7452
|
+
/**
|
|
7453
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
7454
|
+
*
|
|
7455
|
+
* 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.
|
|
7456
|
+
*/
|
|
7457
|
+
workflowId?: string;
|
|
7358
7458
|
/**
|
|
7359
7459
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
7360
7460
|
*
|
|
7361
|
-
* If neither `assistantId` nor `
|
|
7461
|
+
* 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.
|
|
7362
7462
|
*/
|
|
7363
7463
|
squadId?: string;
|
|
7364
7464
|
/**
|
|
@@ -7428,13 +7528,19 @@ export interface TelnyxPhoneNumber {
|
|
|
7428
7528
|
/**
|
|
7429
7529
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
7430
7530
|
*
|
|
7431
|
-
* If neither `assistantId` nor `
|
|
7531
|
+
* 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.
|
|
7432
7532
|
*/
|
|
7433
7533
|
assistantId?: string;
|
|
7534
|
+
/**
|
|
7535
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
7536
|
+
*
|
|
7537
|
+
* 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.
|
|
7538
|
+
*/
|
|
7539
|
+
workflowId?: string;
|
|
7434
7540
|
/**
|
|
7435
7541
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
7436
7542
|
*
|
|
7437
|
-
* If neither `assistantId` nor `
|
|
7543
|
+
* 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.
|
|
7438
7544
|
*/
|
|
7439
7545
|
squadId?: string;
|
|
7440
7546
|
/**
|
|
@@ -7499,13 +7605,19 @@ export interface CreateByoPhoneNumberDTO {
|
|
|
7499
7605
|
/**
|
|
7500
7606
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
7501
7607
|
*
|
|
7502
|
-
* If neither `assistantId` nor `
|
|
7608
|
+
* 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.
|
|
7503
7609
|
*/
|
|
7504
7610
|
assistantId?: string;
|
|
7611
|
+
/**
|
|
7612
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
7613
|
+
*
|
|
7614
|
+
* 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.
|
|
7615
|
+
*/
|
|
7616
|
+
workflowId?: string;
|
|
7505
7617
|
/**
|
|
7506
7618
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
7507
7619
|
*
|
|
7508
|
-
* If neither `assistantId` nor `
|
|
7620
|
+
* 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.
|
|
7509
7621
|
*/
|
|
7510
7622
|
squadId?: string;
|
|
7511
7623
|
/**
|
|
@@ -7533,12 +7645,26 @@ export interface CreateTwilioPhoneNumberDTO {
|
|
|
7533
7645
|
hooks?: PhoneNumberHookCallRinging[];
|
|
7534
7646
|
/** This is to use numbers bought on Twilio. */
|
|
7535
7647
|
provider: 'twilio';
|
|
7648
|
+
/**
|
|
7649
|
+
* Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.
|
|
7650
|
+
*
|
|
7651
|
+
* If set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.
|
|
7652
|
+
* If `true` or omitted (default), Vapi will configure both the voice and messaging URLs.
|
|
7653
|
+
*
|
|
7654
|
+
* @default true
|
|
7655
|
+
* @default true
|
|
7656
|
+
*/
|
|
7657
|
+
smsEnabled?: boolean;
|
|
7536
7658
|
/** These are the digits of the phone number you own on your Twilio. */
|
|
7537
7659
|
number: string;
|
|
7538
7660
|
/** This is the Twilio Account SID for the phone number. */
|
|
7539
7661
|
twilioAccountSid: string;
|
|
7540
7662
|
/** This is the Twilio Auth Token for the phone number. */
|
|
7541
|
-
twilioAuthToken
|
|
7663
|
+
twilioAuthToken?: string;
|
|
7664
|
+
/** This is the Twilio API Key for the phone number. */
|
|
7665
|
+
twilioApiKey?: string;
|
|
7666
|
+
/** This is the Twilio API Secret for the phone number. */
|
|
7667
|
+
twilioApiSecret?: string;
|
|
7542
7668
|
/**
|
|
7543
7669
|
* This is the name of the phone number. This is just for your own reference.
|
|
7544
7670
|
* @maxLength 40
|
|
@@ -7547,13 +7673,19 @@ export interface CreateTwilioPhoneNumberDTO {
|
|
|
7547
7673
|
/**
|
|
7548
7674
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
7549
7675
|
*
|
|
7550
|
-
* If neither `assistantId` nor `
|
|
7676
|
+
* 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.
|
|
7551
7677
|
*/
|
|
7552
7678
|
assistantId?: string;
|
|
7679
|
+
/**
|
|
7680
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
7681
|
+
*
|
|
7682
|
+
* 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.
|
|
7683
|
+
*/
|
|
7684
|
+
workflowId?: string;
|
|
7553
7685
|
/**
|
|
7554
7686
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
7555
7687
|
*
|
|
7556
|
-
* If neither `assistantId` nor `
|
|
7688
|
+
* 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.
|
|
7557
7689
|
*/
|
|
7558
7690
|
squadId?: string;
|
|
7559
7691
|
/**
|
|
@@ -7593,13 +7725,19 @@ export interface CreateVonagePhoneNumberDTO {
|
|
|
7593
7725
|
/**
|
|
7594
7726
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
7595
7727
|
*
|
|
7596
|
-
* If neither `assistantId` nor `
|
|
7728
|
+
* 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.
|
|
7597
7729
|
*/
|
|
7598
7730
|
assistantId?: string;
|
|
7731
|
+
/**
|
|
7732
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
7733
|
+
*
|
|
7734
|
+
* 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.
|
|
7735
|
+
*/
|
|
7736
|
+
workflowId?: string;
|
|
7599
7737
|
/**
|
|
7600
7738
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
7601
7739
|
*
|
|
7602
|
-
* If neither `assistantId` nor `
|
|
7740
|
+
* 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.
|
|
7603
7741
|
*/
|
|
7604
7742
|
squadId?: string;
|
|
7605
7743
|
/**
|
|
@@ -7653,13 +7791,19 @@ export interface CreateVapiPhoneNumberDTO {
|
|
|
7653
7791
|
/**
|
|
7654
7792
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
7655
7793
|
*
|
|
7656
|
-
* If neither `assistantId` nor `
|
|
7794
|
+
* 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.
|
|
7657
7795
|
*/
|
|
7658
7796
|
assistantId?: string;
|
|
7797
|
+
/**
|
|
7798
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
7799
|
+
*
|
|
7800
|
+
* 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.
|
|
7801
|
+
*/
|
|
7802
|
+
workflowId?: string;
|
|
7659
7803
|
/**
|
|
7660
7804
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
7661
7805
|
*
|
|
7662
|
-
* If neither `assistantId` nor `
|
|
7806
|
+
* 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.
|
|
7663
7807
|
*/
|
|
7664
7808
|
squadId?: string;
|
|
7665
7809
|
/**
|
|
@@ -7699,13 +7843,19 @@ export interface CreateTelnyxPhoneNumberDTO {
|
|
|
7699
7843
|
/**
|
|
7700
7844
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
7701
7845
|
*
|
|
7702
|
-
* If neither `assistantId` nor `
|
|
7846
|
+
* 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.
|
|
7703
7847
|
*/
|
|
7704
7848
|
assistantId?: string;
|
|
7849
|
+
/**
|
|
7850
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
7851
|
+
*
|
|
7852
|
+
* 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.
|
|
7853
|
+
*/
|
|
7854
|
+
workflowId?: string;
|
|
7705
7855
|
/**
|
|
7706
7856
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
7707
7857
|
*
|
|
7708
|
-
* If neither `assistantId` nor `
|
|
7858
|
+
* 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.
|
|
7709
7859
|
*/
|
|
7710
7860
|
squadId?: string;
|
|
7711
7861
|
/**
|
|
@@ -7752,13 +7902,19 @@ export interface UpdateByoPhoneNumberDTO {
|
|
|
7752
7902
|
/**
|
|
7753
7903
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
7754
7904
|
*
|
|
7755
|
-
* If neither `assistantId` nor `
|
|
7905
|
+
* 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.
|
|
7756
7906
|
*/
|
|
7757
7907
|
assistantId?: string;
|
|
7908
|
+
/**
|
|
7909
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
7910
|
+
*
|
|
7911
|
+
* 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.
|
|
7912
|
+
*/
|
|
7913
|
+
workflowId?: string;
|
|
7758
7914
|
/**
|
|
7759
7915
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
7760
7916
|
*
|
|
7761
|
-
* If neither `assistantId` nor `
|
|
7917
|
+
* 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.
|
|
7762
7918
|
*/
|
|
7763
7919
|
squadId?: string;
|
|
7764
7920
|
/**
|
|
@@ -7796,6 +7952,16 @@ export interface UpdateTwilioPhoneNumberDTO {
|
|
|
7796
7952
|
fallbackDestination?: TransferDestinationNumber | TransferDestinationSip;
|
|
7797
7953
|
/** This is the hooks that will be used for incoming calls to this phone number. */
|
|
7798
7954
|
hooks?: PhoneNumberHookCallRinging[];
|
|
7955
|
+
/**
|
|
7956
|
+
* Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.
|
|
7957
|
+
*
|
|
7958
|
+
* If set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.
|
|
7959
|
+
* If `true` or omitted (default), Vapi will configure both the voice and messaging URLs.
|
|
7960
|
+
*
|
|
7961
|
+
* @default true
|
|
7962
|
+
* @default true
|
|
7963
|
+
*/
|
|
7964
|
+
smsEnabled?: boolean;
|
|
7799
7965
|
/**
|
|
7800
7966
|
* This is the name of the phone number. This is just for your own reference.
|
|
7801
7967
|
* @maxLength 40
|
|
@@ -7804,13 +7970,19 @@ export interface UpdateTwilioPhoneNumberDTO {
|
|
|
7804
7970
|
/**
|
|
7805
7971
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
7806
7972
|
*
|
|
7807
|
-
* If neither `assistantId` nor `
|
|
7973
|
+
* 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.
|
|
7808
7974
|
*/
|
|
7809
7975
|
assistantId?: string;
|
|
7976
|
+
/**
|
|
7977
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
7978
|
+
*
|
|
7979
|
+
* 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.
|
|
7980
|
+
*/
|
|
7981
|
+
workflowId?: string;
|
|
7810
7982
|
/**
|
|
7811
7983
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
7812
7984
|
*
|
|
7813
|
-
* If neither `assistantId` nor `
|
|
7985
|
+
* 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.
|
|
7814
7986
|
*/
|
|
7815
7987
|
squadId?: string;
|
|
7816
7988
|
/**
|
|
@@ -7829,6 +8001,10 @@ export interface UpdateTwilioPhoneNumberDTO {
|
|
|
7829
8001
|
twilioAccountSid?: string;
|
|
7830
8002
|
/** This is the Twilio Auth Token for the phone number. */
|
|
7831
8003
|
twilioAuthToken?: string;
|
|
8004
|
+
/** This is the Twilio API Key for the phone number. */
|
|
8005
|
+
twilioApiKey?: string;
|
|
8006
|
+
/** This is the Twilio API Secret for the phone number. */
|
|
8007
|
+
twilioApiSecret?: string;
|
|
7832
8008
|
}
|
|
7833
8009
|
export interface UpdateVonagePhoneNumberDTO {
|
|
7834
8010
|
/**
|
|
@@ -7850,13 +8026,19 @@ export interface UpdateVonagePhoneNumberDTO {
|
|
|
7850
8026
|
/**
|
|
7851
8027
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
7852
8028
|
*
|
|
7853
|
-
* If neither `assistantId` nor `
|
|
8029
|
+
* 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.
|
|
7854
8030
|
*/
|
|
7855
8031
|
assistantId?: string;
|
|
8032
|
+
/**
|
|
8033
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
8034
|
+
*
|
|
8035
|
+
* 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.
|
|
8036
|
+
*/
|
|
8037
|
+
workflowId?: string;
|
|
7856
8038
|
/**
|
|
7857
8039
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
7858
8040
|
*
|
|
7859
|
-
* If neither `assistantId` nor `
|
|
8041
|
+
* 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.
|
|
7860
8042
|
*/
|
|
7861
8043
|
squadId?: string;
|
|
7862
8044
|
/**
|
|
@@ -7894,13 +8076,19 @@ export interface UpdateVapiPhoneNumberDTO {
|
|
|
7894
8076
|
/**
|
|
7895
8077
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
7896
8078
|
*
|
|
7897
|
-
* If neither `assistantId` nor `
|
|
8079
|
+
* 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.
|
|
7898
8080
|
*/
|
|
7899
8081
|
assistantId?: string;
|
|
8082
|
+
/**
|
|
8083
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
8084
|
+
*
|
|
8085
|
+
* 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.
|
|
8086
|
+
*/
|
|
8087
|
+
workflowId?: string;
|
|
7900
8088
|
/**
|
|
7901
8089
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
7902
8090
|
*
|
|
7903
|
-
* If neither `assistantId` nor `
|
|
8091
|
+
* 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.
|
|
7904
8092
|
*/
|
|
7905
8093
|
squadId?: string;
|
|
7906
8094
|
/**
|
|
@@ -7946,13 +8134,19 @@ export interface UpdateTelnyxPhoneNumberDTO {
|
|
|
7946
8134
|
/**
|
|
7947
8135
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
7948
8136
|
*
|
|
7949
|
-
* If neither `assistantId` nor `
|
|
8137
|
+
* 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.
|
|
7950
8138
|
*/
|
|
7951
8139
|
assistantId?: string;
|
|
8140
|
+
/**
|
|
8141
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
8142
|
+
*
|
|
8143
|
+
* 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.
|
|
8144
|
+
*/
|
|
8145
|
+
workflowId?: string;
|
|
7952
8146
|
/**
|
|
7953
8147
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
7954
8148
|
*
|
|
7955
|
-
* If neither `assistantId` nor `
|
|
8149
|
+
* 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.
|
|
7956
8150
|
*/
|
|
7957
8151
|
squadId?: string;
|
|
7958
8152
|
/**
|
|
@@ -7997,13 +8191,19 @@ export interface ImportVonagePhoneNumberDTO {
|
|
|
7997
8191
|
/**
|
|
7998
8192
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
7999
8193
|
*
|
|
8000
|
-
* If neither `assistantId` nor `
|
|
8194
|
+
* 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.
|
|
8001
8195
|
*/
|
|
8002
8196
|
assistantId?: string;
|
|
8197
|
+
/**
|
|
8198
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
8199
|
+
*
|
|
8200
|
+
* 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.
|
|
8201
|
+
*/
|
|
8202
|
+
workflowId?: string;
|
|
8003
8203
|
/**
|
|
8004
8204
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
8005
8205
|
*
|
|
8006
|
-
* If neither `assistantId` nor `
|
|
8206
|
+
* 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.
|
|
8007
8207
|
*/
|
|
8008
8208
|
squadId?: string;
|
|
8009
8209
|
/**
|
|
@@ -10034,8 +10234,22 @@ export interface TrieveKnowledgeBaseImport {
|
|
|
10034
10234
|
/** This is the `datasetId` of the dataset on your Trieve account. */
|
|
10035
10235
|
providerId: string;
|
|
10036
10236
|
}
|
|
10237
|
+
export interface Workflow {
|
|
10238
|
+
nodes: (Start | Assistant | Say | Gather | ApiRequest | Hangup | Transfer)[];
|
|
10239
|
+
/** These are the options for the workflow's LLM. */
|
|
10240
|
+
model?: AnthropicModel | AnyscaleModel | CerebrasModel | CustomLLMModel | DeepInfraModel | DeepSeekModel | GoogleModel | GroqModel | InflectionAIModel | OpenAIModel | OpenRouterModel | PerplexityAIModel | TogetherAIModel | XaiModel;
|
|
10241
|
+
id: string;
|
|
10242
|
+
orgId: string;
|
|
10243
|
+
/** @format date-time */
|
|
10244
|
+
createdAt: string;
|
|
10245
|
+
/** @format date-time */
|
|
10246
|
+
updatedAt: string;
|
|
10247
|
+
/** @maxLength 80 */
|
|
10248
|
+
name: string;
|
|
10249
|
+
edges: Edge[];
|
|
10250
|
+
}
|
|
10037
10251
|
export interface UpdateWorkflowDTO {
|
|
10038
|
-
nodes?: (Say | Gather | ApiRequest | Hangup | Transfer)[];
|
|
10252
|
+
nodes?: (Start | Assistant | Say | Gather | ApiRequest | Hangup | Transfer)[];
|
|
10039
10253
|
/** These are the options for the workflow's LLM. */
|
|
10040
10254
|
model?: AnthropicModel | AnyscaleModel | CerebrasModel | CustomLLMModel | DeepInfraModel | DeepSeekModel | GoogleModel | GroqModel | InflectionAIModel | OpenAIModel | OpenRouterModel | PerplexityAIModel | TogetherAIModel | XaiModel;
|
|
10041
10255
|
/** @maxLength 80 */
|
|
@@ -10408,7 +10622,7 @@ export interface TestSuiteTestScorerAI {
|
|
|
10408
10622
|
type: 'ai';
|
|
10409
10623
|
/**
|
|
10410
10624
|
* This is the rubric used by the AI scorer.
|
|
10411
|
-
* @maxLength
|
|
10625
|
+
* @maxLength 10000
|
|
10412
10626
|
*/
|
|
10413
10627
|
rubric: string;
|
|
10414
10628
|
}
|
|
@@ -10436,7 +10650,7 @@ export interface TestSuiteRunScorerAI {
|
|
|
10436
10650
|
reasoning: string;
|
|
10437
10651
|
/**
|
|
10438
10652
|
* This is the rubric used by the AI scorer.
|
|
10439
|
-
* @maxLength
|
|
10653
|
+
* @maxLength 10000
|
|
10440
10654
|
*/
|
|
10441
10655
|
rubric: string;
|
|
10442
10656
|
}
|
|
@@ -12213,7 +12427,11 @@ export interface TrieveCredential {
|
|
|
12213
12427
|
export interface TwilioCredential {
|
|
12214
12428
|
provider: 'twilio';
|
|
12215
12429
|
/** This is not returned in the API. */
|
|
12216
|
-
authToken
|
|
12430
|
+
authToken?: string;
|
|
12431
|
+
/** This is not returned in the API. */
|
|
12432
|
+
apiKey?: string;
|
|
12433
|
+
/** This is not returned in the API. */
|
|
12434
|
+
apiSecret?: string;
|
|
12217
12435
|
/** This is the unique identifier for the credential. */
|
|
12218
12436
|
id: string;
|
|
12219
12437
|
/** This is the unique identifier for the org that this credential belongs to. */
|
|
@@ -13030,6 +13248,10 @@ export interface UpdateTrieveCredentialDTO {
|
|
|
13030
13248
|
export interface UpdateTwilioCredentialDTO {
|
|
13031
13249
|
/** This is not returned in the API. */
|
|
13032
13250
|
authToken?: string;
|
|
13251
|
+
/** This is not returned in the API. */
|
|
13252
|
+
apiKey?: string;
|
|
13253
|
+
/** This is not returned in the API. */
|
|
13254
|
+
apiSecret?: string;
|
|
13033
13255
|
/**
|
|
13034
13256
|
* This is the name of credential. This is just for your reference.
|
|
13035
13257
|
* @minLength 1
|
|
@@ -14747,7 +14969,7 @@ export interface VoicemailDetectionCost {
|
|
|
14747
14969
|
/** This is the model that was used to perform the analysis. */
|
|
14748
14970
|
model: object;
|
|
14749
14971
|
/** This is the provider that was used to detect the voicemail. */
|
|
14750
|
-
provider: 'twilio' | 'google' | 'openai';
|
|
14972
|
+
provider: 'twilio' | 'google' | 'openai' | 'vapi';
|
|
14751
14973
|
/** This is the number of prompt text tokens used in the voicemail detection. */
|
|
14752
14974
|
promptTextTokens: number;
|
|
14753
14975
|
/** This is the number of prompt audio tokens used in the voicemail detection. */
|
|
@@ -14759,6 +14981,18 @@ export interface VoicemailDetectionCost {
|
|
|
14759
14981
|
/** This is the cost of the component in USD. */
|
|
14760
14982
|
cost: number;
|
|
14761
14983
|
}
|
|
14984
|
+
export interface KnowledgeBaseCost {
|
|
14985
|
+
/** This is the type of cost, always 'knowledge-base' for this class. */
|
|
14986
|
+
type: 'knowledge-base';
|
|
14987
|
+
/** This is the model that was used for processing the knowledge base. */
|
|
14988
|
+
model: object;
|
|
14989
|
+
/** This is the number of prompt tokens used in the knowledge base query. */
|
|
14990
|
+
promptTokens: number;
|
|
14991
|
+
/** This is the number of completion tokens generated in the knowledge base query. */
|
|
14992
|
+
completionTokens: number;
|
|
14993
|
+
/** This is the cost of the component in USD. */
|
|
14994
|
+
cost: number;
|
|
14995
|
+
}
|
|
14762
14996
|
export interface FunctionToolWithToolCall {
|
|
14763
14997
|
/**
|
|
14764
14998
|
* This determines if the tool is async.
|
|
@@ -15718,6 +15952,20 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15718
15952
|
* @secure
|
|
15719
15953
|
*/
|
|
15720
15954
|
assistantControllerRemove: (id: string, params?: RequestParams) => Promise<HttpResponse<Assistant, any>>;
|
|
15955
|
+
/**
|
|
15956
|
+
* No description
|
|
15957
|
+
*
|
|
15958
|
+
* @tags Assistants
|
|
15959
|
+
* @name AssistantControllerFindVersions
|
|
15960
|
+
* @summary List Assistant Versions
|
|
15961
|
+
* @request GET:/assistant/{id}/version
|
|
15962
|
+
* @secure
|
|
15963
|
+
*/
|
|
15964
|
+
assistantControllerFindVersions: (id: string, query?: {
|
|
15965
|
+
page?: number;
|
|
15966
|
+
limit?: number;
|
|
15967
|
+
pageState?: string;
|
|
15968
|
+
}, params?: RequestParams) => Promise<HttpResponse<AssistantVersionPaginatedResponse, any>>;
|
|
15721
15969
|
};
|
|
15722
15970
|
phoneNumber: {
|
|
15723
15971
|
/**
|