Public Widget
Public endpoints for the customer's entry flow into the video call. These endpoints do not require JWT authentication, being accessed by the end customer.
Rate Limiting
Public endpoints are limited to 30 requests per minute per IP.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/call/:token/validate | Validate access link |
POST | /api/v1/call/:token/join | Join the service queue |
GET | /api/v1/call/status/:call_id | Check call status |
POST | /api/v1/call/evaluate/:call_id | Rate the call |
GET | /api/v1/call/turn-credentials | Get TURN credentials |
Validate Access Link
Checks if an access link is valid and returns department information.
GET /api/v1/call/:token/validatePath Parameters
| Parameter | Type | Description |
|---|---|---|
token | string | Access link token |
Request Example
bash
curl -X GET https://voki.avanter.com.br/api/v1/call/abc123def456/validateSuccess Response (200)
json
{
"data": {
"valid": true,
"department_name": "Suporte Técnico",
"company_name": "Avanter Aliado Tecnológico Ltda",
"company_logo_url": null,
"primary_color": "#6366f1",
"queue_size": 2,
"estimated_wait_time": 30,
"online_agents": 3
}
}Invalid/Expired Link (404)
json
{
"errors": {
"detail": "Invalid or expired access link"
}
}Join Queue
Customer joins the department's service queue.
POST /api/v1/call/:token/joinRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Customer name |
email | string | No | Customer email |
phone | string | No | Customer phone |
reason | string | No | Reason for the call |
Request Example
bash
curl -X POST https://voki.avanter.com.br/api/v1/call/abc123def456/join \
-H "Content-Type: application/json" \
-d '{
"name": "Carlos Ferreira",
"email": "carlos@email.com",
"reason": "Support with configuration"
}'Success Response (200)
json
{
"data": {
"call_id": "1a2b3c4d-5e6f-7890-abcd-ef1234567890",
"status": "queued",
"position": 3,
"estimated_wait_time": 45,
"websocket_token": "temp_ws_token_for_customer...",
"websocket_url": "wss://voki.avanter.com.br/socket/websocket"
}
}Customer Flow
After joining the queue, the customer should connect via WebSocket using the websocket_token to receive real-time updates about their queue position and when the call is started.
Call Status
Checks the current status of a call (polling alternative to WebSocket).
GET /api/v1/call/status/:call_idRequest Example
bash
curl -X GET https://voki.avanter.com.br/api/v1/call/status/1a2b3c4d-5e6f-7890-abcd-ef1234567890Success Response (200)
json
{
"data": {
"call_id": "1a2b3c4d-5e6f-7890-abcd-ef1234567890",
"status": "queued",
"position": 2,
"estimated_wait_time": 30
}
}Rate Call
Allows the customer to rate the call after it is completed.
POST /api/v1/call/evaluate/:call_idRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
rating | integer | Yes | Rating from 1 to 5 |
comment | string | No | Optional comment |
Request Example
bash
curl -X POST https://voki.avanter.com.br/api/v1/call/evaluate/1a2b3c4d-5e6f-7890-abcd-ef1234567890 \
-H "Content-Type: application/json" \
-d '{
"rating": 5,
"comment": "Excellent service! Issue resolved quickly."
}'Success Response (200)
json
{
"data": {
"message": "Evaluation submitted successfully"
}
}TURN Credentials (public)
Obtains TURN credentials for the customer to establish a WebRTC connection.
GET /api/v1/call/turn-credentialsRequest Example
bash
curl -X GET https://voki.avanter.com.br/api/v1/call/turn-credentialsSuccess Response (200)
json
{
"data": {
"urls": [
"turn:voki.avanter.com.br:3478?transport=udp",
"turn:voki.avanter.com.br:3478?transport=tcp"
],
"username": "1708300800:anonymous",
"credential": "abcdef1234567890",
"ttl": 86400
}
}