Introduction
Voice notifications allow you to make automated calls with virtual agents. This endpoint enables you to send voice calls with AI-powered agents to your contacts, providing a personalized voice experience.📞 Send Voice Notification
To send a voice notification via the Lovi API, make a POST request to the voice endpoint with the necessary parameters and authentication.Method: POST Format: JSON
Endpoint
Query Parameters
| Parameter | Required | Description |
|---|---|---|
access_key | Yes | Your unique API access key. |
unflatten | No | If set to true, the body must contain flat variables (no nested objects). If set to false or omitted, the body can contain nested objects. |
Headers
| Key | Value | Required | Description |
|---|---|---|---|
| Content-Type | application/json | Yes | Indicates that the request body is in JSON format. |
access_key parameter in the URL, not through headers.
Body Request
The body of the request contains the voice notification details.Structure with nested objects (unflatten=false or omitted)
Structure with flat variables (unflatten=true)
Required Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
contact.number | String | Phone number without ’+’ or spaces | "34666033135" |
recipient_id | String | ID or phone number of the recipient | "34911670470" |
agent_id | String | Unique identifier of the voice agent | "uuid-agente-voz" |
notification_type | String | Type for analytics | "marketing", "transactional" |
campaign_name | String | Campaign identifier name | "Voice Campaign Q4" |
Optional Parameters
| Parameter | Type | Description | Example | Default |
|---|---|---|---|---|
contact.first_name | String | Contact’s first name | "María" | - |
contact.last_name | String | Contact’s last name | "González" | - |
contact.email | String | Contact’s email | "[email protected]" | - |
name_event | String | Event to trigger flows | "info-curso-enfermeria" | - |
datetime_sending | DateTime | Scheduled date/time (ISO 8601) | "2024-12-25T09:00:00" | Immediate |
timezone | String | Timezone for scheduling | "Europe/Madrid" | "UTC" |
contact object for personalization (e.g., titulacion, fuente_cliente, etc.).
Response
When the request is successful, the response will contain:Voice-Specific Features
- AI-Powered Agents: Use virtual agents with natural voice synthesis
- Personalization: Include custom contact data for personalized calls
- Scheduling: Program calls for specific times with timezone support
- Event Triggers: Trigger specific conversation flows with
name_event
Best Practices
- Timing: Schedule calls during business hours for better engagement
- Personalization: Include relevant contact information for better conversation flow
- Agent Selection: Choose appropriate agents based on use case (sales, support, etc.)
- Compliance: Ensure calls comply with local regulations and consent requirements
📚 Tips for Voice Development
- Always include
agent_idfor voice notifications - Use scheduling features to respect time zones
- Test with development agents before production
- Monitor call completion rates and adjust timing accordingly
