Send an SMS
POST /api/v1/sms/send
{
"to": "+1234567890",
"message": "Your code is 123456",
"from": "YourBrand"
}
Build an email campaign
- 1
Configure senderChoose from verified providers like SendGrid, Mailgun, or Brevo.
- 2
Visual editorUse the Unlayer editor to add images, buttons, and custom layouts without coding.
- 3
PersonalizationInsert dynamic tags like {{ first_name }} to customize content for each recipient.
- 4
Subject & previewCraft compelling subject lines and preview text to boost open rates.
Request
POST /api/v1/whatsapp/send
{
"to": "+1234567890",
"template": "welcome_message",
"language": "en",
"parameters": { "name": "John Doe", "company": "Acme Inc" },
"media": { "type": "image", "url": "https://example.com/image.jpg" }
}
Response
{
"success": true,
"message_id": "wamid.HBgNMTIzNDU2Nzg5MABCQUI1...",
"status": "sent",
"timestamp": "2024-01-15T10:30:00Z"
}
- 1
Select SDK platformChoose how your app connects.
REST APIiOSAndroidReact NativeFlutter
- 2
Configure app settingsInstall the SDK and add your credentials.
build.gradle
dependencies {
implementation 'ai.leadnest:sdk:1.0.0'
}
- 3
Install & testVerify the SDK integration.
Install SDK Register device Test delivery
- 1
Upload SDK filesDownload the SDK and upload it to your site's root directory.
e.g. https://www.yourdomain.com/sw.js
- 2
Add code to your sitePaste this into your <head> tag.
<script src="https://www.leadnest.ai/storage/sdk.js"></script>
<script
data-app-key="YOUR_APP_KEY"
data-vapid-key="YOUR_VAPID_KEY"
data-app-id="YOUR_APP_ID"></script>
POST/register
Registers the device with GeoNest. Call it on app start, or whenever device info changes.
Requiredapp_api_keydevice_idfcm_tokenplatform
Optionalemailphonedevice_timezonelatitudelongitude
Request
{
"app_api_key": "YOUR_APP_API_KEY",
"device_id": "30b43ehjmed21a89970",
"fcm_token": "FCM_DEVICE_TOKEN",
"platform": "android",
"email": "user@example.com",
"device_timezone": "Asia/Kolkata",
"latitude": 17.4231737,
"longitude": 78.4624177
}
Response
{ "success": true, "message": "Device registered successfully." }
GET/geofences?app_api_key=YOUR_APP_API_KEY
Fetches every geofence and campaign rule configured for your app.
Response
{
"success": true,
"count": 2,
"data": [{
"geofence_id": 1, "campaign_id": 1,
"name": "Madhapur Store",
"shape": "circle",
"lat": 17.4483, "lng": 78.3915, "radius_m": 200,
"event_type": "dwell", "dwell_minutes": 5,
"cooldown_minutes": 720,
"active_hours_start": "09:00:00",
"active_hours_end": "21:00:00",
"start_date": "2026-07-28",
"end_date": "2026-08-06"
}, ]
}
POST/geofence/event
Call it when the device OS detects an ENTER, DWELL, or EXIT event.
Requiredapp_api_keydevice_idgeofence_ideventlatitude / longitude
Optionaloccurred_at
Request
{
"app_api_key": "YOUR_APP_API_KEY",
"device_id": "30b43ehjmed21a89970",
"geofence_id": 1,
"event": "dwell",
"latitude": 17.4230194,
"longitude": 78.462362,
"occurred_at": "2026-08-01T10:30:00+05:30"
}
Response
{ "success": true, "data": { "event_id": 1, "campaign_id": 1 },
"message": "Geofence event processed successfully." }