@retell-ai/mcp-server 5.34.0 → 5.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -336,9 +336,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
336
336
  'retell_llm_dynamic_variables?: object;',
337
337
  ],
338
338
  response:
339
- "{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }",
339
+ "{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }",
340
340
  markdown:
341
- "## create\n\n`client.chat.create(agent_id: string, agent_version?: number | string, metadata?: object, retell_llm_dynamic_variables?: object): { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n**post** `/create-chat`\n\nCreate a chat session\n\n### Parameters\n\n- `agent_id: string`\n The chat agent to use for the chat.\n\n- `agent_version?: number | string`\n The version of the chat agent to use for the chat. If not provided, will default to latest version.\n\n- `metadata?: object`\n An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the chat. Not used for processing. You can later get this field from the chat object.\n\n- `retell_llm_dynamic_variables?: object`\n Add optional dynamic variables in key value pairs of string that injects into your Response Engine prompt and tool description. Only applicable for Response Engine.\n\n### Returns\n\n- `{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n - `agent_id: string`\n - `chat_id: string`\n - `chat_status: 'ongoing' | 'ended' | 'error'`\n - `chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }`\n - `chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }`\n - `chat_type?: 'api_chat' | 'sms_chat'`\n - `collected_dynamic_variables?: object`\n - `custom_attributes?: object`\n - `end_timestamp?: number`\n - `message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[]`\n - `metadata?: object`\n - `retell_llm_dynamic_variables?: object`\n - `start_timestamp?: number`\n - `transcript?: string`\n - `version?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatResponse = await client.chat.create({ agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' });\n\nconsole.log(chatResponse);\n```",
341
+ "## create\n\n`client.chat.create(agent_id: string, agent_version?: number | string, metadata?: object, retell_llm_dynamic_variables?: object): { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n**post** `/create-chat`\n\nCreate a chat session\n\n### Parameters\n\n- `agent_id: string`\n The chat agent to use for the chat.\n\n- `agent_version?: number | string`\n The version of the chat agent to use for the chat. If not provided, will default to latest version.\n\n- `metadata?: object`\n An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the chat. Not used for processing. You can later get this field from the chat object.\n\n- `retell_llm_dynamic_variables?: object`\n Add optional dynamic variables in key value pairs of string that injects into your Response Engine prompt and tool description. Only applicable for Response Engine.\n\n### Returns\n\n- `{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n - `agent_id: string`\n - `chat_id: string`\n - `chat_status: 'ongoing' | 'ended' | 'error'`\n - `chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }`\n - `chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }`\n - `chat_type?: 'api_chat' | 'sms_chat'`\n - `collected_dynamic_variables?: object`\n - `custom_attributes?: object`\n - `end_timestamp?: number`\n - `message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[]`\n - `metadata?: object`\n - `retell_llm_dynamic_variables?: object`\n - `start_timestamp?: number`\n - `transcript?: string`\n - `version?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatResponse = await client.chat.create({ agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' });\n\nconsole.log(chatResponse);\n```",
342
342
  perLanguage: {
343
343
  typescript: {
344
344
  method: 'client.chat.create',
@@ -374,9 +374,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
374
374
  'retell_llm_dynamic_variables?: object;',
375
375
  ],
376
376
  response:
377
- "{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }",
377
+ "{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }",
378
378
  markdown:
379
- "## create-sms-chat\n\n`client.chat.createSMSChat(from_number: string, to_number: string, metadata?: object, override_agent_id?: string, override_agent_version?: number | string, retell_llm_dynamic_variables?: object): { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n**post** `/create-sms-chat`\n\nStart an outbound SMS chat conversation with a phone number using the specified agent. The agent must be configured for chat mode. The initial SMS message will be automatically generated and sent based on the agent's configuration.\n\n### Parameters\n\n- `from_number: string`\n The phone number to send SMS from in E.164 format. Must be a number purchased from Retell or imported to Retell with SMS capability.\n\n- `to_number: string`\n The phone number to send SMS to in E.164 format\n\n- `metadata?: object`\n An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the chat. Not used for processing. You can later get this field from the chat object.\n\n- `override_agent_id?: string`\n For this particular chat, override the agent used with this agent id. This does not bind the agent to this number, this is for one time override.\n\n- `override_agent_version?: number | string`\n For this particular chat, override the agent version used with this version. This does not bind the agent version to this number, this is for one time override.\n\n- `retell_llm_dynamic_variables?: object`\n Add optional dynamic variables in key value pairs of string that injects into your Response Engine prompt and tool description. Only applicable for Response Engine.\n\n### Returns\n\n- `{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n - `agent_id: string`\n - `chat_id: string`\n - `chat_status: 'ongoing' | 'ended' | 'error'`\n - `chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }`\n - `chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }`\n - `chat_type?: 'api_chat' | 'sms_chat'`\n - `collected_dynamic_variables?: object`\n - `custom_attributes?: object`\n - `end_timestamp?: number`\n - `message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[]`\n - `metadata?: object`\n - `retell_llm_dynamic_variables?: object`\n - `start_timestamp?: number`\n - `transcript?: string`\n - `version?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatResponse = await client.chat.createSMSChat({ from_number: '+12137771234', to_number: '+14155551234' });\n\nconsole.log(chatResponse);\n```",
379
+ "## create-sms-chat\n\n`client.chat.createSMSChat(from_number: string, to_number: string, metadata?: object, override_agent_id?: string, override_agent_version?: number | string, retell_llm_dynamic_variables?: object): { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n**post** `/create-sms-chat`\n\nStart an outbound SMS chat conversation with a phone number using the specified agent. The agent must be configured for chat mode. The initial SMS message will be automatically generated and sent based on the agent's configuration.\n\n### Parameters\n\n- `from_number: string`\n The phone number to send SMS from in E.164 format. Must be a number purchased from Retell or imported to Retell with SMS capability.\n\n- `to_number: string`\n The phone number to send SMS to in E.164 format\n\n- `metadata?: object`\n An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the chat. Not used for processing. You can later get this field from the chat object.\n\n- `override_agent_id?: string`\n For this particular chat, override the agent used with this agent id. This does not bind the agent to this number, this is for one time override.\n\n- `override_agent_version?: number | string`\n For this particular chat, override the agent version used with this version. This does not bind the agent version to this number, this is for one time override.\n\n- `retell_llm_dynamic_variables?: object`\n Add optional dynamic variables in key value pairs of string that injects into your Response Engine prompt and tool description. Only applicable for Response Engine.\n\n### Returns\n\n- `{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n - `agent_id: string`\n - `chat_id: string`\n - `chat_status: 'ongoing' | 'ended' | 'error'`\n - `chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }`\n - `chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }`\n - `chat_type?: 'api_chat' | 'sms_chat'`\n - `collected_dynamic_variables?: object`\n - `custom_attributes?: object`\n - `end_timestamp?: number`\n - `message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[]`\n - `metadata?: object`\n - `retell_llm_dynamic_variables?: object`\n - `start_timestamp?: number`\n - `transcript?: string`\n - `version?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatResponse = await client.chat.createSMSChat({ from_number: '+12137771234', to_number: '+14155551234' });\n\nconsole.log(chatResponse);\n```",
380
380
  perLanguage: {
381
381
  typescript: {
382
382
  method: 'client.chat.createSMSChat',
@@ -432,9 +432,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
432
432
  qualified: 'client.chat.retrieve',
433
433
  params: ['chat_id: string;'],
434
434
  response:
435
- "{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }",
435
+ "{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }",
436
436
  markdown:
437
- "## retrieve\n\n`client.chat.retrieve(chat_id: string): { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n**get** `/get-chat/{chat_id}`\n\nRetrieve details of a specific chat\n\n### Parameters\n\n- `chat_id: string`\n\n### Returns\n\n- `{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n - `agent_id: string`\n - `chat_id: string`\n - `chat_status: 'ongoing' | 'ended' | 'error'`\n - `chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }`\n - `chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }`\n - `chat_type?: 'api_chat' | 'sms_chat'`\n - `collected_dynamic_variables?: object`\n - `custom_attributes?: object`\n - `end_timestamp?: number`\n - `message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[]`\n - `metadata?: object`\n - `retell_llm_dynamic_variables?: object`\n - `start_timestamp?: number`\n - `transcript?: string`\n - `version?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatResponse = await client.chat.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatResponse);\n```",
437
+ "## retrieve\n\n`client.chat.retrieve(chat_id: string): { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n**get** `/get-chat/{chat_id}`\n\nRetrieve details of a specific chat\n\n### Parameters\n\n- `chat_id: string`\n\n### Returns\n\n- `{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n - `agent_id: string`\n - `chat_id: string`\n - `chat_status: 'ongoing' | 'ended' | 'error'`\n - `chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }`\n - `chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }`\n - `chat_type?: 'api_chat' | 'sms_chat'`\n - `collected_dynamic_variables?: object`\n - `custom_attributes?: object`\n - `end_timestamp?: number`\n - `message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[]`\n - `metadata?: object`\n - `retell_llm_dynamic_variables?: object`\n - `start_timestamp?: number`\n - `transcript?: string`\n - `version?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatResponse = await client.chat.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatResponse);\n```",
438
438
  perLanguage: {
439
439
  typescript: {
440
440
  method: 'client.chat.retrieve',
@@ -462,9 +462,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
462
462
  qualified: 'client.chat.createChatCompletion',
463
463
  params: ['chat_id: string;', 'content: string;'],
464
464
  response:
465
- "{ messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[]; }",
465
+ "{ messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[]; }",
466
466
  markdown:
467
- "## create-chat-completion\n\n`client.chat.createChatCompletion(chat_id: string, content: string): { messages: object | object | object | object | object[]; }`\n\n**post** `/create-chat-completion`\n\nCreate a chat completion message\n\n### Parameters\n\n- `chat_id: string`\n Unique id of the chat to create completion.\n\n- `content: string`\n user message to generate agent chat completion.\n\n### Returns\n\n- `{ messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[]; }`\n\n - `messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst response = await client.chat.createChatCompletion({ chat_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD', content: 'hi how are you doing?' });\n\nconsole.log(response);\n```",
467
+ "## create-chat-completion\n\n`client.chat.createChatCompletion(chat_id: string, content: string): { messages: object | object | object | object | object | object | object[]; }`\n\n**post** `/create-chat-completion`\n\nCreate a chat completion message\n\n### Parameters\n\n- `chat_id: string`\n Unique id of the chat to create completion.\n\n- `content: string`\n user message to generate agent chat completion.\n\n### Returns\n\n- `{ messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[]; }`\n\n - `messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst response = await client.chat.createChatCompletion({ chat_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD', content: 'hi how are you doing?' });\n\nconsole.log(response);\n```",
468
468
  perLanguage: {
469
469
  typescript: {
470
470
  method: 'client.chat.createChatCompletion',
@@ -499,9 +499,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
499
499
  "sort_order?: 'ascending' | 'descending';",
500
500
  ],
501
501
  response:
502
- "{ has_more?: boolean; items?: { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }[]; pagination_key?: string; total?: number; }",
502
+ "{ has_more?: boolean; items?: { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }[]; pagination_key?: string; total?: number; }",
503
503
  markdown:
504
- "## list\n\n`client.chat.list(filter_criteria?: { agent?: { agent_id: string; version?: number[]; }[]; chat_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; chat_status?: { op: 'in'; type: 'enum'; value: 'ongoing' | 'ended' | 'error'[]; }; chat_successful?: { op: 'eq'; type: 'boolean'; value: boolean; }; combined_cost?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; custom_analysis_data?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; custom_attributes?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; disconnection_reason?: { op: 'in'; type: 'enum'; value: string[]; }; duration_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; end_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; start_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; user_sentiment?: { op: 'in'; type: 'enum'; value: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'[]; }; }, include_total?: boolean, limit?: number, pagination_key?: string, skip?: number, sort_order?: 'ascending' | 'descending'): { has_more?: boolean; items?: chat_response[]; pagination_key?: string; total?: number; }`\n\n**post** `/v3/list-chats`\n\nList chats with unified cursor pagination response.\n\n### Parameters\n\n- `filter_criteria?: { agent?: { agent_id: string; version?: number[]; }[]; chat_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; chat_status?: { op: 'in'; type: 'enum'; value: 'ongoing' | 'ended' | 'error'[]; }; chat_successful?: { op: 'eq'; type: 'boolean'; value: boolean; }; combined_cost?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; custom_analysis_data?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; custom_attributes?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; disconnection_reason?: { op: 'in'; type: 'enum'; value: string[]; }; duration_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; end_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; start_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; user_sentiment?: { op: 'in'; type: 'enum'; value: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'[]; }; }`\n Filter criteria for chats to retrieve.\n - `agent?: { agent_id: string; version?: number[]; }[]`\n Filter by agent(s). Agent filters are connected by OR.\n - `chat_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }`\n Filter by chat ID.\n - `chat_status?: { op: 'in'; type: 'enum'; value: 'ongoing' | 'ended' | 'error'[]; }`\n - `chat_successful?: { op: 'eq'; type: 'boolean'; value: boolean; }`\n Filter by whether the chat was successful.\n - `combined_cost?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by combined cost of the chat.\n - `custom_analysis_data?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]`\n Filter by custom analysis data fields.\n - `custom_attributes?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]`\n Filter by custom attributes fields.\n - `disconnection_reason?: { op: 'in'; type: 'enum'; value: string[]; }`\n - `duration_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by chat duration in milliseconds.\n - `end_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by chat end timestamp (epoch ms).\n - `start_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by chat start timestamp (epoch ms).\n - `user_sentiment?: { op: 'in'; type: 'enum'; value: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'[]; }`\n\n- `include_total?: boolean`\n Whether to include `total` (count of all chats matching `filter_criteria`, ignoring `limit`/`skip`/`pagination_key`) in the response. Defaults to false. Each enabled request triggers an additional aggregate query, so opt in only when the total is needed.\n\n- `limit?: number`\n Maximum number of chats to return.\n\n- `pagination_key?: string`\n Opaque pagination cursor from a previous response.\n\n- `skip?: number`\n Number of records to skip for pagination.\n\n- `sort_order?: 'ascending' | 'descending'`\n Sort chats by `start_timestamp` in ascending or descending order.\n\n### Returns\n\n- `{ has_more?: boolean; items?: { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }[]; pagination_key?: string; total?: number; }`\n\n - `has_more?: boolean`\n - `items?: { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }[]`\n - `pagination_key?: string`\n - `total?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chats = await client.chat.list();\n\nconsole.log(chats);\n```",
504
+ "## list\n\n`client.chat.list(filter_criteria?: { agent?: { agent_id: string; version?: number[]; }[]; chat_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; chat_status?: { op: 'in'; type: 'enum'; value: 'ongoing' | 'ended' | 'error'[]; }; chat_successful?: { op: 'eq'; type: 'boolean'; value: boolean; }; combined_cost?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; custom_analysis_data?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; custom_attributes?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; disconnection_reason?: { op: 'in'; type: 'enum'; value: string[]; }; duration_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; end_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; start_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; user_sentiment?: { op: 'in'; type: 'enum'; value: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'[]; }; }, include_total?: boolean, limit?: number, pagination_key?: string, skip?: number, sort_order?: 'ascending' | 'descending'): { has_more?: boolean; items?: chat_response[]; pagination_key?: string; total?: number; }`\n\n**post** `/v3/list-chats`\n\nList chats with unified cursor pagination response.\n\n### Parameters\n\n- `filter_criteria?: { agent?: { agent_id: string; version?: number[]; }[]; chat_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }; chat_status?: { op: 'in'; type: 'enum'; value: 'ongoing' | 'ended' | 'error'[]; }; chat_successful?: { op: 'eq'; type: 'boolean'; value: boolean; }; combined_cost?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; custom_analysis_data?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; custom_attributes?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]; disconnection_reason?: { op: 'in'; type: 'enum'; value: string[]; }; duration_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; end_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; start_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }; user_sentiment?: { op: 'in'; type: 'enum'; value: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'[]; }; }`\n Filter criteria for chats to retrieve.\n - `agent?: { agent_id: string; version?: number[]; }[]`\n Filter by agent(s). Agent filters are connected by OR.\n - `chat_id?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; }`\n Filter by chat ID.\n - `chat_status?: { op: 'in'; type: 'enum'; value: 'ongoing' | 'ended' | 'error'[]; }`\n - `chat_successful?: { op: 'eq'; type: 'boolean'; value: boolean; }`\n Filter by whether the chat was successful.\n - `combined_cost?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by combined cost of the chat.\n - `custom_analysis_data?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]`\n Filter by custom analysis data fields.\n - `custom_attributes?: { op: 'eq' | 'ne' | 'sw' | 'ew' | 'co'; type: 'string'; value: string; key?: string; } | { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; key?: string; } | { op: 'eq'; type: 'boolean'; value: boolean; key?: string; } | { op: 'bt'; type: 'range'; value: number[]; key?: string; } | { op: 'in'; type: 'enum'; value: string[]; key?: string; } | { op: 'pr' | 'np'; type: 'present'; key?: string; }[]`\n Filter by custom attributes fields.\n - `disconnection_reason?: { op: 'in'; type: 'enum'; value: string[]; }`\n - `duration_ms?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by chat duration in milliseconds.\n - `end_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by chat end timestamp (epoch ms).\n - `start_timestamp?: { op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le'; type: 'number'; value: number; } | { op: 'bt'; type: 'range'; value: number[]; }`\n Filter by chat start timestamp (epoch ms).\n - `user_sentiment?: { op: 'in'; type: 'enum'; value: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'[]; }`\n\n- `include_total?: boolean`\n Whether to include `total` (count of all chats matching `filter_criteria`, ignoring `limit`/`skip`/`pagination_key`) in the response. Defaults to false. Each enabled request triggers an additional aggregate query, so opt in only when the total is needed.\n\n- `limit?: number`\n Maximum number of chats to return.\n\n- `pagination_key?: string`\n Opaque pagination cursor from a previous response.\n\n- `skip?: number`\n Number of records to skip for pagination.\n\n- `sort_order?: 'ascending' | 'descending'`\n Sort chats by `start_timestamp` in ascending or descending order.\n\n### Returns\n\n- `{ has_more?: boolean; items?: { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }[]; pagination_key?: string; total?: number; }`\n\n - `has_more?: boolean`\n - `items?: { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }[]`\n - `pagination_key?: string`\n - `total?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chats = await client.chat.list();\n\nconsole.log(chats);\n```",
505
505
  perLanguage: {
506
506
  typescript: {
507
507
  method: 'client.chat.list',
@@ -535,9 +535,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
535
535
  'override_dynamic_variables?: object;',
536
536
  ],
537
537
  response:
538
- "{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }",
538
+ "{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }",
539
539
  markdown:
540
- "## update\n\n`client.chat.update(chat_id: string, custom_attributes?: object, data_storage_setting?: 'everything' | 'basic_attributes_only', metadata?: object, override_dynamic_variables?: object): { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n**patch** `/update-chat/{chat_id}`\n\nUpdate metadata and sensitive data storage settings for an existing chat.\n\n### Parameters\n\n- `chat_id: string`\n\n- `custom_attributes?: object`\n Custom attributes for the chat\n\n- `data_storage_setting?: 'everything' | 'basic_attributes_only'`\n Data storage setting for this chat. Overrides the agent's default setting. \"everything\" stores all data, \"basic_attributes_only\" stores only metadata. Cannot be downgraded from more restrictive to less restrictive settings.\n\n- `metadata?: object`\n An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the chat. Not used for processing. You can later get this field from the chat object. Size limited to 50kB max.\n\n- `override_dynamic_variables?: object`\n Override dynamic variables represented as key-value pairs of strings. Setting this will override or add the dynamic variables set in the agent during the call. Only need to set the delta where you want to override, no need to set the entire dynamic variables object. Setting this to null will remove any existing override.\n\n### Returns\n\n- `{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n - `agent_id: string`\n - `chat_id: string`\n - `chat_status: 'ongoing' | 'ended' | 'error'`\n - `chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }`\n - `chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }`\n - `chat_type?: 'api_chat' | 'sms_chat'`\n - `collected_dynamic_variables?: object`\n - `custom_attributes?: object`\n - `end_timestamp?: number`\n - `message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[]`\n - `metadata?: object`\n - `retell_llm_dynamic_variables?: object`\n - `start_timestamp?: number`\n - `transcript?: string`\n - `version?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatResponse = await client.chat.update('chat_98c1a2157aa0559144d67bb0729');\n\nconsole.log(chatResponse);\n```",
540
+ "## update\n\n`client.chat.update(chat_id: string, custom_attributes?: object, data_storage_setting?: 'everything' | 'basic_attributes_only', metadata?: object, override_dynamic_variables?: object): { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n**patch** `/update-chat/{chat_id}`\n\nUpdate metadata and sensitive data storage settings for an existing chat.\n\n### Parameters\n\n- `chat_id: string`\n\n- `custom_attributes?: object`\n Custom attributes for the chat\n\n- `data_storage_setting?: 'everything' | 'basic_attributes_only'`\n Data storage setting for this chat. Overrides the agent's default setting. \"everything\" stores all data, \"basic_attributes_only\" stores only metadata. Cannot be downgraded from more restrictive to less restrictive settings.\n\n- `metadata?: object`\n An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the chat. Not used for processing. You can later get this field from the chat object. Size limited to 50kB max.\n\n- `override_dynamic_variables?: object`\n Override dynamic variables represented as key-value pairs of strings. Setting this will override or add the dynamic variables set in the agent during the call. Only need to set the delta where you want to override, no need to set the entire dynamic variables object. Setting this to null will remove any existing override.\n\n### Returns\n\n- `{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n - `agent_id: string`\n - `chat_id: string`\n - `chat_status: 'ongoing' | 'ended' | 'error'`\n - `chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }`\n - `chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }`\n - `chat_type?: 'api_chat' | 'sms_chat'`\n - `collected_dynamic_variables?: object`\n - `custom_attributes?: object`\n - `end_timestamp?: number`\n - `message_with_tool_calls?: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[]`\n - `metadata?: object`\n - `retell_llm_dynamic_variables?: object`\n - `start_timestamp?: number`\n - `transcript?: string`\n - `version?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatResponse = await client.chat.update('chat_98c1a2157aa0559144d67bb0729');\n\nconsole.log(chatResponse);\n```",
541
541
  perLanguage: {
542
542
  typescript: {
543
543
  method: 'client.chat.update',
@@ -2828,7 +2828,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2828
2828
  qualified: 'client.playground.completion',
2829
2829
  params: [
2830
2830
  'agent_id: string;',
2831
- "messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[];",
2831
+ "messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[];",
2832
2832
  'version?: number | string;',
2833
2833
  'component_id?: string;',
2834
2834
  'current_node_id?: string;',
@@ -2837,9 +2837,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2837
2837
  "tool_mocks?: { input_match_rule: { type: 'any'; } | { args: object; type: 'partial_match'; }; output: string; tool_name: string; result?: boolean; }[];",
2838
2838
  ],
2839
2839
  response:
2840
- "{ messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[]; call_ended?: boolean; current_node_id?: string; current_state?: string; dynamic_variables?: object; knowledge_base_retrieved_contents?: string[]; }",
2840
+ "{ messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[]; call_ended?: boolean; current_node_id?: string; current_state?: string; dynamic_variables?: object; knowledge_base_retrieved_contents?: string[]; }",
2841
2841
  markdown:
2842
- "## completion\n\n`client.playground.completion(agent_id: string, messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[], version?: number | string, component_id?: string, current_node_id?: string, current_state?: string, dynamic_variables?: object, tool_mocks?: { input_match_rule: { type: 'any'; } | { args: object; type: 'partial_match'; }; output: string; tool_name: string; result?: boolean; }[]): { messages: object | object | object | object | object[]; call_ended?: boolean; current_node_id?: string; current_state?: string; dynamic_variables?: object; knowledge_base_retrieved_contents?: string[]; }`\n\n**post** `/agent-playground-completion/{agent_id}`\n\nStateless playground completion. Send the full conversation history (same shape as chat completion messages) and receive only the newly generated messages. Nothing is persisted server-side — the caller manages conversation state.\n\n### Parameters\n\n- `agent_id: string`\n\n- `messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[]`\n Full conversation history, same shape as chat completion messages. message_id and created_timestamp are optional — server generates them if omitted.\n\n- `version?: number | string`\n Agent version to use. Defaults to latest.\n\n- `component_id?: string`\n Conversation flow component id. Required when current_node_id refers to a node within a component.\n\n- `current_node_id?: string`\n Current node id for conversation-flow agents. Used to resume from a specific node. Must be provided together with component_id when testing components.\n\n- `current_state?: string`\n Current state name for retell-llm agents. Used to resume from a specific state.\n\n- `dynamic_variables?: object`\n Key-value pairs for dynamic variable substitution.\n\n- `tool_mocks?: { input_match_rule: { type: 'any'; } | { args: object; type: 'partial_match'; }; output: string; tool_name: string; result?: boolean; }[]`\n Optional mock responses for tools. When provided, the agent uses these instead of executing real tool calls.\n\n### Returns\n\n- `{ messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[]; call_ended?: boolean; current_node_id?: string; current_state?: string; dynamic_variables?: object; knowledge_base_retrieved_contents?: string[]; }`\n\n - `messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; }[]`\n - `call_ended?: boolean`\n - `current_node_id?: string`\n - `current_state?: string`\n - `dynamic_variables?: object`\n - `knowledge_base_retrieved_contents?: string[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst response = await client.playground.completion('agent_id', { messages: [{ content: 'Hi, I\\'d like to check my appointment.', role: 'user' }, { content: 'Sure! Could you please provide your name?', role: 'agent' }, { content: 'My name is John Smith.', role: 'user' }] });\n\nconsole.log(response);\n```",
2842
+ "## completion\n\n`client.playground.completion(agent_id: string, messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[], version?: number | string, component_id?: string, current_node_id?: string, current_state?: string, dynamic_variables?: object, tool_mocks?: { input_match_rule: { type: 'any'; } | { args: object; type: 'partial_match'; }; output: string; tool_name: string; result?: boolean; }[]): { messages: object | object | object | object | object | object | object[]; call_ended?: boolean; current_node_id?: string; current_state?: string; dynamic_variables?: object; knowledge_base_retrieved_contents?: string[]; }`\n\n**post** `/agent-playground-completion/{agent_id}`\n\nStateless playground completion. Send the full conversation history (same shape as chat completion messages) and receive only the newly generated messages. Nothing is persisted server-side — the caller manages conversation state.\n\n### Parameters\n\n- `agent_id: string`\n\n- `messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[]`\n Full conversation history, same shape as chat completion messages. message_id and created_timestamp are optional — server generates them if omitted.\n\n- `version?: number | string`\n Agent version to use. Defaults to latest.\n\n- `component_id?: string`\n Conversation flow component id. Required when current_node_id refers to a node within a component.\n\n- `current_node_id?: string`\n Current node id for conversation-flow agents. Used to resume from a specific node. Must be provided together with component_id when testing components.\n\n- `current_state?: string`\n Current state name for retell-llm agents. Used to resume from a specific state.\n\n- `dynamic_variables?: object`\n Key-value pairs for dynamic variable substitution.\n\n- `tool_mocks?: { input_match_rule: { type: 'any'; } | { args: object; type: 'partial_match'; }; output: string; tool_name: string; result?: boolean; }[]`\n Optional mock responses for tools. When provided, the agent uses these instead of executing real tool calls.\n\n### Returns\n\n- `{ messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[]; call_ended?: boolean; current_node_id?: string; current_state?: string; dynamic_variables?: object; knowledge_base_retrieved_contents?: string[]; }`\n\n - `messages: { content: string; role: 'agent' | 'user'; created_timestamp?: number; message_id?: string; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; message_id?: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; created_timestamp?: number; message_id?: string; successful?: boolean; } | { role: 'node_transition'; created_timestamp?: number; former_node_id?: string; former_node_name?: string; message_id?: string; new_node_id?: string; new_node_name?: string; transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal'; } | { role: 'state_transition'; created_timestamp?: number; former_state_name?: string; message_id?: string; new_state_name?: string; } | { content: string; role: 'injected'; created_timestamp?: number; message_id?: string; } | { content: string; role: 'sms'; created_timestamp?: number; message_id?: string; multimedia?: { url: string; summary?: string; }[]; }[]`\n - `call_ended?: boolean`\n - `current_node_id?: string`\n - `current_state?: string`\n - `dynamic_variables?: object`\n - `knowledge_base_retrieved_contents?: string[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst response = await client.playground.completion('agent_id', { messages: [{ content: 'Hi, I\\'d like to check my appointment.', role: 'user' }, { content: 'Sure! Could you please provide your name?', role: 'agent' }, { content: 'My name is John Smith.', role: 'user' }] });\n\nconsole.log(response);\n```",
2843
2843
  perLanguage: {
2844
2844
  typescript: {
2845
2845
  method: 'client.playground.completion',