Endpoints overview
The full reference — with request/response examples, curl and JavaScript for every endpoint — lives on the API → Docs page in the app. This is the map.
The basics
GET https://vision.org.il/wa/api/v1.php?r=leads
Authorization: Bearer wab_live_xxxxxxxx_................
Routing: api/v1.php?r=leads/12 (canonical), or api/v1/leads/12 when mod_rewrite is enabled. All responses are JSON; an error is {"error":{"code":"...","message":"..."}} with a matching HTTP status: 401 key, 402 plan or quota, 403 scope, 404, 422 input, 429 rate limit.
| Endpoint | Scope | What |
|---|---|---|
GET me | read | Account, key and enabled capabilities. |
GET contacts · GET contacts/{id} | read | Contacts, consent state, stage. |
GET leads · POST leads · GET/PATCH leads/{id} | read / write | Leads: list, create, details, change stage. |
GET availability | read | Free slots according to calendar availability. |
GET/POST appointments · GET/DELETE appointments/{id} | read / write | Appointments: list, book, details, cancel. |
GET calls · POST calls | read / calls | Call log with summaries; order an outbound receptionist call. |
POST messages | write | Send a WhatsApp message — through the same gates as the panel (opt-out, 24-hour window, templates, quota). |
GET events | read | Recent webhook deliveries and their state. |
Rules
- Rate: 120 requests per minute per key (
X-RateLimit-*andRetry-Afterheaders). Idempotency-Keyon POST — the same request twice within 24 hours returns the same response without creating a duplicate.- CORS is open for GET only; writes — from your server.
Public endpoints (no API key)
| URL | Purpose |
|---|---|
https://vision.org.il/wa/voice_api.php | Speed-to-lead — form → call. Authenticated by the lead token. |
https://vision.org.il/wa/book.php?t=<slug> | The public booking page. |
https://vision.org.il/wa/webhook.php | Incoming messages from Meta. Verified by the app signature. |
https://vision.org.il/wa/voice_webhook.php | Call events and tools from the voice provider. Verified by the secret in the URL. |
https://vision.org.il/wa/billing_webhook.php | Payment events. Verified by the Stripe signature. |