cURL
curl -sS -X GET "https://dashboard.ondial.ai/api/v1/omni/templates" \
-H "Authorization: Bearer $ONDIAL_API_KEY"const res = await fetch("https://dashboard.ondial.ai/api/v1/omni/templates", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.ONDIAL_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.request(
"GET",
"https://dashboard.ondial.ai/api/v1/omni/templates",
headers={
"Authorization": f"Bearer {os.environ['ONDIAL_API_KEY']}",
},
timeout=30,
)
print(res.status_code, res.json())<?php
$ch = curl_init("https://dashboard.ondial.ai/api/v1/omni/templates");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ONDIAL_API_KEY"),
],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status . " " . $response;import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://dashboard.ondial.ai/api/v1/omni/templates"))
.header("Authorization", "Bearer " + System.getenv("ONDIAL_API_KEY"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using System;
using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://dashboard.ondial.ai/api/v1/omni/templates");
request.Headers.Add("Authorization", "Bearer " + Environment.GetEnvironmentVariable("ONDIAL_API_KEY"));
var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode + " " + await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", "https://dashboard.ondial.ai/api/v1/omni/templates", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("ONDIAL_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(out))
}{
"campaignId": "6a7afae1e1cf2999568febc4",
"name": "TEst API",
"email": {
"profileId": "YOUR_EMAIL_PROFILE_ID",
"templateId": "YOUR_EMAIL_TEMPLATE_ID",
"profiles": [
{
"id": "YOUR_EMAIL_PROFILE_ID",
"name": "Test",
"fromEmail": "support@example.com"
}
],
"templates": [
{
"id": "YOUR_EMAIL_TEMPLATE_ID",
"name": "Product Information",
"subject": "Product information from {{company_name}}",
"selected": true,
"lead": {
"campaignId": "6a7afae1e1cf2999568febc4",
"channel": "email",
"email": "",
"name": "",
"emailProfileId": "YOUR_EMAIL_PROFILE_ID",
"emailTemplateId": "YOUR_EMAIL_TEMPLATE_ID",
"templateVariables": {
"company_name": "",
"contact_name": "",
"agent_name": ""
}
}
}
]
},
"whatsapp": {
"profileId": "YOUR_WHATSAPP_PROFILE_ID",
"templateId": "YOUR_WHATSAPP_TEMPLATE_ID",
"profiles": [
{
"id": "YOUR_WHATSAPP_PROFILE_ID",
"name": "Ondial WhatsApp",
"phone": "917567240879"
}
],
"templates": [
{
"id": "YOUR_WHATSAPP_TEMPLATE_ID",
"name": "order_confirmation_demo",
"selected": true,
"paramLabels": [
"Name",
"Order ID",
"Product",
"Amount",
"Expected Delivery",
"Tracking URL"
],
"lead": {
"campaignId": "6a7afae1e1cf2999568febc4",
"channel": "whatsapp",
"phone": "",
"name": "",
"whatsappProfileId": "YOUR_WHATSAPP_PROFILE_ID",
"whatsappTemplateId": "YOUR_WHATSAPP_TEMPLATE_ID",
"whatsappParams": [
"Asha",
"CRM-99",
"Home loan",
"₹5000",
"30 Sep 2026",
"https://track.example/abc"
]
}
}
]
}
}List Omni templates
Copy email.templates[].lead or whatsapp.templates[].lead into POST /leads.
GET
https://dashboard.ondial.ai
/
api
/
v1
/
omni
/
templates
cURL
curl -sS -X GET "https://dashboard.ondial.ai/api/v1/omni/templates" \
-H "Authorization: Bearer $ONDIAL_API_KEY"const res = await fetch("https://dashboard.ondial.ai/api/v1/omni/templates", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.ONDIAL_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.request(
"GET",
"https://dashboard.ondial.ai/api/v1/omni/templates",
headers={
"Authorization": f"Bearer {os.environ['ONDIAL_API_KEY']}",
},
timeout=30,
)
print(res.status_code, res.json())<?php
$ch = curl_init("https://dashboard.ondial.ai/api/v1/omni/templates");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ONDIAL_API_KEY"),
],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status . " " . $response;import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://dashboard.ondial.ai/api/v1/omni/templates"))
.header("Authorization", "Bearer " + System.getenv("ONDIAL_API_KEY"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using System;
using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://dashboard.ondial.ai/api/v1/omni/templates");
request.Headers.Add("Authorization", "Bearer " + Environment.GetEnvironmentVariable("ONDIAL_API_KEY"));
var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode + " " + await response.Content.ReadAsStringAsync());package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", "https://dashboard.ondial.ai/api/v1/omni/templates", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("ONDIAL_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(out))
}{
"campaignId": "6a7afae1e1cf2999568febc4",
"name": "TEst API",
"email": {
"profileId": "YOUR_EMAIL_PROFILE_ID",
"templateId": "YOUR_EMAIL_TEMPLATE_ID",
"profiles": [
{
"id": "YOUR_EMAIL_PROFILE_ID",
"name": "Test",
"fromEmail": "support@example.com"
}
],
"templates": [
{
"id": "YOUR_EMAIL_TEMPLATE_ID",
"name": "Product Information",
"subject": "Product information from {{company_name}}",
"selected": true,
"lead": {
"campaignId": "6a7afae1e1cf2999568febc4",
"channel": "email",
"email": "",
"name": "",
"emailProfileId": "YOUR_EMAIL_PROFILE_ID",
"emailTemplateId": "YOUR_EMAIL_TEMPLATE_ID",
"templateVariables": {
"company_name": "",
"contact_name": "",
"agent_name": ""
}
}
}
]
},
"whatsapp": {
"profileId": "YOUR_WHATSAPP_PROFILE_ID",
"templateId": "YOUR_WHATSAPP_TEMPLATE_ID",
"profiles": [
{
"id": "YOUR_WHATSAPP_PROFILE_ID",
"name": "Ondial WhatsApp",
"phone": "917567240879"
}
],
"templates": [
{
"id": "YOUR_WHATSAPP_TEMPLATE_ID",
"name": "order_confirmation_demo",
"selected": true,
"paramLabels": [
"Name",
"Order ID",
"Product",
"Amount",
"Expected Delivery",
"Tracking URL"
],
"lead": {
"campaignId": "6a7afae1e1cf2999568febc4",
"channel": "whatsapp",
"phone": "",
"name": "",
"whatsappProfileId": "YOUR_WHATSAPP_PROFILE_ID",
"whatsappTemplateId": "YOUR_WHATSAPP_TEMPLATE_ID",
"whatsappParams": [
"Asha",
"CRM-99",
"Home loan",
"₹5000",
"30 Sep 2026",
"https://track.example/abc"
]
}
}
]
}
}Same API key as Create lead. Never returns SMTP passwords or WhatsApp/AiSensy keys.
| Call | What you get |
|---|---|
GET /api/v1/omni/templates | Full catalog. No selected. Copy any templates[].lead. |
GET /api/v1/omni/templates?campaignId= | Same lists. selected: true = this campaign’s template. Each lead includes campaignId. |
- Copy
email.templates[].lead(the row with"selected": true, or another template) - Fill
email/nameandtemplateVariables - Or copy
whatsapp.templates[].leadand fillphone+whatsappParams(paramLabels[i]={{i+1}}) POST /api/v1/leads
campaignId → 400. Not yours → 404.Authorizations
Paste only your API key (ond_live_… or ond_test_…). Do not type the word Bearer - the playground adds it.
Query Parameters
Optional. Omit for all profiles/templates. Pass a campaign you own to see which profile + template that campaign uses.

