REST API and webhooks
Public API v1 to integrate vats.cloud with your CRM, ERP or website. The full OpenAPI 3.1 specification will be published on this page.
Basics
- Base URL
https://api.vats.cloud/v1- Authentication
Authorization: Bearer vc_live_…- Format
JSON, ISO 8601 dates with time zone- Pagination
cursor- Errors
RFC 9457 (application/problem+json)- Rate limit
60 requests per minute per key- Retries
Idempotency-Key header for POST
API keys are created by the company admin in the Integrations section. A key is shown once and grants access only to its own company’s data within the selected scopes.
OpenAPI 3.1 specification
Machine-readable description of every endpoint, schema and error — for client generation and import into Postman/Insomnia.
Download openapi.json · https://vats.cloud/docs/api/openapi.json
Endpoints
| Method | Path | Purpose | Scope |
|---|---|---|---|
| GET | /v1/calls | Call history filtered by date, direction, number, status | calls:read |
| GET | /v1/calls/{id} | Call details | calls:read |
| GET | /v1/calls/{id}/recording | Temporary recording link (15 minutes) | recordings:read |
| GET | /v1/calls/{id}/analysis | Transcript, summary, scores | ai:read |
| POST | /v1/calls | Click-to-call: rings the employee first, then the customer | calls:write |
| GET · POST · PATCH · DELETE | /v1/extensions | Extensions | extensions:* |
| GET | /v1/users | Employees | users:read |
| GET | /v1/queues, /v1/queues/{id}/stats | Queues and statistics | queues:read |
| GET | /v1/numbers | External numbers | numbers:read |
| GET · POST · DELETE | /v1/webhooks | Event subscriptions | webhooks:* |
| GET · POST | /v1/notifications, /v1/notifications/{id} | Voice notification: call a number and play the action audio | notifications:* |
Webhooks
vats.cloud sends a JSON POST request to your URL. It is signed with HMAC-SHA256 in the X-Vats-Signature and X-Vats-Timestamp headers. 10 s timeout, retries after 1 min, 5 min, 30 min, 2 h and 6 h.
| Event | When |
|---|---|
call.started | An inbound call entered a call flow or an outbound call started dialing |
call.answered | An employee or the customer answered |
call.ended | The call ended (duration, outcome) |
call.missed | An inbound call was not answered |
recording.ready | The recording is available |
analysis.ready | AI analysis is ready |
voicemail.received | A new voicemail message |
notification.completed | A voice notification finished (reached or not) |
Sample event
{
"id": "evt_01J…",
"type": "call.ended",
"created_at": "2026-11-07T14:05:12+04:00",
"tenant": "company",
"data": {
"call_id": "cl_01J…",
"direction": "inbound",
"from": "+994501234567",
"to": "+994121234567",
"answered_by": { "extension": "201", "user_id": 42 },
"duration_sec": 184,
"talk_sec": 160,
"status": "answered"
}
}
Verifying the webhook signature
Compare the signature with HMAC-SHA256 of “timestamp + dot + request body” and reject events older than 5 minutes.
// PHP
$ts = $_SERVER['HTTP_X_VATS_TIMESTAMP'];
$body = file_get_contents('php://input');
$sig = 'sha256=' . hash_hmac('sha256', $ts . '.' . $body, $secret);
$ok = hash_equals($sig, $_SERVER['HTTP_X_VATS_SIGNATURE']) && abs(time() - (int) $ts) < 300;
// Node.js
const sig = 'sha256=' + crypto.createHmac('sha256', secret).update(ts + '.' + rawBody).digest('hex');
const ok = crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(req.headers['x-vats-signature']));