> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ondial.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Ondial Public API

> Lead ingest, contacts, events, and inbound agents — campaigns stay in the dashboard.

<div className="ondial-hero">
  <div className="ondial-kicker">Public API · v1</div>
  <h1>Build on Ondial</h1>

  <p>
    Server-to-server lead ingest and contact control. Create API campaigns in the
    dashboard, then call <code>/api/v1</code> with an approved <code>ond\_live\_…</code> or
    <code>ond\_test\_…</code> key.
  </p>

  <div className="ondial-meta">
    <span>Base <code>[https://dashboard.ondial.ai](https://dashboard.ondial.ai)</code></span>
    <span>Auth <code>Authorization: Bearer …</code></span>
  </div>
</div>

## Paths

<div className="ondial-path-grid">
  <a className="ondial-path" href="/get-started/guides/end-to-end-flows">
    <strong>1 · Flows</strong>
    <span>Request key → UI campaign → push leads → status / webhooks.</span>
  </a>

  <a className="ondial-path" href="/api-reference/quick-start/guide">
    <strong>2 · Quick start</strong>
    <span>Ping → list Omni templates → POST /leads (call, WhatsApp, or email).</span>
  </a>

  <a className="ondial-path" href="/get-started/guides/send-whatsapp-and-email">
    <strong>3 · WhatsApp / email</strong>
    <span>List Omni templates, then POST /leads with no dial.</span>
  </a>

  <a className="ondial-path" href="/api-reference/endpoint/core/ping">
    <strong>4 · Try It</strong>
    <span>Interactive playground — paste key, Send.</span>
  </a>

  <a className="ondial-path" href="/api-reference/quick-start/errors">
    <strong>5 · Errors</strong>
    <span>reasonCode map for guards and kill switch.</span>
  </a>
</div>

## Surface

| Area           | Methods                                                 | Notes                                               |
| -------------- | ------------------------------------------------------- | --------------------------------------------------- |
| Core           | `GET /ping`, `GET /omni/templates`, `POST /leads`       | Lead upsert + list templates for WhatsApp/email     |
| Outbound       | `GET /campaigns`, `GET /campaigns/{id}`, list contacts  | Read-only. Which profile/template the campaign uses |
| Contacts       | get / calls / call detail / delete / cancel / followups | No campaign create                                  |
| Events         | `/events`, `/event-routes`                              | ERP event bus slice                                 |
| Inbound agents | CRUD-ish + activate + HMS sync                          | Pre-owned DIDs; healthcare HMS optional             |

## Boundaries

| Via API key                                          | Dashboard only            |
| ---------------------------------------------------- | ------------------------- |
| Push leads / follow-ups / cancel                     | Create & start campaigns  |
| Event routes + events                                | Buy numbers & concurrency |
| Inbound agent on owned number (incl. HMS Custom API) | Company create, KB upload |
| Status poll                                          | CRM OAuth connect         |
| —                                                    | Credit top-up, admin      |

## Auth (minimal)

```bash theme={"system"}
export ONDIAL_BASE_URL="https://dashboard.ondial.ai"
export ONDIAL_API_KEY="ond_test_xxxxxxxx"

curl -sS -H "Authorization: Bearer $ONDIAL_API_KEY" \
  "$ONDIAL_BASE_URL/api/v1/ping"
```

Full grant flow: [Request API access](/get-started/guides/request-api-access).
