How to Send a Voice Message

Sending a Voice Message via API

Send pre-recorded voice messages to multiple recipients using the LigueLead API's two-step process.


📋 Prerequisites

  • Valid api-token and app-id from your LigueLead account
  • Audio file (supported formats: MP3, WAV, etc.)
  • Target phone numbers in Brazilian format (multiple formats accepted).

🎵 Step 1: Upload Your Audio File

First, upload the audio file you want to send.- Valid api-token and app-id from your LigueLead account

Endpoint: POST /v1/voice/uploads- Audio file (supported formats: MP3, WAV, etc.)


Request Example - Target phone numbers in Brazilian format (multiple formats accepted)

curl -X POST "https://api.liguelead.com.br/v1/voice/uploads" \

  -H "api-token: YOUR_API_TOKEN" \

  -H "app-id: YOUR_APP_ID" \

  -F "title=Welcome Message" \

  -F "file=@/path/to/your/audio.mp3"

Response

{
  "message": "Voice upload successful.",
  "data": {
    "id": 436514,
    "title": "Welcome Message"
  }
}

💡 Tip: Save the returned id (436514 in this example) - you'll need it for sending the message.curl -X POST "https://api.liguelead.com.br/v1/voice/uploads" \


📤 Step 2: Send the Voice Message

Use the audio ID from Step 1 to send your voice message. -H "app-id: YOUR_APP_ID" \

Endpoint: POST /v1/voice -F "title=Welcome Message" \


Request Example

curl -X POST "https://api.liguelead.com.br/v1/voice" \

  -H "api-token: YOUR_API_TOKEN" \

  -H "app-id: YOUR_APP_ID" \

  -H "Content-Type: application/json" \### Response

  -d '{

    "title": "Welcome Campaign",

    "voice_upload_id": 436514,

    "phones": ["11999999999", "+5511888888888"],```json**Endpoint:** `POST /v1/voice/uploads`- Audio file (supported formats: MP3, WAV, etc.)

    "group_id": "optional-group-id"

  }'

Response

{
  "message": "Voice accepted successfully",
  "data": {
    "campaign_id": "3b4f7c5e-7e2d-4157-b542-5eb2155455c5",
    "accepted_at": "2025-12-29T18:34:38.961Z"
  }
}

📋 Request Parameters


Upload Audio (POST /v1/voice/uploads)

ParameterTypeRequiredDescription
titlestringDescriptive name for your audio file
filebinaryAudio file (multipart/form-data)

Send Voice Message (POST /v1/voice)

ParameterTypeRequiredDescription
titlestringCampaign identifier
voice_upload_idintegerID from the upload response
phonesarrayBrazilian phone numbers (multiple formats accepted)
group_idstringOptional group identifier for organization

🔍 Managing Uploaded Audio Files


List All Uploaded Files

curl -X GET "https://api.liguelead.com.br/v1/voice/uploads" \  -H "Content-Type: application/json" \### Response

  -H "api-token: YOUR_API_TOKEN" \

  -H "app-id: YOUR_APP_ID" 

Get Specific Audio File

curl -X GET "https://api.liguelead.com.br/v1/voice/uploads/436514" \ 

  -H "api-token: YOUR_API_TOKEN" \

  -H "app-id: YOUR_APP_ID"   

📱 Phone Number Format

The API accepts Brazilian phone numbers in multiple formats:

National Format:

  • São Paulo: "11999999999"
  • Rio de Janeiro: "21999999999"
  • Brasília: "61999999999"

International Format:

  • São Paulo: "+5511999999999"
  • Rio de Janeiro: "+5521999999999"
  • Brasília: "+5561999999999"

DDI Format:

  • São Paulo: "5511999999999"
  • Rio de Janeiro: "5521999999999"
  • Brasília: "5561999999999"

⏰ Dialing Window (10:00 PM – 08:00 AM | America/Sao_Paulo)

To comply with calling time policies, the system applies a control window for new voice requests.

Requests received until 21:59 (America/Sao_Paulo) may be dialed normally, following the standard queue processing.

Starting at 22:00, new requests are still accepted by the API but will not be dialed immediately. These requests will remain pending and will be processed automatically when dialing resumes at 08:00.

After 22:00, no calls are placed until dialing resumes at 08:00.


⚡ Processing & Delivery

  • Asynchronous Processing: Voice messages are queued for delivery
  • Response Code: 202 Accepted indicates successful queuing
  • Delivery Time: Varies based on carrier and number of recipientsMonitor the delivery status of your voice campaign.
  • Status Tracking: Use Campaign endpoints to monitor progress

🚀 Best Practices

  1. Reuse Audio Files: Upload once, send to multiple campaigns
  2. Organize with Groups: Use group_id to categorize related campaigns
  3. Monitor Delivery: Check campaign status for delivery confirmation
  4. Test First: Start with small batches before scaling up```bash
  5. Clear Titles: Use descriptive names for easy identification

🛠️ Troubleshooting

IssueSolution
File upload failsCheck file format and size limits
Invalid phone formatEnsure valid Brazilian phone number format (11 digits or with DDI)
Authentication errorVerify api-token and app-id headers
Voice not foundConfirm voice_upload_id exists in uploads