# API Reference

> Missed call REST API - base URL, authentication, response format and every endpoint for calls, summary, CSV export, numbers, plans and webhooks.

Source: https://edesy.in/docs/missed-call/api-reference

Base URL: `https://voice-api.edesy.in/v1`

Every request needs your API key as `Authorization: Bearer vp_...`. See [Authentication](https://edesy.in/docs/missed-call/api-reference/authentication).

## Endpoints

| Method | Path | What it does |
|---|---|---|
| `GET` | `/missed-calls` | [List missed calls](https://edesy.in/docs/missed-call/api-reference/list-missed-calls) |
| `GET` | `/missed-calls/summary` | [Totals and per-day counts](https://edesy.in/docs/missed-call/api-reference/summary) |
| `GET` | `/missed-calls/export.csv` | [Download as CSV](https://edesy.in/docs/missed-call/api-reference/export-csv) |
| `GET` | `/missed-calls/pricing` | [Plan catalogue](https://edesy.in/docs/missed-call/api-reference/numbers-and-plans#get-pricing) |
| `GET` | `/missed-calls/numbers` | [Your numbers with plan state](https://edesy.in/docs/missed-call/api-reference/numbers-and-plans#list-numbers) |
| `POST` | `/missed-calls/numbers/:id/enable` | [Switch a number to missed-call routing](https://edesy.in/docs/missed-call/api-reference/numbers-and-plans#enable-missed-call-routing) |
| `GET` | `/missed-calls/numbers/:id/plan` | [A number's plan](https://edesy.in/docs/missed-call/api-reference/numbers-and-plans#get-a-number-s-plan) |
| `POST` | `/missed-calls/numbers/:id/plan/quote` | [Price a prepaid term](https://edesy.in/docs/missed-call/api-reference/numbers-and-plans#quote-a-term) |
| `POST` | `/missed-calls/numbers/:id/plan` | [Buy a prepaid term](https://edesy.in/docs/missed-call/api-reference/numbers-and-plans#buy-a-term) |
| `PATCH` | `/missed-calls/numbers/:id/plan` | [Turn auto-renew on or off](https://edesy.in/docs/missed-call/api-reference/numbers-and-plans#auto-renew) |
| `GET` `POST` `PATCH` `DELETE` | `/webhooks/subscriptions` | [Manage webhooks, test, deliveries and replay](https://edesy.in/docs/missed-call/api-reference/webhook-subscriptions) |

## Responses

Successful responses are JSON with the result under `data`. Lists add a `meta` object with paging.

Missed-call endpoints return errors as:

```json
{ "error": { "code": "VALIDATION_ERROR", "message": "invalid start_date" } }
```

| Status | When |
|---|---|
| `400` | A bad parameter or body |
| `401` | Missing or invalid API key |
| `402` | Wallet too low for a purchase (`insufficient_balance`) |
| `404` | Number not found |
| `409` | Price changed since your quote (`quote_stale`), or the number's rental is overdue (`number_not_active`) |

Timestamps in JSON are UTC, RFC 3339. Phone numbers are E.164 (`+91...`).
