v2
latestOpenAPI 3.1.02026-07-313981108.2 KBCalls
Connect Call
Connect your call with Interactly.
post/calls/v1/conversations/connect
Request body
Example request
{
"direction": "outbound",
"phoneNumberId": "5f7b1b1b1b1b1b1b1b1b1b1b",
"metadata": {
"key": "value"
},
"assistant": {
"name": "My Assistant",
"welcomeMessage": "Hello! How can I help you?",
"welcomeMessageMode": "assistant-speaks-first",
"assistantProvider": "openai",
"assistantModel": "gpt-4o-mini",
"assistantSystemPrompt": "You are AI assistant to help patients with their health care needs.",
"assistantMaxTokens": 256,
"assistantResponseSplitter": ",",
"config": {
"speech": {
"stt": {
"vendor": "microsoft"
},
"sttFallback": {
"vendor": "microsoft"
},
"ttsData": [
{
"enabled": true,
"vendor": "eleven-labs",
"language": "en-US",
"voice": "ZeK6O9RfGNGj0cJT2HoJ",
"config": {
"modelId": "eleven_multilingual_v2",
"stability": 0.7,
"similarityBoost": 0.85,
"speakerBoost": true,
"styleExaggeration": 0.5,
"seed": 42,
"speed": 1,
"applyTextNormalization": true
}
}
]
}
},
"backgroundSound": "enable",
"backgroundSoundVolume": 50,
"maxConsecutiveTtsFailures": 2,
"recordingEnabled": true,
"maxCallDuration": 900,
"idleTimeout": 20,
"maxIdleMessagesInSequence": 3,
"userInterruptionAckPlan": {
"phrases": [
"Please hold on while I check your account.",
"one moment please",
"let me just check that for you"
]
},
"assistantToolIds": [],
"assistantKnowledgeBaseIds": [],
"endCallMessage": "Goodbye!",
"endCallToolDescription": "Trigger the end call only when the user is done with the conversation.",
"endCallPhrases": [
"goodbye",
"bye"
],
"callForwardData": [
{
"phoneNumber": "+1234567890",
"name": "call-forward-name",
"onFailedMessage": "The call forward failed. Please try again later."
}
],
"holdMusicUrl": "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
"warmTransferTimeout": 300,
"assistantAnalysis": {
"summary": {
"maxTokens": 256,
"prompt": "Generate a summary of the call.",
"timeoutSeconds": 30
},
"successEvaluation": {
"maxTokens": 256,
"prompt": "Evaluate the success of the call.",
"timeoutSeconds": 30
},
"structuredData": {
"maxTokens": 256,
"prompt": "Extract structured data from the call.",
"timeoutSeconds": 30
}
},
"assistantOverrides": {
"welcomeMessage": "Hello, how can I help you today?",
"welcomeMessageMode": "assistant-speaks-first",
"recordingEnabled": true,
"maxConsecutiveTtsFailures": 2,
"holdMusicUrl": "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
"warmTransferTimeout": 300,
"recordingPath": "/recordings",
"dynamicVariables": {
"user_name": "John Doe"
}
},
"assistantServer": {
"timeoutSeconds": 20,
"url": "https://api.example.com/v1/getUserDetails",
"secret": "my-secret",
"headers": {}
},
"persistHistory": {
"retentionPeriod": 7
}
},
"assistantId": "678a253ca6d866573043502e",
"assistantOverrides": {
"welcomeMessage": "Hello, how can I help you today?",
"welcomeMessageMode": "assistant-speaks-first",
"recordingEnabled": true,
"maxConsecutiveTtsFailures": 2,
"holdMusicUrl": "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
"warmTransferTimeout": 300,
"recordingPath": "/recordings",
"dynamicVariables": {
"user_name": "John Doe"
}
}
}Response
Successful response
Example response
{
"id": "CC-897ee2d4-ea2f-4958-889f-df381bdfc939",
"teamId": "1f7b1b1b1b1b1b1b1b1b1b1b",
"assistantId": "678a253ca6d866573043502e",
"phoneNumberId": "5f7b1b1b1b1b1b1b1b1b1b1b",
"direction": "outbound",
"createdAt": "2020-10-05T00:00:00.000Z",
"updatedAt": "2020-10-05T00:00:00.000Z",
"status": "queued",
"metadata": {
"key": "value"
},
"phoneVendor": "twilio",
"phoneVendorDetails": {
"from": "+1234567890",
"to": "+1234567890",
"twiml": "twiml-response-tobe-given-to-twilio",
"responseType": "text/xml",
"statusCallback": "https://<domain>.interactly.ai/voice/twilio/call-status/<call-id>"
},
"monitor": {
"controlUrl": "https://<domain>.interactly.ai/calls/v1/conversations/<random-id>/control"
}
}