Getting Started with LigueLead
Welcome to the LigueLead API! This guide will help you get started with our communication platform for voice messaging and SMS services.
Base URL & Authentication
Base URL:
https://api.liguelead.com.br/v1
Messaging requests require dual header authentication:
| Header | Description | Required |
|---|---|---|
api-token | Your API authentication token | ✅ |
app-id | Your application identifier | ✅ * |
Content-Type | application/json (for JSON requests) | ✅ |
* The app management endpoints (
/v1/apps) are the one exception: they authenticate withapi-tokenalone. Requiring anapp-idto create your first app would be circular.
Getting Your Credentials
Get Your Credentials: Access your LigueLead account at areadocliente.liguelead.app.br and navigate to Integrations → API Token.
Managing Apps Programmatically
With an api-token, you can create, list, and remove apps without returning to the dashboard. These three endpoints—and only these endpoints—authenticate with api-token alone, without the app-id header, because requiring one to create your first app would be circular.
Create an App
Create an app with POST /v1/apps.
Authentication: Send
api-tokenonly. Do not sendapp-id, because this endpoint creates the app identifier.
curl -X POST "https://api.liguelead.com.br/v1/apps" \
-H "api-token: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My ERP Integration"
}'A successful request returns 201 Created:
{
"message": "App created successfully",
"data": {
"id": "6f1c9d24-3b7e-4a02-9f88-2c1de4b7a910",
"name": "My ERP Integration"
}
}Send the returned id as the app-id header on every messaging request from that point forward. It is the same value with two names: id in this response and app-id in the header.
List Apps
List your apps with GET /v1/apps.
Authentication: Send
api-tokenonly. Do not sendapp-id, because this endpoint manages app identifiers.
curl -X GET "https://api.liguelead.com.br/v1/apps" \
-H "api-token: YOUR_API_TOKEN"A successful request returns 200 OK:
{
"message": "Success",
"data": [
{
"id": "6f1c9d24-3b7e-4a02-9f88-2c1de4b7a910",
"name": "My ERP Integration"
},
{
"id": "a3e57c81-04b9-4d6f-b2aa-95f0e1c73d42",
"name": "Checkout Notifications"
}
]
}This endpoint lists only active apps belonging to your account. The account is resolved from the token, never from data sent in the request.
Remove an App
Remove an app with DELETE /v1/apps/{id}.
Authentication: Send
api-tokenonly. Do not sendapp-id, because this endpoint manages app identifiers.
curl -X DELETE "https://api.liguelead.com.br/v1/apps/6f1c9d24-3b7e-4a02-9f88-2c1de4b7a910" \
-H "api-token: YOUR_API_TOKEN"A successful request returns 200 OK:
{
"message": "App removed successfully",
"data": {
"id": "6f1c9d24-3b7e-4a02-9f88-2c1de4b7a910"
}
}Removal takes effect immediately: the app stops authenticating requests as soon as the call returns, while messages already sent by it remain in reports. An app that is not yours returns 404, the same response as an app that never existed.
Status Codes
| Code | Meaning |
|---|---|
200 | Apps listed, or app removed |
201 | App created |
401 | Token missing, invalid or blocked |
404 | No such app under your account |
409 | An app with this name already exists |
422 | name is empty or longer than 255 characters |
Errors
Errors include the reason in an error field:
{
"error": "An app with this name already exists"
}Validation errors are the exception: error is a list so you can identify the field:
{
"error": [
{
"field": "name",
"message": "Name is required"
}
]
}name is the only accepted field when you create an app. Any other field is rejected, not ignored.
Limits
There is no limit on how many apps you can hold. App names are checked only against your active apps, so removing an app makes its name available for reuse.
🚀 Quick Start
1. Test Your Authentication
curl -X GET "https://api.liguelead.com.br/v1/voice/uploads" \
-H "api-token: YOUR_API_TOKEN" \
-H "app-id: YOUR_APP_ID"Expected Response for a new app, which has no uploaded audio files yet:
{
"message": "No voice found.",
"data": []
}Once the app has uploaded audio files, the message is Voice list. and data lists them, one { "id", "title", "url" } entry per file.
2. Send Your First SMS
curl -X POST "https://api.liguelead.com.br/v1/sms" \
-H "api-token: YOUR_API_TOKEN" \
-H "app-id: YOUR_APP_ID" \
-H "Content-Type: application/json" \
-d '{
"title": "My First SMS",
"message": "Hello from LigueLead!",
"phones": ["11999999999"]
}'Expected Response:
{
"message": "SMS accepted successfully",
"data": {
"campaign_id": "3b4f7c5e-7e2d-4157-b542-5eb2155455c5",
"accepted_at": "2026-10-07T18:34:38.961Z"
}
}campaign_id is a UUID: keep it to match the webhooks of this send and to query GET /v1/campaigns/{campaign_id}/recipients. With "is_flash": true the message reads "SMS Flash accepted successfully".
📦 Official Node.js SDK
For Node.js 18.18 or later, the official SDK covers every route in this documentation, with typed requests, responses, webhook events and errors:
npm install @liguelead/api-sdkimport { LigueLeadClient } from '@liguelead/api-sdk';
const client = new LigueLeadClient({
apiToken: process.env.LIGUELEAD_API_TOKEN!,
appId: process.env.LIGUELEAD_APP_ID,
});
// In an ES module, or inside an async function:
const { campaign_id } = await client.campaigns.sms.send({
message: 'Hello from LigueLead!',
phones: ['11999999999'],
});- No duplicate sends: the SDK retries only reads. A send goes out once, and when it fails with no response or with a
5xxthe error carriesoutcomeUnknown: true: check what went out before sending again — see API Limits. - Reference: the full guide, with every resource, the webhook types and the error classes, is in the SDK repository; the package is on npm.
For other languages, call the HTTP API as shown in these guides, or generate a client from the OpenAPI specification.
📱 Phone Number Format
Important: The API accepts phone numbers both with and without country code (DDI):
- ✅ Accepted:
"11999999999"(national format) - ✅ Accepted:
"+5511999999999"or"5511999999999"(with DDI)
💡 Best Practice: Send numbers with the country code (
5511999999999or+5511999999999). Without it, on the defaultddi, the length decides: 10 or 11 digits are a national number and get55in front — area code 55 included, so55991234567is sent as5555991234567. See API Limits for the validation rules.
The country code the API puts in front is the send's ddi field, 55 (Brazil) when the request leaves it out. Calls (POST /v1/voice and POST /v1/voice-agent/call) accept any country's code, such as "52" for Mexico — see How to Send Voice Messages. SMS reaches Brazil and the countries enabled for international SMS; SMS Flash and RCS deliver only to Brazil, so their ddi accepts only 55.
🔄 Asynchronous Processing
Every send (SMS, voice, RCS and AI calls) is an asynchronous operation:
- Response:
200 OKfor SMS and voice,202 Acceptedfor RCS and AI calls (the request is queued, not yet delivered) - Tracking: Use the
campaign.statuswebhooks;GET /v1/campaigns/{campaign_id}/recipientsalso lists SMS recipients - Real-time Updates: Webhooks, configured per app in the client area or per send with
webhook_url— see How to Receive Webhooks
🏗️ API Structure
The LigueLead API is organized into logical groups:
| Group | Description | Key Operations |
|---|---|---|
| Apps | App management for the authenticated client | Create, list and remove apps |
| Voice | Audio file management & voice delivery | Upload audio, send voice messages |
| SMS | Text message delivery | Send SMS messages |
| Campaigns | Status tracking and delivery results | Monitor campaign performance |
🛡️ Error Handling
The API uses standard HTTP status codes:
| Code | Status | Description | Action |
|---|---|---|---|
200 | OK | Request successful | Continue |
201 | Created | Resource created (uploads) | Use returned ID |
202 | Accepted | Async operation queued (RCS and AI calls; SMS and voice answer 200) | Monitor campaign |
400 | Bad Request | Invalid request data | Check parameters |
401 | Unauthorized | Invalid credentials | Verify headers |
404 | Not Found | No such resource under your account | Check the identifier |
409 | Conflict | Clashes with something that already exists | Read the error message |
422 | Unprocessable Entity | Request body failed validation | Fix the fields listed in error |
429 | Too Many Requests | Rate limit exceeded | Wait and retry |
500 | Server Error | System issue | Contact support |
📋 Next Steps
- Send a Voice Message - Learn the two-step process
- Send an SMS - Quick SMS delivery
- Check Campaign Status - Monitor per-recipient delivery status on demand
- API Limits - Understand rate limits and constraints
💡 Best Practices
- Test with small batches before scaling up
- Store audio IDs from uploads for reuse
- Handle errors carefully: retry a
429; after a5xxor a timeout, check what went out before resending a send — see API Limits
🆘 Support
Need help? Contact our support team through the LigueLead Client Area.
Updated about 21 hours ago
