Skip to main content
POST
/
api
/
v1
/
calls
Create Call
curl --request POST \
  --url https://api.voicebot.studio/api/v1/calls \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "assistantId": "<string>",
  "assistant": {
    "name": "<string>",
    "model": {
      "messages": [
        {}
      ],
      "provider": "standard",
      "model": "standard",
      "tools": [
        {}
      ],
      "toolIds": [
        "<string>"
      ],
      "temperature": 123,
      "maxTokens": 123,
      "numFastTurns": 123,
      "knowledgeBase": {
        "provider": "<string>",
        "topK": 123,
        "fileIds": [
          "<any>"
        ]
      },
      "fallbackModels": [
        "standard"
      ],
      "semanticCachingEnabled": true,
      "emotionRecognitionEnabled": true
    },
    "voice": {
      "fillerInjectionEnabled": true,
      "model": "standard",
      "style": 123,
      "voiceId": "Robert",
      "language": "<string>",
      "provider": "<string>",
      "stability": 123,
      "similarityBoost": 123,
      "useSpeakerBoost": true,
      "enableSsmlParsing": true,
      "optimizeStreamingLatency": 123,
      "chunkPlan": {
        "enabled": true,
        "minCharacters": 40.5,
        "punctuationBoundaries": [
          "<any>"
        ],
        "formatPlan": {}
      }
    },
    "firstMessageMode": "assistant-speaks-first",
    "hipaaEnabled": true,
    "clientMessages": [
      "<string>"
    ],
    "serverMessages": [
      "end-of-call-report"
    ],
    "silenceTimeoutSeconds": 123,
    "maxDurationSeconds": 123,
    "backgroundSound": "off",
    "backgroundDenoisingEnabled": true,
    "modelOutputInMessagesEnabled": true,
    "transportConfigurations": [
      {
        "provider": "<string>",
        "timeout": 123,
        "record": true,
        "recordingChannels": "mono"
      }
    ],
    "firstMessage": "<string>",
    "voicemailDetection": {
      "enabled": true,
      "provider": "<string>",
      "machineDetectionTimeout": 123,
      "voicemailDetectionTypes": [
        "machine_start"
      ],
      "machineDetectionSilenceTimeout": 123,
      "machineDetectionSpeechThreshold": 123,
      "machineDetectionSpeechEndThreshold": 123
    },
    "voicemailMessage": "<string>",
    "endCallMessage": "<string>",
    "endCallPhrases": [
      "<string>"
    ],
    "metadata": {},
    "serverUrl": "<string>",
    "serverUrlSecret": "<string>",
    "analysisPlan": {
      "successEvaluationRubric": "NumericScale",
      "successEvaluationRequestTimeoutSeconds": 123,
      "successEvaluationPrompt": "<string>",
      "structuredDataSchema": {
        "type": "string",
        "items": {},
        "properties": {},
        "description": "<string>",
        "required": [
          "<any>"
        ]
      },
      "structuredDataRequestTimeoutSeconds": 123,
      "structuredDataPrompt": "<string>",
      "summaryPrompt": "<string>",
      "summaryRequestTimeoutSeconds": 123
    },
    "artifactPlan": {
      "transcriptPlan": {
        "enabled": true,
        "userName": "<string>",
        "assistantName": "<string>"
      },
      "recordingEnabled": true,
      "videoRecordingEnabled": true,
      "recordingPath": "<string>"
    },
    "messagePlan": {
      "idleMessages": [
        "<string>"
      ],
      "idleMessageMaxSpokenCount": 123,
      "idleTimeoutSeconds": 123
    },
    "startSpeakingPlan": {
      "waitSeconds": 123,
      "smartEndpointingEnabled": true,
      "transcriptionEndpointingPlan": {
        "onPunctuationSeconds": 123,
        "onNoPunctuationSeconds": 123,
        "onNumberSeconds": 123
      }
    },
    "stopSpeakingPlan": {
      "numWords": 123,
      "voiceSeconds": 123,
      "backoffSeconds": 123
    },
    "monitorPlan": {
      "listenEnabled": true,
      "controlEnabled": true
    },
    "transcriber": {
      "provider": "standard",
      "model": "standard",
      "language": "<string>",
      "smartFormat": true,
      "languageDetectionEnabled": true,
      "keywords": [
        "<string>"
      ],
      "endpointing": 123
    },
    "dialKeypadFunctionEnabled": true,
    "endCallFunctionEnabled": true,
    "forwardingPhoneNumber": "<string>"
  },
  "assistantOverrides": {
    "name": "<string>",
    "model": {
      "messages": [
        {
          "content": "<string>",
          "role": "<string>"
        }
      ],
      "provider": "standard",
      "model": "standard",
      "tools": [
        {
          "async": false,
          "messages": [
            "<any>"
          ],
          "type": "dtmf",
          "function": {
            "strict": "<any>",
            "name": "<any>",
            "description": "<any>",
            "parameters": "<any>"
          },
          "server": {
            "timeoutSeconds": "<any>",
            "url": "<any>",
            "secret": "<any>",
            "headers": "<any>"
          }
        }
      ],
      "toolIds": [
        "<string>"
      ],
      "temperature": 123,
      "maxTokens": 123,
      "numFastTurns": 123,
      "knowledgeBase": {
        "provider": "<string>",
        "topK": 123,
        "fileIds": [
          "<any>"
        ]
      },
      "fallbackModels": [
        "standard"
      ],
      "semanticCachingEnabled": true,
      "emotionRecognitionEnabled": true
    },
    "voice": {
      "fillerInjectionEnabled": true,
      "model": "standard",
      "style": 123,
      "voiceId": "Robert",
      "language": "<string>",
      "provider": "<string>",
      "stability": 123,
      "similarityBoost": 123,
      "useSpeakerBoost": true,
      "enableSsmlParsing": true,
      "optimizeStreamingLatency": 123,
      "chunkPlan": {
        "enabled": true,
        "minCharacters": 40.5,
        "punctuationBoundaries": [
          "<any>"
        ],
        "formatPlan": {}
      }
    },
    "firstMessageMode": "assistant-speaks-first",
    "hipaaEnabled": true,
    "clientMessages": [
      "<string>"
    ],
    "serverMessages": [
      "end-of-call-report"
    ],
    "silenceTimeoutSeconds": 123,
    "maxDurationSeconds": 123,
    "backgroundSound": "off",
    "backgroundDenoisingEnabled": true,
    "modelOutputInMessagesEnabled": true,
    "transportConfigurations": [
      {
        "provider": "<string>",
        "timeout": 123,
        "record": true,
        "recordingChannels": "mono"
      }
    ],
    "firstMessage": "<string>",
    "voicemailDetection": {
      "enabled": true,
      "provider": "<string>",
      "machineDetectionTimeout": 123,
      "voicemailDetectionTypes": [
        "machine_start"
      ],
      "machineDetectionSilenceTimeout": 123,
      "machineDetectionSpeechThreshold": 123,
      "machineDetectionSpeechEndThreshold": 123
    },
    "voicemailMessage": "<string>",
    "endCallMessage": "<string>",
    "endCallPhrases": [
      "<string>"
    ],
    "metadata": {},
    "serverUrl": "<string>",
    "serverUrlSecret": "<string>",
    "analysisPlan": {
      "successEvaluationRubric": "NumericScale",
      "successEvaluationRequestTimeoutSeconds": 123,
      "successEvaluationPrompt": "<string>",
      "structuredDataSchema": {
        "type": "string",
        "items": {},
        "properties": {},
        "description": "<string>",
        "required": [
          "<any>"
        ]
      },
      "structuredDataRequestTimeoutSeconds": 123,
      "structuredDataPrompt": "<string>",
      "summaryPrompt": "<string>",
      "summaryRequestTimeoutSeconds": 123
    },
    "artifactPlan": {
      "transcriptPlan": {
        "enabled": true,
        "userName": "<string>",
        "assistantName": "<string>"
      },
      "recordingEnabled": true,
      "videoRecordingEnabled": true,
      "recordingPath": "<string>"
    },
    "messagePlan": {
      "idleMessages": [
        "<string>"
      ],
      "idleMessageMaxSpokenCount": 123,
      "idleTimeoutSeconds": 123
    },
    "startSpeakingPlan": {
      "waitSeconds": 123,
      "smartEndpointingEnabled": true,
      "transcriptionEndpointingPlan": {
        "onPunctuationSeconds": 123,
        "onNoPunctuationSeconds": 123,
        "onNumberSeconds": 123
      }
    },
    "stopSpeakingPlan": {
      "numWords": 123,
      "voiceSeconds": 123,
      "backoffSeconds": 123
    },
    "monitorPlan": {
      "listenEnabled": true,
      "controlEnabled": true
    },
    "transcriber": {
      "provider": "standard",
      "model": "standard",
      "language": "<string>",
      "smartFormat": true,
      "languageDetectionEnabled": true,
      "keywords": [
        "<string>"
      ],
      "endpointing": 123
    },
    "dialKeypadFunctionEnabled": true,
    "endCallFunctionEnabled": true,
    "forwardingPhoneNumber": "<string>",
    "variableValues": {}
  },
  "squadId": "<string>",
  "squad": {
    "name": "<string>",
    "assistants": [
      {
        "name": "<string>",
        "model": {
          "messages": [
            {}
          ],
          "provider": "standard",
          "model": "standard",
          "tools": [
            {}
          ],
          "toolIds": [
            "<string>"
          ],
          "temperature": 123,
          "maxTokens": 123,
          "numFastTurns": 123,
          "knowledgeBase": {
            "provider": "<string>",
            "topK": 123,
            "fileIds": [
              "<any>"
            ]
          },
          "fallbackModels": [
            "standard"
          ],
          "semanticCachingEnabled": true,
          "emotionRecognitionEnabled": true
        },
        "voice": {
          "fillerInjectionEnabled": true,
          "model": "standard",
          "style": 123,
          "voiceId": "Robert",
          "language": "<string>",
          "provider": "<string>",
          "stability": 123,
          "similarityBoost": 123,
          "useSpeakerBoost": true,
          "enableSsmlParsing": true,
          "optimizeStreamingLatency": 123,
          "chunkPlan": {
            "enabled": true,
            "minCharacters": 40.5,
            "punctuationBoundaries": [
              "<any>"
            ],
            "formatPlan": {}
          }
        },
        "firstMessageMode": "assistant-speaks-first",
        "hipaaEnabled": true,
        "clientMessages": [
          "<string>"
        ],
        "serverMessages": [
          "end-of-call-report"
        ],
        "silenceTimeoutSeconds": 123,
        "maxDurationSeconds": 123,
        "backgroundSound": "off",
        "backgroundDenoisingEnabled": true,
        "modelOutputInMessagesEnabled": true,
        "transportConfigurations": [
          {
            "provider": "<string>",
            "timeout": 123,
            "record": true,
            "recordingChannels": "mono"
          }
        ],
        "firstMessage": "<string>",
        "voicemailDetection": {
          "enabled": true,
          "provider": "<string>",
          "machineDetectionTimeout": 123,
          "voicemailDetectionTypes": [
            "machine_start"
          ],
          "machineDetectionSilenceTimeout": 123,
          "machineDetectionSpeechThreshold": 123,
          "machineDetectionSpeechEndThreshold": 123
        },
        "voicemailMessage": "<string>",
        "endCallMessage": "<string>",
        "endCallPhrases": [
          "<string>"
        ],
        "metadata": {},
        "serverUrl": "<string>",
        "serverUrlSecret": "<string>",
        "analysisPlan": {
          "successEvaluationRubric": "NumericScale",
          "successEvaluationRequestTimeoutSeconds": 123,
          "successEvaluationPrompt": "<string>",
          "structuredDataSchema": {
            "type": "string",
            "items": {},
            "properties": {},
            "description": "<string>",
            "required": [
              "<any>"
            ]
          },
          "structuredDataRequestTimeoutSeconds": 123,
          "structuredDataPrompt": "<string>",
          "summaryPrompt": "<string>",
          "summaryRequestTimeoutSeconds": 123
        },
        "artifactPlan": {
          "transcriptPlan": {
            "enabled": true,
            "userName": "<string>",
            "assistantName": "<string>"
          },
          "recordingEnabled": true,
          "videoRecordingEnabled": true,
          "recordingPath": "<string>"
        },
        "messagePlan": {
          "idleMessages": [
            "<string>"
          ],
          "idleMessageMaxSpokenCount": 123,
          "idleTimeoutSeconds": 123
        },
        "startSpeakingPlan": {
          "waitSeconds": 123,
          "smartEndpointingEnabled": true,
          "transcriptionEndpointingPlan": {
            "onPunctuationSeconds": 123,
            "onNoPunctuationSeconds": 123,
            "onNumberSeconds": 123
          }
        },
        "stopSpeakingPlan": {
          "numWords": 123,
          "voiceSeconds": 123,
          "backoffSeconds": 123
        },
        "monitorPlan": {
          "listenEnabled": true,
          "controlEnabled": true
        },
        "transcriber": {
          "provider": "standard",
          "model": "standard",
          "language": "<string>",
          "smartFormat": true,
          "languageDetectionEnabled": true,
          "keywords": [
            "<string>"
          ],
          "endpointing": 123
        },
        "dialKeypadFunctionEnabled": true,
        "endCallFunctionEnabled": true,
        "forwardingPhoneNumber": "<string>"
      }
    ]
  },
  "phoneNumberId": "<string>",
  "phoneNumber": {
    "provider": "twilio",
    "number": "<string>",
    "twilioAccountSid": "<string>",
    "twilioAuthToken": "<string>",
    "name": "<string>",
    "assistantId": "<string>",
    "squadId": "<string>",
    "fallbackDestination": {
      "type": "number",
      "number": "<string>",
      "extension": "<string>",
      "callerId": "<string>",
      "message": "<string>",
      "description": "<string>",
      "numberE164CheckEnabled": true
    },
    "serverUrl": "<string>",
    "serverUrlSecret": "<string>"
  },
  "customerId": "<string>",
  "customer": {
    "extension": "<string>",
    "number": "<string>",
    "sipUri": "<string>",
    "name": "<string>",
    "numberE164CheckEnabled": true
  }
}
'
{
  "id": "<string>",
  "type": "<string>",
  "messages": [
    {
      "role": "<string>",
      "message": "<string>",
      "time": 123,
      "secondsFromStart": 123,
      "endTime": 123,
      "source": "<string>",
      "duration": 123
    }
  ],
  "phoneCallProvider": "<string>",
  "phoneCallTransport": "<string>",
  "status": "<string>",
  "endedReason": "<string>",
  "orgId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "startedAt": "2023-11-07T05:31:56Z",
  "endedAt": "2023-11-07T05:31:56Z",
  "analysis": {
    "summary": "<string>",
    "successEvaluation": "<string>"
  },
  "phoneCallProviderId": "<string>",
  "assistantId": "<string>",
  "phoneNumberId": "<string>",
  "customer": {},
  "transcript": "<string>",
  "recordingUrl": "<string>",
  "summary": "<string>",
  "stereoRecordingUrl": "<string>",
  "transport": {},
  "organizationId": "<string>"
}

Authorizations

X-API-Key
string
header
required

Body

application/json
name
string | null
assistantId
string | null
assistant
object | null
assistantOverrides
object | null
squadId
string | null
squad
object | null
phoneNumberId
string | null
phoneNumber
object | null
customerId
string | null
customer
object | null

Response

Successful Response

id
string
required
type
string | null
messages
Message · object[] | null
phoneCallProvider
string | null
phoneCallTransport
string | null
status
string | null
endedReason
string | null
orgId
string | null
createdAt
string<date-time> | null
updatedAt
string<date-time> | null
startedAt
string<date-time> | null
endedAt
string<date-time> | null
analysis
object | null
phoneCallProviderId
string | null
assistantId
string | null
phoneNumberId
string | null
customer
object | null
transcript
string | null
recordingUrl
string | null
summary
string | null
stereoRecordingUrl
string | null
transport
object | null
organizationId
string | null