L2.
01/14/2025, 12:16 AMVapi
01/14/2025, 12:18 AMVapi
01/14/2025, 12:18 AML2.
01/14/2025, 12:19 AMVapi
01/14/2025, 12:19 AML2.
01/14/2025, 12:20 AMVapi
01/14/2025, 12:20 AMjson
POST /api/calls/initiate
Content-Type: application/json
{
"to": "+1234567890",
"from": "+0987654321",
"conversationHistory": [
{
"timestamp": "2023-04-01T12:00:00Z",
"speaker": "user",
"message": "Hello, I need help with my account."
},
{
"timestamp": "2023-04-01T12:01:00Z",
"speaker": "agent",
"message": "Sure, I can help you with that. Could you please provide your account number?"
}
// ... more conversation history
],
// ... other call initiation parameters
}
Please replace the endpoint /api/calls/initiate
and the JSON structure with the actual ones provided by your voice platform's API documentation. If you need the exact details or if there's a specific function you need to call within the VAPI, please provide more information or consult the API documentation for the correct syntax and parameters.L2.
01/14/2025, 12:21 AMVapi
01/14/2025, 12:21 AMhttp
POST {serverUrl}/calls
Authorization: Bearer {your_api_key}
Content-Type: application/json
{
"type": "outboundPhoneCall",
"phoneCallProvider": "{provider_name}",
"to": "{recipient_number}",
"from": "{your_number}",
"context": {
"conversationHistory": [
{
"timestamp": "2023-04-01T12:00:00Z",
"speaker": "user",
"message": "Hello, I need help with my account."
},
{
"timestamp": "2023-04-01T12:01:00Z",
"speaker": "agent",
"message": "Sure, I can help you with that. Could you please provide your account number?"
}
// ... more conversation history
]
}
// ... other call initiation parameters if needed
}
In this example, replace {serverUrl}
, {your_api_key}
, {provider_name}
, {recipient_number}
, and {your_number}
with the actual values you have. The context
field is where you would include the conversation history.
Please ensure that you replace the placeholders with the actual values from your Voice API configuration and that the structure of the JSON payload matches the requirements of your specific API. If you need the exact details, you should refer to the API documentation provided by your voice platform or contact their support for further assistance.Shubham Bajaj
01/14/2025, 5:08 PMShubham Bajaj
01/14/2025, 5:08 PMjson
{
"model": {
"provider": "openai",
"model": "gpt-4",
"messages": [
{
"role": "system",
"content": "You are a voice assistant handling a call with a customer. Use the following previous call history to provide more personalized and contextual responses."
},
{
"role": "system",
"content": "Previous call history: [Include formatted call logs, outcomes, and important details from past interactions with this customer]"
}
]
}
}
Shubham Bajaj
01/14/2025, 5:08 PML2.
01/14/2025, 5:08 PML2.
01/14/2025, 5:08 PMShubham Bajaj
01/14/2025, 5:09 PML2.
01/14/2025, 5:09 PML2.
01/14/2025, 5:09 PMShubham Bajaj
01/14/2025, 5:09 PML2.
01/14/2025, 5:10 PML2.
01/14/2025, 5:10 PML2.
01/14/2025, 5:10 PML2.
01/14/2025, 5:13 PML2.
01/14/2025, 5:17 PMShubham Bajaj
01/14/2025, 5:18 PML2.
01/14/2025, 5:19 PML2.
01/14/2025, 9:18 PML2.
01/14/2025, 9:22 PML2.
01/14/2025, 9:22 PMSeygi
03/13/2025, 1:40 PMjson
{
type: 'add-message',
message: {
role: 'system',
content: `IMPORTANT CONTEXT - This caller has contacted us before. Here is their previous summary. Please acknowledge this information and use it to provide continuity of service: \n\n${previousSummary}`
},
triggerResponseEnabled: true
}
Could you help me with that?Kyle Brunker
03/14/2025, 3:03 AM