Entreprise
Gestion des paramètres de l'entreprise (tenant). Nécessite le rôle manager ou supérieur.
Endpoints
| Méthode | Endpoint | Description | Rôle Minimum |
|---|---|---|---|
GET | /api/v1/company | Données de l'entreprise | manager |
PUT | /api/v1/company | Mettre à jour l'entreprise | manager |
Consulter l'Entreprise
Retourne les paramètres de l'entreprise du tenant actuel.
GET /api/v1/companyExemple de Requête
bash
curl -X GET https://voki.avanter.com.br/api/v1/company \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter"Réponse de Succès (200)
json
{
"data": {
"id": "d4e5f6a7-b8c9-0123-defg-456789012345",
"name": "Avanter Aliado Tecnológico Ltda",
"slug": "avanter",
"document": "12.345.678/0001-90",
"document_type": "cnpj",
"email": "contato@avanter.com.br",
"phone": "+5511999999999",
"logo_url": null,
"primary_color": "#6366f1",
"max_concurrent_calls": 10,
"recording_enabled": true,
"transcription_enabled": true,
"mfa_required": false,
"plan": "professional",
"stripe_customer_id": "cus_xxx",
"stripe_subscription_id": "sub_xxx",
"inserted_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-02-15T10:00:00Z"
}
}Mettre à Jour l'Entreprise
Met à jour les paramètres de l'entreprise.
PUT /api/v1/companyRequest Body
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
name | string | Non | Nom de l'entreprise |
email | string | Non | Email de contact |
phone | string | Non | Téléphone |
logo_url | string | Non | URL du logo |
primary_color | string | Non | Couleur primaire (hex) |
recording_enabled | boolean | Non | Activer l'enregistrement des appels |
transcription_enabled | boolean | Non | Activer la transcription IA |
mfa_required | boolean | Non | Exiger le MFA pour tous les utilisateurs |
Exemple de Requête
bash
curl -X PUT https://voki.avanter.com.br/api/v1/company \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter" \
-H "Content-Type: application/json" \
-d '{
"company": {
"name": "Avanter Aliado Tecnológico Ltda",
"recording_enabled": true,
"mfa_required": true
}
}'Réponse de Succès (200)
json
{
"data": {
"id": "d4e5f6a7-b8c9-0123-defg-456789012345",
"name": "Avanter Aliado Tecnológico Ltda",
"slug": "avanter",
"document": "12.345.678/0001-90",
"document_type": "cnpj",
"email": "contato@avanter.com.br",
"phone": "+5511999999999",
"logo_url": null,
"primary_color": "#6366f1",
"max_concurrent_calls": 10,
"recording_enabled": true,
"transcription_enabled": true,
"mfa_required": true,
"plan": "professional",
"stripe_customer_id": "cus_xxx",
"stripe_subscription_id": "sub_xxx",
"inserted_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-02-18T11:30:00Z"
}
}Erreurs
| Code | Description |
|---|---|
422 | Données invalides |
403 | Permission insuffisante |
