Liens d'Accès
Gestion des liens d'accès permettant aux clients de rejoindre des appels vidéo. Les liens sont uniques et peuvent être à usage unique ou réutilisables. Nécessite le rôle supervisor ou supérieur.
Endpoints
| Méthode | Endpoint | Description | Rôle Minimum |
|---|---|---|---|
GET | /api/v1/access-links | Lister les liens | supervisor |
GET | /api/v1/access-links/:id | Rechercher un lien | supervisor |
POST | /api/v1/access-links | Créer un lien | supervisor |
POST | /api/v1/access-links/batch | Créer plusieurs liens | supervisor |
POST | /api/v1/access-links/:id/cancel | Annuler un lien | supervisor |
Lister les Liens
GET /api/v1/access-linksQuery Parameters
| Paramètre | Type | Défaut | Description |
|---|---|---|---|
page | integer | 1 | Numéro de page |
page_size | integer | 20 | Éléments par page |
sort_by | string | inserted_at | Champ de tri |
sort_order | string | desc | Direction du tri |
status | string | - | Filtre : active, used, expired, cancelled |
department_id | uuid | - | Filtre par département |
Exemple de Requête
bash
curl -X GET "https://voki.avanter.com.br/api/v1/access-links?status=active" \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter"Réponse de Succès (200)
json
{
"data": [
{
"id": "6e7f8a9b-0c1d-2345-fghi-678901234567",
"token": "abc123def456",
"url": "https://voki.avanter.com.br/call/abc123def456",
"status": "active",
"department_id": "e5f6a7b8-c9d0-1234-efgh-567890123456",
"department_name": "Suporte Técnico",
"customer_name": "Carlos Ferreira",
"customer_email": "carlos@email.com",
"customer_phone": "+5511999998888",
"expires_at": "2026-02-25T23:59:59Z",
"used_at": null,
"inserted_at": "2026-02-18T10:00:00Z"
}
],
"meta": {
"current_page": 1,
"page_size": 20,
"total_pages": 1,
"total_count": 5
}
}Rechercher un Lien
GET /api/v1/access-links/:idExemple de Requête
bash
curl -X GET https://voki.avanter.com.br/api/v1/access-links/6e7f8a9b-0c1d-2345-fghi-678901234567 \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter"Créer un Lien
POST /api/v1/access-linksRequest Body
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
department_id | uuid | Oui | ID du département |
customer_name | string | Non | Nom du client |
customer_email | string | Non | Email du client |
customer_phone | string | Non | Téléphone du client |
expires_at | string | Non | Date d'expiration (ISO 8601, défaut : 7 jours) |
Exemple de Requête
bash
curl -X POST https://voki.avanter.com.br/api/v1/access-links \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter" \
-H "Content-Type: application/json" \
-d '{
"link": {
"department_id": "e5f6a7b8-c9d0-1234-efgh-567890123456",
"customer_name": "Ana Costa",
"customer_email": "ana@email.com",
"expires_at": "2026-02-28T23:59:59Z"
}
}'Réponse de Succès (201)
json
{
"data": {
"id": "7f8a9b0c-1d2e-3456-ghij-789012345678",
"token": "xyz789ghi012",
"url": "https://voki.avanter.com.br/call/xyz789ghi012",
"status": "active",
"department_id": "e5f6a7b8-c9d0-1234-efgh-567890123456",
"department_name": "Suporte Técnico",
"customer_name": "Ana Costa",
"customer_email": "ana@email.com",
"customer_phone": null,
"expires_at": "2026-02-28T23:59:59Z",
"used_at": null,
"inserted_at": "2026-02-18T16:00:00Z"
}
}Créer des Liens en Lot
Crée plusieurs liens d'accès en une seule fois.
POST /api/v1/access-links/batchRequest Body
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
department_id | uuid | Oui | ID du département |
links | array | Oui | Liste de liens à créer |
links[].customer_name | string | Non | Nom du client |
links[].customer_email | string | Non | Email du client |
links[].customer_phone | string | Non | Téléphone du client |
expires_at | string | Non | Date d'expiration pour tous les liens |
Exemple de Requête
bash
curl -X POST https://voki.avanter.com.br/api/v1/access-links/batch \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter" \
-H "Content-Type: application/json" \
-d '{
"department_id": "e5f6a7b8-c9d0-1234-efgh-567890123456",
"expires_at": "2026-03-01T23:59:59Z",
"links": [
{"customer_name": "Ana Costa", "customer_email": "ana@email.com"},
{"customer_name": "Roberto Lima", "customer_email": "roberto@email.com"},
{"customer_name": "Patrícia Souza", "customer_email": "patricia@email.com"}
]
}'Réponse de Succès (201)
json
{
"data": [
{
"id": "8a9b0c1d-2e3f-4567-hijk-890123456789",
"token": "link1abc123",
"url": "https://voki.avanter.com.br/call/link1abc123",
"customer_name": "Ana Costa",
"customer_email": "ana@email.com",
"status": "active"
},
{
"id": "9b0c1d2e-3f4a-5678-ijkl-901234567890",
"token": "link2def456",
"url": "https://voki.avanter.com.br/call/link2def456",
"customer_name": "Roberto Lima",
"customer_email": "roberto@email.com",
"status": "active"
},
{
"id": "0c1d2e3f-4a5b-6789-jklm-012345678901",
"token": "link3ghi789",
"url": "https://voki.avanter.com.br/call/link3ghi789",
"customer_name": "Patrícia Souza",
"customer_email": "patricia@email.com",
"status": "active"
}
]
}Annuler un Lien
Annule un lien d'accès actif.
POST /api/v1/access-links/:id/cancelExemple de Requête
bash
curl -X POST https://voki.avanter.com.br/api/v1/access-links/6e7f8a9b-0c1d-2345-fghi-678901234567/cancel \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter"Réponse de Succès (200)
json
{
"data": {
"id": "6e7f8a9b-0c1d-2345-fghi-678901234567",
"status": "cancelled"
}
}Statuts du Lien
| Statut | Description |
|---|---|
active | Lien actif, disponible pour utilisation |
used | Lien déjà utilisé |
expired | Lien expiré |
cancelled | Lien annulé manuellement |
