Skip to content

Receive Call

Endpoint used to receive a call from the AI agent via API.

Terminal window
curl --request POST \
--url https://chat.api.toolzz.com.br/api/v1/bot/call-phone/{bot-id} \
--header 'Authorization: Bearer TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "<string>",
"language": "<string>",
"voiceId": "<string>",
"credentialId": "<string>",
"model": "<string>",
"firstMessage": "<string>",
"prompt": "<string>"
}
'
{
"message": "<string>",
"response": {
"message": "<string>",
"roomName": "<string>",
"participantIdentity": "<string>",
"status": true
}
}

ParameterTypeDescriptionRequired
AuthorizationStringAccess token (“Bearer” must be before the token)Yes
ParameterTypeDescriptionRequired
bot-idUUIDUnique identifier of the agent.Yes
ParameterTypeDescriptionRequired
phoneStringPhone number to receive the call.Yes
languageStringCall language.Yes
voiceIdStringIdentifier of the voice to be used.Yes
credentialIdStringCredential identifier.Yes
modelStringAI model to be used.Yes
firstMessageStringInitial message to be sent.Yes
promptStringPrompt to be used.Yes
KeyTypeDescription
messageStringIdentification message of the credential in the system.
responseObjectObject containing interaction details and routing metadata.
response.messageStringAI agent’s response.
response.roomNameStringName of the conversation room between user and agent.
response.participantIdentityStringUnique identifier of the participant.
response.statusBooleanCall status.

To access this endpoint, it is necessary to send a valid access token through the authorization header (Authorization) of the request. Additionally, the API is protected by other security measures to safeguard user data.

To access your access token, follow these steps:

  1. Log in to the ToolzzAI platform
  2. Click on “Settings”
  3. Click on “Access Token”
  4. Copy the access token

Access token page