# pingx.ai API

> Run the pingx.ai platform from your own systems with an API key: WhatsApp, voice calls, AI agents, analytics, memory and billing.

The pingx.ai API lets you run the whole platform from your own systems: send WhatsApp
messages and campaigns, place and review voice calls, configure AI agents and their
knowledge, and read analytics, memory and billing. Everything you can do in the app, you
can do with an API key.

**Base URL:** `https://api.pingx.ai`

## Quickstart

1. In the app, open **Settings > API Keys**, choose the access each area needs
   (for example *Voice: Read & write*), and generate a key. It is shown once; copy it.
2. Call any endpoint with the key as a bearer token:

```bash
export PINGX_API_KEY=pk_live_xxxxxxxxxxxxxxxx

# List your WhatsApp numbers
curl https://api.pingx.ai/whatsapp/v1/numbers \
  -H "Authorization: Bearer $PINGX_API_KEY"

# Place an AI call
curl -X POST https://api.pingx.ai/voice/v1/calls \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "agentId": "123", "phone": "+919876543210" }'
```

The organization comes from the key. You never send it, and ids from another organization
behave exactly like ids that do not exist.

## What you can do

| Area | Base path | What it covers |
|---|---|---|
| [WhatsApp](https://docs.pingx.ai/whatsapp.md) | `/whatsapp/v1` | Numbers, messages, templates, media, contacts and labels, groups, campaigns, reports, Team Inbox chats, opt-out, auto-responses, flows, commerce |
| [Voice](https://docs.pingx.ai/voice.md) | `/voice/v1` | Place AI and human-bridged calls, call history, transcripts, recordings, numbers, human operators |
| [Agents](https://docs.pingx.ai/agents.md) | `/agents/v1` | AI agents, knowledge bases and sources, web-chat links, custom fields, text chat |
| [Analytics](https://docs.pingx.ai/analytics.md) | `/analytics/v1` | NPS trend, branch leaderboard, custom metrics, call volume |
| [Contact memory](https://docs.pingx.ai/memory.md) | `/memory/v1` | What agents remember about contacts: inspect, correct, erase |
| [Billing](https://docs.pingx.ai/billing.md) | `/billing/v1` | Balance, credit changes, usage (read-only) |

Start with [Authentication and conventions](https://docs.pingx.ai/authentication.md) for scopes, errors, pagination
and formats. The [API reference](https://docs.pingx.ai/reference/whatsapp.md) lists every endpoint with its
parameters.

## For AI agents and tools

This documentation is also published in forms made for LLMs and code generators:

- [`/llms.txt`](/llms.txt): an index of every page, with one-line descriptions.
- [`/llms-full.txt`](/llms-full.txt): the whole documentation in one markdown file.
- Any page as markdown: add `.md` to its URL (for example `/voice.md`), or request it
  with `Accept: text/markdown`.
- [`/openapi.json`](/openapi.json): the OpenAPI 2.0 (Swagger) specification for every endpoint.

