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

# Phones, KYC, and UCC

> Kupe App /api/v1/phone rows become telephony accounts. India KYC and UCC are first-class on Kupe Hub.

Kupe App stored numbers as `phone_numbers` rows (`/api/v1/phone`). Kupe Hub stores **telephony accounts** (`tel_...`): either a Kupe-managed Plivo DID or BYOK (Twilio / Plivo / Exotel).

See [Phones](https://docs.kupe.in/guides/phones.md), [India KYC](https://docs.kupe.in/guides/kyc.md), and [UCC](https://docs.kupe.in/guides/ucc.md).

## List / add / release

| Kupe App | Kupe Hub |
| - | - |
| `GET /api/v1/phone` | `GET /v1/orgs/{org_id}/telephony-accounts` |
| `POST /api/v1/phone` (add existing number + credentials) | `POST /v1/orgs/{org_id}/telephony-accounts` — body: `provider`, `account_sid`, `api_key`, `from_number`, optional `exotel_subdomain`, `label`, `is_default` |
| `GET/PUT/DELETE /api/v1/phone/{phone_id}` | `GET/PATCH/DELETE /v1/telephony-accounts/{account_id}` |
| `POST /api/v1/phone/verify` (Twilio) | BYOK create validates credentials; no separate verify route |
| `POST /api/v1/phone/verify/plivo` | Same — create/purchase path |
| `GET /api/v1/phone/active` | List accounts and filter `status` client-side |
| `GET .../billing`, `owner-context`, `rentals*` | No 1:1 — wallet is [Billing](https://docs.kupe.in/guides/billing.md) |

`DELETE /v1/telephony-accounts/{account_id}` releases a **Kupe-managed** Plivo number at Plivo, then deletes the row. BYOK rows are deleted locally only. MCP `buy_phone_number` / `delete_phone_number` require `confirm=true`.

## Search and buy (Plivo)

| Kupe App | Kupe Hub |
| - | - |
| `GET /api/v1/phone/plivo/available-numbers` | `GET /v1/orgs/{org_id}/plivo/numbers/search?country_iso=IN\|US&pattern=` |
| `POST /api/v1/phone/plivo/rent` | `POST /v1/orgs/{org_id}/plivo/numbers/purchase` `{ "number": "+91..." }` |
| `GET /api/v1/phone/plivo/compliance-applications` | `GET /v1/orgs/{org_id}/plivo/compliance` + `.../requirements` |
| `POST /api/v1/phone/{id}/compliance` (link packet to number) | KYC is **account-level** before India purchase, not a per-DID link |
| Kupe App `/api/v1/compliance-applications` (platform review queue) | **Different product** — Kupe Plivo KYC is `POST /v1/orgs/{org_id}/plivo/compliance`. Document upload is **dashboard-only**. |

```bash Kupe App theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl "https://api.kupe.in/api/v1/phone/plivo/available-numbers?country_iso=IN" \
  -H "x-api-key: YOUR_APP_KEY"

curl -X POST https://api.kupe.in/api/v1/phone/plivo/rent \
  -H "x-api-key: YOUR_APP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"number":"+9180..."}'
```

```bash Kupe Hub theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl "https://x.kupe.in/v1/orgs/org_.../plivo/numbers/search?country_iso=IN&pattern=80" \
  -H "Authorization: Bearer sk-kupe-YOUR_KEY"

curl -X POST https://x.kupe.in/v1/orgs/org_.../plivo/numbers/purchase \
  -H "Authorization: Bearer sk-kupe-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"number":"+9180..."}'
```

US can be purchased immediately. **India requires an accepted compliance application** first.

## UCC

Kupe App had **no** public UCC routes in the mounted API. Kupe Hub adds org-level Plivo UCC:

* `GET /v1/orgs/{org_id}/plivo/ucc`
* `GET .../ucc/summary`
* `POST .../ucc/sync`
* `GET .../ucc/{reference_id}`
* `POST .../ucc/{reference_id}/proof`

Callback URL (paste in Plivo Console — Plivo has no API to set it):

```
https://x.kupe.in/v1/plivo/webhooks/ucc
```

Do not keep UCC (or voice) callbacks on `https://api.kupe.in/...`.

## Inbound mapping vs deployments

Binding a DID to an agent is **not** `POST /api/v1/phone/mapping` anymore. Use [Inbound deployments](https://docs.kupe.in/migrate/inbound.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.