retell-sdk 5.49.0 → 5.49.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +9 -9
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +9 -9
  5. package/client.d.ts.map +1 -1
  6. package/internal/uploads.js +12 -2
  7. package/internal/uploads.js.map +1 -1
  8. package/internal/uploads.mjs +12 -2
  9. package/internal/uploads.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent.d.mts +69 -69
  12. package/resources/agent.d.mts.map +1 -1
  13. package/resources/agent.d.ts +69 -69
  14. package/resources/agent.d.ts.map +1 -1
  15. package/resources/agent.js +30 -30
  16. package/resources/agent.js.map +1 -1
  17. package/resources/agent.mjs +30 -30
  18. package/resources/agent.mjs.map +1 -1
  19. package/resources/call.d.mts +1350 -1350
  20. package/resources/call.d.mts.map +1 -1
  21. package/resources/call.d.ts +1350 -1350
  22. package/resources/call.d.ts.map +1 -1
  23. package/resources/call.js +60 -60
  24. package/resources/call.js.map +1 -1
  25. package/resources/call.mjs +60 -60
  26. package/resources/call.mjs.map +1 -1
  27. package/resources/chat-agent.d.mts +70 -70
  28. package/resources/chat-agent.d.mts.map +1 -1
  29. package/resources/chat-agent.d.ts +70 -70
  30. package/resources/chat-agent.d.ts.map +1 -1
  31. package/resources/chat-agent.js +31 -31
  32. package/resources/chat-agent.js.map +1 -1
  33. package/resources/chat-agent.mjs +31 -31
  34. package/resources/chat-agent.mjs.map +1 -1
  35. package/resources/chat.d.mts +97 -97
  36. package/resources/chat.d.mts.map +1 -1
  37. package/resources/chat.d.ts +97 -97
  38. package/resources/chat.d.ts.map +1 -1
  39. package/resources/chat.js +55 -55
  40. package/resources/chat.js.map +1 -1
  41. package/resources/chat.mjs +55 -55
  42. package/resources/chat.mjs.map +1 -1
  43. package/resources/conversation-flow-component.d.mts +25 -25
  44. package/resources/conversation-flow-component.d.mts.map +1 -1
  45. package/resources/conversation-flow-component.d.ts +25 -25
  46. package/resources/conversation-flow-component.d.ts.map +1 -1
  47. package/resources/conversation-flow-component.js +12 -12
  48. package/resources/conversation-flow-component.js.map +1 -1
  49. package/resources/conversation-flow-component.mjs +12 -12
  50. package/resources/conversation-flow-component.mjs.map +1 -1
  51. package/resources/conversation-flow.d.mts +25 -25
  52. package/resources/conversation-flow.d.mts.map +1 -1
  53. package/resources/conversation-flow.d.ts +25 -25
  54. package/resources/conversation-flow.d.ts.map +1 -1
  55. package/resources/conversation-flow.js +12 -12
  56. package/resources/conversation-flow.js.map +1 -1
  57. package/resources/conversation-flow.mjs +12 -12
  58. package/resources/conversation-flow.mjs.map +1 -1
  59. package/resources/index.d.mts +9 -9
  60. package/resources/index.d.mts.map +1 -1
  61. package/resources/index.d.ts +9 -9
  62. package/resources/index.d.ts.map +1 -1
  63. package/resources/llm.d.mts +24 -24
  64. package/resources/llm.d.mts.map +1 -1
  65. package/resources/llm.d.ts +24 -24
  66. package/resources/llm.d.ts.map +1 -1
  67. package/resources/llm.js +11 -11
  68. package/resources/llm.js.map +1 -1
  69. package/resources/llm.mjs +11 -11
  70. package/resources/llm.mjs.map +1 -1
  71. package/resources/phone-number.d.mts +130 -130
  72. package/resources/phone-number.d.mts.map +1 -1
  73. package/resources/phone-number.d.ts +130 -130
  74. package/resources/phone-number.d.ts.map +1 -1
  75. package/resources/phone-number.js +27 -27
  76. package/resources/phone-number.js.map +1 -1
  77. package/resources/phone-number.mjs +27 -27
  78. package/resources/phone-number.mjs.map +1 -1
  79. package/resources/tests.d.mts +95 -95
  80. package/resources/tests.d.mts.map +1 -1
  81. package/resources/tests.d.ts +95 -95
  82. package/resources/tests.d.ts.map +1 -1
  83. package/resources/tests.js +27 -27
  84. package/resources/tests.js.map +1 -1
  85. package/resources/tests.mjs +27 -27
  86. package/resources/tests.mjs.map +1 -1
  87. package/resources/voice.d.mts +8 -8
  88. package/resources/voice.d.mts.map +1 -1
  89. package/resources/voice.d.ts +8 -8
  90. package/resources/voice.d.ts.map +1 -1
  91. package/resources/voice.js +12 -12
  92. package/resources/voice.js.map +1 -1
  93. package/resources/voice.mjs +12 -12
  94. package/resources/voice.mjs.map +1 -1
  95. package/src/client.ts +18 -18
  96. package/src/internal/uploads.ts +12 -4
  97. package/src/resources/agent.ts +90 -90
  98. package/src/resources/call.ts +1821 -1821
  99. package/src/resources/chat-agent.ts +95 -95
  100. package/src/resources/chat.ts +112 -112
  101. package/src/resources/conversation-flow-component.ts +34 -34
  102. package/src/resources/conversation-flow.ts +34 -34
  103. package/src/resources/index.ts +18 -18
  104. package/src/resources/llm.ts +30 -30
  105. package/src/resources/phone-number.ts +152 -152
  106. package/src/resources/tests.ts +136 -136
  107. package/src/resources/voice.ts +12 -12
  108. package/src/version.ts +1 -1
  109. package/version.d.mts +1 -1
  110. package/version.d.ts +1 -1
  111. package/version.js +1 -1
  112. package/version.mjs +1 -1
@@ -8,136 +8,136 @@ import { path } from '../internal/utils/path';
8
8
 
