Create Phone Call
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
The phone number associated with the account from which the call will be made.
The phone number to call including the country code.
The agent configuration to use for the conversation. If null, the agent id will be used.
The hooks of the agent. These are used for real-time conversation events such as function_calls, messages and much more.
hang_up
phone_call:connection_requested
, phone_call:rejected
, phone_call:accepted
, function_call:triggered
, conversation:started
, conversation:ended
, conversation:duration
, speech:started
, speech:ended
, message:sent
, message:generated
The initial message that the agent will say. If null, the agent will wait for the user to speak first.
The language model provider.
openai
The credential id to use for the provider. If null, we include the provider cost in the conversation.
The maximum number of tokens to generate for an each response from the agent. Default is 300.
The OpenAI language model to use.
gpt-3.5-turbo
, gpt-3.5-turbo-0125
, gpt-3.5-turbo-1106
, gpt-3.5-turbo-16k
, gpt-3.5-turbo-0613
, gpt-4-turbo
, gpt-4-turbo-2024-04-09
, gpt-4-turbo-preview
, gpt-4-0125-preview
, gpt-4-1106-preview
, gpt-4-0613
, gpt-4
, gpt-4o
The temperature of the model. Default is 0 for optimized caching performance.
0 < x < 2
The list of OpenAI tools.
The function definition to be called.
The description of the OpenAI function call.
This is the name of the function to be called. Must be less than 64 characters (a-z, A-Z, 0-9, including underscores).
The parameters of the OpenAI function call.
This is the type of OpenAI Tool.
function
The maximum conversation duration in seconds. If null, the conversation can be of any duration. The default value is 10 min.
The metadata of the agent. This is used to store additional information about the agent.
The prompt of the agent.
The transcriber provider.
deepgram
The credential id to use for the provider. If null, we include the provider cost in the conversation.
Specific keywords you want to detect in the transcription. This is useful to correctly understand product or company names.
The selected language for the transcription.
en
, fr
, es
, de
, it
, nl
, pt
, ru
, ja
, cs
, da
, el
, hi
, id
, ko
, no
, pl
, sv
, tr
, uk
The deepgram model to use.
nova-2
, nova-2-general
, nova-2-meeting
, nova-2-phonecall
, nova-2-finance
, nova-2-voicemail
, nova-2-medical
, nova-2-drivethru
, nova-2-automotive
, nova-2-conversationalai
The voice provider.
playht
The credential id to use for the provider. If null, we include the provider cost in the conversation.
The playht model to use.
susan
, william
, phoebe
, arthur
, ayla
, dylan
, madelyn
, oliver
, sophia
Control how fast the generated audio should be. A number greater than 0 and less than or equal to 5.0
0 < x < 5
A number between 1 and 30. Use lower numbers to to reduce how strong your chosen emotion will be. Higher numbers will create a very emotional performance.
1 < x < 30
A floating point number between 0, inclusive, and 2, inclusive. If equal to null or not provided, the model's default temperature will be used.
0 < x < 2
A number between 1 and 2. This number influences how closely the generated speech adheres to the input text.
1 < x < 2
The webhooks of the agent. These are used for real-time conversation events such as function_calls, messages and much more.
The method of the webhook.
GET
, POST
The url of the webhook. Where the requests will be sent.
phone_call:connection_requested
, phone_call:rejected
, phone_call:accepted
, function_call:triggered
, conversation:started
, conversation:ended
, conversation:duration
, speech:started
, speech:ended
, message:sent
, message:generated
The agent id to use for the conversation. If null, the agent configuration will be used.
Response
The account id associated with of the conversation.
The agent configuration used for the conversation.
The hooks of the agent. These are used for real-time conversation events such as function_calls, messages and much more.
hang_up
phone_call:connection_requested
, phone_call:rejected
, phone_call:accepted
, function_call:triggered
, conversation:started
, conversation:ended
, conversation:duration
, speech:started
, speech:ended
, message:sent
, message:generated
The initial message that the agent will say. If null, the agent will wait for the user to speak first.
The language model provider.
openai
The credential id to use for the provider. If null, we include the provider cost in the conversation.
The maximum number of tokens to generate for an each response from the agent. Default is 300.
The OpenAI language model to use.
gpt-3.5-turbo
, gpt-3.5-turbo-0125
, gpt-3.5-turbo-1106
, gpt-3.5-turbo-16k
, gpt-3.5-turbo-0613
, gpt-4-turbo
, gpt-4-turbo-2024-04-09
, gpt-4-turbo-preview
, gpt-4-0125-preview
, gpt-4-1106-preview
, gpt-4-0613
, gpt-4
, gpt-4o
The temperature of the model. Default is 0 for optimized caching performance.
0 < x < 2
The list of OpenAI tools.
The function definition to be called.
The description of the OpenAI function call.
This is the name of the function to be called. Must be less than 64 characters (a-z, A-Z, 0-9, including underscores).
The parameters of the OpenAI function call.
This is the type of OpenAI Tool.
function
The maximum conversation duration in seconds. If null, the conversation can be of any duration. The default value is 10 min.
The metadata of the agent. This is used to store additional information about the agent.
The prompt of the agent.
The transcriber provider.
deepgram
The credential id to use for the provider. If null, we include the provider cost in the conversation.
Specific keywords you want to detect in the transcription. This is useful to correctly understand product or company names.
The selected language for the transcription.
en
, fr
, es
, de
, it
, nl
, pt
, ru
, ja
, cs
, da
, el
, hi
, id
, ko
, no
, pl
, sv
, tr
, uk
The deepgram model to use.
nova-2
, nova-2-general
, nova-2-meeting
, nova-2-phonecall
, nova-2-finance
, nova-2-voicemail
, nova-2-medical
, nova-2-drivethru
, nova-2-automotive
, nova-2-conversationalai
The voice provider.
playht
The credential id to use for the provider. If null, we include the provider cost in the conversation.
The playht model to use.
susan
, william
, phoebe
, arthur
, ayla
, dylan
, madelyn
, oliver
, sophia
Control how fast the generated audio should be. A number greater than 0 and less than or equal to 5.0
0 < x < 5
A number between 1 and 30. Use lower numbers to to reduce how strong your chosen emotion will be. Higher numbers will create a very emotional performance.
1 < x < 30
A floating point number between 0, inclusive, and 2, inclusive. If equal to null or not provided, the model's default temperature will be used.
0 < x < 2
A number between 1 and 2. This number influences how closely the generated speech adheres to the input text.
1 < x < 2
The webhooks of the agent. These are used for real-time conversation events such as function_calls, messages and much more.
The method of the webhook.
GET
, POST
The url of the webhook. Where the requests will be sent.
phone_call:connection_requested
, phone_call:rejected
, phone_call:accepted
, function_call:triggered
, conversation:started
, conversation:ended
, conversation:duration
, speech:started
, speech:ended
, message:sent
, message:generated
The id of the conversation.
The status of the conversation.
started
, ended
, queued
The type of conversation.
inbound_phone_call
, outbound_phone_call
, web_call
The uri of the conversation.
The id of the agent used in the conversation. Returns null if the conversation did not use an existing agent.
The cost breakdown of the conversation.
The cost of the agent.
The language model cost.
The cost for the language model usage (USD).
The number of input tokens used for the language model.
The number of output tokens used for the language model.
The provider of the language model.
openai
, google
The total cost of the conversation (USD).
The transcriber cost.
The cost for the transcriber usage (USD).
The provider of the transcriber.
deepgram
, azure
The number of seconds used for the transcriber.
The voice cost.
The number of characters used for the voice.
The cost for the voice usage (USD).
The provider of the synthetizer.
azure
, elevenlabs
, rimeai
, deepgram
, playht
The telephony cost. Returns null if the conversation was over web.
The cost for the telephony usage. Returns zero, if the phone number was imported.
The provider of the phone number used.
twilio
The number of seconds used for the telephony.
The end time of the conversation. Returns null if the conversation is has not ended.
The reasons the conversation ended.
agent_ended
, user_ended
, unknown
The phone call details of the conversation. Returns null if the conversation was over web.
The start time of the conversation.