cURL
curl -sS -X POST "https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/crm/lookup" \
-H "Authorization: Bearer $ONDIAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"useCase": "order_lookup",
"phone": "+919876543210",
"orderId": "ORD-123"
}'const res = await fetch("https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/crm/lookup", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.ONDIAL_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"useCase": "order_lookup",
"phone": "+919876543210",
"orderId": "ORD-123"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.request(
"POST",
"https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/crm/lookup",
headers={
"Authorization": f"Bearer {os.environ['ONDIAL_API_KEY']}",
},
json={
"useCase": "order_lookup",
"phone": "+919876543210",
"orderId": "ORD-123",
},
timeout=30,
)
print(res.status_code, res.json())<?php
$ch = curl_init("https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/crm/lookup");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ONDIAL_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
'useCase' => 'order_lookup',
'phone' => '+919876543210',
'orderId' => 'ORD-123',
]),
]);
$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/inbound-agents/YOUR_ID/crm/lookup"))
.header("Authorization", "Bearer " + System.getenv("ONDIAL_API_KEY"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"useCase": "order_lookup",
"phone": "+919876543210",
"orderId": "ORD-123"
}
"""))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using System;
using System.Net.Http;
using System.Text;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/crm/lookup");
request.Headers.Add("Authorization", "Bearer " + Environment.GetEnvironmentVariable("ONDIAL_API_KEY"));
request.Content = new StringContent("""
{
"useCase": "order_lookup",
"phone": "+919876543210",
"orderId": "ORD-123"
}
""", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode + " " + await response.Content.ReadAsStringAsync());package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
body := []byte(`{
"useCase": "order_lookup",
"phone": "+919876543210",
"orderId": "ORD-123"
}`)
req, _ := http.NewRequest("POST", "https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/crm/lookup", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer "+os.Getenv("ONDIAL_API_KEY"))
req.Header.Set("Content-Type", "application/json")
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))
}{
"useCase": "order_lookup",
"found": true,
"row": {
"name": "Asha",
"order_status": "Shipped"
}
}Inbound CRM lookup
CRM read via agent config (Sheets / Zoho / Custom API). No live call.
POST
https://dashboard.ondial.ai
/
api
/
v1
/
inbound-agents
/
{id}
/
crm
/
lookup
cURL
curl -sS -X POST "https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/crm/lookup" \
-H "Authorization: Bearer $ONDIAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"useCase": "order_lookup",
"phone": "+919876543210",
"orderId": "ORD-123"
}'const res = await fetch("https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/crm/lookup", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.ONDIAL_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"useCase": "order_lookup",
"phone": "+919876543210",
"orderId": "ORD-123"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.request(
"POST",
"https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/crm/lookup",
headers={
"Authorization": f"Bearer {os.environ['ONDIAL_API_KEY']}",
},
json={
"useCase": "order_lookup",
"phone": "+919876543210",
"orderId": "ORD-123",
},
timeout=30,
)
print(res.status_code, res.json())<?php
$ch = curl_init("https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/crm/lookup");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ONDIAL_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
'useCase' => 'order_lookup',
'phone' => '+919876543210',
'orderId' => 'ORD-123',
]),
]);
$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/inbound-agents/YOUR_ID/crm/lookup"))
.header("Authorization", "Bearer " + System.getenv("ONDIAL_API_KEY"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"useCase": "order_lookup",
"phone": "+919876543210",
"orderId": "ORD-123"
}
"""))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using System;
using System.Net.Http;
using System.Text;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/crm/lookup");
request.Headers.Add("Authorization", "Bearer " + Environment.GetEnvironmentVariable("ONDIAL_API_KEY"));
request.Content = new StringContent("""
{
"useCase": "order_lookup",
"phone": "+919876543210",
"orderId": "ORD-123"
}
""", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode + " " + await response.Content.ReadAsStringAsync());package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
body := []byte(`{
"useCase": "order_lookup",
"phone": "+919876543210",
"orderId": "ORD-123"
}`)
req, _ := http.NewRequest("POST", "https://dashboard.ondial.ai/api/v1/inbound-agents/YOUR_ID/crm/lookup", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer "+os.Getenv("ONDIAL_API_KEY"))
req.Header.Set("Content-Type", "application/json")
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))
}{
"useCase": "order_lookup",
"found": true,
"row": {
"name": "Asha",
"order_status": "Shipped"
}
}Wire CRM in Dashboard → Inbound setup.
found: false is still HTTP 200.
| reasonCode | Meaning |
|---|---|
invalid_request | Missing useCase |
crm_disabled / crm_not_configured | CRM not set on agent |
crm_upstream_error | Upstream CRM failed (502) |
not_found | Agent not owned |
Authorizations
Paste only your API key (ond_live_… or ond_test_…). Do not type the word Bearer - the playground adds it.
Path Parameters
Body
application/json