9
9
  export class Call extends APIResource {
10
10
  /**
11
- * Create a new outbound phone call
11
+ * Retrieve details of a specific call
12
12
  *
13
13
  * @example
14
14
  * ```ts
15
- * const phoneCallResponse = await client.call.createPhoneCall(
16
- * {
17
- * from_number: '+14157774444',
18
- * to_number: '+12137774445',
19
- * },
15
+ * const callResponse = await client.call.retrieve(
16
+ * '119c3f8e47135a29e65947eeb34cf12d',
20
17
  * );
21
18
  * ```
22
19
  */
23
- createPhoneCall(body: CallCreatePhoneCallParams, options?: RequestOptions): APIPromise<PhoneCallResponse> {
24
- return this._client.post('/v2/create-phone-call', {
25
- body,
26
- timeout: (this._client as any)._options.timeout ?? 120000,
27
- ...options,
28
- });
20
+ retrieve(callID: string, options?: RequestOptions): APIPromise<CallResponse> {
21
+ return this._client.get(path`/v2/get-call/${callID}`, options);
29
22
  }
30
23
 
31
24
  /**
32
- * Register a new phone call for custom telephony
25
+ * Update metadata and sensitive data storage settings for an existing call.
33
26
  *
34
27
  * @example
35
28
  * ```ts
36
- * const phoneCallResponse =
37
- * await client.call.registerPhoneCall({
38
- * agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
39
- * });
29
+ * const callResponse = await client.call.update(
30
+ * 'call_a4441234567890777c4a4a123e6',
31
+ * {
32
+ * data_storage_setting: 'everything_except_pii',
33
+ * metadata: {
34
+ * customer_id: 'cust_123',
35
+ * notes: 'Follow-up required',
36
+ * },
37
+ * },
38
+ * );
40
39
  * ```
41
40
  */
42
- registerPhoneCall(
43
- body: CallRegisterPhoneCallParams,
44
- options?: RequestOptions,
45
- ): APIPromise<PhoneCallResponse> {
46
- return this._client.post('/v2/register-phone-call', { body, ...options });
41
+ update(callID: string, body: CallUpdateParams, options?: RequestOptions): APIPromise<CallResponse> {
42
+ return this._client.patch(path`/v2/update-call/${callID}`, { body, ...options });
47
43
  }
48
44
 
49
45
  /**
50
- * Create a new web call
46
+ * List calls with unified cursor pagination response.
51
47
  *
52
48
  * @example
53
49
  * ```ts
54
- * const webCallResponse = await client.call.createWebCall({
55
- * agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
56
- * });
50
+ * const calls = await client.call.list();
57
51
  * ```
58
52
  */
59
- createWebCall(body: CallCreateWebCallParams, options?: RequestOptions): APIPromise<WebCallResponse> {
60
- return this._client.post('/v2/create-web-call', { body, ...options });
53
+ list(body: CallListParams | null | undefined = {}, options?: RequestOptions): APIPromise<CallListResponse> {
54
+ return this._client.post('/v3/list-calls', {
55
+ body,
56
+ timeout: (this._client as any)._options.timeout ?? 300000,
57
+ ...options,
58
+ });
61
59
  }
62
60
 
63
61
  /**
64
- * Retrieve details of a specific call
62
+ * Delete a specific call and its associated data
65
63
  *
66
64
  * @example
67
65
  * ```ts
68
- * const callResponse = await client.call.retrieve(
66
+ * await client.call.delete(
69
67
  * '119c3f8e47135a29e65947eeb34cf12d',
70
68
  * );
71
69
  * ```
72
70
  */
73
- retrieve(callID: string, options?: RequestOptions): APIPromise<CallResponse> {
74
- return this._client.get(path`/v2/get-call/${callID}`, options);
71
+ delete(callID: string, options?: RequestOptions): APIPromise<void> {
72
+ return this._client.delete(path`/v2/delete-call/${callID}`, {
73
+ ...options,
74
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
75
+ });
75
76
  }
76
77
 
77
78
  /**
78
- * List calls with unified cursor pagination response.
79
+ * Create a new outbound phone call
79
80
  *
80
81
  * @example
81
82
  * ```ts
82
- * const calls = await client.call.list();
83
+ * const phoneCallResponse = await client.call.createPhoneCall(
84
+ * {
85
+ * from_number: '+14157774444',
86
+ * to_number: '+12137774445',
87
+ * },
88
+ * );
83
89
  * ```
84
90
  */
85
- list(body: CallListParams | null | undefined = {}, options?: RequestOptions): APIPromise<CallListResponse> {
86
- return this._client.post('/v3/list-calls', {
91
+ createPhoneCall(body: CallCreatePhoneCallParams, options?: RequestOptions): APIPromise<PhoneCallResponse> {
92
+ return this._client.post('/v2/create-phone-call', {
87
93
  body,
88
- timeout: (this._client as any)._options.timeout ?? 300000,
94
+ timeout: (this._client as any)._options.timeout ?? 120000,
89
95
  ...options,
90
96
  });
91
97
  }
92
98
 
93
99
  /**
94
- * Update metadata and sensitive data storage settings for an existing call.
100
+ * Create a new web call
95
101
  *
96
102
  * @example
97
103
  * ```ts
98
- * const callResponse = await client.call.update(
99
- * 'call_a4441234567890777c4a4a123e6',
100
- * {
101
- * data_storage_setting: 'everything_except_pii',
102
- * metadata: {
103
- * customer_id: 'cust_123',
104
- * notes: 'Follow-up required',
105
- * },
106
- * },
107
- * );
104
+ * const webCallResponse = await client.call.createWebCall({
105
+ * agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
106
+ * });
108
107
  * ```
109
108
  */
110
- update(callID: string, body: CallUpdateParams, options?: RequestOptions): APIPromise<CallResponse> {
111
- return this._client.patch(path`/v2/update-call/${callID}`, { body, ...options });
109
+ createWebCall(body: CallCreateWebCallParams, options?: RequestOptions): APIPromise<WebCallResponse> {
110
+ return this._client.post('/v2/create-web-call', { body, ...options });
112
111
  }
113
112
 
114
113
  /**
115
- * Stop an ongoing call.
114
+ * Register a new phone call for custom telephony
116
115
  *
117
116
  * @example
118
117
  * ```ts
119
- * await client.call.stop('call_a4441234567890777c4a4a123e6');
118
+ * const phoneCallResponse =
119
+ * await client.call.registerPhoneCall({
120
+ * agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
121
+ * });
120
122
  * ```
121
123
  */
122
- stop(callID: string, options?: RequestOptions): APIPromise<void> {
123
- return this._client.post(path`/v2/stop-call/${callID}`, {
124
- ...options,
125
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
126
- });
124
+ registerPhoneCall(
125
+ body: CallRegisterPhoneCallParams,
126
+ options?: RequestOptions,
127
+ ): APIPromise<PhoneCallResponse> {
128
+ return this._client.post('/v2/register-phone-call', { body, ...options });
127
129
  }
128
130
 
129
131
  /**
130
- * Delete a specific call and its associated data
132
+ * Stop an ongoing call.
131
133
  *
132
134
  * @example
133
135
  * ```ts
134
- * await client.call.delete(
135
- * '119c3f8e47135a29e65947eeb34cf12d',
136
- * );
136
+ * await client.call.stop('call_a4441234567890777c4a4a123e6');
137
137
  * ```
138
138
  */
139
- delete(callID: string, options?: RequestOptions): APIPromise<void> {
140
- return this._client.delete(path`/v2/delete-call/${callID}`, {
139
+ stop(callID: string, options?: RequestOptions): APIPromise<void> {
140
+ return this._client.post(path`/v2/stop-call/${callID}`, {
141
141
  ...options,
142
142
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
143
143
  });
@@ -4022,1429 +4022,937 @@ export namespace CallListResponse {
4022
4022
  }
4023
4023
  }
4024
4024
 
4025
- export interface CallCreatePhoneCallParams {
4025
+ export interface CallUpdateParams {
4026
4026
  /**
4027
- * The number you own in E.164 format. Must be a number purchased from Retell or
4028
- * imported to Retell.
4027
+ * Custom attributes for the call, as key-value pairs. Each attribute must first be
4028
+ * defined for your organization in the Retell dashboard (Call History → Actions →
4029
+ * Custom attributes) before it can be set here. The object key must match the id
4030
+ * of an existing organization-level custom attribute; keys that do not match a
4031
+ * defined attribute are ignored and will not be saved. Values must be a string,
4032
+ * number, or boolean.
4029
4033
  */
4030
- from_number: string;
4034
+ custom_attributes?: { [key: string]: string | number | boolean };
4031
4035
 
4032
4036
  /**
4033
- * The number you want to call, in E.164 format. If using a number purchased from
4034
- * Retell, only US numbers are supported as destination.
4037
+ * Data storage setting for this call. Overrides the agent's default setting.
4038
+ * "everything" stores all data, "everything_except_pii" excludes PII when
4039
+ * possible, "basic_attributes_only" stores only metadata. Cannot be downgraded
4040
+ * from more restrictive to less restrictive settings.
4035
4041
  */
4036
- to_number: string;
4042
+ data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only';
4037
4043
 
4038
4044
  /**
4039
- * For this particular call, override agent configuration with these settings. This
4040
- * allows you to customize agent behavior for individual calls without modifying
4041
- * the base agent.
4045
+ * An arbitrary object for storage purpose only. You can put anything here like
4046
+ * your internal customer id associated with the call. Not used for processing. You
4047
+ * can later get this field from the call object. Size limited to 50kB max.
4042
4048
  */
4043
- agent_override?: CallCreatePhoneCallParams.AgentOverride;
4049
+ metadata?: unknown;
4050
+ }
4044
4051
 
4052
+ export interface CallListParams {
4045
4053
  /**
4046
- * Add optional custom SIP headers to the call.
4054
+ * Filter criteria for calls. All conditions are implicitly connected with AND.
4047
4055
  */
4048
- custom_sip_headers?: { [key: string]: string };
4056
+ filter_criteria?: CallListParams.FilterCriteria;
4049
4057
 
4050
4058
  /**
4051
- * If true, the e.164 validation will be ignored for the from_number. This can be
4052
- * useful when you want to dial to internal pseudo numbers. This only applies when
4053
- * you are using custom telephony and does not apply when you are using Retell
4054
- * Telephony. If omitted, the default value is false.
4059
+ * Whether to include `total` (count of all calls matching `filter_criteria`,
4060
+ * ignoring `limit`/`skip`/`pagination_key`) in the response. Defaults to false.
4061
+ * Each enabled request triggers an additional aggregate query, so opt in only when
4062
+ * the total is needed.
4055
4063
  */
4056
- ignore_e164_validation?: boolean;
4064
+ include_total?: boolean;
4057
4065
 
4058
4066
  /**
4059
- * An arbitrary object for storage purpose only. You can put anything here like
4060
- * your internal customer id associated with the call. Not used for processing. You
4061
- * can later get this field from the call object.
4067
+ * Maximum number of calls to return.
4062
4068
  */
4063
- metadata?: unknown;
4069
+ limit?: number;
4064
4070
 
4065
4071
  /**
4066
- * For this particular call, override the agent used with this agent id. This does
4067
- * not bind the agent to this number, this is for one time override.
4072
+ * Opaque pagination cursor from a previous response.
4068
4073
  */
4069
- override_agent_id?: string;
4074
+ pagination_key?: string;
4070
4075
 
4071
4076
  /**
4072
- * For this particular call, override the agent version used with this version.
4073
- * This does not bind the agent version to this number, this is for one time
4074
- * override.
4077
+ * Number of records to skip for pagination.
4075
4078
  */
4076
- override_agent_version?: string | number;
4079
+ skip?: number;
4077
4080
 
4078
4081
  /**
4079
- * Add optional dynamic variables in key value pairs of string that injects into
4080
- * your Response Engine prompt and tool description. Only applicable for Response
4081
- * Engine.
4082
+ * Sort calls by `start_timestamp` in ascending or descending order.
4082
4083
  */
4083
- retell_llm_dynamic_variables?: { [key: string]: string };
4084
+ sort_order?: 'ascending' | 'descending';
4084
4085
  }
4085
4086
 
4086
- export namespace CallCreatePhoneCallParams {
4087
+ export namespace CallListParams {
4087
4088
  /**
4088
- * For this particular call, override agent configuration with these settings. This
4089
- * allows you to customize agent behavior for individual calls without modifying
4090
- * the base agent.
4089
+ * Filter criteria for calls. All conditions are implicitly connected with AND.
4091
4090
  */
4092
- export interface AgentOverride {
4091
+ export interface FilterCriteria {
4093
4092
  /**
4094
- * Override agent configuration settings. Any properties specified here will
4095
- * override the base agent configuration for this call.
4093
+ * Filter by agent(s). Agent filters are connected by OR.
4096
4094
  */
4097
- agent?: AgentOverride.Agent;
4095
+ agent?: Array<FilterCriteria.Agent>;
4098
4096
 
4099
4097
  /**
4100
- * Override conversation flow configuration settings. Only applicable when using
4101
- * conversation flow as the response engine. Supported attributes - model_choice,
4102
- * model_temperature, tool_call_strict_mode, knowledge_base_ids, kb_config,
4103
- * start_speaker, begin_after_user_silence_ms.
4098
+ * Filter by agent environment tag(s) (e.g. "prod", "staging").
4104
4099
  */
4105
- conversation_flow?: AgentOverride.ConversationFlow;
4100
+ agent_tag?: FilterCriteria.AgentTag;
4106
4101
 
4107
4102
  /**
4108
- * Override Retell LLM configuration settings. Only applicable when using Retell
4109
- * LLM as the response engine. Supported attributes - model, s2s_model,
4110
- * model_temperature, model_high_priority, tool_call_strict_mode,
4111
- * knowledge_base_ids, kb_config, start_speaker, begin_after_user_silence_ms,
4112
- * begin_message.
4103
+ * Filter by batch call ID.
4113
4104
  */
4114
- retell_llm?: AgentOverride.RetellLlm;
4115
- }
4105
+ batch_call_id?: FilterCriteria.BatchCallID;
4116
4106
 
4117
- export namespace AgentOverride {
4118
4107
  /**
4119
- * Override agent configuration settings. Any properties specified here will
4120
- * override the base agent configuration for this call.
4108
+ * Filter by call ID.
4121
4109
  */
4122
- export interface Agent {
4123
- /**
4124
- * The name of the agent. Only used for your own reference.
4125
- */
4126
- agent_name?: string | null;
4110
+ call_id?: FilterCriteria.StringFilter | FilterCriteria.EnumFilter;
4127
4111
 
4128
- /**
4129
- * If set to true, DTMF input will interrupt the agent even when
4130
- * interruption_sensitivity is 0. Can be overridden per conversation or subagent
4131
- * node. Default to false.
4132
- */
4133
- allow_dtmf_interruption?: boolean;
4112
+ call_status?: FilterCriteria.CallStatus;
4134
4113
 
4135
- /**
4136
- * If set to true, DTMF input will be accepted and processed. If false, any DTMF
4137
- * input will be ignored. Default to true.
4138
- */
4139
- allow_user_dtmf?: boolean;
4114
+ /**
4115
+ * Filter by whether the call was successful.
4116
+ */
4117
+ call_successful?: FilterCriteria.CallSuccessful;
4140
4118
 
4141
- /**
4142
- * If set, will add ambient environment sound to the call to make experience more
4143
- * realistic. Currently supports the following options:
4144
- *
4145
- * - `coffee-shop`: Coffee shop ambience with people chatting in background.
4146
- * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/coffee-shop.wav)
4147
- * - `convention-hall`: Convention hall ambience, with some echo and people
4148
- * chatting in background.
4149
- * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/convention-hall.wav)
4150
- * - `summer-outdoor`: Summer outdoor ambience with cicada chirping.
4151
- * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/summer-outdoor.wav)
4152
- * - `mountain-outdoor`: Mountain outdoor ambience with birds singing.
4153
- * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/mountain-outdoor.wav)
4154
- * - `static-noise`: Constant static noise.
4155
- * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/static-noise.wav)
4156
- * - `call-center`: Call center work noise.
4157
- * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/call-center.wav)
4158
- * Set to `null` to remove ambient sound from this agent.
4159
- */
4160
- ambient_sound?:
4161
- | 'coffee-shop'
4162
- | 'convention-hall'
4163
- | 'summer-outdoor'
4164
- | 'mountain-outdoor'
4165
- | 'static-noise'
4166
- | 'call-center'
4167
- | null;
4119
+ call_type?: FilterCriteria.CallType;
4168
4120
 
4169
- /**
4170
- * If set, will control the volume of the ambient sound. Value ranging from [0,2].
4171
- * Lower value means quieter ambient sound, while higher value means louder ambient
4172
- * sound. If unset, default value 1 will apply.
4173
- */
4174
- ambient_sound_volume?: number;
4121
+ /**
4122
+ * Filter by combined cost of the call.
4123
+ */
4124
+ combined_cost?: FilterCriteria.NumberFilter | FilterCriteria.RangeFilter;
4125
+
4126
+ /**
4127
+ * Filter by custom analysis data fields.
4128
+ */
4129
+ custom_analysis_data?: Array<
4130
+ | FilterCriteria.StringFilter
4131
+ | FilterCriteria.NumberFilter
4132
+ | FilterCriteria.BooleanFilter
4133
+ | FilterCriteria.RangeFilter
4134
+ | FilterCriteria.EnumFilter
4135
+ | FilterCriteria.PresentFilter
4136
+ >;
4137
+
4138
+ /**
4139
+ * Filter by custom attributes fields.
4140
+ */
4141
+ custom_attributes?: Array<
4142
+ | FilterCriteria.StringFilter
4143
+ | FilterCriteria.NumberFilter
4144
+ | FilterCriteria.BooleanFilter
4145
+ | FilterCriteria.RangeFilter
4146
+ | FilterCriteria.EnumFilter
4147
+ | FilterCriteria.PresentFilter
4148
+ >;
4149
+
4150
+ data_storage_setting?: FilterCriteria.DataStorageSetting;
4151
+
4152
+ direction?: FilterCriteria.Direction;
4153
+
4154
+ disconnection_reason?: FilterCriteria.DisconnectionReason;
4155
+
4156
+ /**
4157
+ * Filter by call duration in milliseconds.
4158
+ */
4159
+ duration_ms?: FilterCriteria.NumberFilter | FilterCriteria.RangeFilter;
4160
+
4161
+ /**
4162
+ * Filter by dynamic variables.
4163
+ */
4164
+ dynamic_variables?: Array<FilterCriteria.DynamicVariable>;
4165
+
4166
+ /**
4167
+ * Filter by end-to-end latency p50.
4168
+ */
4169
+ e2e_latency_p50?: FilterCriteria.NumberFilter | FilterCriteria.RangeFilter;
4170
+
4171
+ /**
4172
+ * Filter by call end timestamp (epoch ms).
4173
+ */
4174
+ end_timestamp?: FilterCriteria.NumberFilter | FilterCriteria.RangeFilter;
4175
+
4176
+ /**
4177
+ * Filter by from number.
4178
+ */
4179
+ from_number?: FilterCriteria.FromNumber;
4180
+
4181
+ /**
4182
+ * Filter by whether the call is in voicemail.
4183
+ */
4184
+ in_voicemail?: FilterCriteria.InVoicemail;
4185
+
4186
+ /**
4187
+ * Filter by metadata fields.
4188
+ */
4189
+ metadata?: Array<
4190
+ | FilterCriteria.StringFilter
4191
+ | FilterCriteria.NumberFilter
4192
+ | FilterCriteria.BooleanFilter
4193
+ | FilterCriteria.RangeFilter
4194
+ | FilterCriteria.EnumFilter
4195
+ | FilterCriteria.PresentFilter
4196
+ >;
4197
+
4198
+ /**
4199
+ * Filter by call start timestamp (epoch ms).
4200
+ */
4201
+ start_timestamp?: FilterCriteria.NumberFilter | FilterCriteria.RangeFilter;
4202
+
4203
+ /**
4204
+ * Filter by to number.
4205
+ */
4206
+ to_number?: FilterCriteria.ToNumber;
4175
4207
 
4208
+ /**
4209
+ * Filter by tool call criteria. Tool call filters are connected by AND.
4210
+ */
4211
+ tool_calls?: Array<FilterCriteria.ToolCall>;
4212
+
4213
+ user_sentiment?: FilterCriteria.UserSentiment;
4214
+ }
4215
+
4216
+ export namespace FilterCriteria {
4217
+ export interface Agent {
4176
4218
  /**
4177
- * Only applicable when enable_backchannel is true. Controls how often the agent
4178
- * would backchannel when a backchannel is possible. Value ranging from [0,1].
4179
- * Lower value means less frequent backchannel, while higher value means more
4180
- * frequent backchannel. If unset, default value 0.8 will apply.
4219
+ * The agent ID to filter on.
4181
4220
  */
4182
- backchannel_frequency?: number;
4221
+ agent_id: string;
4183
4222
 
4184
4223
  /**
4185
- * Only applicable when enable_backchannel is true. A list of words that the agent
4186
- * would use as backchannel. If not set, default backchannel words will apply.
4187
- * Check out
4188
- * [backchannel default words](/agent/interaction-configuration#backchannel) for
4189
- * more details. Note that certain voices do not work too well with certain words,
4190
- * so it's recommended to experiment before adding any words.
4224
+ * Specific versions to filter on. If not provided, all versions are included.
4191
4225
  */
4192
- backchannel_words?: Array<string> | null;
4226
+ version?: Array<number>;
4227
+ }
4193
4228
 
4229
+ /**
4230
+ * Filter by agent environment tag(s) (e.g. "prod", "staging").
4231
+ */
4232
+ export interface AgentTag {
4194
4233
  /**
4195
- * If set, will delay the first message by the specified amount of milliseconds, so
4196
- * that it gives user more time to prepare to take the call. Valid range is [0,
4197
- * 5000]. If not set or set to 0, agent will speak immediately. Only applicable
4198
- * when agent speaks first.
4234
+ * in: value is one of the listed values
4199
4235
  */
4200
- begin_message_delay_ms?: number;
4236
+ op: 'in';
4237
+
4238
+ type: 'enum';
4201
4239
 
4240
+ value: Array<string>;
4241
+ }
4242
+
4243
+ /**
4244
+ * Filter by batch call ID.
4245
+ */
4246
+ export interface BatchCallID {
4202
4247
  /**
4203
- * Provide a customized list of keywords to bias the transcriber model, so that
4204
- * these words are more likely to get transcribed. Commonly used for names, brands,
4205
- * street, etc. Entries may reference dynamic variables with `{{variable}}` syntax.
4248
+ * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
4206
4249
  */
4207
- boosted_keywords?: Array<string> | null;
4250
+ op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
4251
+
4252
+ type: 'string';
4253
+
4254
+ value: string;
4255
+ }
4208
4256
 
4257
+ export interface StringFilter {
4209
4258
  /**
4210
- * If this option is set, the agent prompt will include call screen handling
4211
- * instructions for identity and call purpose questions. Set this to null to
4212
- * disable call screen prompt instructions.
4259
+ * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
4213
4260
  */
4214
- call_screening_option?: Agent.CallScreeningOption | null;
4261
+ op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
4262
+
4263
+ type: 'string';
4264
+
4265
+ value: string;
4266
+ }
4215
4267
 
4268
+ export interface EnumFilter {
4216
4269
  /**
4217
- * Custom STT configuration. Only used when stt_mode is set to custom.
4270
+ * in: value is one of the listed values
4218
4271
  */
4219
- custom_stt_config?: Agent.CustomSttConfig | null;
4272
+ op: 'in';
4273
+
4274
+ type: 'enum';
4275
+
4276
+ value: Array<string>;
4277
+ }
4220
4278
 
4279
+ export interface CallStatus {
4221
4280
  /**
4222
- * Number of days to retain call/chat data before automatic deletion. Must be
4223
- * between 1 and 730 days. If not set, data is retained forever (no automatic
4224
- * deletion).
4281
+ * in: value is one of the listed values
4225
4282
  */
4226
- data_storage_retention_days?: number | null;
4283
+ op: 'in';
4284
+
4285
+ type: 'enum';
4286
+
4287
+ value: Array<'not_connected' | 'ongoing' | 'ended' | 'error'>;
4288
+ }
4289
+
4290
+ /**
4291
+ * Filter by whether the call was successful.
4292
+ */
4293
+ export interface CallSuccessful {
4294
+ op: 'eq';
4295
+
4296
+ type: 'boolean';
4227
4297
 
4298
+ value: boolean;
4299
+ }
4300
+
4301
+ export interface CallType {
4228
4302
  /**
4229
- * Granular setting to manage how Retell stores sensitive data (transcripts,
4230
- * recordings, logs, etc.). This replaces the deprecated
4231
- * `opt_out_sensitive_data_storage` field.
4232
- *
4233
- * - `everything`: Store all data including transcripts, recordings, and logs.
4234
- * - `everything_except_pii`: Store data without PII when PII is detected.
4235
- * - `basic_attributes_only`: Store only basic attributes; no
4236
- * transcripts/recordings/logs. If not set, default value of "everything" will
4237
- * apply.
4303
+ * in: value is one of the listed values
4238
4304
  */
4239
- data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only';
4305
+ op: 'in';
4306
+
4307
+ type: 'enum';
4308
+
4309
+ value: Array<'web_call' | 'phone_call'>;
4310
+ }
4240
4311
 
4312
+ export interface NumberFilter {
4241
4313
  /**
4242
- * If set, determines what denoising mode to use. Use "no-denoise" to bypass all
4243
- * audio denoising. Default to noise-cancellation.
4314
+ * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
4315
+ * than, le: less than or equal
4244
4316
  */
4245
- denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation';
4317
+ op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
4246
4318
 
4319
+ type: 'number';
4320
+
4321
+ value: number;
4322
+ }
4323
+
4324
+ export interface RangeFilter {
4247
4325
  /**
4248
- * Controls whether the agent would backchannel (agent interjects the speaker with
4249
- * phrases like "yeah", "uh-huh" to signify interest and engagement). Backchannel
4250
- * when enabled tends to show up more in longer user utterances. If not set, agent
4251
- * will not backchannel.
4326
+ * bt: between
4252
4327
  */
4253
- enable_backchannel?: boolean;
4328
+ op: 'bt';
4329
+
4330
+ type: 'range';
4254
4331
 
4255
4332
  /**
4256
- * If set to true, the agent will dynamically adjust how quickly it responds based
4257
- * on the user's speech rate and past turn-taking behavior in the call. If unset,
4258
- * default value false will apply.
4333
+ * [lower_bound, upper_bound]
4259
4334
  */
4260
- enable_dynamic_responsiveness?: boolean;
4335
+ value: Array<number>;
4336
+ }
4261
4337
 
4338
+ export interface StringFilter {
4262
4339
  /**
4263
- * If set to true, will enable dynamic voice speed adjustment based on the user's
4264
- * speech rate and conversation context. If unset, default value false will apply.
4340
+ * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
4265
4341
  */
4266
- enable_dynamic_voice_speed?: boolean;
4342
+ op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
4267
4343
 
4268
- /**
4269
- * Master toggle for expressive mode. When true, the agent may add expressive voice
4270
- * tags to the audio it generates. Only applicable for platform voices. If unset,
4271
- * defaults to false.
4272
- */
4273
- enable_expressive_mode?: boolean;
4344
+ type: 'string';
4345
+
4346
+ value: string;
4274
4347
 
4275
4348
  /**
4276
- * If users stay silent for a period after agent speech, end the call. The minimum
4277
- * value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).
4349
+ * The field name to filter on.
4278
4350
  */
4279
- end_call_after_silence_ms?: number;
4351
+ key?: string;
4352
+ }
4280
4353
 
4354
+ export interface NumberFilter {
4281
4355
  /**
4282
- * The expressive voice tags Retell pre-teaches the model to use when
4283
- * enable_expressive_mode is true. Custom tags defined in the system prompt are
4284
- * still allowed. If empty, the agent follows general expressive guidance without a
4285
- * fixed tag set.
4356
+ * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
4357
+ * than, le: less than or equal
4286
4358
  */
4287
- expressive_emotion_tags?: Array<
4288
- | 'empathetic'
4289
- | 'excited'
4290
- | 'happy'
4291
- | 'curious'
4292
- | 'surprised'
4293
- | 'sigh'
4294
- | 'clear throat'
4295
- | 'pause'
4296
- | 'long pause'
4297
- | 'emphasis'
4298
- >;
4359
+ op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
4360
+
4361
+ type: 'number';
4362
+
4363
+ value: number;
4299
4364
 
4300
4365
  /**
4301
- * Custom expressive voice guidance to use instead of the default Retell expressive
4302
- * prompt when enable_expressive_mode is true. If omitted or blank, the default
4303
- * expressive prompt will be used.
4366
+ * The field name to filter on.
4304
4367
  */
4305
- expressive_mode_prompt?: string | null;
4368
+ key?: string;
4369
+ }
4370
+
4371
+ export interface BooleanFilter {
4372
+ op: 'eq';
4373
+
4374
+ type: 'boolean';
4375
+
4376
+ value: boolean;
4306
4377
 
4307
4378
  /**
4308
- * When TTS provider for the selected voice is experiencing outages, we would use
4309
- * fallback voices listed here for the agent. Voice id and the fallback voice ids
4310
- * must be from different TTS providers. The system would go through the list in
4311
- * order, if the first one in the list is also having outage, it would use the next
4312
- * one. Set to null to remove voice fallback for the agent.
4379
+ * The field name to filter on.
4313
4380
  */
4314
- fallback_voice_ids?: Array<string> | null;
4381
+ key?: string;
4382
+ }
4315
4383
 
4384
+ export interface RangeFilter {
4316
4385
  /**
4317
- * Configuration for guardrail checks to detect and prevent prohibited topics in
4318
- * agent output and user input.
4386
+ * bt: between
4319
4387
  */
4320
- guardrail_config?: Agent.GuardrailConfig;
4388
+ op: 'bt';
4389
+
4390
+ type: 'range';
4321
4391
 
4322
4392
  /**
4323
- * Toggle behavior presets on/off to influence agent response style and behaviors.
4393
+ * [lower_bound, upper_bound]
4324
4394
  */
4325
- handbook_config?: Agent.HandbookConfig;
4395
+ value: Array<number>;
4326
4396
 
4327
4397
  /**
4328
- * Controls how sensitive the agent is to user interruptions. Value ranging from
4329
- * [0,1]. Lower value means it will take longer / more words for user to interrupt
4330
- * agent, while higher value means it's easier for user to interrupt agent. If
4331
- * unset, default value 1 will apply. When this is set to 0, agent would never be
4332
- * interrupted.
4398
+ * The field name to filter on.
4333
4399
  */
4334
- interruption_sensitivity?: number;
4400
+ key?: string;
4401
+ }
4335
4402
 
4403
+ export interface EnumFilter {
4336
4404
  /**
4337
- * If this option is set, the call will try to detect IVR in the first 3 minutes of
4338
- * the call. Actions defined will be applied when the IVR is detected. Set this to
4339
- * null to disable IVR detection.
4405
+ * in: value is one of the listed values
4340
4406
  */
4341
- ivr_option?: Agent.IvrOption | null;
4407
+ op: 'in';
4408
+
4409
+ type: 'enum';
4410
+
4411
+ value: Array<string>;
4342
4412
 
4343
4413
  /**
4344
- * Specifies what language(s) the agent will operate in. Accepts either a single
4345
- * scalar locale (e.g. `en-US`), the legacy scalar value `multi` for multilingual
4346
- * support, or an array of concrete locale codes for explicit multi-locale
4347
- * selection (e.g. `["en-US","es-ES"]`). The array form must contain concrete
4348
- * locale codes only — the `multi` value is valid only as the scalar legacy form
4349
- * and must not appear inside an array. Single-element arrays are normalized to the
4350
- * equivalent scalar on output. If unset, defaults to `en-US`.
4414
+ * The field name to filter on.
4351
4415
  */
4352
- language?:
4353
- | 'en-US'
4354
- | 'en-IN'
4355
- | 'en-GB'
4356
- | 'en-AU'
4357
- | 'en-NZ'
4358
- | 'de-DE'
4359
- | 'es-ES'
4360
- | 'es-419'
4361
- | 'hi-IN'
4362
- | 'fr-FR'
4363
- | 'fr-CA'
4364
- | 'ja-JP'
4365
- | 'pt-PT'
4366
- | 'pt-BR'
4367
- | 'zh-CN'
4368
- | 'ru-RU'
4369
- | 'it-IT'
4370
- | 'ko-KR'
4371
- | 'nl-NL'
4372
- | 'nl-BE'
4373
- | 'pl-PL'
4374
- | 'tr-TR'
4375
- | 'vi-VN'
4376
- | 'ro-RO'
4377
- | 'bg-BG'
4378
- | 'ca-ES'
4379
- | 'th-TH'
4380
- | 'da-DK'
4381
- | 'fi-FI'
4382
- | 'el-GR'
4383
- | 'hu-HU'
4384
- | 'id-ID'
4385
- | 'no-NO'
4386
- | 'sk-SK'
4387
- | 'sv-SE'
4388
- | 'lt-LT'
4389
- | 'lv-LV'
4390
- | 'cs-CZ'
4391
- | 'ms-MY'
4392
- | 'af-ZA'
4393
- | 'ar-SA'
4394
- | 'az-AZ'
4395
- | 'bs-BA'
4396
- | 'cy-GB'
4397
- | 'fa-IR'
4398
- | 'fil-PH'
4399
- | 'gl-ES'
4400
- | 'he-IL'
4401
- | 'hr-HR'
4402
- | 'hy-AM'
4403
- | 'is-IS'
4404
- | 'kk-KZ'
4405
- | 'kn-IN'
4406
- | 'mk-MK'
4407
- | 'mr-IN'
4408
- | 'ne-NP'
4409
- | 'sl-SI'
4410
- | 'sr-RS'
4411
- | 'sw-KE'
4412
- | 'ta-IN'
4413
- | 'ur-IN'
4414
- | 'yue-CN'
4415
- | 'uk-UA'
4416
- | 'multi'
4417
- | Array<
4418
- | 'en-US'
4419
- | 'en-IN'
4420
- | 'en-GB'
4421
- | 'en-AU'
4422
- | 'en-NZ'
4423
- | 'de-DE'
4424
- | 'es-ES'
4425
- | 'es-419'
4426
- | 'hi-IN'
4427
- | 'fr-FR'
4428
- | 'fr-CA'
4429
- | 'ja-JP'
4430
- | 'pt-PT'
4431
- | 'pt-BR'
4432
- | 'zh-CN'
4433
- | 'ru-RU'
4434
- | 'it-IT'
4435
- | 'ko-KR'
4436
- | 'nl-NL'
4437
- | 'nl-BE'
4438
- | 'pl-PL'
4439
- | 'tr-TR'
4440
- | 'vi-VN'
4441
- | 'ro-RO'
4442
- | 'bg-BG'
4443
- | 'ca-ES'
4444
- | 'th-TH'
4445
- | 'da-DK'
4446
- | 'fi-FI'
4447
- | 'el-GR'
4448
- | 'hu-HU'
4449
- | 'id-ID'
4450
- | 'no-NO'
4451
- | 'sk-SK'
4452
- | 'sv-SE'
4453
- | 'lt-LT'
4454
- | 'lv-LV'
4455
- | 'cs-CZ'
4456
- | 'ms-MY'
4457
- | 'af-ZA'
4458
- | 'ar-SA'
4459
- | 'az-AZ'
4460
- | 'bs-BA'
4461
- | 'cy-GB'
4462
- | 'fa-IR'
4463
- | 'fil-PH'
4464
- | 'gl-ES'
4465
- | 'he-IL'
4466
- | 'hr-HR'
4467
- | 'hy-AM'
4468
- | 'is-IS'
4469
- | 'kk-KZ'
4470
- | 'kn-IN'
4471
- | 'mk-MK'
4472
- | 'mr-IN'
4473
- | 'ne-NP'
4474
- | 'sl-SI'
4475
- | 'sr-RS'
4476
- | 'sw-KE'
4477
- | 'ta-IN'
4478
- | 'ur-IN'
4479
- | 'yue-CN'
4480
- | 'uk-UA'
4481
- >;
4416
+ key?: string;
4417
+ }
4482
4418
 
4419
+ export interface PresentFilter {
4483
4420
  /**
4484
- * Maximum allowed length for the call, will force end the call if reached. The
4485
- * minimum value allowed is 60,000 ms (1 min), and maximum value allowed is
4486
- * 7,200,000 (2 hours). By default, this is set to 3,600,000 (1 hour).
4421
+ * pr: present (has value), np: not present
4487
4422
  */
4488
- max_call_duration_ms?: number;
4423
+ op: 'pr' | 'np';
4424
+
4425
+ type: 'present';
4489
4426
 
4490
4427
  /**
4491
- * Whether this agent opts in for signed URLs for public logs and recordings. When
4492
- * enabled, the generated URLs will include security signatures that restrict
4493
- * access and automatically expire after 24 hours.
4428
+ * The field name to filter on.
4494
4429
  */
4495
- opt_in_signed_url?: boolean;
4430
+ key?: string;
4431
+ }
4496
4432
 
4433
+ export interface StringFilter {
4497
4434
  /**
4498
- * Configuration for PII scrubbing from transcripts and recordings.
4435
+ * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
4499
4436
  */
4500
- pii_config?: Agent.PiiConfig;
4437
+ op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
4501
4438
 
4502
- /**
4503
- * Post call analysis data to extract from the call. This data will augment the
4504
- * pre-defined variables extracted in the call analysis. This will be available
4505
- * after the call ends.
4506
- */
4507
- post_call_analysis_data?: Array<
4508
- | Agent.StringAnalysisData
4509
- | Agent.EnumAnalysisData
4510
- | Agent.BooleanAnalysisData
4511
- | Agent.NumberAnalysisData
4512
- | Agent.CallPresetAnalysisData
4513
- > | null;
4439
+ type: 'string';
4514
4440
 
4515
- /**
4516
- * The model to use for post call analysis. Default to gpt-4.1.
4517
- */
4518
- post_call_analysis_model?:
4519
- | 'gpt-4.1'
4520
- | 'gpt-4.1-mini'
4521
- | 'gpt-4.1-nano'
4522
- | 'gpt-5'
4523
- | 'gpt-5-mini'
4524
- | 'gpt-5-nano'
4525
- | 'gpt-5.1'
4526
- | 'gpt-5.2'
4527
- | 'gpt-5.4'
4528
- | 'gpt-5.4-mini'
4529
- | 'gpt-5.4-nano'
4530
- | 'gpt-5.5'
4531
- | 'gpt-5.6-terra'
4532
- | 'gpt-5.6-luna'
4533
- | 'claude-4.5-sonnet'
4534
- | 'claude-4.6-sonnet'
4535
- | 'claude-5-sonnet'
4536
- | 'claude-4.5-haiku'
4537
- | 'gemini-3.0-flash'
4538
- | 'gemini-3.1-flash-lite'
4539
- | 'gemini-3.5-flash'
4540
- | null;
4441
+ value: string;
4541
4442
 
4542
4443
  /**
4543
- * A list of words / phrases and their pronunciation to be used to guide the audio
4544
- * synthesize for consistent pronunciation. Check the dashboard to see what
4545
- * provider supports this feature. Set to null to remove pronunciation dictionary
4546
- * from this agent.
4444
+ * The field name to filter on.
4547
4445
  */
4548
- pronunciation_dictionary?: Array<Agent.PronunciationDictionary> | null;
4446
+ key?: string;
4447
+ }
4549
4448
 
4449
+ export interface NumberFilter {
4550
4450
  /**
4551
- * If set, controls how many times agent would remind user when user is
4552
- * unresponsive. Must be a non negative integer. If unset, default value of 1 will
4553
- * apply (remind once). Set to 0 to disable agent from reminding.
4451
+ * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
4452
+ * than, le: less than or equal
4554
4453
  */
4555
- reminder_max_count?: number;
4454
+ op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
4556
4455
 
4557
- /**
4558
- * If set (in milliseconds), will trigger a reminder to the agent to speak if the
4559
- * user has been silent for the specified duration after some agent speech. Must be
4560
- * a positive number. If unset, default value of 10000 ms (10 s) will apply.
4561
- */
4562
- reminder_trigger_ms?: number;
4456
+ type: 'number';
4563
4457
 
4564
- /**
4565
- * The Response Engine to attach to the agent. It is used to generate responses for
4566
- * the agent. You need to create a Response Engine first before attaching it to an
4567
- * agent.
4568
- */
4569
- response_engine?:
4570
- | Agent.ResponseEngineRetellLm
4571
- | Agent.ResponseEngineCustomLm
4572
- | Agent.ResponseEngineConversationFlow;
4458
+ value: number;
4573
4459
 
4574
4460
  /**
4575
- * Controls how responsive is the agent. Value ranging from [0,1]. Lower value
4576
- * means less responsive agent (wait more, respond slower), while higher value
4577
- * means faster exchanges (respond when it can). If unset, default value 1 will
4578
- * apply.
4461
+ * The field name to filter on.
4579
4462
  */
4580
- responsiveness?: number;
4463
+ key?: string;
4464
+ }
4581
4465
 
4582
- /**
4583
- * If set, the phone ringing will last for the specified amount of milliseconds.
4584
- * This applies for both outbound call ringtime, and call transfer ringtime.
4585
- * Default to 30000 (30 s). Valid range is [5000, 300000].
4586
- */
4587
- ring_duration_ms?: number;
4466
+ export interface BooleanFilter {
4467
+ op: 'eq';
4588
4468
 
4589
- /**
4590
- * The expiration time for the signed url in milliseconds. Only applicable when
4591
- * opt_in_signed_url is true. If not set, default value of 86400000 (24 hours) will
4592
- * apply.
4593
- */
4594
- signed_url_expiration_ms?: number | null;
4469
+ type: 'boolean';
4470
+
4471
+ value: boolean;
4595
4472
 
4596
4473
  /**
4597
- * If set, determines whether speech to text should focus on latency or accuracy.
4598
- * Default to fast mode. When set to custom, custom_stt_config must be provided.
4474
+ * The field name to filter on.
4599
4475
  */
4600
- stt_mode?: 'fast' | 'accurate' | 'custom';
4476
+ key?: string;
4477
+ }
4601
4478
 
4479
+ export interface RangeFilter {
4602
4480
  /**
4603
- * IANA timezone for the agent (e.g. America/New_York). Defaults to
4604
- * America/Los_Angeles if not set.
4481
+ * bt: between
4605
4482
  */
4606
- timezone?: string | null;
4483
+ op: 'bt';
4607
4484
 
4608
- user_dtmf_options?: Agent.UserDtmfOptions | null;
4485
+ type: 'range';
4609
4486
 
4610
4487
  /**
4611
- * Optional description of the agent version. Used for your own reference and
4612
- * documentation.
4488
+ * [lower_bound, upper_bound]
4613
4489
  */
4614
- version_description?: string | null;
4490
+ value: Array<number>;
4615
4491
 
4616
4492
  /**
4617
- * Optional title of the agent version. Used for your own reference.
4493
+ * The field name to filter on.
4618
4494
  */
4619
- version_title?: string | null;
4495
+ key?: string;
4496
+ }
4620
4497
 
4498
+ export interface EnumFilter {
4621
4499
  /**
4622
- * If set, determines the vocabulary set to use for transcription. This setting
4623
- * only applies for English agents, for non English agent, this setting is a no-op.
4624
- * Default to general.
4500
+ * in: value is one of the listed values
4625
4501
  */
4626
- vocab_specialization?: 'general' | 'medical';
4502
+ op: 'in';
4627
4503
 
4628
- /**
4629
- * Controls the emotional tone of the agent's voice. Currently supported for
4630
- * Cartesia and Minimax TTS providers. If unset, no emotion will be used.
4631
- */
4632
- voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised' | null;
4504
+ type: 'enum';
4633
4505
 
4634
- /**
4635
- * Unique voice id used for the agent. Find list of available voices and their
4636
- * preview in Dashboard.
4637
- */
4638
- voice_id?: string;
4506
+ value: Array<string>;
4639
4507
 
4640
4508
  /**
4641
- * Select the voice model used for the selected voice. Each provider has a set of
4642
- * available voice models. Set to null to remove voice model selection, and default
4643
- * ones will apply. Check out dashboard for more details of each voice model.
4509
+ * The field name to filter on.
4644
4510
  */
4645
- voice_model?:
4646
- | 'eleven_flash_v2'
4647
- | 'eleven_flash_v2_5'
4648
- | 'eleven_multilingual_v2'
4649
- | 'eleven_v3'
4650
- | 'sonic-3'
4651
- | 'sonic-3-latest'
4652
- | 'sonic-3.5'
4653
- | 'tts-1'
4654
- | 'gpt-4o-mini-tts'
4655
- | 'speech-02-turbo'
4656
- | 'speech-2.8-turbo'
4657
- | 's1'
4658
- | 's2-pro'
4659
- | 's2.1-pro'
4660
- | null;
4511
+ key?: string;
4512
+ }
4661
4513
 
4514
+ export interface PresentFilter {
4662
4515
  /**
4663
- * Controls speed of voice. Value ranging from [0.5,2]. Lower value means slower
4664
- * speech, while higher value means faster speech rate. If unset, default value 1
4665
- * will apply.
4516
+ * pr: present (has value), np: not present
4666
4517
  */
4667
- voice_speed?: number;
4518
+ op: 'pr' | 'np';
4668
4519
 
4669
- /**
4670
- * Controls how stable the voice is. Value ranging from [0,2]. Lower value means
4671
- * more stable, and higher value means more variant speech generation. Check the
4672
- * dashboard to see what provider supports this feature. If unset, default value 1
4673
- * will apply.
4674
- */
4675
- voice_temperature?: number;
4520
+ type: 'present';
4676
4521
 
4677
4522
  /**
4678
- * If this option is set, the call will try to detect voicemail in the first 3
4679
- * minutes of the call. Actions defined (hangup, or leave a message) will be
4680
- * applied when the voicemail is detected. Set this to null to disable voicemail
4681
- * detection.
4523
+ * The field name to filter on.
4682
4524
  */
4683
- voicemail_option?: Agent.VoicemailOption | null;
4525
+ key?: string;
4526
+ }
4684
4527
 
4528
+ export interface DataStorageSetting {
4685
4529
  /**
4686
- * If set, will control the volume of the agent. Value ranging from [0,2]. Lower
4687
- * value means quieter agent speech, while higher value means louder agent speech.
4688
- * If unset, default value 1 will apply.
4530
+ * in: value is one of the listed values
4689
4531
  */
4690
- volume?: number;
4532
+ op: 'in';
4691
4533
 
4692
- /**
4693
- * Which webhook events this agent should receive. If not set, defaults to
4694
- * call_started, call_ended, call_analyzed.
4695
- */
4696
- webhook_events?: Array<
4697
- | 'call_started'
4698
- | 'call_ended'
4699
- | 'call_analyzed'
4700
- | 'transcript_updated'
4701
- | 'transfer_started'
4702
- | 'transfer_bridged'
4703
- | 'transfer_cancelled'
4704
- | 'transfer_ended'
4705
- > | null;
4534
+ type: 'enum';
4706
4535
 
4707
- /**
4708
- * The timeout for the webhook in milliseconds. If not set, default value of 10000
4709
- * will apply.
4710
- */
4711
- webhook_timeout_ms?: number;
4536
+ value: Array<'everything' | 'everything_except_pii' | 'basic_attributes_only'>;
4537
+ }
4712
4538
 
4539
+ export interface Direction {
4713
4540
  /**
4714
- * The webhook for agent to listen to call events. See what events it would get at
4715
- * [webhook doc](/features/webhook). If set, will binds webhook events for this
4716
- * agent to the specified url, and will ignore the account level webhook for this
4717
- * agent. Set to `null` to remove webhook url from this agent.
4541
+ * in: value is one of the listed values
4718
4542
  */
4719
- webhook_url?: string | null;
4543
+ op: 'in';
4544
+
4545
+ type: 'enum';
4546
+
4547
+ value: Array<'inbound' | 'outbound'>;
4720
4548
  }
4721
4549
 
4722
- export namespace Agent {
4550
+ export interface DisconnectionReason {
4723
4551
  /**
4724
- * If this option is set, the agent prompt will include call screen handling
4725
- * instructions for identity and call purpose questions. Set this to null to
4726
- * disable call screen prompt instructions.
4552
+ * in: value is one of the listed values
4727
4553
  */
4728
- export interface CallScreeningOption {
4729
- /**
4730
- * Identity the agent should provide when a call screen asks who is calling.
4731
- * Dynamic variables are supported.
4732
- */
4733
- agent_identity: string;
4554
+ op: 'in';
4734
4555
 
4735
- /**
4736
- * Purpose the agent should provide when a call screen asks why it is calling.
4737
- * Dynamic variables are supported.
4738
- */
4739
- call_purpose: string;
4740
- }
4556
+ type: 'enum';
4557
+
4558
+ value: Array<
4559
+ | 'user_hangup'
4560
+ | 'agent_hangup'
4561
+ | 'call_transfer'
4562
+ | 'voicemail_reached'
4563
+ | 'ivr_reached'
4564
+ | 'inactivity'
4565
+ | 'max_duration_reached'
4566
+ | 'concurrency_limit_reached'
4567
+ | 'no_concurrency_fallback'
4568
+ | 'no_valid_payment'
4569
+ | 'scam_detected'
4570
+ | 'dial_busy'
4571
+ | 'dial_failed'
4572
+ | 'dial_no_answer'
4573
+ | 'invalid_destination'
4574
+ | 'telephony_provider_permission_denied'
4575
+ | 'telephony_provider_unavailable'
4576
+ | 'sip_routing_error'
4577
+ | 'marked_as_spam'
4578
+ | 'user_declined'
4579
+ | 'error_llm_websocket_open'
4580
+ | 'error_llm_websocket_lost_connection'
4581
+ | 'error_llm_websocket_runtime'
4582
+ | 'error_llm_websocket_corrupt_payload'
4583
+ | 'error_no_audio_received'
4584
+ | 'error_asr'
4585
+ | 'error_retell'
4586
+ | 'error_unknown'
4587
+ | 'error_user_not_joined'
4588
+ | 'registered_call_timeout'
4589
+ | 'transfer_bridged'
4590
+ | 'transfer_cancelled'
4591
+ | 'manual_stopped'
4592
+ | 'call_take_over'
4593
+ >;
4594
+ }
4741
4595
 
4596
+ export interface NumberFilter {
4742
4597
  /**
4743
- * Custom STT configuration. Only used when stt_mode is set to custom.
4598
+ * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
4599
+ * than, le: less than or equal
4744
4600
  */
4745
- export interface CustomSttConfig {
4746
- /**
4747
- * Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram,
4748
- * 500 for Soniox, 100 for AssemblyAI.
4749
- */
4750
- endpointing_ms: number;
4601
+ op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
4751
4602
 
4752
- /**
4753
- * ASR provider name.
4754
- */
4755
- provider: 'azure' | 'deepgram' | 'soniox' | 'assemblyai';
4756
- }
4603
+ type: 'number';
4604
+
4605
+ value: number;
4606
+ }
4757
4607
 
4608
+ export interface RangeFilter {
4758
4609
  /**
4759
- * Configuration for guardrail checks to detect and prevent prohibited topics in
4760
- * agent output and user input.
4610
+ * bt: between
4761
4611
  */
4762
- export interface GuardrailConfig {
4763
- /**
4764
- * Selected prohibited user topic categories to check. When user messages contain
4765
- * these topics, the agent will respond with a placeholder message instead of
4766
- * processing the request.
4767
- */
4768
- input_topics?: Array<'platform_integrity_jailbreaking'> | null;
4612
+ op: 'bt';
4769
4613
 
4770
- /**
4771
- * Selected prohibited agent topic categories to check. When agent messages contain
4772
- * these topics, they will be replaced with a placeholder message.
4773
- */
4774
- output_topics?: Array<
4775
- | 'harassment'
4776
- | 'self_harm'
4777
- | 'sexual_exploitation'
4778
- | 'violence'
4779
- | 'defense_and_national_security'
4780
- | 'illicit_and_harmful_activity'
4781
- | 'gambling'
4782
- | 'regulated_professional_advice'
4783
- | 'child_safety_and_exploitation'
4784
- > | null;
4785
- }
4614
+ type: 'range';
4786
4615
 
4787
4616
  /**
4788
- * Toggle behavior presets on/off to influence agent response style and behaviors.
4617
+ * [lower_bound, upper_bound]
4789
4618
  */
4790
- export interface HandbookConfig {
4791
- /**
4792
- * When asked, acknowledge being a virtual assistant.
4793
- */
4794
- ai_disclosure?: boolean;
4619
+ value: Array<number>;
4620
+ }
4795
4621
 
4796
- /**
4797
- * Enables Conversational Personality. When true, the agent uses the Conversational
4798
- * Personality handbook preset, skips Professional Rep Personality during prompt
4799
- * assembly, and enables internal colloquial rewrite behavior.
4800
- */
4801
- conversational_personality?: boolean;
4622
+ export interface DynamicVariable {
4623
+ /**
4624
+ * The dynamic variable name to filter on.
4625
+ */
4626
+ key: string;
4802
4627
 
4803
- /**
4804
- * Professional call center rep baseline.
4805
- */
4806
- default_personality?: boolean;
4628
+ /**
4629
+ * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
4630
+ */
4631
+ op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
4807
4632
 
4808
- /**
4809
- * Repeat back and confirm important details (voice only).
4810
- */
4811
- echo_verification?: boolean;
4633
+ type: 'string';
4812
4634
 
4813
- /**
4814
- * Warm acknowledgment of caller concerns.
4815
- */
4816
- high_empathy?: boolean;
4635
+ value: string;
4636
+ }
4817
4637
 
4818
- /**
4819
- * Spell using NATO phonetic alphabet style (voice only).
4820
- */
4821
- nato_phonetic_alphabet?: boolean;
4638
+ export interface NumberFilter {
4639
+ /**
4640
+ * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
4641
+ * than, le: less than or equal
4642
+ */
4643
+ op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
4822
4644
 
4823
- /**
4824
- * Sprinkle natural speech fillers like "um", "you know" for a more human,
4825
- * conversational tone.
4826
- */
4827
- natural_filler_words?: boolean;
4645
+ type: 'number';
4828
4646
 
4829
- /**
4830
- * Stay within prompt/context scope, don't invent details.
4831
- */
4832
- scope_boundaries?: boolean;
4647
+ value: number;
4648
+ }
4833
4649
 
4834
- /**
4835
- * Treat near-match similar words as same entity to reduce impact of transcription
4836
- * error (voice only).
4837
- */
4838
- smart_matching?: boolean;
4650
+ export interface RangeFilter {
4651
+ /**
4652
+ * bt: between
4653
+ */
4654
+ op: 'bt';
4839
4655
 
4840
- /**
4841
- * Convert numbers/dates/currency to spoken forms (voice only).
4842
- */
4843
- speech_normalization?: boolean;
4844
- }
4656
+ type: 'range';
4845
4657
 
4846
4658
  /**
4847
- * If this option is set, the call will try to detect IVR in the first 3 minutes of
4848
- * the call. Actions defined will be applied when the IVR is detected. Set this to
4849
- * null to disable IVR detection.
4659
+ * [lower_bound, upper_bound]
4850
4660
  */
4851
- export interface IvrOption {
4852
- action: IvrOption.Action;
4661
+ value: Array<number>;
4662
+ }
4853
4663
 
4854
- /**
4855
- * Optionally describe what should be treated as an IVR. Leave as null to use the
4856
- * default definition.
4857
- */
4858
- detection_prompt?: string | null;
4859
- }
4664
+ export interface NumberFilter {
4665
+ /**
4666
+ * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
4667
+ * than, le: less than or equal
4668
+ */
4669
+ op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
4860
4670
 
4861
- export namespace IvrOption {
4862
- export interface Action {
4863
- type: 'hangup';
4864
- }
4865
- }
4671
+ type: 'number';
4866
4672
 
4673
+ value: number;
4674
+ }
4675
+
4676
+ export interface RangeFilter {
4867
4677
  /**
4868
- * Configuration for PII scrubbing from transcripts and recordings.
4678
+ * bt: between
4869
4679
  */
4870
- export interface PiiConfig {
4871
- /**
4872
- * List of PII categories to scrub from transcripts and recordings. PII redaction
4873
- * is only active when this list is non-empty; an empty array means no PII
4874
- * scrubbing is performed.
4875
- */
4876
- categories: Array<
4877
- | 'person_name'
4878
- | 'address'
4879
- | 'email'
4880
- | 'phone_number'
4881
- | 'ssn'
4882
- | 'passport'
4883
- | 'driver_license'
4884
- | 'credit_card'
4885
- | 'bank_account'
4886
- | 'password'
4887
- | 'pin'
4888
- | 'medical_id'
4889
- | 'date_of_birth'
4890
- | 'customer_account_number'
4891
- >;
4680
+ op: 'bt';
4892
4681
 
4893
- /**
4894
- * The processing mode for PII scrubbing. Currently only post-call is supported.
4895
- */
4896
- mode: 'post_call';
4897
- }
4682
+ type: 'range';
4898
4683
 
4899
- export interface StringAnalysisData {
4900
- /**
4901
- * Description of the variable.
4902
- */
4903
- description: string;
4684
+ /**
4685
+ * [lower_bound, upper_bound]
4686
+ */
4687
+ value: Array<number>;
4688
+ }
4904
4689
 
4905
- /**
4906
- * Name of the variable.
4907
- */
4908
- name: string;
4690
+ /**
4691
+ * Filter by from number.
4692
+ */
4693
+ export interface FromNumber {
4694
+ /**
4695
+ * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
4696
+ */
4697
+ op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
4909
4698
 
4910
- /**
4911
- * Type of the variable to extract.
4912
- */
4913
- type: 'string';
4699
+ type: 'string';
4914
4700
 
4915
- /**
4916
- * Optional instruction to help decide whether this field needs to be populated in
4917
- * the analysis. If not set, the field is always included. If required is true,
4918
- * this is ignored.
4919
- */
4920
- conditional_prompt?: string;
4701
+ value: string;
4702
+ }
4921
4703
 
4922
- /**
4923
- * Examples of the variable value to teach model the style and syntax.
4924
- */
4925
- examples?: Array<string>;
4704
+ /**
4705
+ * Filter by whether the call is in voicemail.
4706
+ */
4707
+ export interface InVoicemail {
4708
+ op: 'eq';
4926
4709
 
4927
- /**
4928
- * Whether this data is required. If true and the data is not extracted, the call
4929
- * will be marked as unsuccessful.
4930
- */
4931
- required?: boolean;
4932
- }
4710
+ type: 'boolean';
4933
4711
 
4934
- export interface EnumAnalysisData {
4935
- /**
4936
- * The possible values of the variable, must be non empty array.
4937
- */
4938
- choices: Array<string>;
4712
+ value: boolean;
4713
+ }
4939
4714
 
4940
- /**
4941
- * Description of the variable.
4942
- */
4943
- description: string;
4715
+ export interface StringFilter {
4716
+ /**
4717
+ * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
4718
+ */
4719
+ op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
4944
4720
 
4945
- /**
4946
- * Name of the variable.
4947
- */
4948
- name: string;
4721
+ type: 'string';
4949
4722
 
4950
- /**
4951
- * Type of the variable to extract.
4952
- */
4953
- type: 'enum';
4723
+ value: string;
4954
4724
 
4955
- /**
4956
- * Optional instruction to help decide whether this field needs to be populated in
4957
- * the analysis. If not set, the field is always included. If required is true,
4958
- * this is ignored.
4959
- */
4960
- conditional_prompt?: string;
4725
+ /**
4726
+ * The field name to filter on.
4727
+ */
4728
+ key?: string;
4729
+ }
4961
4730
 
4962
- /**
4963
- * Whether this data is required. If true and the data is not extracted, the call
4964
- * will be marked as unsuccessful.
4965
- */
4966
- required?: boolean;
4967
- }
4731
+ export interface NumberFilter {
4732
+ /**
4733
+ * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
4734
+ * than, le: less than or equal
4735
+ */
4736
+ op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
4968
4737
 
4969
- export interface BooleanAnalysisData {
4970
- /**
4971
- * Description of the variable.
4972
- */
4973
- description: string;
4738
+ type: 'number';
4974
4739
 
4975
- /**
4976
- * Name of the variable.
4977
- */
4978
- name: string;
4740
+ value: number;
4979
4741
 
4980
- /**
4981
- * Type of the variable to extract.
4982
- */
4983
- type: 'boolean';
4742
+ /**
4743
+ * The field name to filter on.
4744
+ */
4745
+ key?: string;
4746
+ }
4984
4747
 
4985
- /**
4986
- * Optional instruction to help decide whether this field needs to be populated in
4987
- * the analysis. If not set, the field is always included. If required is true,
4988
- * this is ignored.
4989
- */
4990
- conditional_prompt?: string;
4748
+ export interface BooleanFilter {
4749
+ op: 'eq';
4991
4750
 
4992
- /**
4993
- * Whether this data is required. If true and the data is not extracted, the call
4994
- * will be marked as unsuccessful.
4995
- */
4996
- required?: boolean;
4997
- }
4751
+ type: 'boolean';
4998
4752
 
4999
- export interface NumberAnalysisData {
5000
- /**
5001
- * Description of the variable.
5002
- */
5003
- description: string;
4753
+ value: boolean;
5004
4754
 
5005
- /**
5006
- * Name of the variable.
5007
- */
5008
- name: string;
4755
+ /**
4756
+ * The field name to filter on.
4757
+ */
4758
+ key?: string;
4759
+ }
5009
4760
 
5010
- /**
5011
- * Type of the variable to extract.
5012
- */
5013
- type: 'number';
4761
+ export interface RangeFilter {
4762
+ /**
4763
+ * bt: between
4764
+ */
4765
+ op: 'bt';
5014
4766
 
5015
- /**
5016
- * Optional instruction to help decide whether this field needs to be populated in
5017
- * the analysis. If not set, the field is always included. If required is true,
5018
- * this is ignored.
5019
- */
5020
- conditional_prompt?: string;
4767
+ type: 'range';
5021
4768
 
5022
- /**
5023
- * Whether this data is required. If true and the data is not extracted, the call
5024
- * will be marked as unsuccessful.
5025
- */
5026
- required?: boolean;
5027
- }
4769
+ /**
4770
+ * [lower_bound, upper_bound]
4771
+ */
4772
+ value: Array<number>;
5028
4773
 
5029
4774
  /**
5030
- * System preset for post-call analysis (voice agents). Use in
5031
- * post_call_analysis_data to override prompts or mark fields optional.
4775
+ * The field name to filter on.
5032
4776
  */
5033
- export interface CallPresetAnalysisData {
5034
- /**
5035
- * Preset identifier for voice agent analysis.
5036
- */
5037
- name: 'call_summary' | 'call_successful' | 'user_sentiment';
4777
+ key?: string;
4778
+ }
5038
4779
 
5039
- /**
5040
- * Identifies this item as a system preset.
5041
- */
5042
- type: 'system-presets';
4780
+ export interface EnumFilter {
4781
+ /**
4782
+ * in: value is one of the listed values
4783
+ */
4784
+ op: 'in';
5043
4785
 
5044
- /**
5045
- * Optional instruction to help decide whether this field needs to be populated. If
5046
- * not set, the field is always included.
5047
- */
5048
- conditional_prompt?: string;
4786
+ type: 'enum';
5049
4787
 
5050
- /**
5051
- * Prompt or description for this preset.
5052
- */
5053
- description?: string;
4788
+ value: Array<string>;
5054
4789
 
5055
- /**
5056
- * If false, this field is optional in the analysis. If true or unset, the field is
5057
- * required.
5058
- */
5059
- required?: boolean;
5060
- }
4790
+ /**
4791
+ * The field name to filter on.
4792
+ */
4793
+ key?: string;
4794
+ }
5061
4795
 
5062
- export interface PronunciationDictionary {
5063
- /**
5064
- * The phonetic alphabet to be used for pronunciation.
5065
- */
5066
- alphabet: 'ipa' | 'cmu';
4796
+ export interface PresentFilter {
4797
+ /**
4798
+ * pr: present (has value), np: not present
4799
+ */
4800
+ op: 'pr' | 'np';
5067
4801
 
5068
- /**
5069
- * Pronunciation of the word in the format of a IPA / CMU pronunciation.
5070
- */
5071
- phoneme: string;
4802
+ type: 'present';
5072
4803
 
5073
- /**
5074
- * The string of word / phrase to be annotated with pronunciation.
5075
- */
5076
- word: string;
5077
- }
4804
+ /**
4805
+ * The field name to filter on.
4806
+ */
4807
+ key?: string;
4808
+ }
5078
4809
 
5079
- export interface ResponseEngineRetellLm {
5080
- /**
5081
- * id of the Retell LLM Response Engine.
5082
- */
5083
- llm_id: string;
4810
+ export interface NumberFilter {
4811
+ /**
4812
+ * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
4813
+ * than, le: less than or equal
4814
+ */
4815
+ op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
5084
4816
 
5085
- /**
5086
- * type of the Response Engine.
5087
- */
5088
- type: 'retell-llm';
4817
+ type: 'number';
5089
4818
 
5090
- /**
5091
- * Version of the Retell LLM Response Engine.
5092
- */
5093
- version?: number | null;
5094
- }
4819
+ value: number;
4820
+ }
5095
4821
 
5096
- export interface ResponseEngineCustomLm {
5097
- /**
5098
- * LLM websocket url of the custom LLM.
5099
- */
5100
- llm_websocket_url: string;
4822
+ export interface RangeFilter {
4823
+ /**
4824
+ * bt: between
4825
+ */
4826
+ op: 'bt';
5101
4827
 
5102
- /**
5103
- * type of the Response Engine.
5104
- */
5105
- type: 'custom-llm';
5106
- }
5107
-
5108
- export interface ResponseEngineConversationFlow {
5109
- /**
5110
- * ID of the Conversation Flow Response Engine.
5111
- */
5112
- conversation_flow_id: string;
5113
-
5114
- /**
5115
- * type of the Response Engine.
5116
- */
5117
- type: 'conversation-flow';
5118
-
5119
- /**
5120
- * Version of the Conversation Flow Response Engine.
5121
- */
5122
- version?: number | null;
5123
- }
5124
-
5125
- export interface UserDtmfOptions {
5126
- /**
5127
- * The maximum number of digits allowed in the user's DTMF (Dual-Tone
5128
- * Multi-Frequency) input per turn. Once this limit is reached, the input is
5129
- * considered complete and a response will be generated immediately.
5130
- */
5131
- digit_limit?: number | null;
5132
-
5133
- /**
5134
- * A single key that signals the end of DTMF input. Acceptable values include any
5135
- * digit (0-9), the pound/hash symbol (#), or the asterisk (\*).
5136
- */
5137
- termination_key?: string | null;
5138
-
5139
- /**
5140
- * The time (in milliseconds) to wait for user DTMF input before timing out. The
5141
- * timer resets with each digit received.
5142
- */
5143
- timeout_ms?: number;
5144
- }
4828
+ type: 'range';
5145
4829
 
5146
4830
  /**
5147
- * If this option is set, the call will try to detect voicemail in the first 3
5148
- * minutes of the call. Actions defined (hangup, or leave a message) will be
5149
- * applied when the voicemail is detected. Set this to null to disable voicemail
5150
- * detection.
4831
+ * [lower_bound, upper_bound]
5151
4832
  */
5152
- export interface VoicemailOption {
5153
- action:
5154
- | VoicemailOption.VoicemailActionPrompt
5155
- | VoicemailOption.VoicemailActionStaticText
5156
- | VoicemailOption.VoicemailActionHangup
5157
- | VoicemailOption.VoicemailActionBridgeTransfer;
5158
-
5159
- /**
5160
- * Optionally describe what should be treated as voicemail. Leave as null to use
5161
- * the default definition.
5162
- */
5163
- detection_prompt?: string | null;
5164
- }
5165
-
5166
- export namespace VoicemailOption {
5167
- export interface VoicemailActionPrompt {
5168
- /**
5169
- * The prompt used to generate the text to be spoken when the call is detected to
5170
- * be in voicemail.
5171
- */
5172
- text: string;
5173
-
5174
- type: 'prompt';
5175
- }
5176
-
5177
- export interface VoicemailActionStaticText {
5178
- /**
5179
- * The text to be spoken when the call is detected to be in voicemail.
5180
- */
5181
- text: string;
5182
-
5183
- type: 'static_text';
5184
- }
5185
-
5186
- export interface VoicemailActionHangup {
5187
- type: 'hangup';
5188
- }
5189
-
5190
- export interface VoicemailActionBridgeTransfer {
5191
- type: 'bridge_transfer';
5192
- }
5193
- }
4833
+ value: Array<number>;
5194
4834
  }
5195
4835
 
5196
4836
  /**
5197
- * Override conversation flow configuration settings. Only applicable when using
5198
- * conversation flow as the response engine. Supported attributes - model_choice,
5199
- * model_temperature, tool_call_strict_mode, knowledge_base_ids, kb_config,
5200
- * start_speaker, begin_after_user_silence_ms.
4837
+ * Filter by to number.
5201
4838
  */
5202
- export interface ConversationFlow {
4839
+ export interface ToNumber {
5203
4840
  /**
5204
- * If set, the AI will begin the conversation after waiting for the user for the
5205
- * duration (in milliseconds) specified by this attribute. This only applies if the
5206
- * agent is configured to wait for the user to speak first. If not set, the agent
5207
- * will wait indefinitely for the user to speak.
4841
+ * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
5208
4842
  */
5209
- begin_after_user_silence_ms?: number | null;
4843
+ op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
5210
4844
 
5211
- /**
5212
- * Knowledge base configuration for RAG retrieval.
5213
- */
5214
- kb_config?: ConversationFlow.KBConfig;
4845
+ type: 'string';
5215
4846
 
5216
- /**
5217
- * Knowledge base IDs for RAG (Retrieval-Augmented Generation).
5218
- */
5219
- knowledge_base_ids?: Array<string> | null;
4847
+ value: string;
4848
+ }
5220
4849
 
4850
+ export interface ToolCall {
5221
4851
  /**
5222
- * The model choice for the conversation flow.
4852
+ * Filter by tool call latency in milliseconds.
5223
4853
  */
5224
- model_choice?: ConversationFlow.ModelChoice;
4854
+ latency_ms?: ToolCall.NumberFilter | ToolCall.RangeFilter;
5225
4855
 
5226
4856
  /**
5227
- * Controls the randomness of the model's responses. Lower values make responses
5228
- * more deterministic.
4857
+ * The tool call name to filter on.
5229
4858
  */
5230
- model_temperature?: number | null;
4859
+ name?: string;
5231
4860
 
5232
4861
  /**
5233
- * Who starts the conversation - user or agent.
4862
+ * Filter by tool call success status.
5234
4863
  */
5235
- start_speaker?: 'user' | 'agent';
4864
+ success?: ToolCall.Success;
5236
4865
 
5237
4866
  /**
5238
- * Whether to use strict mode for tool calls. Only applicable when using certain
5239
- * supported models.
4867
+ * The tool call type to filter on.
5240
4868
  */
5241
- tool_call_strict_mode?: boolean | null;
4869
+ type?: string;
5242
4870
  }
5243
4871
 
5244
- export namespace ConversationFlow {
5245
- /**
5246
- * Knowledge base configuration for RAG retrieval.
5247
- */
5248
- export interface KBConfig {
4872
+ export namespace ToolCall {
4873
+ export interface NumberFilter {
5249
4874
  /**
5250
- * Similarity threshold for filtering search results
4875
+ * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
4876
+ * than, le: less than or equal
5251
4877
  */
5252
- filter_score?: number;
4878
+ op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
5253
4879
 
5254
- /**
5255
- * Max number of knowledge base chunks to retrieve
5256
- */
5257
- top_k?: number;
4880
+ type: 'number';
4881
+
4882
+ value: number;
5258
4883
  }
5259
4884
 
5260
- /**
5261
- * The model choice for the conversation flow.
5262
- */
5263
- export interface ModelChoice {
4885
+ export interface RangeFilter {
5264
4886
  /**
5265
- * The LLM model to use
4887
+ * bt: between
5266
4888
  */
5267
- model:
5268
- | 'gpt-4.1'
5269
- | 'gpt-4.1-mini'
5270
- | 'gpt-4.1-nano'
5271
- | 'gpt-5'
5272
- | 'gpt-5-mini'
5273
- | 'gpt-5-nano'
5274
- | 'gpt-5.1'
5275
- | 'gpt-5.2'
5276
- | 'gpt-5.4'
5277
- | 'gpt-5.4-mini'
5278
- | 'gpt-5.4-nano'
5279
- | 'gpt-5.5'
5280
- | 'gpt-5.6-terra'
5281
- | 'gpt-5.6-luna'
5282
- | 'claude-4.5-sonnet'
5283
- | 'claude-4.6-sonnet'
5284
- | 'claude-5-sonnet'
5285
- | 'claude-4.5-haiku'
5286
- | 'gemini-3.0-flash'
5287
- | 'gemini-3.1-flash-lite'
5288
- | 'gemini-3.5-flash';
4889
+ op: 'bt';
5289
4890
 
5290
- /**
5291
- * Type of model choice
5292
- */
5293
- type: 'cascading';
4891
+ type: 'range';
5294
4892
 
5295
4893
  /**
5296
- * Whether to use high priority pool with more dedicated resource, default false
4894
+ * [lower_bound, upper_bound]
5297
4895
  */
5298
- high_priority?: boolean;
4896
+ value: Array<number>;
5299
4897
  }
5300
- }
5301
4898
 
5302
- /**
5303
- * Override Retell LLM configuration settings. Only applicable when using Retell
5304
- * LLM as the response engine. Supported attributes - model, s2s_model,
5305
- * model_temperature, model_high_priority, tool_call_strict_mode,
5306
- * knowledge_base_ids, kb_config, start_speaker, begin_after_user_silence_ms,
5307
- * begin_message.
5308
- */
5309
- export interface RetellLlm {
5310
4899
  /**
5311
- * If set, the AI will begin the conversation after waiting for the user for the
5312
- * duration (in milliseconds) specified by this attribute. This only applies if the
5313
- * agent is configured to wait for the user to speak first. If not set, the agent
5314
- * will wait indefinitely for the user to speak.
4900
+ * Filter by tool call success status.
5315
4901
  */
5316
- begin_after_user_silence_ms?: number | null;
4902
+ export interface Success {
4903
+ op: 'eq';
5317
4904
 
5318
- /**
5319
- * First utterance said by the agent in the call. If not set, LLM will dynamically
5320
- * generate a message. If set to "", agent will wait for user to speak first.
5321
- */
5322
- begin_message?: string | null;
4905
+ type: 'boolean';
5323
4906
 
5324
- /**
5325
- * Knowledge base configuration for RAG retrieval.
5326
- */
5327
- kb_config?: RetellLlm.KBConfig | null;
4907
+ value: boolean;
4908
+ }
4909
+ }
5328
4910
 
4911
+ export interface UserSentiment {
5329
4912
  /**
5330
- * A list of knowledge base ids to use for this resource.
4913
+ * in: value is one of the listed values
5331
4914
  */
5332
- knowledge_base_ids?: Array<string> | null;
4915
+ op: 'in';
5333
4916
 
5334
- /**
5335
- * Select the underlying text LLM. If not set, would default to gpt-4.1.
5336
- */
5337
- model?:
5338
- | 'gpt-4.1'
5339
- | 'gpt-4.1-mini'
5340
- | 'gpt-4.1-nano'
5341
- | 'gpt-5'
5342
- | 'gpt-5-mini'
5343
- | 'gpt-5-nano'
5344
- | 'gpt-5.1'
5345
- | 'gpt-5.2'
5346
- | 'gpt-5.4'
5347
- | 'gpt-5.4-mini'
5348
- | 'gpt-5.4-nano'
5349
- | 'gpt-5.5'
5350
- | 'gpt-5.6-terra'
5351
- | 'gpt-5.6-luna'
5352
- | 'claude-4.5-sonnet'
5353
- | 'claude-4.6-sonnet'
5354
- | 'claude-5-sonnet'
5355
- | 'claude-4.5-haiku'
5356
- | 'gemini-3.0-flash'
5357
- | 'gemini-3.1-flash-lite'
5358
- | 'gemini-3.5-flash'
5359
- | null;
4917
+ type: 'enum';
5360
4918
 
5361
- /**
5362
- * If set to true, will use high priority pool with more dedicated resource to
5363
- * ensure lower and more consistent latency, default to false. This feature usually
5364
- * comes with a higher cost.
5365
- */
5366
- model_high_priority?: boolean | null;
4919
+ value: Array<'Negative' | 'Positive' | 'Neutral' | 'Unknown'>;
4920
+ }
4921
+ }
4922
+ }
5367
4923
 
5368
- /**
5369
- * If set, will control the randomness of the response. Value ranging from [0,1].
5370
- * Lower value means more deterministic, while higher value means more random. If
5371
- * unset, default value 0 will apply. Note that for tool calling, a lower value is
5372
- * recommended.
5373
- */
5374
- model_temperature?: number;
5375
-
5376
- /**
5377
- * Select the underlying speech to speech model. Can only set this or model, not
5378
- * both.
5379
- */
5380
- s2s_model?:
5381
- | 'gpt-realtime-2.1'
5382
- | 'gpt-realtime-2.1-mini'
5383
- | 'gpt-realtime-2'
5384
- | 'gpt-realtime-1.5'
5385
- | 'gpt-realtime'
5386
- | 'gpt-realtime-mini'
5387
- | null;
5388
-
5389
- /**
5390
- * The speaker who starts the conversation. Required. Must be either 'user' or
5391
- * 'agent'.
5392
- */
5393
- start_speaker?: 'user' | 'agent';
5394
-
5395
- /**
5396
- * Whether to use strict mode for tool calls. Only applicable when using certain
5397
- * supported models.
5398
- */
5399
- tool_call_strict_mode?: boolean | null;
5400
- }
5401
-
5402
- export namespace RetellLlm {
5403
- /**
5404
- * Knowledge base configuration for RAG retrieval.
5405
- */
5406
- export interface KBConfig {
5407
- /**
5408
- * Similarity threshold for filtering search results
5409
- */
5410
- filter_score?: number;
5411
-
5412
- /**
5413
- * Max number of knowledge base chunks to retrieve
5414
- */
5415
- top_k?: number;
5416
- }
5417
- }
5418
- }
5419
- }
4924
+ export interface CallCreatePhoneCallParams {
4925
+ /**
4926
+ * The number you own in E.164 format. Must be a number purchased from Retell or
4927
+ * imported to Retell.
4928
+ */
4929
+ from_number: string;
5420
4930
 
5421
- export interface CallRegisterPhoneCallParams {
5422
4931
  /**
5423
- * The agent to use for the call.
4932
+ * The number you want to call, in E.164 format. If using a number purchased from
4933
+ * Retell, only US numbers are supported as destination.
5424
4934
  */
5425
- agent_id: string;
4935
+ to_number: string;
5426
4936
 
5427
4937
  /**
5428
4938
  * For this particular call, override agent configuration with these settings. This
5429
4939
  * allows you to customize agent behavior for individual calls without modifying
5430
4940
  * the base agent.
5431
4941
  */
5432
- agent_override?: CallRegisterPhoneCallParams.AgentOverride;
5433
-
5434
- /**
5435
- * The version of the agent to use for the call.
5436
- */
5437
- agent_version?: string | number;
4942
+ agent_override?: CallCreatePhoneCallParams.AgentOverride;
5438
4943
 
5439
4944
  /**
5440
- * Direction of the phone call. Stored for tracking purpose.
4945
+ * Add optional custom SIP headers to the call.
5441
4946
  */
5442
- direction?: 'inbound' | 'outbound';
4947
+ custom_sip_headers?: { [key: string]: string };
5443
4948
 
5444
4949
  /**
5445
- * The number you own in E.164 format. Stored for tracking purpose.
4950
+ * If true, the e.164 validation will be ignored for the from_number. This can be
4951
+ * useful when you want to dial to internal pseudo numbers. This only applies when
4952
+ * you are using custom telephony and does not apply when you are using Retell
4953
+ * Telephony. If omitted, the default value is false.
5446
4954
  */
5447
- from_number?: string;
4955
+ ignore_e164_validation?: boolean;
5448
4956
 
5449
4957
  /**
5450
4958
  * An arbitrary object for storage purpose only. You can put anything here like
@@ -5453,20 +4961,28 @@ export interface CallRegisterPhoneCallParams {
5453
4961
  */
5454
4962
  metadata?: unknown;
5455
4963
 
4964
+ /**
4965
+ * For this particular call, override the agent used with this agent id. This does
4966
+ * not bind the agent to this number, this is for one time override.
4967
+ */
4968
+ override_agent_id?: string;
4969
+
4970
+ /**
4971
+ * For this particular call, override the agent version used with this version.
4972
+ * This does not bind the agent version to this number, this is for one time
4973
+ * override.
4974
+ */
4975
+ override_agent_version?: string | number;
4976
+
5456
4977
  /**
5457
4978
  * Add optional dynamic variables in key value pairs of string that injects into
5458
4979
  * your Response Engine prompt and tool description. Only applicable for Response
5459
4980
  * Engine.
5460
4981
  */
5461
4982
  retell_llm_dynamic_variables?: { [key: string]: string };
5462
-
5463
- /**
5464
- * The number you want to call, in E.164 format. Stored for tracking purpose.
5465
- */
5466
- to_number?: string;
5467
4983
  }
5468
4984
 
5469
- export namespace CallRegisterPhoneCallParams {
4985
+ export namespace CallCreatePhoneCallParams {
5470
4986
  /**
5471
4987
  * For this particular call, override agent configuration with these settings. This
5472
4988
  * allows you to customize agent behavior for individual calls without modifying
@@ -8184,915 +7700,1399 @@ export namespace CallCreateWebCallParams {
8184
7700
  }
8185
7701
  }
8186
7702
 
8187
- export interface CallListParams {
7703
+ export interface CallRegisterPhoneCallParams {
8188
7704
  /**
8189
- * Filter criteria for calls. All conditions are implicitly connected with AND.
7705
+ * The agent to use for the call.
8190
7706
  */
8191
- filter_criteria?: CallListParams.FilterCriteria;
7707
+ agent_id: string;
8192
7708
 
8193
7709
  /**
8194
- * Whether to include `total` (count of all calls matching `filter_criteria`,
8195
- * ignoring `limit`/`skip`/`pagination_key`) in the response. Defaults to false.
8196
- * Each enabled request triggers an additional aggregate query, so opt in only when
8197
- * the total is needed.
7710
+ * For this particular call, override agent configuration with these settings. This
7711
+ * allows you to customize agent behavior for individual calls without modifying
7712
+ * the base agent.
8198
7713
  */
8199
- include_total?: boolean;
7714
+ agent_override?: CallRegisterPhoneCallParams.AgentOverride;
8200
7715
 
8201
7716
  /**
8202
- * Maximum number of calls to return.
7717
+ * The version of the agent to use for the call.
8203
7718
  */
8204
- limit?: number;
7719
+ agent_version?: string | number;
8205
7720
 
8206
7721
  /**
8207
- * Opaque pagination cursor from a previous response.
7722
+ * Direction of the phone call. Stored for tracking purpose.
8208
7723
  */
8209
- pagination_key?: string;
7724
+ direction?: 'inbound' | 'outbound';
8210
7725
 
8211
7726
  /**
8212
- * Number of records to skip for pagination.
7727
+ * The number you own in E.164 format. Stored for tracking purpose.
8213
7728
  */
8214
- skip?: number;
7729
+ from_number?: string;
8215
7730
 
8216
7731
  /**
8217
- * Sort calls by `start_timestamp` in ascending or descending order.
7732
+ * An arbitrary object for storage purpose only. You can put anything here like
7733
+ * your internal customer id associated with the call. Not used for processing. You
7734
+ * can later get this field from the call object.
8218
7735
  */
8219
- sort_order?: 'ascending' | 'descending';
7736
+ metadata?: unknown;
7737
+
7738
+ /**
7739
+ * Add optional dynamic variables in key value pairs of string that injects into
7740
+ * your Response Engine prompt and tool description. Only applicable for Response
7741
+ * Engine.
7742
+ */
7743
+ retell_llm_dynamic_variables?: { [key: string]: string };
7744
+
7745
+ /**
7746
+ * The number you want to call, in E.164 format. Stored for tracking purpose.
7747
+ */
7748
+ to_number?: string;
8220
7749
  }
8221
7750
 
8222
- export namespace CallListParams {
7751
+ export namespace CallRegisterPhoneCallParams {
8223
7752
  /**
8224
- * Filter criteria for calls. All conditions are implicitly connected with AND.
7753
+ * For this particular call, override agent configuration with these settings. This
7754
+ * allows you to customize agent behavior for individual calls without modifying
7755
+ * the base agent.
8225
7756
  */
8226
- export interface FilterCriteria {
7757
+ export interface AgentOverride {
8227
7758
  /**
8228
- * Filter by agent(s). Agent filters are connected by OR.
7759
+ * Override agent configuration settings. Any properties specified here will
7760
+ * override the base agent configuration for this call.
8229
7761
  */
8230
- agent?: Array<FilterCriteria.Agent>;
7762
+ agent?: AgentOverride.Agent;
8231
7763
 
8232
7764
  /**
8233
- * Filter by agent environment tag(s) (e.g. "prod", "staging").
7765
+ * Override conversation flow configuration settings. Only applicable when using
7766
+ * conversation flow as the response engine. Supported attributes - model_choice,
7767
+ * model_temperature, tool_call_strict_mode, knowledge_base_ids, kb_config,
7768
+ * start_speaker, begin_after_user_silence_ms.
8234
7769
  */
8235
- agent_tag?: FilterCriteria.AgentTag;
7770
+ conversation_flow?: AgentOverride.ConversationFlow;
8236
7771
 
8237
7772
  /**
8238
- * Filter by batch call ID.
7773
+ * Override Retell LLM configuration settings. Only applicable when using Retell
7774
+ * LLM as the response engine. Supported attributes - model, s2s_model,
7775
+ * model_temperature, model_high_priority, tool_call_strict_mode,
7776
+ * knowledge_base_ids, kb_config, start_speaker, begin_after_user_silence_ms,
7777
+ * begin_message.
8239
7778
  */
8240
- batch_call_id?: FilterCriteria.BatchCallID;
7779
+ retell_llm?: AgentOverride.RetellLlm;
7780
+ }
8241
7781
 
7782
+ export namespace AgentOverride {
8242
7783
  /**
8243
- * Filter by call ID.
7784
+ * Override agent configuration settings. Any properties specified here will
7785
+ * override the base agent configuration for this call.
8244
7786
  */
8245
- call_id?: FilterCriteria.StringFilter | FilterCriteria.EnumFilter;
8246
-
8247
- call_status?: FilterCriteria.CallStatus;
7787
+ export interface Agent {
7788
+ /**
7789
+ * The name of the agent. Only used for your own reference.
7790
+ */
7791
+ agent_name?: string | null;
8248
7792
 
8249
- /**
8250
- * Filter by whether the call was successful.
8251
- */
8252
- call_successful?: FilterCriteria.CallSuccessful;
7793
+ /**
7794
+ * If set to true, DTMF input will interrupt the agent even when
7795
+ * interruption_sensitivity is 0. Can be overridden per conversation or subagent
7796
+ * node. Default to false.
7797
+ */
7798
+ allow_dtmf_interruption?: boolean;
8253
7799
 
8254
- call_type?: FilterCriteria.CallType;
7800
+ /**
7801
+ * If set to true, DTMF input will be accepted and processed. If false, any DTMF
7802
+ * input will be ignored. Default to true.
7803
+ */
7804
+ allow_user_dtmf?: boolean;
8255
7805
 
8256
- /**
8257
- * Filter by combined cost of the call.
8258
- */
8259
- combined_cost?: FilterCriteria.NumberFilter | FilterCriteria.RangeFilter;
7806
+ /**
7807
+ * If set, will add ambient environment sound to the call to make experience more
7808
+ * realistic. Currently supports the following options:
7809
+ *
7810
+ * - `coffee-shop`: Coffee shop ambience with people chatting in background.
7811
+ * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/coffee-shop.wav)
7812
+ * - `convention-hall`: Convention hall ambience, with some echo and people
7813
+ * chatting in background.
7814
+ * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/convention-hall.wav)
7815
+ * - `summer-outdoor`: Summer outdoor ambience with cicada chirping.
7816
+ * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/summer-outdoor.wav)
7817
+ * - `mountain-outdoor`: Mountain outdoor ambience with birds singing.
7818
+ * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/mountain-outdoor.wav)
7819
+ * - `static-noise`: Constant static noise.
7820
+ * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/static-noise.wav)
7821
+ * - `call-center`: Call center work noise.
7822
+ * [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/call-center.wav)
7823
+ * Set to `null` to remove ambient sound from this agent.
7824
+ */
7825
+ ambient_sound?:
7826
+ | 'coffee-shop'
7827
+ | 'convention-hall'
7828
+ | 'summer-outdoor'
7829
+ | 'mountain-outdoor'
7830
+ | 'static-noise'
7831
+ | 'call-center'
7832
+ | null;
8260
7833
 
8261
- /**
8262
- * Filter by custom analysis data fields.
8263
- */
8264
- custom_analysis_data?: Array<
8265
- | FilterCriteria.StringFilter
8266
- | FilterCriteria.NumberFilter
8267
- | FilterCriteria.BooleanFilter
8268
- | FilterCriteria.RangeFilter
8269
- | FilterCriteria.EnumFilter
8270
- | FilterCriteria.PresentFilter
8271
- >;
7834
+ /**
7835
+ * If set, will control the volume of the ambient sound. Value ranging from [0,2].
7836
+ * Lower value means quieter ambient sound, while higher value means louder ambient
7837
+ * sound. If unset, default value 1 will apply.
7838
+ */
7839
+ ambient_sound_volume?: number;
8272
7840
 
8273
- /**
8274
- * Filter by custom attributes fields.
8275
- */
8276
- custom_attributes?: Array<
8277
- | FilterCriteria.StringFilter
8278
- | FilterCriteria.NumberFilter
8279
- | FilterCriteria.BooleanFilter
8280
- | FilterCriteria.RangeFilter
8281
- | FilterCriteria.EnumFilter
8282
- | FilterCriteria.PresentFilter
8283
- >;
8284
-
8285
- data_storage_setting?: FilterCriteria.DataStorageSetting;
8286
-
8287
- direction?: FilterCriteria.Direction;
8288
-
8289
- disconnection_reason?: FilterCriteria.DisconnectionReason;
8290
-
8291
- /**
8292
- * Filter by call duration in milliseconds.
8293
- */
8294
- duration_ms?: FilterCriteria.NumberFilter | FilterCriteria.RangeFilter;
8295
-
8296
- /**
8297
- * Filter by dynamic variables.
8298
- */
8299
- dynamic_variables?: Array<FilterCriteria.DynamicVariable>;
8300
-
8301
- /**
8302
- * Filter by end-to-end latency p50.
8303
- */
8304
- e2e_latency_p50?: FilterCriteria.NumberFilter | FilterCriteria.RangeFilter;
8305
-
8306
- /**
8307
- * Filter by call end timestamp (epoch ms).
8308
- */
8309
- end_timestamp?: FilterCriteria.NumberFilter | FilterCriteria.RangeFilter;
8310
-
8311
- /**
8312
- * Filter by from number.
8313
- */
8314
- from_number?: FilterCriteria.FromNumber;
8315
-
8316
- /**
8317
- * Filter by whether the call is in voicemail.
8318
- */
8319
- in_voicemail?: FilterCriteria.InVoicemail;
8320
-
8321
- /**
8322
- * Filter by metadata fields.
8323
- */
8324
- metadata?: Array<
8325
- | FilterCriteria.StringFilter
8326
- | FilterCriteria.NumberFilter
8327
- | FilterCriteria.BooleanFilter
8328
- | FilterCriteria.RangeFilter
8329
- | FilterCriteria.EnumFilter
8330
- | FilterCriteria.PresentFilter
8331
- >;
8332
-
8333
- /**
8334
- * Filter by call start timestamp (epoch ms).
8335
- */
8336
- start_timestamp?: FilterCriteria.NumberFilter | FilterCriteria.RangeFilter;
8337
-
8338
- /**
8339
- * Filter by to number.
8340
- */
8341
- to_number?: FilterCriteria.ToNumber;
8342
-
8343
- /**
8344
- * Filter by tool call criteria. Tool call filters are connected by AND.
8345
- */
8346
- tool_calls?: Array<FilterCriteria.ToolCall>;
8347
-
8348
- user_sentiment?: FilterCriteria.UserSentiment;
8349
- }
8350
-
8351
- export namespace FilterCriteria {
8352
- export interface Agent {
8353
7841
  /**
8354
- * The agent ID to filter on.
7842
+ * Only applicable when enable_backchannel is true. Controls how often the agent
7843
+ * would backchannel when a backchannel is possible. Value ranging from [0,1].
7844
+ * Lower value means less frequent backchannel, while higher value means more
7845
+ * frequent backchannel. If unset, default value 0.8 will apply.
8355
7846
  */
8356
- agent_id: string;
7847
+ backchannel_frequency?: number;
8357
7848
 
8358
7849
  /**
8359
- * Specific versions to filter on. If not provided, all versions are included.
7850
+ * Only applicable when enable_backchannel is true. A list of words that the agent
7851
+ * would use as backchannel. If not set, default backchannel words will apply.
7852
+ * Check out
7853
+ * [backchannel default words](/agent/interaction-configuration#backchannel) for
7854
+ * more details. Note that certain voices do not work too well with certain words,
7855
+ * so it's recommended to experiment before adding any words.
8360
7856
  */
8361
- version?: Array<number>;
8362
- }
7857
+ backchannel_words?: Array<string> | null;
8363
7858
 
8364
- /**
8365
- * Filter by agent environment tag(s) (e.g. "prod", "staging").
8366
- */
8367
- export interface AgentTag {
8368
7859
  /**
8369
- * in: value is one of the listed values
7860
+ * If set, will delay the first message by the specified amount of milliseconds, so
7861
+ * that it gives user more time to prepare to take the call. Valid range is [0,
7862
+ * 5000]. If not set or set to 0, agent will speak immediately. Only applicable
7863
+ * when agent speaks first.
8370
7864
  */
8371
- op: 'in';
8372
-
8373
- type: 'enum';
8374
-
8375
- value: Array<string>;
8376
- }
7865
+ begin_message_delay_ms?: number;
8377
7866
 
8378
- /**
8379
- * Filter by batch call ID.
8380
- */
8381
- export interface BatchCallID {
8382
7867
  /**
8383
- * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
7868
+ * Provide a customized list of keywords to bias the transcriber model, so that
7869
+ * these words are more likely to get transcribed. Commonly used for names, brands,
7870
+ * street, etc. Entries may reference dynamic variables with `{{variable}}` syntax.
8384
7871
  */
8385
- op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
8386
-
8387
- type: 'string';
8388
-
8389
- value: string;
8390
- }
7872
+ boosted_keywords?: Array<string> | null;
8391
7873
 
8392
- export interface StringFilter {
8393
7874
  /**
8394
- * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
7875
+ * If this option is set, the agent prompt will include call screen handling
7876
+ * instructions for identity and call purpose questions. Set this to null to
7877
+ * disable call screen prompt instructions.
8395
7878
  */
8396
- op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
8397
-
8398
- type: 'string';
8399
-
8400
- value: string;
8401
- }
7879
+ call_screening_option?: Agent.CallScreeningOption | null;
8402
7880
 
8403
- export interface EnumFilter {
8404
7881
  /**
8405
- * in: value is one of the listed values
7882
+ * Custom STT configuration. Only used when stt_mode is set to custom.
8406
7883
  */
8407
- op: 'in';
8408
-
8409
- type: 'enum';
8410
-
8411
- value: Array<string>;
8412
- }
7884
+ custom_stt_config?: Agent.CustomSttConfig | null;
8413
7885
 
8414
- export interface CallStatus {
8415
7886
  /**
8416
- * in: value is one of the listed values
7887
+ * Number of days to retain call/chat data before automatic deletion. Must be
7888
+ * between 1 and 730 days. If not set, data is retained forever (no automatic
7889
+ * deletion).
8417
7890
  */
8418
- op: 'in';
8419
-
8420
- type: 'enum';
8421
-
8422
- value: Array<'not_connected' | 'ongoing' | 'ended' | 'error'>;
8423
- }
8424
-
8425
- /**
8426
- * Filter by whether the call was successful.
8427
- */
8428
- export interface CallSuccessful {
8429
- op: 'eq';
8430
-
8431
- type: 'boolean';
8432
-
8433
- value: boolean;
8434
- }
7891
+ data_storage_retention_days?: number | null;
8435
7892
 
8436
- export interface CallType {
8437
7893
  /**
8438
- * in: value is one of the listed values
7894
+ * Granular setting to manage how Retell stores sensitive data (transcripts,
7895
+ * recordings, logs, etc.). This replaces the deprecated
7896
+ * `opt_out_sensitive_data_storage` field.
7897
+ *
7898
+ * - `everything`: Store all data including transcripts, recordings, and logs.
7899
+ * - `everything_except_pii`: Store data without PII when PII is detected.
7900
+ * - `basic_attributes_only`: Store only basic attributes; no
7901
+ * transcripts/recordings/logs. If not set, default value of "everything" will
7902
+ * apply.
8439
7903
  */
8440
- op: 'in';
8441
-
8442
- type: 'enum';
8443
-
8444
- value: Array<'web_call' | 'phone_call'>;
8445
- }
7904
+ data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only';
8446
7905
 
8447
- export interface NumberFilter {
8448
7906
  /**
8449
- * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
8450
- * than, le: less than or equal
7907
+ * If set, determines what denoising mode to use. Use "no-denoise" to bypass all
7908
+ * audio denoising. Default to noise-cancellation.
8451
7909
  */
8452
- op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
8453
-
8454
- type: 'number';
8455
-
8456
- value: number;
8457
- }
7910
+ denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation';
8458
7911
 
8459
- export interface RangeFilter {
8460
7912
  /**
8461
- * bt: between
7913
+ * Controls whether the agent would backchannel (agent interjects the speaker with
7914
+ * phrases like "yeah", "uh-huh" to signify interest and engagement). Backchannel
7915
+ * when enabled tends to show up more in longer user utterances. If not set, agent
7916
+ * will not backchannel.
8462
7917
  */
8463
- op: 'bt';
8464
-
8465
- type: 'range';
7918
+ enable_backchannel?: boolean;
8466
7919
 
8467
7920
  /**
8468
- * [lower_bound, upper_bound]
7921
+ * If set to true, the agent will dynamically adjust how quickly it responds based
7922
+ * on the user's speech rate and past turn-taking behavior in the call. If unset,
7923
+ * default value false will apply.
8469
7924
  */
8470
- value: Array<number>;
8471
- }
7925
+ enable_dynamic_responsiveness?: boolean;
8472
7926
 
8473
- export interface StringFilter {
8474
7927
  /**
8475
- * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
7928
+ * If set to true, will enable dynamic voice speed adjustment based on the user's
7929
+ * speech rate and conversation context. If unset, default value false will apply.
8476
7930
  */
8477
- op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
8478
-
8479
- type: 'string';
8480
-
8481
- value: string;
7931
+ enable_dynamic_voice_speed?: boolean;
8482
7932
 
8483
7933
  /**
8484
- * The field name to filter on.
7934
+ * Master toggle for expressive mode. When true, the agent may add expressive voice
7935
+ * tags to the audio it generates. Only applicable for platform voices. If unset,
7936
+ * defaults to false.
8485
7937
  */
8486
- key?: string;
8487
- }
7938
+ enable_expressive_mode?: boolean;
8488
7939
 
8489
- export interface NumberFilter {
8490
7940
  /**
8491
- * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
8492
- * than, le: less than or equal
7941
+ * If users stay silent for a period after agent speech, end the call. The minimum
7942
+ * value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).
8493
7943
  */
8494
- op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
8495
-
8496
- type: 'number';
8497
-
8498
- value: number;
7944
+ end_call_after_silence_ms?: number;
8499
7945
 
8500
7946
  /**
8501
- * The field name to filter on.
7947
+ * The expressive voice tags Retell pre-teaches the model to use when
7948
+ * enable_expressive_mode is true. Custom tags defined in the system prompt are
7949
+ * still allowed. If empty, the agent follows general expressive guidance without a
7950
+ * fixed tag set.
8502
7951
  */
8503
- key?: string;
8504
- }
8505
-
8506
- export interface BooleanFilter {
8507
- op: 'eq';
8508
-
8509
- type: 'boolean';
8510
-
8511
- value: boolean;
7952
+ expressive_emotion_tags?: Array<
7953
+ | 'empathetic'
7954
+ | 'excited'
7955
+ | 'happy'
7956
+ | 'curious'
7957
+ | 'surprised'
7958
+ | 'sigh'
7959
+ | 'clear throat'
7960
+ | 'pause'
7961
+ | 'long pause'
7962
+ | 'emphasis'
7963
+ >;
8512
7964
 
8513
7965
  /**
8514
- * The field name to filter on.
7966
+ * Custom expressive voice guidance to use instead of the default Retell expressive
7967
+ * prompt when enable_expressive_mode is true. If omitted or blank, the default
7968
+ * expressive prompt will be used.
8515
7969
  */
8516
- key?: string;
8517
- }
7970
+ expressive_mode_prompt?: string | null;
8518
7971
 
8519
- export interface RangeFilter {
8520
7972
  /**
8521
- * bt: between
7973
+ * When TTS provider for the selected voice is experiencing outages, we would use
7974
+ * fallback voices listed here for the agent. Voice id and the fallback voice ids
7975
+ * must be from different TTS providers. The system would go through the list in
7976
+ * order, if the first one in the list is also having outage, it would use the next
7977
+ * one. Set to null to remove voice fallback for the agent.
8522
7978
  */
8523
- op: 'bt';
8524
-
8525
- type: 'range';
7979
+ fallback_voice_ids?: Array<string> | null;
8526
7980
 
8527
7981
  /**
8528
- * [lower_bound, upper_bound]
7982
+ * Configuration for guardrail checks to detect and prevent prohibited topics in
7983
+ * agent output and user input.
8529
7984
  */
8530
- value: Array<number>;
7985
+ guardrail_config?: Agent.GuardrailConfig;
8531
7986
 
8532
7987
  /**
8533
- * The field name to filter on.
7988
+ * Toggle behavior presets on/off to influence agent response style and behaviors.
8534
7989
  */
8535
- key?: string;
8536
- }
7990
+ handbook_config?: Agent.HandbookConfig;
8537
7991
 
8538
- export interface EnumFilter {
8539
7992
  /**
8540
- * in: value is one of the listed values
7993
+ * Controls how sensitive the agent is to user interruptions. Value ranging from
7994
+ * [0,1]. Lower value means it will take longer / more words for user to interrupt
7995
+ * agent, while higher value means it's easier for user to interrupt agent. If
7996
+ * unset, default value 1 will apply. When this is set to 0, agent would never be
7997
+ * interrupted.
8541
7998
  */
8542
- op: 'in';
8543
-
8544
- type: 'enum';
8545
-
8546
- value: Array<string>;
7999
+ interruption_sensitivity?: number;
8547
8000
 
8548
8001
  /**
8549
- * The field name to filter on.
8002
+ * If this option is set, the call will try to detect IVR in the first 3 minutes of
8003
+ * the call. Actions defined will be applied when the IVR is detected. Set this to
8004
+ * null to disable IVR detection.
8550
8005
  */
8551
- key?: string;
8552
- }
8006
+ ivr_option?: Agent.IvrOption | null;
8553
8007
 
8554
- export interface PresentFilter {
8555
8008
  /**
8556
- * pr: present (has value), np: not present
8009
+ * Specifies what language(s) the agent will operate in. Accepts either a single
8010
+ * scalar locale (e.g. `en-US`), the legacy scalar value `multi` for multilingual
8011
+ * support, or an array of concrete locale codes for explicit multi-locale
8012
+ * selection (e.g. `["en-US","es-ES"]`). The array form must contain concrete
8013
+ * locale codes only — the `multi` value is valid only as the scalar legacy form
8014
+ * and must not appear inside an array. Single-element arrays are normalized to the
8015
+ * equivalent scalar on output. If unset, defaults to `en-US`.
8557
8016
  */
8558
- op: 'pr' | 'np';
8559
-
8560
- type: 'present';
8017
+ language?:
8018
+ | 'en-US'
8019
+ | 'en-IN'
8020
+ | 'en-GB'
8021
+ | 'en-AU'
8022
+ | 'en-NZ'
8023
+ | 'de-DE'
8024
+ | 'es-ES'
8025
+ | 'es-419'
8026
+ | 'hi-IN'
8027
+ | 'fr-FR'
8028
+ | 'fr-CA'
8029
+ | 'ja-JP'
8030
+ | 'pt-PT'
8031
+ | 'pt-BR'
8032
+ | 'zh-CN'
8033
+ | 'ru-RU'
8034
+ | 'it-IT'
8035
+ | 'ko-KR'
8036
+ | 'nl-NL'
8037
+ | 'nl-BE'
8038
+ | 'pl-PL'
8039
+ | 'tr-TR'
8040
+ | 'vi-VN'
8041
+ | 'ro-RO'
8042
+ | 'bg-BG'
8043
+ | 'ca-ES'
8044
+ | 'th-TH'
8045
+ | 'da-DK'
8046
+ | 'fi-FI'
8047
+ | 'el-GR'
8048
+ | 'hu-HU'
8049
+ | 'id-ID'
8050
+ | 'no-NO'
8051
+ | 'sk-SK'
8052
+ | 'sv-SE'
8053
+ | 'lt-LT'
8054
+ | 'lv-LV'
8055
+ | 'cs-CZ'
8056
+ | 'ms-MY'
8057
+ | 'af-ZA'
8058
+ | 'ar-SA'
8059
+ | 'az-AZ'
8060
+ | 'bs-BA'
8061
+ | 'cy-GB'
8062
+ | 'fa-IR'
8063
+ | 'fil-PH'
8064
+ | 'gl-ES'
8065
+ | 'he-IL'
8066
+ | 'hr-HR'
8067
+ | 'hy-AM'
8068
+ | 'is-IS'
8069
+ | 'kk-KZ'
8070
+ | 'kn-IN'
8071
+ | 'mk-MK'
8072
+ | 'mr-IN'
8073
+ | 'ne-NP'
8074
+ | 'sl-SI'
8075
+ | 'sr-RS'
8076
+ | 'sw-KE'
8077
+ | 'ta-IN'
8078
+ | 'ur-IN'
8079
+ | 'yue-CN'
8080
+ | 'uk-UA'
8081
+ | 'multi'
8082
+ | Array<
8083
+ | 'en-US'
8084
+ | 'en-IN'
8085
+ | 'en-GB'
8086
+ | 'en-AU'
8087
+ | 'en-NZ'
8088
+ | 'de-DE'
8089
+ | 'es-ES'
8090
+ | 'es-419'
8091
+ | 'hi-IN'
8092
+ | 'fr-FR'
8093
+ | 'fr-CA'
8094
+ | 'ja-JP'
8095
+ | 'pt-PT'
8096
+ | 'pt-BR'
8097
+ | 'zh-CN'
8098
+ | 'ru-RU'
8099
+ | 'it-IT'
8100
+ | 'ko-KR'
8101
+ | 'nl-NL'
8102
+ | 'nl-BE'
8103
+ | 'pl-PL'
8104
+ | 'tr-TR'
8105
+ | 'vi-VN'
8106
+ | 'ro-RO'
8107
+ | 'bg-BG'
8108
+ | 'ca-ES'
8109
+ | 'th-TH'
8110
+ | 'da-DK'
8111
+ | 'fi-FI'
8112
+ | 'el-GR'
8113
+ | 'hu-HU'
8114
+ | 'id-ID'
8115
+ | 'no-NO'
8116
+ | 'sk-SK'
8117
+ | 'sv-SE'
8118
+ | 'lt-LT'
8119
+ | 'lv-LV'
8120
+ | 'cs-CZ'
8121
+ | 'ms-MY'
8122
+ | 'af-ZA'
8123
+ | 'ar-SA'
8124
+ | 'az-AZ'
8125
+ | 'bs-BA'
8126
+ | 'cy-GB'
8127
+ | 'fa-IR'
8128
+ | 'fil-PH'
8129
+ | 'gl-ES'
8130
+ | 'he-IL'
8131
+ | 'hr-HR'
8132
+ | 'hy-AM'
8133
+ | 'is-IS'
8134
+ | 'kk-KZ'
8135
+ | 'kn-IN'
8136
+ | 'mk-MK'
8137
+ | 'mr-IN'
8138
+ | 'ne-NP'
8139
+ | 'sl-SI'
8140
+ | 'sr-RS'
8141
+ | 'sw-KE'
8142
+ | 'ta-IN'
8143
+ | 'ur-IN'
8144
+ | 'yue-CN'
8145
+ | 'uk-UA'
8146
+ >;
8561
8147
 
8562
8148
  /**
8563
- * The field name to filter on.
8149
+ * Maximum allowed length for the call, will force end the call if reached. The
8150
+ * minimum value allowed is 60,000 ms (1 min), and maximum value allowed is
8151
+ * 7,200,000 (2 hours). By default, this is set to 3,600,000 (1 hour).
8564
8152
  */
8565
- key?: string;
8566
- }
8153
+ max_call_duration_ms?: number;
8567
8154
 
8568
- export interface StringFilter {
8569
8155
  /**
8570
- * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
8156
+ * Whether this agent opts in for signed URLs for public logs and recordings. When
8157
+ * enabled, the generated URLs will include security signatures that restrict
8158
+ * access and automatically expire after 24 hours.
8571
8159
  */
8572
- op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
8573
-
8574
- type: 'string';
8575
-
8576
- value: string;
8160
+ opt_in_signed_url?: boolean;
8577
8161
 
8578
8162
  /**
8579
- * The field name to filter on.
8163
+ * Configuration for PII scrubbing from transcripts and recordings.
8580
8164
  */
8581
- key?: string;
8582
- }
8165
+ pii_config?: Agent.PiiConfig;
8583
8166
 
8584
- export interface NumberFilter {
8585
8167
  /**
8586
- * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
8587
- * than, le: less than or equal
8168
+ * Post call analysis data to extract from the call. This data will augment the
8169
+ * pre-defined variables extracted in the call analysis. This will be available
8170
+ * after the call ends.
8588
8171
  */
8589
- op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
8590
-
8591
- type: 'number';
8592
-
8593
- value: number;
8172
+ post_call_analysis_data?: Array<
8173
+ | Agent.StringAnalysisData
8174
+ | Agent.EnumAnalysisData
8175
+ | Agent.BooleanAnalysisData
8176
+ | Agent.NumberAnalysisData
8177
+ | Agent.CallPresetAnalysisData
8178
+ > | null;
8594
8179
 
8595
8180
  /**
8596
- * The field name to filter on.
8181
+ * The model to use for post call analysis. Default to gpt-4.1.
8597
8182
  */
8598
- key?: string;
8599
- }
8600
-
8601
- export interface BooleanFilter {
8602
- op: 'eq';
8603
-
8604
- type: 'boolean';
8605
-
8606
- value: boolean;
8183
+ post_call_analysis_model?:
8184
+ | 'gpt-4.1'
8185
+ | 'gpt-4.1-mini'
8186
+ | 'gpt-4.1-nano'
8187
+ | 'gpt-5'
8188
+ | 'gpt-5-mini'
8189
+ | 'gpt-5-nano'
8190
+ | 'gpt-5.1'
8191
+ | 'gpt-5.2'
8192
+ | 'gpt-5.4'
8193
+ | 'gpt-5.4-mini'
8194
+ | 'gpt-5.4-nano'
8195
+ | 'gpt-5.5'
8196
+ | 'gpt-5.6-terra'
8197
+ | 'gpt-5.6-luna'
8198
+ | 'claude-4.5-sonnet'
8199
+ | 'claude-4.6-sonnet'
8200
+ | 'claude-5-sonnet'
8201
+ | 'claude-4.5-haiku'
8202
+ | 'gemini-3.0-flash'
8203
+ | 'gemini-3.1-flash-lite'
8204
+ | 'gemini-3.5-flash'
8205
+ | null;
8607
8206
 
8608
8207
  /**
8609
- * The field name to filter on.
8208
+ * A list of words / phrases and their pronunciation to be used to guide the audio
8209
+ * synthesize for consistent pronunciation. Check the dashboard to see what
8210
+ * provider supports this feature. Set to null to remove pronunciation dictionary
8211
+ * from this agent.
8610
8212
  */
8611
- key?: string;
8612
- }
8213
+ pronunciation_dictionary?: Array<Agent.PronunciationDictionary> | null;
8613
8214
 
8614
- export interface RangeFilter {
8615
8215
  /**
8616
- * bt: between
8216
+ * If set, controls how many times agent would remind user when user is
8217
+ * unresponsive. Must be a non negative integer. If unset, default value of 1 will
8218
+ * apply (remind once). Set to 0 to disable agent from reminding.
8617
8219
  */
8618
- op: 'bt';
8619
-
8620
- type: 'range';
8220
+ reminder_max_count?: number;
8621
8221
 
8622
8222
  /**
8623
- * [lower_bound, upper_bound]
8223
+ * If set (in milliseconds), will trigger a reminder to the agent to speak if the
8224
+ * user has been silent for the specified duration after some agent speech. Must be
8225
+ * a positive number. If unset, default value of 10000 ms (10 s) will apply.
8624
8226
  */
8625
- value: Array<number>;
8227
+ reminder_trigger_ms?: number;
8626
8228
 
8627
8229
  /**
8628
- * The field name to filter on.
8230
+ * The Response Engine to attach to the agent. It is used to generate responses for
8231
+ * the agent. You need to create a Response Engine first before attaching it to an
8232
+ * agent.
8629
8233
  */
8630
- key?: string;
8631
- }
8234
+ response_engine?:
8235
+ | Agent.ResponseEngineRetellLm
8236
+ | Agent.ResponseEngineCustomLm
8237
+ | Agent.ResponseEngineConversationFlow;
8632
8238
 
8633
- export interface EnumFilter {
8634
8239
  /**
8635
- * in: value is one of the listed values
8240
+ * Controls how responsive is the agent. Value ranging from [0,1]. Lower value
8241
+ * means less responsive agent (wait more, respond slower), while higher value
8242
+ * means faster exchanges (respond when it can). If unset, default value 1 will
8243
+ * apply.
8636
8244
  */
8637
- op: 'in';
8638
-
8639
- type: 'enum';
8640
-
8641
- value: Array<string>;
8245
+ responsiveness?: number;
8642
8246
 
8643
8247
  /**
8644
- * The field name to filter on.
8248
+ * If set, the phone ringing will last for the specified amount of milliseconds.
8249
+ * This applies for both outbound call ringtime, and call transfer ringtime.
8250
+ * Default to 30000 (30 s). Valid range is [5000, 300000].
8645
8251
  */
8646
- key?: string;
8647
- }
8252
+ ring_duration_ms?: number;
8648
8253
 
8649
- export interface PresentFilter {
8650
8254
  /**
8651
- * pr: present (has value), np: not present
8255
+ * The expiration time for the signed url in milliseconds. Only applicable when
8256
+ * opt_in_signed_url is true. If not set, default value of 86400000 (24 hours) will
8257
+ * apply.
8652
8258
  */
8653
- op: 'pr' | 'np';
8654
-
8655
- type: 'present';
8259
+ signed_url_expiration_ms?: number | null;
8656
8260
 
8657
8261
  /**
8658
- * The field name to filter on.
8262
+ * If set, determines whether speech to text should focus on latency or accuracy.
8263
+ * Default to fast mode. When set to custom, custom_stt_config must be provided.
8659
8264
  */
8660
- key?: string;
8661
- }
8265
+ stt_mode?: 'fast' | 'accurate' | 'custom';
8662
8266
 
8663
- export interface DataStorageSetting {
8664
8267
  /**
8665
- * in: value is one of the listed values
8268
+ * IANA timezone for the agent (e.g. America/New_York). Defaults to
8269
+ * America/Los_Angeles if not set.
8666
8270
  */
8667
- op: 'in';
8668
-
8669
- type: 'enum';
8271
+ timezone?: string | null;
8670
8272
 
8671
- value: Array<'everything' | 'everything_except_pii' | 'basic_attributes_only'>;
8672
- }
8273
+ user_dtmf_options?: Agent.UserDtmfOptions | null;
8673
8274
 
8674
- export interface Direction {
8675
8275
  /**
8676
- * in: value is one of the listed values
8276
+ * Optional description of the agent version. Used for your own reference and
8277
+ * documentation.
8677
8278
  */
8678
- op: 'in';
8679
-
8680
- type: 'enum';
8681
-
8682
- value: Array<'inbound' | 'outbound'>;
8683
- }
8279
+ version_description?: string | null;
8684
8280
 
8685
- export interface DisconnectionReason {
8686
8281
  /**
8687
- * in: value is one of the listed values
8282
+ * Optional title of the agent version. Used for your own reference.
8688
8283
  */
8689
- op: 'in';
8690
-
8691
- type: 'enum';
8692
-
8693
- value: Array<
8694
- | 'user_hangup'
8695
- | 'agent_hangup'
8696
- | 'call_transfer'
8697
- | 'voicemail_reached'
8698
- | 'ivr_reached'
8699
- | 'inactivity'
8700
- | 'max_duration_reached'
8701
- | 'concurrency_limit_reached'
8702
- | 'no_concurrency_fallback'
8703
- | 'no_valid_payment'
8704
- | 'scam_detected'
8705
- | 'dial_busy'
8706
- | 'dial_failed'
8707
- | 'dial_no_answer'
8708
- | 'invalid_destination'
8709
- | 'telephony_provider_permission_denied'
8710
- | 'telephony_provider_unavailable'
8711
- | 'sip_routing_error'
8712
- | 'marked_as_spam'
8713
- | 'user_declined'
8714
- | 'error_llm_websocket_open'
8715
- | 'error_llm_websocket_lost_connection'
8716
- | 'error_llm_websocket_runtime'
8717
- | 'error_llm_websocket_corrupt_payload'
8718
- | 'error_no_audio_received'
8719
- | 'error_asr'
8720
- | 'error_retell'
8721
- | 'error_unknown'
8722
- | 'error_user_not_joined'
8723
- | 'registered_call_timeout'
8724
- | 'transfer_bridged'
8725
- | 'transfer_cancelled'
8726
- | 'manual_stopped'
8727
- | 'call_take_over'
8728
- >;
8729
- }
8284
+ version_title?: string | null;
8730
8285
 
8731
- export interface NumberFilter {
8732
8286
  /**
8733
- * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
8734
- * than, le: less than or equal
8287
+ * If set, determines the vocabulary set to use for transcription. This setting
8288
+ * only applies for English agents, for non English agent, this setting is a no-op.
8289
+ * Default to general.
8735
8290
  */
8736
- op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
8737
-
8738
- type: 'number';
8739
-
8740
- value: number;
8741
- }
8291
+ vocab_specialization?: 'general' | 'medical';
8742
8292
 
8743
- export interface RangeFilter {
8744
8293
  /**
8745
- * bt: between
8294
+ * Controls the emotional tone of the agent's voice. Currently supported for
8295
+ * Cartesia and Minimax TTS providers. If unset, no emotion will be used.
8746
8296
  */
8747
- op: 'bt';
8297
+ voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised' | null;
8748
8298
 
8749
- type: 'range';
8299
+ /**
8300
+ * Unique voice id used for the agent. Find list of available voices and their
8301
+ * preview in Dashboard.
8302
+ */
8303
+ voice_id?: string;
8750
8304
 
8751
8305
  /**
8752
- * [lower_bound, upper_bound]
8306
+ * Select the voice model used for the selected voice. Each provider has a set of
8307
+ * available voice models. Set to null to remove voice model selection, and default
8308
+ * ones will apply. Check out dashboard for more details of each voice model.
8753
8309
  */
8754
- value: Array<number>;
8755
- }
8310
+ voice_model?:
8311
+ | 'eleven_flash_v2'
8312
+ | 'eleven_flash_v2_5'
8313
+ | 'eleven_multilingual_v2'
8314
+ | 'eleven_v3'
8315
+ | 'sonic-3'
8316
+ | 'sonic-3-latest'
8317
+ | 'sonic-3.5'
8318
+ | 'tts-1'
8319
+ | 'gpt-4o-mini-tts'
8320
+ | 'speech-02-turbo'
8321
+ | 'speech-2.8-turbo'
8322
+ | 's1'
8323
+ | 's2-pro'
8324
+ | 's2.1-pro'
8325
+ | null;
8756
8326
 
8757
- export interface DynamicVariable {
8758
8327
  /**
8759
- * The dynamic variable name to filter on.
8328
+ * Controls speed of voice. Value ranging from [0.5,2]. Lower value means slower
8329
+ * speech, while higher value means faster speech rate. If unset, default value 1
8330
+ * will apply.
8760
8331
  */
8761
- key: string;
8332
+ voice_speed?: number;
8762
8333
 
8763
8334
  /**
8764
- * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
8335
+ * Controls how stable the voice is. Value ranging from [0,2]. Lower value means
8336
+ * more stable, and higher value means more variant speech generation. Check the
8337
+ * dashboard to see what provider supports this feature. If unset, default value 1
8338
+ * will apply.
8765
8339
  */
8766
- op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
8340
+ voice_temperature?: number;
8767
8341
 
8768
- type: 'string';
8342
+ /**
8343
+ * If this option is set, the call will try to detect voicemail in the first 3
8344
+ * minutes of the call. Actions defined (hangup, or leave a message) will be
8345
+ * applied when the voicemail is detected. Set this to null to disable voicemail
8346
+ * detection.
8347
+ */
8348
+ voicemail_option?: Agent.VoicemailOption | null;
8769
8349
 
8770
- value: string;
8771
- }
8350
+ /**
8351
+ * If set, will control the volume of the agent. Value ranging from [0,2]. Lower
8352
+ * value means quieter agent speech, while higher value means louder agent speech.
8353
+ * If unset, default value 1 will apply.
8354
+ */
8355
+ volume?: number;
8772
8356
 
8773
- export interface NumberFilter {
8774
8357
  /**
8775
- * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
8776
- * than, le: less than or equal
8358
+ * Which webhook events this agent should receive. If not set, defaults to
8359
+ * call_started, call_ended, call_analyzed.
8777
8360
  */
8778
- op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
8361
+ webhook_events?: Array<
8362
+ | 'call_started'
8363
+ | 'call_ended'
8364
+ | 'call_analyzed'
8365
+ | 'transcript_updated'
8366
+ | 'transfer_started'
8367
+ | 'transfer_bridged'
8368
+ | 'transfer_cancelled'
8369
+ | 'transfer_ended'
8370
+ > | null;
8779
8371
 
8780
- type: 'number';
8372
+ /**
8373
+ * The timeout for the webhook in milliseconds. If not set, default value of 10000
8374
+ * will apply.
8375
+ */
8376
+ webhook_timeout_ms?: number;
8781
8377
 
8782
- value: number;
8378
+ /**
8379
+ * The webhook for agent to listen to call events. See what events it would get at
8380
+ * [webhook doc](/features/webhook). If set, will binds webhook events for this
8381
+ * agent to the specified url, and will ignore the account level webhook for this
8382
+ * agent. Set to `null` to remove webhook url from this agent.
8383
+ */
8384
+ webhook_url?: string | null;
8783
8385
  }
8784
8386
 
8785
- export interface RangeFilter {
8387
+ export namespace Agent {
8388
+ /**
8389
+ * If this option is set, the agent prompt will include call screen handling
8390
+ * instructions for identity and call purpose questions. Set this to null to
8391
+ * disable call screen prompt instructions.
8392
+ */
8393
+ export interface CallScreeningOption {
8394
+ /**
8395
+ * Identity the agent should provide when a call screen asks who is calling.
8396
+ * Dynamic variables are supported.
8397
+ */
8398
+ agent_identity: string;
8399
+
8400
+ /**
8401
+ * Purpose the agent should provide when a call screen asks why it is calling.
8402
+ * Dynamic variables are supported.
8403
+ */
8404
+ call_purpose: string;
8405
+ }
8406
+
8407
+ /**
8408
+ * Custom STT configuration. Only used when stt_mode is set to custom.
8409
+ */
8410
+ export interface CustomSttConfig {
8411
+ /**
8412
+ * Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram,
8413
+ * 500 for Soniox, 100 for AssemblyAI.
8414
+ */
8415
+ endpointing_ms: number;
8416
+
8417
+ /**
8418
+ * ASR provider name.
8419
+ */
8420
+ provider: 'azure' | 'deepgram' | 'soniox' | 'assemblyai';
8421
+ }
8422
+
8423
+ /**
8424
+ * Configuration for guardrail checks to detect and prevent prohibited topics in
8425
+ * agent output and user input.
8426
+ */
8427
+ export interface GuardrailConfig {
8428
+ /**
8429
+ * Selected prohibited user topic categories to check. When user messages contain
8430
+ * these topics, the agent will respond with a placeholder message instead of
8431
+ * processing the request.
8432
+ */
8433
+ input_topics?: Array<'platform_integrity_jailbreaking'> | null;
8434
+
8435
+ /**
8436
+ * Selected prohibited agent topic categories to check. When agent messages contain
8437
+ * these topics, they will be replaced with a placeholder message.
8438
+ */
8439
+ output_topics?: Array<
8440
+ | 'harassment'
8441
+ | 'self_harm'
8442
+ | 'sexual_exploitation'
8443
+ | 'violence'
8444
+ | 'defense_and_national_security'
8445
+ | 'illicit_and_harmful_activity'
8446
+ | 'gambling'
8447
+ | 'regulated_professional_advice'
8448
+ | 'child_safety_and_exploitation'
8449
+ > | null;
8450
+ }
8451
+
8452
+ /**
8453
+ * Toggle behavior presets on/off to influence agent response style and behaviors.
8454
+ */
8455
+ export interface HandbookConfig {
8456
+ /**
8457
+ * When asked, acknowledge being a virtual assistant.
8458
+ */
8459
+ ai_disclosure?: boolean;
8460
+
8461
+ /**
8462
+ * Enables Conversational Personality. When true, the agent uses the Conversational
8463
+ * Personality handbook preset, skips Professional Rep Personality during prompt
8464
+ * assembly, and enables internal colloquial rewrite behavior.
8465
+ */
8466
+ conversational_personality?: boolean;
8467
+
8468
+ /**
8469
+ * Professional call center rep baseline.
8470
+ */
8471
+ default_personality?: boolean;
8472
+
8473
+ /**
8474
+ * Repeat back and confirm important details (voice only).
8475
+ */
8476
+ echo_verification?: boolean;
8477
+
8478
+ /**
8479
+ * Warm acknowledgment of caller concerns.
8480
+ */
8481
+ high_empathy?: boolean;
8482
+
8483
+ /**
8484
+ * Spell using NATO phonetic alphabet style (voice only).
8485
+ */
8486
+ nato_phonetic_alphabet?: boolean;
8487
+
8488
+ /**
8489
+ * Sprinkle natural speech fillers like "um", "you know" for a more human,
8490
+ * conversational tone.
8491
+ */
8492
+ natural_filler_words?: boolean;
8493
+
8494
+ /**
8495
+ * Stay within prompt/context scope, don't invent details.
8496
+ */
8497
+ scope_boundaries?: boolean;
8498
+
8499
+ /**
8500
+ * Treat near-match similar words as same entity to reduce impact of transcription
8501
+ * error (voice only).
8502
+ */
8503
+ smart_matching?: boolean;
8504
+
8505
+ /**
8506
+ * Convert numbers/dates/currency to spoken forms (voice only).
8507
+ */
8508
+ speech_normalization?: boolean;
8509
+ }
8510
+
8511
+ /**
8512
+ * If this option is set, the call will try to detect IVR in the first 3 minutes of
8513
+ * the call. Actions defined will be applied when the IVR is detected. Set this to
8514
+ * null to disable IVR detection.
8515
+ */
8516
+ export interface IvrOption {
8517
+ action: IvrOption.Action;
8518
+
8519
+ /**
8520
+ * Optionally describe what should be treated as an IVR. Leave as null to use the
8521
+ * default definition.
8522
+ */
8523
+ detection_prompt?: string | null;
8524
+ }
8525
+
8526
+ export namespace IvrOption {
8527
+ export interface Action {
8528
+ type: 'hangup';
8529
+ }
8530
+ }
8531
+
8532
+ /**
8533
+ * Configuration for PII scrubbing from transcripts and recordings.
8534
+ */
8535
+ export interface PiiConfig {
8536
+ /**
8537
+ * List of PII categories to scrub from transcripts and recordings. PII redaction
8538
+ * is only active when this list is non-empty; an empty array means no PII
8539
+ * scrubbing is performed.
8540
+ */
8541
+ categories: Array<
8542
+ | 'person_name'
8543
+ | 'address'
8544
+ | 'email'
8545
+ | 'phone_number'
8546
+ | 'ssn'
8547
+ | 'passport'
8548
+ | 'driver_license'
8549
+ | 'credit_card'
8550
+ | 'bank_account'
8551
+ | 'password'
8552
+ | 'pin'
8553
+ | 'medical_id'
8554
+ | 'date_of_birth'
8555
+ | 'customer_account_number'
8556
+ >;
8557
+
8558
+ /**
8559
+ * The processing mode for PII scrubbing. Currently only post-call is supported.
8560
+ */
8561
+ mode: 'post_call';
8562
+ }
8563
+
8564
+ export interface StringAnalysisData {
8565
+ /**
8566
+ * Description of the variable.
8567
+ */
8568
+ description: string;
8569
+
8570
+ /**
8571
+ * Name of the variable.
8572
+ */
8573
+ name: string;
8574
+
8575
+ /**
8576
+ * Type of the variable to extract.
8577
+ */
8578
+ type: 'string';
8579
+
8580
+ /**
8581
+ * Optional instruction to help decide whether this field needs to be populated in
8582
+ * the analysis. If not set, the field is always included. If required is true,
8583
+ * this is ignored.
8584
+ */
8585
+ conditional_prompt?: string;
8586
+
8587
+ /**
8588
+ * Examples of the variable value to teach model the style and syntax.
8589
+ */
8590
+ examples?: Array<string>;
8591
+
8592
+ /**
8593
+ * Whether this data is required. If true and the data is not extracted, the call
8594
+ * will be marked as unsuccessful.
8595
+ */
8596
+ required?: boolean;
8597
+ }
8598
+
8599
+ export interface EnumAnalysisData {
8600
+ /**
8601
+ * The possible values of the variable, must be non empty array.
8602
+ */
8603
+ choices: Array<string>;
8604
+
8605
+ /**
8606
+ * Description of the variable.
8607
+ */
8608
+ description: string;
8609
+
8610
+ /**
8611
+ * Name of the variable.
8612
+ */
8613
+ name: string;
8614
+
8615
+ /**
8616
+ * Type of the variable to extract.
8617
+ */
8618
+ type: 'enum';
8619
+
8620
+ /**
8621
+ * Optional instruction to help decide whether this field needs to be populated in
8622
+ * the analysis. If not set, the field is always included. If required is true,
8623
+ * this is ignored.
8624
+ */
8625
+ conditional_prompt?: string;
8626
+
8627
+ /**
8628
+ * Whether this data is required. If true and the data is not extracted, the call
8629
+ * will be marked as unsuccessful.
8630
+ */
8631
+ required?: boolean;
8632
+ }
8633
+
8634
+ export interface BooleanAnalysisData {
8635
+ /**
8636
+ * Description of the variable.
8637
+ */
8638
+ description: string;
8639
+
8640
+ /**
8641
+ * Name of the variable.
8642
+ */
8643
+ name: string;
8644
+
8645
+ /**
8646
+ * Type of the variable to extract.
8647
+ */
8648
+ type: 'boolean';
8649
+
8650
+ /**
8651
+ * Optional instruction to help decide whether this field needs to be populated in
8652
+ * the analysis. If not set, the field is always included. If required is true,
8653
+ * this is ignored.
8654
+ */
8655
+ conditional_prompt?: string;
8656
+
8657
+ /**
8658
+ * Whether this data is required. If true and the data is not extracted, the call
8659
+ * will be marked as unsuccessful.
8660
+ */
8661
+ required?: boolean;
8662
+ }
8663
+
8664
+ export interface NumberAnalysisData {
8665
+ /**
8666
+ * Description of the variable.
8667
+ */
8668
+ description: string;
8669
+
8670
+ /**
8671
+ * Name of the variable.
8672
+ */
8673
+ name: string;
8674
+
8675
+ /**
8676
+ * Type of the variable to extract.
8677
+ */
8678
+ type: 'number';
8679
+
8680
+ /**
8681
+ * Optional instruction to help decide whether this field needs to be populated in
8682
+ * the analysis. If not set, the field is always included. If required is true,
8683
+ * this is ignored.
8684
+ */
8685
+ conditional_prompt?: string;
8686
+
8687
+ /**
8688
+ * Whether this data is required. If true and the data is not extracted, the call
8689
+ * will be marked as unsuccessful.
8690
+ */
8691
+ required?: boolean;
8692
+ }
8693
+
8786
8694
  /**
8787
- * bt: between
8695
+ * System preset for post-call analysis (voice agents). Use in
8696
+ * post_call_analysis_data to override prompts or mark fields optional.
8788
8697
  */
8789
- op: 'bt';
8698
+ export interface CallPresetAnalysisData {
8699
+ /**
8700
+ * Preset identifier for voice agent analysis.
8701
+ */
8702
+ name: 'call_summary' | 'call_successful' | 'user_sentiment';
8790
8703
 
8791
- type: 'range';
8704
+ /**
8705
+ * Identifies this item as a system preset.
8706
+ */
8707
+ type: 'system-presets';
8792
8708
 
8793
- /**
8794
- * [lower_bound, upper_bound]
8795
- */
8796
- value: Array<number>;
8797
- }
8709
+ /**
8710
+ * Optional instruction to help decide whether this field needs to be populated. If
8711
+ * not set, the field is always included.
8712
+ */
8713
+ conditional_prompt?: string;
8798
8714
 
8799
- export interface NumberFilter {
8800
- /**
8801
- * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
8802
- * than, le: less than or equal
8803
- */
8804
- op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
8715
+ /**
8716
+ * Prompt or description for this preset.
8717
+ */
8718
+ description?: string;
8805
8719
 
8806
- type: 'number';
8720
+ /**
8721
+ * If false, this field is optional in the analysis. If true or unset, the field is
8722
+ * required.
8723
+ */
8724
+ required?: boolean;
8725
+ }
8807
8726
 
8808
- value: number;
8809
- }
8727
+ export interface PronunciationDictionary {
8728
+ /**
8729
+ * The phonetic alphabet to be used for pronunciation.
8730
+ */
8731
+ alphabet: 'ipa' | 'cmu';
8810
8732
 
8811
- export interface RangeFilter {
8812
- /**
8813
- * bt: between
8814
- */
8815
- op: 'bt';
8733
+ /**
8734
+ * Pronunciation of the word in the format of a IPA / CMU pronunciation.
8735
+ */
8736
+ phoneme: string;
8816
8737
 
8817
- type: 'range';
8738
+ /**
8739
+ * The string of word / phrase to be annotated with pronunciation.
8740
+ */
8741
+ word: string;
8742
+ }
8818
8743
 
8819
- /**
8820
- * [lower_bound, upper_bound]
8821
- */
8822
- value: Array<number>;
8823
- }
8744
+ export interface ResponseEngineRetellLm {
8745
+ /**
8746
+ * id of the Retell LLM Response Engine.
8747
+ */
8748
+ llm_id: string;
8824
8749
 
8825
- /**
8826
- * Filter by from number.
8827
- */
8828
- export interface FromNumber {
8829
- /**
8830
- * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
8831
- */
8832
- op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
8750
+ /**
8751
+ * type of the Response Engine.
8752
+ */
8753
+ type: 'retell-llm';
8833
8754
 
8834
- type: 'string';
8755
+ /**
8756
+ * Version of the Retell LLM Response Engine.
8757
+ */
8758
+ version?: number | null;
8759
+ }
8835
8760
 
8836
- value: string;
8837
- }
8761
+ export interface ResponseEngineCustomLm {
8762
+ /**
8763
+ * LLM websocket url of the custom LLM.
8764
+ */
8765
+ llm_websocket_url: string;
8838
8766
 
8839
- /**
8840
- * Filter by whether the call is in voicemail.
8841
- */
8842
- export interface InVoicemail {
8843
- op: 'eq';
8767
+ /**
8768
+ * type of the Response Engine.
8769
+ */
8770
+ type: 'custom-llm';
8771
+ }
8844
8772
 
8845
- type: 'boolean';
8773
+ export interface ResponseEngineConversationFlow {
8774
+ /**
8775
+ * ID of the Conversation Flow Response Engine.
8776
+ */
8777
+ conversation_flow_id: string;
8846
8778
 
8847
- value: boolean;
8848
- }
8779
+ /**
8780
+ * type of the Response Engine.
8781
+ */
8782
+ type: 'conversation-flow';
8849
8783
 
8850
- export interface StringFilter {
8851
- /**
8852
- * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
8853
- */
8854
- op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
8784
+ /**
8785
+ * Version of the Conversation Flow Response Engine.
8786
+ */
8787
+ version?: number | null;
8788
+ }
8855
8789
 
8856
- type: 'string';
8790
+ export interface UserDtmfOptions {
8791
+ /**
8792
+ * The maximum number of digits allowed in the user's DTMF (Dual-Tone
8793
+ * Multi-Frequency) input per turn. Once this limit is reached, the input is
8794
+ * considered complete and a response will be generated immediately.
8795
+ */
8796
+ digit_limit?: number | null;
8857
8797
 
8858
- value: string;
8798
+ /**
8799
+ * A single key that signals the end of DTMF input. Acceptable values include any
8800
+ * digit (0-9), the pound/hash symbol (#), or the asterisk (\*).
8801
+ */
8802
+ termination_key?: string | null;
8859
8803
 
8860
- /**
8861
- * The field name to filter on.
8862
- */
8863
- key?: string;
8864
- }
8804
+ /**
8805
+ * The time (in milliseconds) to wait for user DTMF input before timing out. The
8806
+ * timer resets with each digit received.
8807
+ */
8808
+ timeout_ms?: number;
8809
+ }
8865
8810
 
8866
- export interface NumberFilter {
8867
8811
  /**
8868
- * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
8869
- * than, le: less than or equal
8812
+ * If this option is set, the call will try to detect voicemail in the first 3
8813
+ * minutes of the call. Actions defined (hangup, or leave a message) will be
8814
+ * applied when the voicemail is detected. Set this to null to disable voicemail
8815
+ * detection.
8870
8816
  */
8871
- op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
8817
+ export interface VoicemailOption {
8818
+ action:
8819
+ | VoicemailOption.VoicemailActionPrompt
8820
+ | VoicemailOption.VoicemailActionStaticText
8821
+ | VoicemailOption.VoicemailActionHangup
8822
+ | VoicemailOption.VoicemailActionBridgeTransfer;
8872
8823
 
8873
- type: 'number';
8824
+ /**
8825
+ * Optionally describe what should be treated as voicemail. Leave as null to use
8826
+ * the default definition.
8827
+ */
8828
+ detection_prompt?: string | null;
8829
+ }
8874
8830
 
8875
- value: number;
8831
+ export namespace VoicemailOption {
8832
+ export interface VoicemailActionPrompt {
8833
+ /**
8834
+ * The prompt used to generate the text to be spoken when the call is detected to
8835
+ * be in voicemail.
8836
+ */
8837
+ text: string;
8876
8838
 
8877
- /**
8878
- * The field name to filter on.
8879
- */
8880
- key?: string;
8881
- }
8839
+ type: 'prompt';
8840
+ }
8882
8841
 
8883
- export interface BooleanFilter {
8884
- op: 'eq';
8842
+ export interface VoicemailActionStaticText {
8843
+ /**
8844
+ * The text to be spoken when the call is detected to be in voicemail.
8845
+ */
8846
+ text: string;
8885
8847
 
8886
- type: 'boolean';
8848
+ type: 'static_text';
8849
+ }
8887
8850
 
8888
- value: boolean;
8851
+ export interface VoicemailActionHangup {
8852
+ type: 'hangup';
8853
+ }
8889
8854
 
8890
- /**
8891
- * The field name to filter on.
8892
- */
8893
- key?: string;
8855
+ export interface VoicemailActionBridgeTransfer {
8856
+ type: 'bridge_transfer';
8857
+ }
8858
+ }
8894
8859
  }
8895
8860
 
8896
- export interface RangeFilter {
8897
- /**
8898
- * bt: between
8899
- */
8900
- op: 'bt';
8901
-
8902
- type: 'range';
8903
-
8861
+ /**
8862
+ * Override conversation flow configuration settings. Only applicable when using
8863
+ * conversation flow as the response engine. Supported attributes - model_choice,
8864
+ * model_temperature, tool_call_strict_mode, knowledge_base_ids, kb_config,
8865
+ * start_speaker, begin_after_user_silence_ms.
8866
+ */
8867
+ export interface ConversationFlow {
8904
8868
  /**
8905
- * [lower_bound, upper_bound]
8869
+ * If set, the AI will begin the conversation after waiting for the user for the
8870
+ * duration (in milliseconds) specified by this attribute. This only applies if the
8871
+ * agent is configured to wait for the user to speak first. If not set, the agent
8872
+ * will wait indefinitely for the user to speak.
8906
8873
  */
8907
- value: Array<number>;
8874
+ begin_after_user_silence_ms?: number | null;
8908
8875
 
8909
8876
  /**
8910
- * The field name to filter on.
8877
+ * Knowledge base configuration for RAG retrieval.
8911
8878
  */
8912
- key?: string;
8913
- }
8879
+ kb_config?: ConversationFlow.KBConfig;
8914
8880
 
8915
- export interface EnumFilter {
8916
8881
  /**
8917
- * in: value is one of the listed values
8882
+ * Knowledge base IDs for RAG (Retrieval-Augmented Generation).
8918
8883
  */
8919
- op: 'in';
8920
-
8921
- type: 'enum';
8922
-
8923
- value: Array<string>;
8884
+ knowledge_base_ids?: Array<string> | null;
8924
8885
 
8925
8886
  /**
8926
- * The field name to filter on.
8887
+ * The model choice for the conversation flow.
8927
8888
  */
8928
- key?: string;
8929
- }
8889
+ model_choice?: ConversationFlow.ModelChoice;
8930
8890
 
8931
- export interface PresentFilter {
8932
8891
  /**
8933
- * pr: present (has value), np: not present
8892
+ * Controls the randomness of the model's responses. Lower values make responses
8893
+ * more deterministic.
8934
8894
  */
8935
- op: 'pr' | 'np';
8936
-
8937
- type: 'present';
8895
+ model_temperature?: number | null;
8938
8896
 
8939
8897
  /**
8940
- * The field name to filter on.
8898
+ * Who starts the conversation - user or agent.
8941
8899
  */
8942
- key?: string;
8943
- }
8900
+ start_speaker?: 'user' | 'agent';
8944
8901
 
8945
- export interface NumberFilter {
8946
8902
  /**
8947
- * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
8948
- * than, le: less than or equal
8903
+ * Whether to use strict mode for tool calls. Only applicable when using certain
8904
+ * supported models.
8949
8905
  */
8950
- op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
8951
-
8952
- type: 'number';
8953
-
8954
- value: number;
8906
+ tool_call_strict_mode?: boolean | null;
8955
8907
  }
8956
8908
 
8957
- export interface RangeFilter {
8909
+ export namespace ConversationFlow {
8958
8910
  /**
8959
- * bt: between
8911
+ * Knowledge base configuration for RAG retrieval.
8960
8912
  */
8961
- op: 'bt';
8913
+ export interface KBConfig {
8914
+ /**
8915
+ * Similarity threshold for filtering search results
8916
+ */
8917
+ filter_score?: number;
8962
8918
 
8963
- type: 'range';
8919
+ /**
8920
+ * Max number of knowledge base chunks to retrieve
8921
+ */
8922
+ top_k?: number;
8923
+ }
8964
8924
 
8965
8925
  /**
8966
- * [lower_bound, upper_bound]
8926
+ * The model choice for the conversation flow.
8967
8927
  */
8968
- value: Array<number>;
8928
+ export interface ModelChoice {
8929
+ /**
8930
+ * The LLM model to use
8931
+ */
8932
+ model:
8933
+ | 'gpt-4.1'
8934
+ | 'gpt-4.1-mini'
8935
+ | 'gpt-4.1-nano'
8936
+ | 'gpt-5'
8937
+ | 'gpt-5-mini'
8938
+ | 'gpt-5-nano'
8939
+ | 'gpt-5.1'
8940
+ | 'gpt-5.2'
8941
+ | 'gpt-5.4'
8942
+ | 'gpt-5.4-mini'
8943
+ | 'gpt-5.4-nano'
8944
+ | 'gpt-5.5'
8945
+ | 'gpt-5.6-terra'
8946
+ | 'gpt-5.6-luna'
8947
+ | 'claude-4.5-sonnet'
8948
+ | 'claude-4.6-sonnet'
8949
+ | 'claude-5-sonnet'
8950
+ | 'claude-4.5-haiku'
8951
+ | 'gemini-3.0-flash'
8952
+ | 'gemini-3.1-flash-lite'
8953
+ | 'gemini-3.5-flash';
8954
+
8955
+ /**
8956
+ * Type of model choice
8957
+ */
8958
+ type: 'cascading';
8959
+
8960
+ /**
8961
+ * Whether to use high priority pool with more dedicated resource, default false
8962
+ */
8963
+ high_priority?: boolean;
8964
+ }
8969
8965
  }
8970
8966
 
8971
8967
  /**
8972
- * Filter by to number.
8968
+ * Override Retell LLM configuration settings. Only applicable when using Retell
8969
+ * LLM as the response engine. Supported attributes - model, s2s_model,
8970
+ * model_temperature, model_high_priority, tool_call_strict_mode,
8971
+ * knowledge_base_ids, kb_config, start_speaker, begin_after_user_silence_ms,
8972
+ * begin_message.
8973
8973
  */
8974
- export interface ToNumber {
8974
+ export interface RetellLlm {
8975
8975
  /**
8976
- * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
8976
+ * If set, the AI will begin the conversation after waiting for the user for the
8977
+ * duration (in milliseconds) specified by this attribute. This only applies if the
8978
+ * agent is configured to wait for the user to speak first. If not set, the agent
8979
+ * will wait indefinitely for the user to speak.
8977
8980
  */
8978
- op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
8979
-
8980
- type: 'string';
8981
-
8982
- value: string;
8983
- }
8981
+ begin_after_user_silence_ms?: number | null;
8984
8982
 
8985
- export interface ToolCall {
8986
8983
  /**
8987
- * Filter by tool call latency in milliseconds.
8984
+ * First utterance said by the agent in the call. If not set, LLM will dynamically
8985
+ * generate a message. If set to "", agent will wait for user to speak first.
8988
8986
  */
8989
- latency_ms?: ToolCall.NumberFilter | ToolCall.RangeFilter;
8987
+ begin_message?: string | null;
8990
8988
 
8991
8989
  /**
8992
- * The tool call name to filter on.
8990
+ * Knowledge base configuration for RAG retrieval.
8993
8991
  */
8994
- name?: string;
8992
+ kb_config?: RetellLlm.KBConfig | null;
8995
8993
 
8996
8994
  /**
8997
- * Filter by tool call success status.
8995
+ * A list of knowledge base ids to use for this resource.
8998
8996
  */
8999
- success?: ToolCall.Success;
8997
+ knowledge_base_ids?: Array<string> | null;
9000
8998
 
9001
8999
  /**
9002
- * The tool call type to filter on.
9000
+ * Select the underlying text LLM. If not set, would default to gpt-4.1.
9003
9001
  */
9004
- type?: string;
9005
- }
9006
-
9007
- export namespace ToolCall {
9008
- export interface NumberFilter {
9009
- /**
9010
- * eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
9011
- * than, le: less than or equal
9012
- */
9013
- op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
9014
-
9015
- type: 'number';
9016
-
9017
- value: number;
9018
- }
9019
-
9020
- export interface RangeFilter {
9021
- /**
9022
- * bt: between
9023
- */
9024
- op: 'bt';
9002
+ model?:
9003
+ | 'gpt-4.1'
9004
+ | 'gpt-4.1-mini'
9005
+ | 'gpt-4.1-nano'
9006
+ | 'gpt-5'
9007
+ | 'gpt-5-mini'
9008
+ | 'gpt-5-nano'
9009
+ | 'gpt-5.1'
9010
+ | 'gpt-5.2'
9011
+ | 'gpt-5.4'
9012
+ | 'gpt-5.4-mini'
9013
+ | 'gpt-5.4-nano'
9014
+ | 'gpt-5.5'
9015
+ | 'gpt-5.6-terra'
9016
+ | 'gpt-5.6-luna'
9017
+ | 'claude-4.5-sonnet'
9018
+ | 'claude-4.6-sonnet'
9019
+ | 'claude-5-sonnet'
9020
+ | 'claude-4.5-haiku'
9021
+ | 'gemini-3.0-flash'
9022
+ | 'gemini-3.1-flash-lite'
9023
+ | 'gemini-3.5-flash'
9024
+ | null;
9025
9025
 
9026
- type: 'range';
9026
+ /**
9027
+ * If set to true, will use high priority pool with more dedicated resource to
9028
+ * ensure lower and more consistent latency, default to false. This feature usually
9029
+ * comes with a higher cost.
9030
+ */
9031
+ model_high_priority?: boolean | null;
9027
9032
 
9028
- /**
9029
- * [lower_bound, upper_bound]
9030
- */
9031
- value: Array<number>;
9032
- }
9033
+ /**
9034
+ * If set, will control the randomness of the response. Value ranging from [0,1].
9035
+ * Lower value means more deterministic, while higher value means more random. If
9036
+ * unset, default value 0 will apply. Note that for tool calling, a lower value is
9037
+ * recommended.
9038
+ */
9039
+ model_temperature?: number;
9033
9040
 
9034
9041
  /**
9035
- * Filter by tool call success status.
9042
+ * Select the underlying speech to speech model. Can only set this or model, not
9043
+ * both.
9036
9044
  */
9037
- export interface Success {
9038
- op: 'eq';
9045
+ s2s_model?:
9046
+ | 'gpt-realtime-2.1'
9047
+ | 'gpt-realtime-2.1-mini'
9048
+ | 'gpt-realtime-2'
9049
+ | 'gpt-realtime-1.5'
9050
+ | 'gpt-realtime'
9051
+ | 'gpt-realtime-mini'
9052
+ | null;
9039
9053
 
9040
- type: 'boolean';
9054
+ /**
9055
+ * The speaker who starts the conversation. Required. Must be either 'user' or
9056
+ * 'agent'.
9057
+ */
9058
+ start_speaker?: 'user' | 'agent';
9041
9059
 
9042
- value: boolean;
9043
- }
9060
+ /**
9061
+ * Whether to use strict mode for tool calls. Only applicable when using certain
9062
+ * supported models.
9063
+ */
9064
+ tool_call_strict_mode?: boolean | null;
9044
9065
  }
9045
9066
 
9046
- export interface UserSentiment {
9067
+ export namespace RetellLlm {
9047
9068
  /**
9048
- * in: value is one of the listed values
9069
+ * Knowledge base configuration for RAG retrieval.
9049
9070
  */
9050
- op: 'in';
9051
-
9052
- type: 'enum';
9071
+ export interface KBConfig {
9072
+ /**
9073
+ * Similarity threshold for filtering search results
9074
+ */
9075
+ filter_score?: number;
9053
9076
 
9054
- value: Array<'Negative' | 'Positive' | 'Neutral' | 'Unknown'>;
9077
+ /**
9078
+ * Max number of knowledge base chunks to retrieve
9079
+ */
9080
+ top_k?: number;
9081
+ }
9055
9082
  }
9056
9083
  }
9057
9084
  }
9058
9085
 
9059
- export interface CallUpdateParams {
9060
- /**
9061
- * Custom attributes for the call, as key-value pairs. Each attribute must first be
9062
- * defined for your organization in the Retell dashboard (Call History → Actions →
9063
- * Custom attributes) before it can be set here. The object key must match the id
9064
- * of an existing organization-level custom attribute; keys that do not match a
9065
- * defined attribute are ignored and will not be saved. Values must be a string,
9066
- * number, or boolean.
9067
- */
9068
- custom_attributes?: { [key: string]: string | number | boolean };
9069
-
9070
- /**
9071
- * Data storage setting for this call. Overrides the agent's default setting.
9072
- * "everything" stores all data, "everything_except_pii" excludes PII when
9073
- * possible, "basic_attributes_only" stores only metadata. Cannot be downgraded
9074
- * from more restrictive to less restrictive settings.
9075
- */
9076
- data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only';
9077
-
9078
- /**
9079
- * An arbitrary object for storage purpose only. You can put anything here like
9080
- * your internal customer id associated with the call. Not used for processing. You
9081
- * can later get this field from the call object. Size limited to 50kB max.
9082
- */
9083
- metadata?: unknown;
9084
- }
9085
-
9086
9086
  export declare namespace Call {
9087
9087
  export {
9088
9088
  type CallResponse as CallResponse,
9089
9089
  type PhoneCallResponse as PhoneCallResponse,
9090
9090
  type WebCallResponse as WebCallResponse,
9091
9091
  type CallListResponse as CallListResponse,
9092
+ type CallUpdateParams as CallUpdateParams,
9093
+ type CallListParams as CallListParams,
9092
9094
  type CallCreatePhoneCallParams as CallCreatePhoneCallParams,
9093
- type CallRegisterPhoneCallParams as CallRegisterPhoneCallParams,
9094
9095
  type CallCreateWebCallParams as CallCreateWebCallParams,
9095
- type CallListParams as CallListParams,
9096
- type CallUpdateParams as CallUpdateParams,
9096
+ type CallRegisterPhoneCallParams as CallRegisterPhoneCallParams,
9097
9097
  };
9098
9098
  }