Skip to content

REST API

9.1 Overview

Voki offers a complete REST API for integration with external systems. The API allows you to manage calls, customers, departments, access links, and much more programmatically.

Base URL: https://voki.avanter.com.br/api

Format: JSON (Content-Type: application/json)

9.2 Authentication

All authenticated requests must include the JWT token in the header:

Authorization: Bearer {access_token}

To obtain a token:

bash
curl -X POST https://voki.avanter.com.br/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@company.com",
    "password": "yourPassword",
    "tenant": "company-name"
  }'

Response:

json
{
  "access_token": "eyJhbGciOi...",
  "refresh_token": "eyJhbGciOi...",
  "user": {
    "id": "uuid",
    "name": "User Name",
    "email": "user@company.com",
    "role": "manager"
  }
}

9.3 Main Endpoints

Authentication

MethodEndpointDescription
POST/api/auth/loginLogin
POST/api/auth/refreshRefresh token
POST/api/auth/mfa/verifyVerify MFA code
POST/api/auth/logoutLogout
POST/api/auth/forgot-passwordRequest password reset
POST/api/auth/reset-passwordReset password

Users

MethodEndpointDescription
GET/api/v1/users/meAuthenticated user data
GET/api/v1/usersList users
GET/api/v1/users/:idUser details
POST/api/v1/usersCreate user
PUT/api/v1/users/:idUpdate user

Departments

MethodEndpointDescription
GET/api/v1/departmentsList departments
GET/api/v1/departments/:idDepartment details
POST/api/v1/departmentsCreate department
PUT/api/v1/departments/:idUpdate department
DELETE/api/v1/departments/:idDelete department
POST/api/v1/departments/:id/usersAdd agent to department
DELETE/api/v1/departments/:id/users/:user_idRemove agent from department
GET/api/v1/departments/:id/usersList department agents

Calls

MethodEndpointDescription
GET/api/v1/callsList calls
GET/api/v1/calls/:idCall details
POST/api/v1/calls/:id/assignAssign call to an agent
POST/api/v1/calls/:id/startStart call
POST/api/v1/calls/:id/completeComplete call
POST/api/v1/calls/:call_id/uploadUpload file to call
GET/api/v1/calls/:call_id/recordingGet recording
POST/api/v1/calls/:call_id/recording/uploadUpload recording

Customers

MethodEndpointDescription
GET/api/v1/customersList customers
GET/api/v1/customers/:idCustomer details
POST/api/v1/customersCreate customer
PUT/api/v1/customers/:idUpdate customer
DELETE/api/v1/customers/:idDelete customer
POST/api/v1/customers/mergeMerge duplicate customers
MethodEndpointDescription
GET/api/v1/access-linksList links
GET/api/v1/access-links/:idLink details
POST/api/v1/access-linksCreate link
POST/api/v1/access-links/batchCreate links in batch
POST/api/v1/access-links/:id/cancelCancel link

Appointments

MethodEndpointDescription
GET/api/v1/appointmentsList appointments
GET/api/v1/appointments/:idAppointment details
POST/api/v1/appointmentsCreate appointment
PUT/api/v1/appointments/:idUpdate appointment
GET/api/v1/appointments/conflictsCheck time conflicts
POST/api/v1/appointments/:id/confirmConfirm appointment
POST/api/v1/appointments/:id/cancelCancel appointment
POST/api/v1/appointments/:id/completeMark as completed
POST/api/v1/appointments/:id/no-showMark as no-show

Tags

MethodEndpointDescription
GET/api/v1/tagsList tags
GET/api/v1/tags/treeTag tree
POST/api/v1/tagsCreate tag
PUT/api/v1/tags/:idUpdate tag
DELETE/api/v1/tags/:idDelete tag
GET/api/v1/calls/:call_id/tagsTags for a call
POST/api/v1/calls/:call_id/tagsApply tag to call
DELETE/api/v1/calls/:call_id/tags/:tag_idRemove tag from call

Analytics

MethodEndpointDescription
GET/api/v1/analytics/overviewMetrics overview
GET/api/v1/analytics/hourlyHourly metrics
GET/api/v1/analytics/agentsMetrics by agent
GET/api/v1/analytics/trendsTrends
POST/api/v1/analytics/refresh-viewsRefresh materialized views

Webhooks

MethodEndpointDescription
GET/api/v1/webhooksList webhooks
GET/api/v1/webhooks/:idWebhook details
POST/api/v1/webhooksCreate webhook
PUT/api/v1/webhooks/:idUpdate webhook
DELETE/api/v1/webhooks/:idDelete webhook
GET/api/v1/webhooks/:id/deliveriesDelivery history
POST/api/v1/webhooks/:id/testTest webhook

Export

MethodEndpointDescription
GET/api/v1/export/calls.csvExport calls as CSV
GET/api/v1/export/customers.csvExport customers as CSV
GET/api/v1/export/links.csvExport links as CSV

Public Access (Customers)

MethodEndpointDescription
GET/api/v1/call/:token/validateValidate access token
POST/api/v1/call/:token/joinJoin the service queue
GET/api/v1/call/status/:call_idCall status
POST/api/v1/call/evaluate/:call_idSubmit post-service evaluation

9.4 Rate Limiting

Endpoint TypeLimitInterval
Authentication5 requestsPer minute
Public API30 requestsPer minute

When the limit is exceeded:

  • HTTP Status: 429 Too Many Requests
  • Header Retry-After: seconds until you can try again

9.5 Response Codes

CodeMeaning
200Success
201Resource created successfully
400Bad request (missing or incorrect parameters)
401Not authenticated (missing or expired token)
403Forbidden (insufficient role or plan limit)
404Resource not found
422Validation error (invalid data)
429Rate limit exceeded
500Internal server error

9.6 Interactive Documentation

The complete API documentation with request and response examples is available at:

https://voki.avanter.com.br/docs

Manual de Uso — Voki v4.0