Receive Call
Endpoint used to receive a call from the AI agent via API.
Request Example
Section titled “Request Example”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>" }'Response Example
Section titled “Response Example”{ "message": "<string>", "response": { "message": "<string>", "roomName": "<string>", "participantIdentity": "<string>", "status": true }}Request description
Section titled “Request description”Access Token
Section titled “Access Token”| Parameter | Type | Description | Required |
|---|---|---|---|
Authorization | String | Access token (“Bearer” must be before the token) | Yes |
URL Parameters
Section titled “URL Parameters”| Parameter | Type | Description | Required |
|---|---|---|---|
bot-id | UUID | Unique identifier of the agent. | Yes |
Body Parameters
Section titled “Body Parameters”| Parameter | Type | Description | Required |
|---|---|---|---|
phone | String | Phone number to receive the call. | Yes |
language | String | Call language. | Yes |
voiceId | String | Identifier of the voice to be used. | Yes |
credentialId | String | Credential identifier. | Yes |
model | String | AI model to be used. | Yes |
firstMessage | String | Initial message to be sent. | Yes |
prompt | String | Prompt to be used. | Yes |
Response description
Section titled “Response description”| Key | Type | Description |
|---|---|---|
message | String | Identification message of the credential in the system. |
response | Object | Object containing interaction details and routing metadata. |
response.message | String | AI agent’s response. |
response.roomName | String | Name of the conversation room between user and agent. |
response.participantIdentity | String | Unique identifier of the participant. |
response.status | Boolean | Call status. |
Security
Section titled “Security”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:
- Log in to the ToolzzAI platform
- Click on “Settings”
- Click on “Access Token”
- Copy the access token
