cURL
curl -sS -X POST "https://dashboard.ondial.ai/api/v1/companies" \
-H "Authorization: Bearer $ONDIAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Clinic",
"mobile": "+919876543210",
"industry": "Healthcare",
"description": "Multi-specialty clinic",
"website": "https://example.com",
"timezone": "(UTC+5:30) Chennai, Kolkata, Mumbai, New Delhi (IST)"
}'const res = await fetch("https://dashboard.ondial.ai/api/v1/companies", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.ONDIAL_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Acme Clinic",
"mobile": "+919876543210",
"industry": "Healthcare",
"description": "Multi-specialty clinic",
"website": "https://example.com",
"timezone": "(UTC+5:30) Chennai, Kolkata, Mumbai, New Delhi (IST)"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.request(
"POST",
"https://dashboard.ondial.ai/api/v1/companies",
headers={
"Authorization": f"Bearer {os.environ['ONDIAL_API_KEY']}",
},
json={
"name": "Acme Clinic",
"mobile": "+919876543210",
"industry": "Healthcare",
"description": "Multi-specialty clinic",
"website": "https://example.com",
"timezone": "(UTC+5:30) Chennai, Kolkata, Mumbai, New Delhi (IST)",
},
timeout=30,
)
print(res.status_code, res.json())<?php
$ch = curl_init("https://dashboard.ondial.ai/api/v1/companies");
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([
'name' => 'Acme Clinic',
'mobile' => '+919876543210',
'industry' => 'Healthcare',
'description' => 'Multi-specialty clinic',
'website' => 'https://example.com',
'timezone' => '(UTC+5:30) Chennai, Kolkata, Mumbai, New Delhi (IST)',
]),
]);
$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/companies"))
.header("Authorization", "Bearer " + System.getenv("ONDIAL_API_KEY"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"name": "Acme Clinic",
"mobile": "+919876543210",
"industry": "Healthcare",
"description": "Multi-specialty clinic",
"website": "https://example.com",
"timezone": "(UTC+5:30) Chennai, Kolkata, Mumbai, New Delhi (IST)"
}
"""))
.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/companies");
request.Headers.Add("Authorization", "Bearer " + Environment.GetEnvironmentVariable("ONDIAL_API_KEY"));
request.Content = new StringContent("""
{
"name": "Acme Clinic",
"mobile": "+919876543210",
"industry": "Healthcare",
"description": "Multi-specialty clinic",
"website": "https://example.com",
"timezone": "(UTC+5:30) Chennai, Kolkata, Mumbai, New Delhi (IST)"
}
""", 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(`{
"name": "Acme Clinic",
"mobile": "+919876543210",
"industry": "Healthcare",
"description": "Multi-specialty clinic",
"website": "https://example.com",
"timezone": "(UTC+5:30) Chennai, Kolkata, Mumbai, New Delhi (IST)"
}`)
req, _ := http.NewRequest("POST", "https://dashboard.ondial.ai/api/v1/companies", 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))
}{
"company": {
"id": "<string>",
"name": "<string>",
"mobile": "<string>",
"countryCode": "<string>",
"countryIso": "<string>",
"description": "<string>",
"industry": "<string>",
"website": "<string>",
"businessHours": {},
"timezone": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"leadId": 177,
"error": "<string>",
"reasonCode": "<string>",
"missing": [
"<string>"
]
}{
"error": "Invalid or inactive API key",
"reasonCode": "unauthorized"
}{
"leadId": 177,
"error": "<string>",
"reasonCode": "<string>",
"missing": [
"<string>"
]
}Create company
Create a company profile (requires companies:write scope).
POST
https://dashboard.ondial.ai
/
api
/
v1
/
companies
cURL
curl -sS -X POST "https://dashboard.ondial.ai/api/v1/companies" \
-H "Authorization: Bearer $ONDIAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Clinic",
"mobile": "+919876543210",
"industry": "Healthcare",
"description": "Multi-specialty clinic",
"website": "https://example.com",
"timezone": "(UTC+5:30) Chennai, Kolkata, Mumbai, New Delhi (IST)"
}'const res = await fetch("https://dashboard.ondial.ai/api/v1/companies", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.ONDIAL_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Acme Clinic",
"mobile": "+919876543210",
"industry": "Healthcare",
"description": "Multi-specialty clinic",
"website": "https://example.com",
"timezone": "(UTC+5:30) Chennai, Kolkata, Mumbai, New Delhi (IST)"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.request(
"POST",
"https://dashboard.ondial.ai/api/v1/companies",
headers={
"Authorization": f"Bearer {os.environ['ONDIAL_API_KEY']}",
},
json={
"name": "Acme Clinic",
"mobile": "+919876543210",
"industry": "Healthcare",
"description": "Multi-specialty clinic",
"website": "https://example.com",
"timezone": "(UTC+5:30) Chennai, Kolkata, Mumbai, New Delhi (IST)",
},
timeout=30,
)
print(res.status_code, res.json())<?php
$ch = curl_init("https://dashboard.ondial.ai/api/v1/companies");
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([
'name' => 'Acme Clinic',
'mobile' => '+919876543210',
'industry' => 'Healthcare',
'description' => 'Multi-specialty clinic',
'website' => 'https://example.com',
'timezone' => '(UTC+5:30) Chennai, Kolkata, Mumbai, New Delhi (IST)',
]),
]);
$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/companies"))
.header("Authorization", "Bearer " + System.getenv("ONDIAL_API_KEY"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"name": "Acme Clinic",
"mobile": "+919876543210",
"industry": "Healthcare",
"description": "Multi-specialty clinic",
"website": "https://example.com",
"timezone": "(UTC+5:30) Chennai, Kolkata, Mumbai, New Delhi (IST)"
}
"""))
.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/companies");
request.Headers.Add("Authorization", "Bearer " + Environment.GetEnvironmentVariable("ONDIAL_API_KEY"));
request.Content = new StringContent("""
{
"name": "Acme Clinic",
"mobile": "+919876543210",
"industry": "Healthcare",
"description": "Multi-specialty clinic",
"website": "https://example.com",
"timezone": "(UTC+5:30) Chennai, Kolkata, Mumbai, New Delhi (IST)"
}
""", 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(`{
"name": "Acme Clinic",
"mobile": "+919876543210",
"industry": "Healthcare",
"description": "Multi-specialty clinic",
"website": "https://example.com",
"timezone": "(UTC+5:30) Chennai, Kolkata, Mumbai, New Delhi (IST)"
}`)
req, _ := http.NewRequest("POST", "https://dashboard.ondial.ai/api/v1/companies", 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))
}{
"company": {
"id": "<string>",
"name": "<string>",
"mobile": "<string>",
"countryCode": "<string>",
"countryIso": "<string>",
"description": "<string>",
"industry": "<string>",
"website": "<string>",
"businessHours": {},
"timezone": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"leadId": 177,
"error": "<string>",
"reasonCode": "<string>",
"missing": [
"<string>"
]
}{
"error": "Invalid or inactive API key",
"reasonCode": "unauthorized"
}{
"leadId": 177,
"error": "<string>",
"reasonCode": "<string>",
"missing": [
"<string>"
]
}Requires scope
companies:write.
Phone must be valid E.164 or country code + national digits. Fields like omniChannelSettings are rejected if sent.
Use the returned id when linking a profile to inbound agents (dashboard or future PATCH on inbound-agents).Authorizations
Paste only your API key (ond_live_… or ond_test_…). Do not type the word Bearer - the playground adds it.
Body
application/json
Response
Created
Hide child attributes
Hide child attributes

