Vapi - Get Context
Retrieves the context for a VAPI call using the customer’s phone number
curl --request POST \
--url https://protegee.ai/voice/api/v1/vapi/get-context \
--header 'Content-Type: application/json' \
--data '{
"message": {
"customer": {
"number": "+1234567890"
},
"toolCalls": [
{
"id": "123456789",
"function": {
"name": "GetContextFromProtegee"
}
}
]
}
}'
{
"results": [
{
"toolCallId": "<string>",
"result": {
"caller": "<string>",
"description": "Reservation for two at The Gourmet Bistro, 7:30 PM on December 30th, 2024, Table 12, Indoor seating, Special request: Window view, Confirmation number: 12345",
"price": "10.00",
"vendor": "example-co",
"customer_id": "",
"persona": "english-jessica",
"callback": "+14155552671",
"email": "[email protected]",
"full_name": "John Doe",
"transaction_type": "once",
"memory": "",
"status": "payment-success",
"start_time": "2024-12-30T02:59:32.213280+00:00",
"processor": {},
"debug": ""
}
}
]
}
Query Parameters
API token for authentication
Body
Customer's phone number
"+1234567890"
Response
Phone number of the caller (your customer)
Details about the purchase
Price of the item (in USD), e.g. 10.50
Who this payment should be sent to - please refer to the /vendors page to find the full list
To specify the processor-specific customer ID (if you have it). Only used if processor is Authorize.net.
Which voice to use - currently available: 'english-jessica'
Phone number to hand the call back to after the payment is processed, e.g. +14155552671
Email of the caller (your customer)
Name of the caller (your customer)
How to process the transaction
once
, subscription
, authorize
Literally anything. Typically used to share information across agents.
How the call went
When the call was initiated.
dynamic response that is unique to the payment processor
Any misc details to help debug issues
curl --request POST \
--url https://protegee.ai/voice/api/v1/vapi/get-context \
--header 'Content-Type: application/json' \
--data '{
"message": {
"customer": {
"number": "+1234567890"
},
"toolCalls": [
{
"id": "123456789",
"function": {
"name": "GetContextFromProtegee"
}
}
]
}
}'
{
"results": [
{
"toolCallId": "<string>",
"result": {
"caller": "<string>",
"description": "Reservation for two at The Gourmet Bistro, 7:30 PM on December 30th, 2024, Table 12, Indoor seating, Special request: Window view, Confirmation number: 12345",
"price": "10.00",
"vendor": "example-co",
"customer_id": "",
"persona": "english-jessica",
"callback": "+14155552671",
"email": "[email protected]",
"full_name": "John Doe",
"transaction_type": "once",
"memory": "",
"status": "payment-success",
"start_time": "2024-12-30T02:59:32.213280+00:00",
"processor": {},
"debug": ""
}
}
]
}