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/callsCall history filtered by date, direction, number, statuscalls:read
GET/v1/calls/{id}Call detailscalls:read
GET/v1/calls/{id}/recordingTemporary recording link (15 minutes)recordings:read
GET/v1/calls/{id}/analysisTranscript, summary, scoresai:read
POST/v1/callsClick-to-call: rings the employee first, then the customercalls:write
GET · POST · PATCH · DELETE/v1/extensionsExtensionsextensions:*
GET/v1/usersEmployeesusers:read
GET/v1/queues, /v1/queues/{id}/statsQueues and statisticsqueues:read
GET/v1/numbersExternal numbersnumbers:read
GET · POST · DELETE/v1/webhooksEvent subscriptionswebhooks:*
GET · POST/v1/notifications, /v1/notifications/{id}Voice notification: call a number and play the action audionotifications:*

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.

EventWhen
call.startedAn inbound call entered a call flow or an outbound call started dialing
call.answeredAn employee or the customer answered
call.endedThe call ended (duration, outcome)
call.missedAn inbound call was not answered
recording.readyThe recording is available
analysis.readyAI analysis is ready
voicemail.receivedA new voicemail message
notification.completedA 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']));