{"openapi":"3.1.0","info":{"title":"API clients","version":"2026-11-20","description":"Tout ce que fait l’administrateur ou l’utilisateur dans le panneau et les applications, avec une clé d’API d’entreprise (vxk_…) ou au nom d’un client avec une clé revendeur (vxr_… et X-Organization)."},"servers":[{"url":"https://api.hcloud.fr"}],"security":[{"bearer":[]}],"tags":[{"name":"Authentification et sécurité","description":"Connexion par mot de passe, double authentification, clés d’accès (passkeys), cartes de connexion et jetons de session. Avec une clé d’API, seules les lectures sont permises ici : mot de passe, double authentification, clés d’accès, cartes de connexion, clés d’API et connexion unique ne se modifient que depuis le panneau (403 sinon)."},{"name":"Entreprise et réglages","description":"Fiche de l’entreprise, mode simple ou avancé, type de service, identification (obligatoire avant d’obtenir des numéros), domaine SIP, sonneries, fonctions activées, journal d’audit."},{"name":"Utilisateurs","description":"Création des utilisateurs (avec ou sans invitation par e-mail), rôles (utilisateur ou administrateur), droits fins, poste créé en même temps, réinitialisation de la sécurité."},{"name":"Postes et téléphones","description":"Postes (comptes SIP), renvois, messagerie vocale, droits d’appel, numéro présenté, téléphones de bureau associés par adresse MAC (configuration automatique), annuaire des téléphones."},{"name":"Numéros","description":"Lignes mobiles de l’entreprise (consommation data, options appels, SMS, MMS, messagerie, conférence, reconnexion). Achat d’un numéro (liste des numéros disponibles par zone, attribution immédiate), routage d’un numéro vers un poste, un groupe, une file d’attente, un standard vocal, un horaire, un scénario, une messagerie ou un numéro externe."},{"name":"Portabilité","description":"Transfert de vos numéros depuis votre opérateur actuel : demande, mandat signé en ligne, suivi des étapes, annulation. Les numéros portés sont ajoutés au compte le jour du portage."},{"name":"Accueil des appels","description":"Files d’attente (agents, stratégie, attente maximale, musique, annonces), groupes d’appel, standards vocaux (menus « tapez 1 »), horaires et jours fériés, conférences, scénarios d’appel, messageries partagées, fichiers audio et musiques d’attente."},{"name":"Appels et journal","description":"Appels en cours (raccrocher, écouter), journal des appels avec enregistrements, export, statistiques, appel lancé depuis l’API (le poste sonne puis le numéro est composé)."},{"name":"Espace utilisateur","description":"Tout ce qu’un utilisateur fait dans son espace et ses applications : comptes SIP du softphone, présence, renvois, messagerie vocale, files d’attente (connexion, pause), contacts, annuaire, messagerie instantanée, recherche. Avec une clé d’API, ajoutez l’en-tête X-User pour agir comme un utilisateur précis."},{"name":"Rappels et widget","description":"Demandes de rappel (widget « être rappelé » à intégrer à votre site, file virtuelle) et numéros bloqués."},{"name":"SMS et WhatsApp","description":"Envoyer un SMS : POST /api/v1/sms (voir le guide « Envoyer un SMS »). Suivi de remise (GET /api/v1/sms/{id}, webhook sms.status), crédits et comptage (GET /api/v1/sms/balance), historique, WhatsApp de l’entreprise, réponses automatiques."},{"name":"Standardiste IA et analyse des appels","description":"Standardiste virtuel qui répond aux appels, analyse automatique des appels enregistrés (compte rendu, notes, critères)."},{"name":"Satisfaction","description":"Enquêtes de satisfaction après appel (notes au clavier), rapports par agent, file et critère."},{"name":"Applications métier","description":"Centre d’appels (campagnes, qualifications, pauses), hôtel (chambres, arrivées, départs, réveils), radio (émissions, appels à l’antenne)."},{"name":"Trunks SIP","description":"Raccordement d’un PBX (trunk SIP de la plateforme) ou de vos propres trunks d’opérateur."},{"name":"Abonnement, factures et options","description":"Offres, devis, souscription, moyens de paiement, factures, renouvellement, options (intégrations, enquête de satisfaction…)."},{"name":"Intégrations","description":"Fiche CRM à la prise d’appel (le softphone ouvre la fiche du client, requête signée vers votre CRM avec les variables du scénario), clés d’API, webhooks (appels terminés, messages vocaux…), Microsoft Teams (Direct Routing), module WHMCS."},{"name":"Services","description":"Accès internet (test d’éligibilité, commande), forfaits mobiles, cybersécurité, test de débit."},{"name":"Support et dépannage","description":"Tickets de support, appel de test et diagnostic, sauvegardes et restauration de la configuration."},{"name":"Comptes d’essai","description":"Entreprises fictives pour développer votre intégration sans risque (voir le guide « Compte d’essai »)."}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Clé d’entreprise vxk_…, ou clé revendeur vxr_… avec l’en-tête X-Organization"}},"schemas":{"Verification":{"type":"object","properties":{"id":{"type":"string"},"to":{"type":"string"},"channel":{"enum":["sms","whatsapp","auto"]},"status":{"enum":["pending","approved","expired","failed","canceled"]},"attemptsLeft":{"type":"integer"},"sends":{"type":"integer"},"tag":{"type":["string","null"]},"expiresAt":{"type":"string","format":"date-time"},"approvedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}},"Lookup":{"type":"object","properties":{"input":{"type":"string"},"valid":{"type":"boolean"},"number":{"type":["string","null"]},"country":{"type":["string","null"]},"type":{"enum":["mobile","fixed","voip","tollfree","premium","shared_cost","m2m","unknown"]},"detail":{"type":"string"},"nationalFormat":{"type":["string","null"]},"internationalFormat":{"type":["string","null"]},"carrier":{"type":"null"}}},"Error":{"type":"object","properties":{"error":{"type":"string"}}},"Application":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"format":{"enum":["json","twiml"]},"voiceUrl":{"type":"string","format":"uri"},"fallbackUrl":{"type":["string","null"]},"statusCallbackUrl":{"type":["string","null"]},"signingSecret":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"ApplicationInput":{"type":"object","required":["name","voiceUrl"],"properties":{"name":{"type":"string"},"voiceUrl":{"type":"string","format":"uri"},"fallbackUrl":{"type":["string","null"]},"statusCallbackUrl":{"type":["string","null"]},"format":{"enum":["json","twiml"],"default":"json","description":"json : requêtes JSON signées X-VoxNova-Signature ; twiml : requêtes au format Twilio (formulaire, X-Twilio-Signature). Les réponses TwiML (XML) sont acceptées dans les deux cas."}}},"Endpoint":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string","description":"Numéro interne (identifiant SIP)"},"name":{"type":"string"},"enabled":{"type":"boolean"},"applicationId":{"type":["string","null"],"description":"Application qui route les appels émis par cet endpoint"},"voicemail":{"type":"boolean"},"callerId":{"type":["string","null"]},"permission":{"enum":["INTERNAL","NATIONAL","INTERNATIONAL"]},"recordCalls":{"type":"boolean"},"forward":{"type":"object","properties":{"always":{"type":["string","null"]},"busy":{"type":["string","null"]},"noAnswer":{"type":["string","null"]},"noAnswerSeconds":{"type":"integer"}}},"sip":{"type":"object","properties":{"username":{"type":"string"},"authUsername":{"type":"string"},"password":{"type":"string"},"domain":{"type":"string"},"server":{"type":"string"},"port":{"type":"integer"},"transports":{"type":"array","items":{"type":"string"}},"outboundProxy":{"type":"string"}}},"webphone":{"type":["object","null"],"description":"Configuration prête pour @voxnova/webphone (softphone navigateur) : wsServers, uri, authorizationUser, password, realm, iceServers","properties":{"wsServers":{"type":"array","items":{"type":"string"}},"uri":{"type":"string"},"authorizationUser":{"type":"string"},"password":{"type":"string"},"realm":{"type":"string"},"displayName":{"type":"string"},"registerExpires":{"type":"integer"},"iceServers":{"type":"array","items":{"type":"object"}}}},"registrations":{"type":"array","items":{"$ref":"#/components/schemas/Registration"}}}},"EndpointInput":{"type":"object","required":["name"],"properties":{"number":{"type":"string","pattern":"^\\d{2,6}$","description":"Par défaut : premier numéro libre à partir de 1000"},"name":{"type":"string"},"applicationId":{"type":["string","null"]},"password":{"type":"string","minLength":12,"description":"Par défaut : généré"},"voicemail":{"type":"boolean"},"callerId":{"type":["string","null"]},"permission":{"enum":["INTERNAL","NATIONAL","INTERNATIONAL"]},"recordCalls":{"type":"boolean"},"enabled":{"type":"boolean"},"forward":{"type":"object","properties":{"always":{"type":["string","null"]},"busy":{"type":["string","null"]},"noAnswer":{"type":["string","null"]},"noAnswerSeconds":{"type":"integer"}}}}},"Registration":{"type":"object","properties":{"user":{"type":"string"},"agent":{"type":"string"},"ip":{"type":"string"},"port":{"type":"string"},"status":{"type":"string"},"contact":{"type":"string"}}},"Number":{"type":"object","properties":{"number":{"type":"string"},"label":{"type":"string"},"destType":{"type":["string","null"]},"routing":{"type":["object","null"]},"monthlyPriceCents":{"type":"integer"}}},"CallInput":{"type":"object","required":["to","applicationId"],"properties":{"to":{"type":"string","description":"Endpoint (numéro interne ou id) ou numéro de téléphone"},"from":{"type":"string","description":"Un de vos numéros (présentation)"},"applicationId":{"type":"string"},"url":{"type":"string","format":"uri","description":"Remplace voiceUrl pour cet appel"},"timeout":{"type":"integer","default":30},"vars":{"type":"object","additionalProperties":{"type":"string"},"description":"Variables transmises à chaque webhook (vars)"},"statusCallback":{"type":"string","format":"uri","description":"Prévenue à la fin de cet appel (remplace statusCallbackUrl de l’application)"},"twiml":{"type":"string","description":"Instructions TwiML en ligne (<Response>…</Response>), à la place d’une adresse"}}},"Call":{"type":"object","properties":{"callId":{"type":"string"},"status":{"type":"string"}}},"Verb":{"type":"object","required":["verb"],"description":"Instruction renvoyée par votre webhook","properties":{"verb":{"enum":["answer","play","say","pause","set","gather","record","dial","redirect","queue","conference","voicemail","transfer","dtmf","sms","hangup"]},"url":{"type":"string","description":"play/gather : fichier audio (MP3, WAV, AAC…) ; redirect : URL"},"audioId":{"type":"string"},"sound":{"type":"string"},"loop":{"type":"integer"},"value":{"type":"string","description":"say : nombre à prononcer"},"text":{"type":"string","description":"say, gather : texte lu à voix haute (1 000 caractères) ; sms : message envoyé pendant l’appel"},"voice":{"enum":["woman","man"]},"digits":{"type":"string","description":"dtmf : touches envoyées"},"as":{"enum":["number","digits"]},"language":{"enum":["fr","en"]},"seconds":{"type":"integer"},"vars":{"type":"object"},"minDigits":{"type":"integer"},"maxDigits":{"type":"integer"},"numDigits":{"type":"integer"},"timeout":{"type":"integer"},"finishOnKey":{"type":"string"},"tries":{"type":"integer"},"action":{"type":"string","format":"uri","description":"URL rappelée avec le résultat (gather, dial, record)"},"maxSeconds":{"type":"integer"},"beep":{"type":"boolean"},"endpoint":{"type":"string"},"number":{"type":"string"},"targets":{"type":"array","items":{"type":"object"}},"strategy":{"enum":["simultaneous","sequential"]},"callerId":{"type":"string"},"record":{"type":"boolean"},"queue":{"type":"string"},"name":{"type":"string"},"muted":{"type":"boolean"},"moderator":{"type":"boolean"},"to":{"type":"string"},"cause":{"type":"string"}}},"WebhookRequest":{"type":"object","properties":{"event":{"enum":["call.incoming","gather","dial","record","redirect"]},"callId":{"type":"string"},"applicationId":{"type":"string"},"accountId":{"type":"string"},"direction":{"enum":["inbound","endpoint","api"]},"from":{"type":"string"},"to":{"type":"string"},"endpoint":{"type":"string"},"callerName":{"type":"string"},"digits":{"type":"string"},"dial":{"type":"object","properties":{"status":{"enum":["completed","busy","no-answer","canceled","failed"]},"hangupCause":{"type":"string"},"answered":{"type":"boolean"}}},"recording":{"type":["object","null"],"properties":{"id":{"type":"string"},"duration":{"type":"integer"}}},"vars":{"type":"object"},"timestamp":{"type":"string"}}},"VoicemailMessage":{"type":"object","properties":{"uuid":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"read":{"type":"boolean"},"folder":{"type":"string"},"callerName":{"type":"string"},"callerNumber":{"type":"string"},"seconds":{"type":"integer"},"transcript":{"type":["string","null"],"description":"Transcription (option IA)"}}},"VoicemailBox":{"type":"object","properties":{"extensionId":{"type":"string"},"number":{"type":"string"},"name":{"type":"string"},"email":{"type":["string","null"]},"unread":{"type":"integer"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/VoicemailMessage"}}}},"VoicemailEvent":{"type":"object","properties":{"event":{"const":"voicemail.new"},"createdAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"orgId":{"type":"string"},"extension":{"type":"string"},"extensionId":{"type":"string"},"uuid":{"type":"string"},"callerName":{"type":["string","null"]},"callerNumber":{"type":["string","null"]},"seconds":{"type":"integer"},"receivedAt":{"type":"string","format":"date-time"},"transcript":{"type":["string","null"]}}}}},"Porting":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["AWAITING_SIGNATURE","SUBMITTED","IN_PROGRESS","SCHEDULED","DONE","REJECTED","CANCELLED"],"description":"AWAITING_SIGNATURE : mandat à signer ; SUBMITTED : reçue ; IN_PROGRESS : en traitement ; SCHEDULED : date de portage fixée ; DONE : numéros portés (ajoutés au compte) ; REJECTED : refusée ; CANCELLED : annulée"},"statusLabel":{"type":"string"},"numbers":{"type":"array","items":{"type":"string"}},"numberType":{"enum":["FIXE","MOBILE"]},"holderName":{"type":"string"},"siret":{"type":["string","null"]},"address":{"type":["string","null"]},"currentOperator":{"type":"string"},"operators":{"type":"array","items":{"type":"object"},"description":"Opérateur actuel de chaque numéro (bases de portabilité)"},"rio":{"type":["string","null"]},"desiredDate":{"type":["string","null"],"format":"date-time"},"scheduledAt":{"type":["string","null"],"format":"date-time","description":"Date de portage fixée"},"contactName":{"type":"string"},"contactEmail":{"type":"string"},"contactPhone":{"type":["string","null"]},"notes":{"type":"string"},"message":{"type":["string","null"],"description":"Message de l’équipe (motif de refus, précisions)"},"mandateSigned":{"type":"boolean"},"awaitingSignature":{"type":"boolean"},"files":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"name":{"type":"string"},"size":{"type":"integer"},"type":{"type":"string"}}}},"history":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"status":{"type":"string"},"note":{"type":["string","null"]}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"PortingInput":{"type":"object","required":["numbers","holderName","contactName","contactEmail"],"properties":{"numbers":{"type":"array","items":{"type":"string"},"description":"Numéros à porter (01 23 45 67 89, +33…), 200 au plus"},"numberType":{"enum":["FIXE","MOBILE"],"default":"FIXE"},"holderName":{"type":"string","description":"Titulaire de la ligne chez l’opérateur actuel"},"siret":{"type":"string","description":"14 chiffres (professionnels)"},"address":{"type":"string"},"currentOperator":{"type":"string","description":"Facultatif : relevé automatiquement dans les bases de portabilité"},"rio":{"type":"string","description":"Obligatoire pour les mobiles : 12 caractères (3179 depuis la ligne). La clé est vérifiée pour un numéro unique."},"desiredDate":{"type":"string","format":"date-time"},"contactName":{"type":"string"},"contactEmail":{"type":"string","format":"email"},"contactPhone":{"type":"string"},"notes":{"type":"string"},"documents":{"type":"array","maxItems":5,"description":"Facture récente, mandat signé… (PDF, PNG, JPEG, WebP ; 10 Mo). Inutiles quand le mandat est signé en ligne (`GET /api/v1/porting/config` : esign).","items":{"type":"object","required":["name","type","content"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"content":{"type":"string","description":"Contenu en base64"}}}}}},"PortingEvent":{"type":"object","properties":{"event":{"const":"porting.status"},"createdAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/Porting"}}},"Sms":{"type":"object","properties":{"id":{"type":"string"},"to":{"type":"string","description":"Numéro E.164"},"text":{"type":"string"},"status":{"enum":["queued","sent","delivered","failed"],"description":"queued : en file ; sent : accepté par l’opérateur ; delivered : remis ; failed : échec"},"providerStatus":{"type":["string","null"],"description":"Dernier état du fournisseur : accepted, sent, delivered, hard_bounce…"},"messageId":{"type":["string","null"],"description":"Identifiant de suivi du message chez l’opérateur SMS"},"sender":{"type":["string","null"]},"tag":{"type":["string","null"]},"type":{"enum":["transactional","marketing",null]},"segments":{"type":"integer","description":"Crédits consommés"},"channel":{"type":["string","null"]},"error":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"sentAt":{"type":["string","null"]},"deliveredAt":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string"},"at":{"type":"string","format":"date-time"}}}}}},"SmsInput":{"type":"object","required":["to","text"],"properties":{"to":{"type":"string","description":"Mobile du destinataire : 0612345678, 06 12 34 56 78 ou +33612345678 (mobiles français, 06 et 07)"},"text":{"type":"string","maxLength":1000,"description":"160 caractères par SMS (153 par partie au-delà) ; 70 (67) avec ê, â, î, ô, û, ç minuscule ou un emoji"},"sender":{"type":"string","description":"Expéditeur affiché (3 à 11 lettres/chiffres) ; refusé s’il figure sur une liste de blocage"},"tag":{"type":"string","description":"Étiquette libre, renvoyée dans les statuts"},"type":{"enum":["transactional","marketing"],"default":"transactional"},"channel":{"enum":["sms","whatsapp","auto"],"default":"sms","description":"auto : WhatsApp si possible, sinon SMS"},"inviteText":{"type":"string","maxLength":600,"description":"channel whatsapp ou auto : SMS d’invitation envoyé si WhatsApp refuse un premier contact ({{whatsapp_lien}} y insère le lien)"},"statusCallback":{"type":"string","format":"uri","description":"Adresse prévenue à chaque changement de statut de ce message (JSON signé : voir /api/v1/sms/callback-secret)"}}},"SmsCredits":{"type":"object","properties":{"monthlyLimit":{"type":"integer","description":"Forfait du mois (remis à zéro chaque mois)"},"monthlyUsed":{"type":"integer"},"monthlyLeft":{"type":"integer"},"balance":{"type":"integer","description":"Solde à vie (sans expiration), utilisé après le forfait du mois"},"available":{"type":"integer","description":"Forfait restant + solde"},"metered":{"type":"object","description":"SMS au comptage : facturés à l’unité en fin de mois une fois le forfait et le solde épuisés","properties":{"enabled":{"type":"boolean"},"unitPriceCents":{"type":"number","description":"Tarif HT d’un SMS en centimes (5.8 = 0,058 €)"},"cap":{"type":["integer","null"],"description":"Plafond mensuel (null : sans plafond)"},"monthUsed":{"type":"integer"},"monthCents":{"type":"integer","description":"Montant HT du mois"},"left":{"type":["integer","null"],"description":"SMS au comptage encore autorisés ce mois-ci"}}}}},"SmsPack":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"enum":["MONTHLY","LIFETIME"],"description":"MONTHLY : forfait remis à zéro chaque mois ; LIFETIME : crédits ajoutés au solde"},"credits":{"type":"integer"},"priceCents":{"type":"integer"},"active":{"type":"boolean"}}},"SmsPackInput":{"type":"object","required":["name","kind","credits"],"properties":{"name":{"type":"string"},"kind":{"enum":["MONTHLY","LIFETIME"]},"credits":{"type":"integer"},"priceCents":{"type":"integer"},"active":{"type":"boolean"}}},"SenderBlock":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["exact","prefix","contains"]},"value":{"type":"string"},"reason":{"type":"string"}}},"SenderBlockInput":{"type":"object","required":["value"],"properties":{"kind":{"enum":["exact","prefix","contains"],"default":"exact"},"value":{"type":"string"},"reason":{"type":"string"}}},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"enum":["call.completed","voicemail.new","sms.status","porting.status","number.assigned","invoice.created","invoice.paid"]}},"enabled":{"type":"boolean"},"lastStatus":{"type":["string","null"]},"secret":{"type":"string","description":"Fourni une seule fois, à la création"}}},"WebhookInput":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"enum":["call.completed","voicemail.new","sms.status","porting.status","number.assigned","invoice.created","invoice.paid"]}},"enabled":{"type":"boolean"}}},"SmsStatusEvent":{"type":"object","properties":{"event":{"const":"sms.status"},"createdAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"id":{"type":"string"},"orgId":{"type":"string"},"to":{"type":"string"},"status":{"type":"string","description":"accepted, sent, delivered, hard_bounce, failed…"},"messageId":{"type":"string"},"tag":{"type":["string","null"]},"type":{"type":["string","null"]},"segments":{"type":"integer"},"sender":{"type":["string","null"]},"error":{"type":["string","null"]},"at":{"type":"string","format":"date-time"}}}}},"ResellerApiKey":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"key":{"type":"string","description":"Clé complète, fournie une seule fois"},"lastUsedAt":{"type":["string","null"]}}}},"parameters":{"User":{"name":"X-User","in":"header","required":false,"schema":{"type":"string"},"description":"Agir comme un utilisateur précis de l’entreprise (identifiant ou e-mail) ; sans cet en-tête, la clé agit comme l’administrateur."},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Écritures (POST, PUT, PATCH, DELETE) : une requête rejouée avec la même clé (8 à 200 caractères) renvoie la réponse de la première (en-tête `Idempotent-Replayed: true`), sans doublon, pendant 24 h. Même clé avec un autre corps : 422 ; requête identique en cours : 409.","schema":{"type":"string"}},"Organization":{"name":"X-Organization","in":"header","required":false,"description":"Avec une clé revendeur (vxr_) : identifiant ou identifiant court du client au nom duquel agir (il doit être l’un de vos clients). Inutile avec une clé d’entreprise (vxk_).","schema":{"type":"string"}}},"responses":{"Error":{"description":"Erreur","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Message lisible, en français"},"code":{"type":"string"},"details":{}}}}}}}},"paths":{"/api/addons":{"get":{"summary":"Options disponibles et options souscrites (prix, état, réglages).","tags":["Abonnement, factures et options"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"code":"whmcs","label":"Intégration WHMCS","description":"Clic pour appeler, fiche client à l’appel, appels et résumés IA notés dans WHMCS","priceCents":1000,"active":false,"offered":false,"hasToken":false,"startedAt":null,"settings":{"noteInbound":true,"noteOutbound":true,"noteMissed":true,"aiSummary":true,"minDurationSec":0,"popup":true}},{"code":"satisfaction","label":"Enquête de satisfaction","description":"L’appelant note l’appel au clavier après la conversation, sur vos critères ; tableau de bord par agent, file et critère","priceCents":900,"active":true,"offered":true,"hasToken":false,"startedAt":"2026-10-14T17:28:39.572Z"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/addons/{code}/cancel":{"post":{"summary":"Résilie une option.","tags":["Abonnement, factures et options"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/addons/{code}/subscribe":{"post":{"summary":"Souscrit une option (code : whmcs, satisfaction…).","tags":["Abonnement, factures et options"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/addons/{code}/token":{"post":{"summary":"Crée (ou remplace) le jeton de connexion de l’option (module WHMCS) ; affiché une seule fois.","tags":["Abonnement, factures et options"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/addons/whmcs/module.zip":{"get":{"summary":"Télécharge le module WHMCS prêt à installer.","tags":["Abonnement, factures et options"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/addons/whmcs/settings":{"put":{"summary":"Réglages du module WHMCS : notes d’appels dans la fiche client, résumé IA, fiche à l’appel.","tags":["Abonnement, factures et options"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"noteInbound":{"type":"boolean"},"noteOutbound":{"type":"boolean"},"noteMissed":{"type":"boolean"},"aiSummary":{"type":"boolean"},"minDurationSec":{"type":"integer","minimum":0,"maximum":600},"popup":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/ai/analyses":{"get":{"summary":"Liste et statistiques (période, poste, note).","tags":["Standardiste IA et analyse des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"days","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":366}},{"name":"agent","in":"query","required":false,"schema":{"type":"string","maxLength":20}},{"name":"maxScore","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":100}},{"name":"page","in":"query","required":false,"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"items":[],"total":0,"stats":{"analyzed":0,"avgScore":null,"minutes":0,"sentiment":{},"agents":[]}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/ai/analyses/{id}":{"delete":{"summary":"Supprime une analyse.","tags":["Standardiste IA et analyse des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"get":{"summary":"Analyse d’un appel : compte rendu, notes par critère, points forts et axes de progrès.","tags":["Standardiste IA et analyse des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/ai/calls/{id}/analyze":{"post":{"summary":"Analyse à la demande d'un appel enregistré (journal des appels).","tags":["Standardiste IA et analyse des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/ai/settings":{"put":{"summary":"Réglages de l’analyse IA : appels analysés, durée minimale, consignes propres à l’entreprise.","tags":["Standardiste IA et analyse des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"auto":{"type":"boolean"},"scope":{"type":"string","enum":["all","selected"]},"extensionIds":{"default":[],"maxItems":1000,"type":"array","items":{"type":"string"}},"criteria":{"default":"","type":"string","maxLength":3000},"announceAudioId":{"type":["string","null"]}},"required":["auto","scope"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/ai/status":{"get":{"summary":"Analyse IA : disponible ou non, quota du mois.","tags":["Standardiste IA et analyse des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"available":false,"platformReady":false,"offered":true,"minSeconds":15,"settings":{"auto":true,"scope":"all","extensionIds":[],"criteria":"","announceAudioId":null}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/callcenter/callbacks/{id}":{"patch":{"summary":"Met à jour un rappel planifié (date, fait, annulé).","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/callcenter/campaigns":{"get":{"summary":"Campagnes d’appels.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdjq3i0014q7rreaq9da4i","orgId":"cmv8684q90000q7abs5rcqq3y","name":"Relance clients","status":"DRAFT","agents":[],"maxAttempts":3,"retryMinutes":60,"script":"","createdAt":"2026-11-16T14:44:17.503Z","counts":{"PENDING":1}}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée une campagne.","tags":["Applications métier"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"agents":{"default":[],"maxItems":500,"type":"array","items":{"type":"string"}},"maxAttempts":{"default":3,"type":"integer","minimum":1,"maximum":20},"retryMinutes":{"default":60,"type":"integer","minimum":1,"maximum":10080},"script":{"default":"","type":"string","maxLength":10000}},"required":["name"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/callcenter/campaigns/{id}":{"delete":{"summary":"Supprime une campagne.","tags":["Applications métier"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie une campagne.","tags":["Applications métier"],"x-access":"admin","x-partial":true,"description":"Droits : Administrateur. Modification partielle : seuls les champs envoyés sont modifiés.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"agents":{"default":[],"maxItems":500,"type":"array","items":{"type":"string"}},"maxAttempts":{"default":3,"type":"integer","minimum":1,"maximum":20},"retryMinutes":{"default":60,"type":"integer","minimum":1,"maximum":10080},"script":{"default":"","type":"string","maxLength":10000},"status":{"type":"string","enum":["DRAFT","RUNNING","PAUSED","DONE"]}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/callcenter/campaigns/{id}/contacts":{"get":{"summary":"Contacts d’une campagne et leur état (à appeler, joint, à rappeler…).","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdjq3u001aq7rr0qgmq34d","campaignId":"cmwjdjq3i0014q7rreaq9da4i","number":"+33612345678","name":"","data":{},"status":"PENDING","attempts":0,"assignedTo":null,"nextAttemptAt":"2026-11-16T14:44:17.514Z","dispositionId":null,"notes":"","updatedAt":"2026-11-16T14:44:17.514Z"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Import de contacts : CSV « numéro;nom;autres colonnes… » (première ligne d'en-têtes facultative).","tags":["Applications métier"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":3,"maxLength":5000000}},"required":["csv"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/callcenter/campaigns/{id}/next":{"post":{"summary":"Contact suivant pour l'agent (verrouillé pour lui jusqu'à la qualification).","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/callcenter/contacts/{id}/release":{"post":{"summary":"Libère un contact réservé par un agent (remis dans la campagne).","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/callcenter/dispositions":{"get":{"summary":"Qualifications d’appel.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdjq3d0011q7rrhn90wqi8","orgId":"cmv8684q90000q7abs5rcqq3y","label":"Vente conclue","color":"slate","success":false,"callback":false,"sortOrder":0}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée une qualification.","tags":["Applications métier"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"color":{"default":"slate","type":"string","maxLength":20},"success":{"default":false,"type":"boolean"},"callback":{"default":false,"type":"boolean"},"sortOrder":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["label"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/callcenter/dispositions/{id}":{"delete":{"summary":"Supprime une qualification.","tags":["Applications métier"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie une qualification.","tags":["Applications métier"],"x-access":"admin","x-partial":true,"description":"Droits : Administrateur. Modification partielle : seuls les champs envoyés sont modifiés.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"color":{"default":"slate","type":"string","maxLength":20},"success":{"default":false,"type":"boolean"},"callback":{"default":false,"type":"boolean"},"sortOrder":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/callcenter/logs":{"post":{"summary":"Qualification de l'appel (après chaque appel) ; met à jour la campagne et programme un rappel.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","minLength":2,"maxLength":30},"direction":{"default":"INBOUND","type":"string","enum":["INBOUND","OUTBOUND"]},"dispositionId":{"type":["string","null"]},"notes":{"default":"","type":"string","maxLength":4000},"durationSec":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"contactId":{"type":["string","null"]},"callback":{"anyOf":[{"type":"object","properties":{"at":{},"note":{"default":"","type":"string","maxLength":500},"name":{"default":"","type":"string","maxLength":80}},"required":["at"]},{"type":"null"}]}},"required":["number"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/callcenter/lookup":{"get":{"summary":"Fiche de l'appelant : contact, historique des échanges, rappels, données de campagne.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"number","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":30}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/callcenter/me":{"get":{"summary":"État de l’agent connecté : statut, pause, appel en cours, rappels à faire.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"extensions":[{"id":"cmv8684sf0008q7abh4b8ftyw","number":"102"}],"queues":[{"id":"cmv8684ta000gq7abhezk2dgn","name":"Service client","number":"600"}],"status":"Logged Out","state":null,"pauseReason":null,"since":null,"today":{"calls":0,"talkSec":0,"byDisposition":[]},"callbacks":[],"campaigns":[]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/callcenter/me/status":{"post":{"summary":"Change le statut de l’agent : disponible, en pause (avec motif), déconnecté.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["Available","On Break","Logged Out"]},"reason":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]}},"required":["status"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/callcenter/overview":{"get":{"summary":"Tableau de bord du centre d’appels : agents, campagnes, files, indicateurs du jour.","tags":["Applications métier"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"queues":[{"id":"cmv8684ta000gq7abhezk2dgn","name":"Service client","number":"600","waiting":0,"longestWaitSec":0,"talking":0}],"agents":[{"extensionId":"cmv8684s40006q7abi97pyqu8","number":"101","name":"Julie Martin","status":"Logged Out","state":"","pauseReason":null,"since":null,"callsAnswered":0,"qualified":0,"success":0},{"extensionId":"cmv8684so000aq7ab7xldoinc","number":"103","name":"Sophie Laurent","status":"Logged Out","state":"","pauseReason":null,"since":null,"callsAnswered":0,"qualified":0,"success":0}],"dispositions":[{"id":"cmwjdjq3d0011q7rrhn90wqi8","orgId":"cmv8684q90000q7abs5rcqq3y","label":"Vente conclue","color":"slate","success":false,"callback":false,"sortOrder":0,"count":0}]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/callcenter/pause-reasons":{"get":{"summary":"Motifs de pause.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdjq3g0012q7rrdjj79uru","orgId":"cmv8684q90000q7abs5rcqq3y","label":"Déjeuner"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée un motif de pause.","tags":["Applications métier"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60}},"required":["label"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/callcenter/pause-reasons/{id}":{"delete":{"summary":"Supprime un motif de pause.","tags":["Applications métier"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/hotel/rooms":{"get":{"summary":"Chambres.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdjq39000xq7rrj7toyz2x","orgId":"cmv8684q90000q7abs5rcqq3y","number":"101","floor":"","extensionId":null,"occupied":false,"guestName":"","guestLanguage":"fr","checkInAt":null,"housekeeping":"CLEAN","notes":"","updatedAt":"2026-11-16T14:44:17.493Z","wakeups":[],"extension":null}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée une chambre.","tags":["Applications métier"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":10},"floor":{"default":"","type":"string","maxLength":20},"extensionId":{"type":["string","null"]},"createExtension":{"default":false,"type":"boolean"},"notes":{"default":"","type":"string","maxLength":500}},"required":["number"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/hotel/rooms/{id}":{"delete":{"summary":"Supprime une chambre.","tags":["Applications métier"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Modifie une chambre.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"housekeeping":{"type":"string","enum":["CLEAN","DIRTY","INSPECTED","OUT_OF_ORDER"]},"notes":{"type":"string","maxLength":500},"floor":{"type":"string","maxLength":20},"dnd":{"type":"boolean"},"guestName":{"type":"string","maxLength":80}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/hotel/rooms/{id}/checkin":{"post":{"summary":"Arrivée d’un client : la chambre est ouverte aux appels (droits d’appel, nom affiché).","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"guestName":{"type":"string","minLength":1,"maxLength":80},"language":{"default":"fr","type":"string","maxLength":5}},"required":["guestName"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/hotel/rooms/{id}/checkout":{"post":{"summary":"Départ : appels de la chambre bloqués, relevé des communications.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/hotel/rooms/{id}/folio":{"get":{"summary":"Relevé des appels facturables de la chambre pendant le séjour.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"room":"101","guestName":"","checkInAt":null,"lines":[],"totalCents":0}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/hotel/rooms/{id}/wakeups":{"post":{"summary":"Programme un réveil téléphonique pour la chambre.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"at":{}},"required":["at"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/hotel/rooms/bulk":{"post":{"summary":"Crée plusieurs chambres d’un coup (plage de numéros).","tags":["Applications métier"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"integer","minimum":1,"maximum":9007199254740991},"to":{"type":"integer","minimum":1,"maximum":9007199254740991},"floor":{"default":"","type":"string","maxLength":20}},"required":["from","to"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/hotel/settings":{"get":{"summary":"Réglages de l’hôtel : tarifs des appels, numéros autorisés, réveils.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"occupiedPermission":"NATIONAL","vacantPermission":"INTERNAL","markupPercent":50,"minChargeCents":30,"wakeupRetries":3}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie les réglages de l’hôtel.","tags":["Applications métier"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"occupiedPermission":{"type":"string","enum":["INTERNAL","NATIONAL","INTERNATIONAL"]},"vacantPermission":{"type":"string","enum":["INTERNAL","NATIONAL","INTERNATIONAL"]},"markupPercent":{"type":"number","minimum":0,"maximum":1000},"minChargeCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"wakeupRetries":{"type":"integer","minimum":1,"maximum":5}},"required":["occupiedPermission","vacantPermission","markupPercent","minChargeCents","wakeupRetries"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/hotel/stays":{"get":{"summary":"Historique des séjours.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/hotel/wakeups/{id}":{"delete":{"summary":"Supprime un réveil.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/radio/calls/{id}":{"patch":{"summary":"Met à jour un auditeur en attente (nom, note, ordre de passage).","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"city":{"type":"string","maxLength":80},"topic":{"type":"string","maxLength":200},"note":{"type":"string","maxLength":1000},"priority":{"type":"integer","minimum":0,"maximum":9}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/radio/calls/{id}/action":{"post":{"summary":"Actions du standard et de l'antenne.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["screen","wait","ready","air","hangup","mute","unmute"]},"extensionId":{"type":"string"}},"required":["action"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/radio/shows":{"get":{"summary":"Émissions.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdjq3c000zq7rrdkbtrcem","orgId":"cmv8684q90000q7abs5rcqq3y","name":"Matinale","studioExtensionId":null,"screeners":[],"welcomeAudioId":null,"holdAudioId":null,"maxWaiting":20,"autoAnswer":true,"createdAt":"2026-11-16T14:44:17.496Z"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée une émission.","tags":["Applications métier"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"studioExtensionId":{"type":["string","null"]},"screeners":{"default":[],"maxItems":50,"type":"array","items":{"type":"string"}},"welcomeAudioId":{"type":["string","null"]},"holdAudioId":{"type":["string","null"]},"maxWaiting":{"default":20,"type":"integer","minimum":1,"maximum":200}},"required":["name"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/radio/shows/{id}":{"delete":{"summary":"Supprime une émission.","tags":["Applications métier"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie une émission.","tags":["Applications métier"],"x-access":"admin","x-partial":true,"description":"Droits : Administrateur. Modification partielle : seuls les champs envoyés sont modifiés.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"studioExtensionId":{"type":["string","null"]},"screeners":{"default":[],"maxItems":50,"type":"array","items":{"type":"string"}},"welcomeAudioId":{"type":["string","null"]},"holdAudioId":{"type":["string","null"]},"maxWaiting":{"default":20,"type":"integer","minimum":1,"maximum":200}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/radio/shows/{id}/live":{"get":{"summary":"État en direct : auditeurs, antenne, studio.","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"online":false,"now":1795214336043,"show":{"id":"cmwjdjq3c000zq7rrdkbtrcem","name":"Matinale","studioExtension":null},"studio":{"connected":false,"muted":false,"talking":false},"calls":[{"id":"cmwjdjq3q0018q7rryubwbar3","showId":"cmwjdjq3c000zq7rrdkbtrcem","uuid":"00000000-0000-4000-8000-000000000002","caller":"+33612345678","callerName":null,"state":"WAITING","name":"","city":"","topic":"","note":"","priority":0,"screenedBy":null,"onAirAt":null,"endedAt":null,"createdAt":"2026-11-16T14:44:17.510Z","updatedAt":"2026-11-16T14:44:17.510Z","air":null}],"ended":[]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/apps/radio/shows/{id}/studio":{"post":{"summary":"Ouvre ou ferme le studio de l’émission (prise d’appels).","tags":["Applications métier"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["connect","disconnect","mute","unmute","clear"]}},"required":["action"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/accept-invite":{"post":{"summary":"Accepte une invitation : choix du mot de passe, compte activé.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"password":{"type":"string","minLength":10,"maxLength":200},"name":{"type":"string","minLength":2}},"required":["token","password"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/forgot":{"post":{"summary":"Envoie un lien de réinitialisation du mot de passe.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"captcha":{"type":"string","maxLength":4000}},"required":["email"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/login":{"post":{"summary":"Connexion par e-mail et mot de passe : jeton de session (12 h) et jeton de renouvellement, ou étape de double authentification.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"password":{"type":"string","minLength":1}},"required":["email","password"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/login-link":{"post":{"summary":"Consommation d'un lien de connexion automatique : ouvre la session (une seule fois). Appelée par la page /sso du panneau.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":20,"maxLength":200}},"required":["token"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/login/card":{"post":{"summary":"Connexion par carte de connexion (QR code).","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":40,"maxLength":100}},"required":["key"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/login/mfa":{"post":{"summary":"Seconde étape de la connexion : code de l'application d'authentification (ou code de secours).","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mfaToken":{"type":"string","minLength":10},"code":{"type":"string","minLength":6,"maxLength":20}},"required":["mfaToken","code"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/login/passkey":{"post":{"summary":"Connexion par clé d’accès (passkey).","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mfaToken":{"type":"string","minLength":10},"token":{"type":"string","minLength":10},"response":{"type":"object","properties":{"id":{"type":"string","minLength":10,"maxLength":1500}},"required":["id"],"additionalProperties":{}}},"required":["token","response"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/login/passkey/options":{"post":{"summary":"Prépare une connexion par clé d’accès (défi WebAuthn).","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mfaToken":{"type":"string","minLength":10}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/logout":{"post":{"summary":"Déconnexion : jeton de renouvellement révoqué.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/me":{"get":{"summary":"Utilisateur connecté, son entreprise et ses droits.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"user":{"id":"cmwjdhkg40001q7e0y8y40faf","email":"demo-utilisateur@hcloud.invalid","name":"Thomas Bernard","role":"USER","orgId":"cmv8684q90000q7abs5rcqq3y","locale":"fr","status":"ACTIVE","permissions":[],"emailVerified":false,"newsletterOptOut":false},"org":{"id":"cmv8684q90000q7abs5rcqq3y","sandbox":false,"sandboxOwnerId":null,"name":"Boulangerie Martin","slug":"demo-documentation","sipDomain":"demo-documentation.demo.invalid","status":"ACTIVE","billingEmail":null,"vatNumber":null,"address":null,"country":"FR","trialEndsAt":null,"settings":{"phonebookToken":"••••••••"},"centrexEnabled":true,"timezone":"Europe/Paris","defaultCallerId":null,"recordingRetentionDays":90,"maxChannels":null,"pbxNodeId":null,"pbxHomeNodeId":null,"pbxPinned":false,"lat":null,"lon":null,"telecomBilledMonth":"2026-10","apps":["radio","hotel"],"mohId":null,"announceOverMusic":false,"announceMode":"alone","announceMusicLevel":25,"simpleMode":false,"product":"CENTREX","onboardingDone":true,"aiGranted":false,"postalCode":"69002","inseeCode":"69382","city":"Lyon","blockPremium":true,"blockShortNumbers":true,"specialCapCents":3000,"internationalCapCents":3000},"brand":{"name":"VoxNova","logoUrl":null,"primaryColor":null,"supportEmail":null,"supportPhone":null,"website":null,"supportUrl":null,"centrexHostedName":"Centrex by VoxNova","url":"http://localhost:5173","whiteLabel":false,"resellerId":null},"reseller":null,"impersonatorId":null}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Modifie son profil (nom, mot de passe, langue…).","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"locale":{"type":"string","enum":["fr","en"]},"newsletterOptOut":{"type":"boolean"},"currentPassword":{"type":"string"},"newPassword":{"type":"string","minLength":10,"maxLength":200}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/provision":{"post":{"summary":"Connexion d'une application mobile/bureau par QR code (jeton à usage unique)","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/refresh":{"post":{"summary":"Renouvelle le jeton de session avec le jeton de renouvellement.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"refreshToken":{"type":"string","minLength":10}},"required":["refreshToken"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/reset":{"post":{"summary":"Choisit un nouveau mot de passe avec le lien reçu par e-mail.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"password":{"type":"string","minLength":10,"maxLength":200}},"required":["token","password"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/signup":{"post":{"summary":"Inscription d’une nouvelle entreprise (période d’essai).","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string","minLength":2,"maxLength":100},"name":{"type":"string","minLength":2,"maxLength":100},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","pattern":"^[+0-9 ().-]{6,25}$"},"password":{"type":"string","minLength":10,"maxLength":200},"product":{"default":"RELAY","type":"string","enum":["CENTREX_HOSTED","CENTREX","RELAY","TRUNK","DEVELOPER"]},"postalCode":{"type":"string","maxLength":10},"inseeCode":{"type":"string","maxLength":5},"usage":{"type":"string","maxLength":40},"captcha":{"type":"string","maxLength":4000},"referral":{"type":"string","maxLength":20},"acquisition":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["company","name","email","password"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/sso/app-handoff":{"post":{"summary":"Application mobile : code à usage unique (5 min) échangé par l'application contre sa propre session.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/sso/callback":{"get":{"summary":"Retour de l’authentification unique (SSO) de l’entreprise.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/sso/start":{"post":{"summary":"Démarre une connexion par l’authentification unique (SSO) de l’entreprise.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"origin":{"type":"string","maxLength":200},"next":{"type":"string","maxLength":300}},"required":["email","origin"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/stop-impersonation":{"post":{"summary":"Fin d'usurpation d'identité (retour au compte super-admin)","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/verify-email":{"post":{"summary":"Confirme l’adresse e-mail avec le lien reçu.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":10,"maxLength":200}},"required":["token"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/verify-email/change":{"post":{"summary":"Adresse saisie avec une faute : l'utilisateur la corrige tant qu'elle n'est pas confirmée.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["email"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/auth/verify-email/resend":{"post":{"summary":"Renvoie l’e-mail de confirmation.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/billing":{"get":{"summary":"Abonnement, licences, moyens de paiement, factures, consommation et offres proposées.","tags":["Abonnement, factures et options"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"methods":["card"],"org":{"id":"cmv8684q90000q7abs5rcqq3y","sandbox":false,"sandboxOwnerId":null,"name":"Boulangerie Martin","slug":"demo-documentation","sipDomain":"demo-documentation.demo.invalid","status":"ACTIVE","billingEmail":null,"vatNumber":null,"address":null,"country":"FR","trialEndsAt":null,"settings":{"phonebookToken":"••••••••"},"centrexEnabled":true,"timezone":"Europe/Paris","defaultCallerId":null,"recordingRetentionDays":90,"maxChannels":null,"pbxNodeId":null,"pbxHomeNodeId":null,"pbxPinned":false,"lat":null,"lon":null,"telecomBilledMonth":"2026-10","apps":["radio","hotel"],"mohId":null,"announceOverMusic":false,"announceMode":"alone","announceMusicLevel":25,"simpleMode":false,"product":"CENTREX","onboardingDone":true,"aiGranted":false,"postalCode":"69002","inseeCode":"69382","city":"Lyon","blockPremium":true,"blockShortNumbers":true,"specialCapCents":3000,"internationalCapCents":3000},"current":null,"licenses":[],"paymentMethods":[],"invoices":[],"usage":{"used":2,"seats":0,"available":0},"plans":[],"products":["CENTREX_HOSTED","RELAY"],"centrexHostedName":"Centrex by VoxNova","provider":"test","taxRatePercent":20,"pending":[],"managedBy":null}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/billing/auto-renew":{"post":{"summary":"Active ou désactive le renouvellement automatique de l’abonnement.","tags":["Abonnement, factures et options"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"autoRenew":{"type":"boolean"}},"required":["autoRenew"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/billing/checkout":{"post":{"summary":"Souscription / changement d'offre.","tags":["Abonnement, factures et options"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"planCode":{"type":"string"},"seats":{"type":"integer","minimum":1,"maximum":100000},"channels":{"anyOf":[{"type":"integer","minimum":1,"maximum":10000},{"type":"null"}]},"numbers":{"type":"integer","minimum":0,"maximum":500},"unlimitedCalls":{"type":"boolean"},"aiAnalysis":{"type":"boolean"},"teams":{"type":"boolean"},"card":{"type":"object","properties":{"number":{"type":"string","minLength":12,"maxLength":23},"expMonth":{"type":"integer","minimum":1,"maximum":12},"expYear":{"type":"integer","minimum":0,"maximum":2100},"cvc":{"type":"string","minLength":3,"maxLength":4},"holderName":{"type":"string","maxLength":100}},"required":["number","expMonth","expYear","cvc"]},"paymentMethodId":{"type":"string"},"method":{"type":"string","enum":["card","sepa","transfer"]}},"required":["planCode","seats"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/billing/invoices/{id}":{"get":{"summary":"Facture en PDF (Factur-X si la plateforme agréée est configurée).","tags":["Abonnement, factures et options"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/billing/license-key":{"get":{"summary":"Clé de licence de l’abonnement en cours (installation sur site).","tags":["Abonnement, factures et options"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/billing/numbers":{"get":{"summary":"Numéros disponibles à l’achat dans une zone (?area=01…05 ou 09), prix et nombre de numéros inclus dans l’offre.","tags":["Numéros"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"eligible":false,"reason":"Souscrivez d’abord une offre (menu Abonnement) : vos numéros se choisissent à la souscription.","areas":{"01":"Île-de-France","02":"Nord-Ouest","03":"Nord-Est","04":"Sud-Est","05":"Sud-Ouest","09":"Non géographique"}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Achète un numéro de la liste : attribution immédiate, facturé au prorata s’il n’est pas inclus dans l’offre.","tags":["Numéros"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","pattern":"^\\+33\\d{9}$"}},"required":["number"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/billing/orders/{id}/cancel":{"post":{"summary":"Annulation d'une commande pas encore payée (paiement manuel).","tags":["Abonnement, factures et options"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/billing/payment-methods":{"post":{"summary":"Enregistre une carte bancaire (vérifiée par une autorisation de 0 €) ; elle devient le moyen de paiement par défaut.","tags":["Abonnement, factures et options"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","minLength":12,"maxLength":23},"expMonth":{"type":"integer","minimum":1,"maximum":12},"expYear":{"type":"integer","minimum":0,"maximum":2100},"cvc":{"type":"string","minLength":3,"maxLength":4},"holderName":{"type":"string","maxLength":100}},"required":["number","expMonth","expYear","cvc"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/billing/payment-methods/{id}":{"delete":{"summary":"Supprime un moyen de paiement.","tags":["Abonnement, factures et options"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/billing/quote":{"post":{"summary":"Calcule le prix d’une offre (postes, canaux, numéros, options) sans rien souscrire.","tags":["Abonnement, factures et options"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"planCode":{"type":"string"},"seats":{"type":"integer","minimum":1,"maximum":9007199254740991},"channels":{"anyOf":[{"type":"integer","minimum":1,"maximum":10000},{"type":"null"}]},"numbers":{"type":"integer","minimum":0,"maximum":500},"unlimitedCalls":{"type":"boolean"},"aiAnalysis":{"type":"boolean"},"teams":{"type":"boolean"}},"required":["planCode","seats"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/calls":{"delete":{"summary":"Vide son historique d’appels.","tags":["Appels et journal"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"get":{"summary":"Historique personnel des appels de l’utilisateur (applications et softphone) : page, sens, état, recherche.","tags":["Appels et journal"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"page","in":"query","required":false,"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["INBOUND","OUTBOUND"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"items":[],"total":0,"page":1,"pageSize":50}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Enregistre un appel terminé (envoyé par les applications). Idempotent par Call-ID.","tags":["Appels et journal"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"extensionId":{"type":"string"},"direction":{"type":"string","enum":["INBOUND","OUTBOUND"]},"status":{"type":"string","enum":["ANSWERED","MISSED","REJECTED","BUSY","FAILED","CANCELLED"]},"remoteNumber":{"type":"string","minLength":1,"maxLength":100},"remoteName":{"type":"string","maxLength":200},"sipCallId":{"type":"string","maxLength":300},"startedAt":{},"answeredAt":{},"endedAt":{},"platform":{"type":"string","enum":["IOS","ANDROID","WEB","DESKTOP"]},"quality":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"notes":{"type":"string","maxLength":2000}},"required":["direction","status","remoteNumber","startedAt"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/calls/{id}":{"delete":{"summary":"Retire un appel de son historique.","tags":["Appels et journal"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Ajoute ou modifie la note d’un appel de son historique.","tags":["Appels et journal"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"string","maxLength":2000}},"required":["notes"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/calls/stats":{"get":{"summary":"Statistiques de ses appels (volumes, durées, appels manqués).","tags":["Appels et journal"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"total":0,"inbound":0,"outbound":0,"missed":0,"talkTimeSec":0}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/api-keys":{"get":{"summary":"Clés d’API.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdjq3m0016q7rrcw12anod","name":"Intégration","prefix":"vxk_demo","lastUsedAt":null,"createdAt":"2026-11-16T14:44:17.507Z"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée une clé d’API.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/api-keys/{id}":{"delete":{"summary":"Supprime une clé d’API.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/audio":{"get":{"summary":"Fichiers audio (annonces, musiques).","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"demo-sat-audio","orgId":"cmv8684q90000q7abs5rcqq3y","resellerId":null,"name":"Question satisfaction","kind":"GREETING","path":"/tmp/x.wav","url":null,"durationSec":3,"createdAt":"2026-10-14T17:28:39.576Z"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée un fichier audio.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"Fichier audio (WAV, MP3, OGG ; converti automatiquement)"},"name":{"type":"string","description":"Nom affiché"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/audio/{id}":{"delete":{"summary":"Supprime un fichier audio.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/audio/{id}/file":{"get":{"summary":"Télécharge un fichier audio.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/audio/{id}/listen":{"get":{"summary":"Écoute d'un flux radio dans le navigateur (jeton en paramètre : balise <audio>).","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/audio/stream":{"post":{"summary":"Flux radio (Icecast, Shoutcast, MP3, AAC, HLS) utilisé comme musique d'attente.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","maxLength":500,"format":"uri"}},"required":["name","url"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/cdr":{"get":{"summary":"Journal détaillé des appels (filtres : dates, poste, sens, numéro, appels manqués), avec enregistrements.","tags":["Appels et journal"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"page","in":"query","required":false,"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"from","in":"query","required":false,"schema":{}},{"name":"to","in":"query","required":false,"schema":{}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["INBOUND","OUTBOUND","INTERNAL"]}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"answered","in":"query","required":false,"schema":{"type":"string","enum":["yes","no"]}},{"name":"recorded","in":"query","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"items":[{"id":"cmv8684tl000oq7abbtm6lx4x","uuid":"demo-cmv8684q90000q7abs5rcqq3y-1","orgId":"cmv8684q90000q7abs5rcqq3y","direction":"INBOUND","callerNumber":"+33612345678","callerName":null,"destination":"101","did":null,"trunkId":null,"extension":"101","startedAt":"2026-10-14T13:07:09.129Z","answeredAt":"2026-10-14T13:07:15.129Z","endedAt":"2026-10-14T13:10:20.129Z","durationSec":191,"billSec":185,"hangupCause":null,"costCents":0,"costPending":false,"costCorrectedAt":null,"queueId":null,"queueWaitSec":null,"queueOutcome":null,"agent":null,"sipTrunkId":null,"flowId":null,"category":null,"locationInsee":null,"locationSource":null,"createdAt":"2026-10-14T13:54:09.130Z","analysis":null,"callerContact":null,"destinationContact":"Julie Martin","contactName":null,"hasRecording":false},{"id":"cmv8684tn000qq7abo48c2drr","uuid":"demo-cmv8684q90000q7abs5rcqq3y-2","orgId":"cmv8684q90000q7abs5rcqq3y","direction":"OUTBOUND","callerNumber":"101","callerName":null,"destination":"+33478112233","did":null,"trunkId":null,"extension":"101","startedAt":"2026-10-14T12:20:09.129Z","answeredAt":"2026-10-14T12:20:15.129Z","endedAt":"2026-10-14T12:25:57.129Z","durationSec":348,"billSec":342,"hangupCause":null,"costCents":0,"costPending":false,"costCorrectedAt":null,"queueId":null,"queueWaitSec":null,"queueOutcome":null,"agent":null,"sipTrunkId":null,"flowId":null,"category":null,"locationInsee":null,"locationSource":null,"createdAt":"2026-10-14T13:54:09.131Z","analysis":null,"callerContact":"Julie Martin","destinationContact":null,"contactName":null,"hasRecording":false}],"total":5,"billSec":684,"costCents":0}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/cdr/{id}/listen":{"post":{"summary":"Écoute d'un enregistrement : lien de lecture signé (quelques minutes), sans téléchargement (RGPD).","tags":["Appels et journal"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/cdr/{id}/recording":{"delete":{"summary":"Supprime l’enregistrement d’un appel.","tags":["Appels et journal"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/cdr/export.csv":{"get":{"summary":"Export CSV du journal des appels.","tags":["Appels et journal"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"page","in":"query","required":false,"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"from","in":"query","required":false,"schema":{}},{"name":"to","in":"query","required":false,"schema":{}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["INBOUND","OUTBOUND","INTERNAL"]}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"answered","in":"query","required":false,"schema":{"type":"string","enum":["yes","no"]}},{"name":"recorded","in":"query","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/conferences":{"get":{"summary":"Salles de conférence.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdjq2c0007q7rrmch43cbn","orgId":"cmv8684q90000q7abs5rcqq3y","number":"800","name":"Réunion d’équipe","pin":null,"moderatorPin":null,"waitForModerator":false,"muteOnEntry":false,"endWithModerator":false,"maxMembers":null,"announceCount":true,"record":false,"createdAt":"2026-11-16T14:44:17.460Z"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée une salle de conférence.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","pattern":"^\\d{2,6}$"},"name":{"type":"string","minLength":1,"maxLength":100},"pin":{"anyOf":[{"type":"string","pattern":"^\\d{3,10}$"},{"type":"null"}]},"moderatorPin":{"anyOf":[{"type":"string","pattern":"^\\d{3,10}$"},{"type":"null"}]},"waitForModerator":{"default":false,"type":"boolean"},"muteOnEntry":{"default":false,"type":"boolean"},"endWithModerator":{"default":false,"type":"boolean"},"maxMembers":{"anyOf":[{"type":"integer","minimum":2,"maximum":500},{"type":"null"}]},"announceCount":{"default":true,"type":"boolean"},"record":{"default":false,"type":"boolean"}},"required":["number","name"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/conferences/{id}":{"delete":{"summary":"Supprime une salle de conférence.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie une salle de conférence.","tags":["Accueil des appels"],"x-access":"admin","x-partial":true,"description":"Droits : Administrateur. Modification partielle : seuls les champs envoyés sont modifiés.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","pattern":"^\\d{2,6}$"},"name":{"type":"string","minLength":1,"maxLength":100},"pin":{"anyOf":[{"type":"string","pattern":"^\\d{3,10}$"},{"type":"null"}]},"moderatorPin":{"anyOf":[{"type":"string","pattern":"^\\d{3,10}$"},{"type":"null"}]},"waitForModerator":{"default":false,"type":"boolean"},"muteOnEntry":{"default":false,"type":"boolean"},"endWithModerator":{"default":false,"type":"boolean"},"maxMembers":{"anyOf":[{"type":"integer","minimum":2,"maximum":500},{"type":"null"}]},"announceCount":{"default":true,"type":"boolean"},"record":{"default":false,"type":"boolean"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/conferences/{id}/action":{"post":{"summary":"Action sur une conférence en cours : couper ou rétablir le micro d’un participant, l’exclure, verrouiller la salle.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["mute","unmute","kick","deaf","undeaf","lock","unlock","record","norecord","dial","muteall","unmuteall"]},"member":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"number":{"type":"string","maxLength":30}},"required":["action"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/conferences/{id}/live":{"get":{"summary":"Participants d’une conférence en cours.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"online":false,"running":false,"members":[]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/destinations":{"get":{"summary":"Toutes les destinations possibles (listes déroulantes de l'interface).","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"SHARED_VOICEMAIL":[{"id":"cmwjdjq2k000dq7rr0gnctv94","label":"Messagerie commune"}],"AI_AGENT":[{"id":"cmwjdhlt6000aq7e0vgnn3tdp","label":"Standardiste IA (Léa)"}],"EXTENSION":[{"id":"cmv8684rr0004q7abx95vduea","label":"100 — Accueil"},{"id":"cmv8684s40006q7abi97pyqu8","label":"101 — Julie Martin"}],"VOICEMAIL":[{"id":"cmv8684rr0004q7abx95vduea","label":"Messagerie 100 — Accueil"},{"id":"cmv8684s40006q7abi97pyqu8","label":"Messagerie 101 — Julie Martin"}],"RING_GROUP":[{"id":"cmv8684tc000iq7abd6ovdmis","label":"500 — Boutique"}],"IVR":[{"id":"cmv8684th000kq7ab1fi9t85y","label":"700 — Accueil principal"}],"QUEUE":[{"id":"cmv8684ta000gq7abhezk2dgn","label":"600 — Service client"}],"TIME_CONDITION":[{"id":"cmv8684tj000mq7abf58lstdi","label":"Horaires de la boutique"}],"CONFERENCE":[{"id":"cmwjdjq2c0007q7rrmch43cbn","label":"800 — Réunion d’équipe"}],"FLOW":[{"id":"cmwjdjq2o000hq7rrofua0gzt","label":"Accueil horaires"}],"RADIO":[{"id":"cmwjdjq3c000zq7rrdkbtrcem","label":"Matinale"}],"APPLICATION":[{"id":"cmwjdjq2r000jq7rrcw2qr5p2","label":"Application vocale"}]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/enable":{"post":{"summary":"Active le standard hébergé (création des postes pour les utilisateurs, premier numéro interne).","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"createForUsers":{"default":true,"type":"boolean"},"firstNumber":{"default":"100","type":"string","pattern":"^\\d{2,6}$"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/flows":{"get":{"summary":"Scénarios d’appel.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdjq2o000hq7rrofua0gzt","name":"Accueil horaires","number":null,"description":"","enabled":true,"updatedAt":"2026-11-16T14:44:17.472Z"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée un scénario d’appel.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"default":"","type":"string","maxLength":500},"number":{"anyOf":[{"type":"string","pattern":"^\\d{2,6}$"},{"type":"null"}]},"enabled":{"default":true,"type":"boolean"},"graph":{"type":"object","properties":{"nodes":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w]{1,40}$"},"type":{"type":"string","enum":["start","play","menu","collect","http","condition","time","set","split","notify","queue","transfer","voicemail","hangup","support","assigned","callback","message"]},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"]},"data":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type"]}},"edges":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string"},"sourceHandle":{"type":["string","null"]},"target":{"type":"string"}},"required":["source","target"]}}},"required":["nodes","edges"]}},"required":["name","graph"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/flows/{id}":{"delete":{"summary":"Supprime un scénario d’appel.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"get":{"summary":"Détail d’un scénario d’appel.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"id":"cmwjdjq2o000hq7rrofua0gzt","orgId":"cmv8684q90000q7abs5rcqq3y","number":null,"name":"Accueil horaires","description":"","graph":{"edges":[],"nodes":[]},"enabled":true,"createdAt":"2026-11-16T14:44:17.472Z","updatedAt":"2026-11-16T14:44:17.472Z"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie un scénario d’appel.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"default":"","type":"string","maxLength":500},"number":{"anyOf":[{"type":"string","pattern":"^\\d{2,6}$"},{"type":"null"}]},"enabled":{"default":true,"type":"boolean"},"graph":{"type":"object","properties":{"nodes":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w]{1,40}$"},"type":{"type":"string","enum":["start","play","menu","collect","http","condition","time","set","split","notify","queue","transfer","voicemail","hangup","support","assigned","callback","message"]},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"]},"data":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type"]}},"edges":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string"},"sourceHandle":{"type":["string","null"]},"target":{"type":"string"}},"required":["source","target"]}}},"required":["nodes","edges"]}},"required":["name","graph"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/flows/ai":{"get":{"summary":"Assistant de création de scénario : disponibilité.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"available":true,"dailyLimit":30}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée un scénario d’appel à partir d’une description en français.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":15,"maxLength":2000}},"required":["prompt"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/flows/chat":{"post":{"summary":"Assistant conversationnel de l'éditeur : propose le scénario modifié, enregistré seulement par l'administrateur.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"text":{"type":"string","minLength":1,"maxLength":3000}},"required":["role","text"]}},"graph":{"default":null,"anyOf":[{"type":"object","properties":{"nodes":{"maxItems":300,"type":"array","items":{}},"edges":{"maxItems":600,"type":"array","items":{}}},"required":["nodes","edges"]},{"type":"null"}]}},"required":["messages"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/flows/simulate":{"post":{"summary":"Simulation : exécute le scénario (requêtes HTTP réelles) avec des saisies fournies.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"graph":{"type":"object","properties":{"nodes":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w]{1,40}$"},"type":{"type":"string","enum":["start","play","menu","collect","http","condition","time","set","split","notify","queue","transfer","voicemail","hangup","support","assigned","callback","message"]},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"]},"data":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type"]}},"edges":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string"},"sourceHandle":{"type":["string","null"]},"target":{"type":"string"}},"required":["source","target"]}}},"required":["nodes","edges"]},"caller":{"default":"0612345678","type":"string"},"callerName":{"type":"string"},"did":{"type":"string"},"digits":{"default":[],"maxItems":30,"type":"array","items":{"type":"string"}},"at":{},"queueResult":{"type":"string"}},"required":["graph"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/flows/validate":{"post":{"summary":"Vérifie un graphe sans l'enregistrer (erreurs affichées dans l'éditeur).","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"graph":{"type":"object","properties":{"nodes":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[\\w]{1,40}$"},"type":{"type":"string","enum":["start","play","menu","collect","http","condition","time","set","split","notify","queue","transfer","voicemail","hangup","support","assigned","callback","message"]},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"]},"data":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type"]}},"edges":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string"},"sourceHandle":{"type":["string","null"]},"target":{"type":"string"}},"required":["source","target"]}}},"required":["nodes","edges"]}},"required":["graph"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/ivr":{"get":{"summary":"Standards vocaux (menus).","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmv8684th000kq7ab1fi9t85y","orgId":"cmv8684q90000q7abs5rcqq3y","number":"700","name":"Accueil principal","greetingId":null,"options":[{"digit":"1","destId":"cmv8684ta000gq7abhezk2dgn","destType":"QUEUE"},{"digit":"2","destId":"cmv8684s40006q7abi97pyqu8","destType":"EXTENSION"}],"timeoutSeconds":5,"maxFailures":3,"directDial":false,"fallbackType":null,"fallbackId":null,"fallbackValue":null,"createdAt":"2026-10-14T13:54:09.125Z"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée un standard vocal.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","pattern":"^\\d{2,6}$"},"name":{"type":"string","minLength":1,"maxLength":100},"greetingId":{"type":["string","null"]},"options":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"digit":{"type":"string","pattern":"^[0-9*#]$"},"destType":{"type":"string","enum":["EXTENSION","RING_GROUP","IVR","QUEUE","VOICEMAIL","CONFERENCE","TIME_CONDITION","EXTERNAL","HANGUP","FLOW","RADIO","APPLICATION","SHARED_VOICEMAIL","AI_AGENT"]},"destId":{"type":["string","null"]},"destValue":{"type":["string","null"]}},"required":["digit","destType"]}},"timeoutSeconds":{"default":5,"type":"integer","minimum":1,"maximum":30},"maxFailures":{"default":3,"type":"integer","minimum":1,"maximum":10},"directDial":{"default":false,"type":"boolean"},"fallbackType":{"anyOf":[{"type":"string","enum":["EXTENSION","RING_GROUP","IVR","QUEUE","VOICEMAIL","CONFERENCE","TIME_CONDITION","EXTERNAL","HANGUP","FLOW","RADIO","APPLICATION","SHARED_VOICEMAIL","AI_AGENT"]},{"type":"null"}]},"fallbackId":{"type":["string","null"]},"fallbackValue":{"type":["string","null"]}},"required":["number","name"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/ivr/{id}":{"delete":{"summary":"Supprime un standard vocal.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie un standard vocal.","tags":["Accueil des appels"],"x-access":"admin","x-partial":true,"description":"Droits : Administrateur. Modification partielle : seuls les champs envoyés sont modifiés.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","pattern":"^\\d{2,6}$"},"name":{"type":"string","minLength":1,"maxLength":100},"greetingId":{"type":["string","null"]},"options":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"digit":{"type":"string","pattern":"^[0-9*#]$"},"destType":{"type":"string","enum":["EXTENSION","RING_GROUP","IVR","QUEUE","VOICEMAIL","CONFERENCE","TIME_CONDITION","EXTERNAL","HANGUP","FLOW","RADIO","APPLICATION","SHARED_VOICEMAIL","AI_AGENT"]},"destId":{"type":["string","null"]},"destValue":{"type":["string","null"]}},"required":["digit","destType"]}},"timeoutSeconds":{"default":5,"type":"integer","minimum":1,"maximum":30},"maxFailures":{"default":3,"type":"integer","minimum":1,"maximum":10},"directDial":{"default":false,"type":"boolean"},"fallbackType":{"anyOf":[{"type":"string","enum":["EXTENSION","RING_GROUP","IVR","QUEUE","VOICEMAIL","CONFERENCE","TIME_CONDITION","EXTERNAL","HANGUP","FLOW","RADIO","APPLICATION","SHARED_VOICEMAIL","AI_AGENT"]},{"type":"null"}]},"fallbackId":{"type":["string","null"]},"fallbackValue":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/live":{"get":{"summary":"Appels en cours dans l’entreprise.","tags":["Appels et journal"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"online":false,"calls":[]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/live/{uuid}/hangup":{"post":{"summary":"Raccroche un appel en cours.","tags":["Appels et journal"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/live/{uuid}/spy":{"post":{"summary":"Superviseur : écouter, chuchoter à l'agent ou intervenir dans un appel en cours.","tags":["Appels et journal"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"extensionId":{"type":"string"},"mode":{"type":"string","enum":["listen","whisper","barge"]},"autoAnswer":{"default":true,"type":"boolean"}},"required":["extensionId","mode"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/numbers":{"get":{"summary":"Numéros de l’entreprise.","tags":["Numéros"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdjq2h000bq7rrooociqwr","number":"+33199001234","orgId":"cmv8684q90000q7abs5rcqq3y","trunkId":null,"label":"Accueil","destType":null,"destId":null,"destValue":null,"monthlyPriceCents":0,"rio":null,"assignedAt":null,"previousOrgId":null,"quarantineUntil":null,"createdAt":"2026-11-16T14:44:17.466Z","updatedAt":"2026-11-16T14:44:17.466Z","trunk":null}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Ajout d'un numéro porté par un trunk de l'entreprise (les numéros de la plateforme sont attribués par l'éditeur).","tags":["Numéros"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","minLength":4},"trunkId":{"type":"string"},"label":{"default":"","type":"string","maxLength":100}},"required":["number","trunkId"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/numbers/{id}":{"delete":{"summary":"Supprime un numéro.","tags":["Numéros"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie un numéro.","tags":["Numéros"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","maxLength":100},"destType":{"anyOf":[{"type":"string","enum":["EXTENSION","RING_GROUP","IVR","QUEUE","VOICEMAIL","CONFERENCE","TIME_CONDITION","EXTERNAL","HANGUP","FLOW","RADIO","APPLICATION","SHARED_VOICEMAIL","AI_AGENT"]},{"type":"null"}]},"destId":{"type":["string","null"]},"destValue":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/originate":{"post":{"summary":"Lance un appel : le poste sonne, puis le numéro est composé.","tags":["Appels et journal"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"extensionId":{"type":"string"},"to":{"type":"string","minLength":2,"maxLength":30}},"required":["extensionId","to"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/queues":{"get":{"summary":"Files d’attente.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmv8684ta000gq7abhezk2dgn","orgId":"cmv8684q90000q7abs5rcqq3y","number":"600","name":"Service client","strategy":"longest-idle-agent","members":["cmv8684s40006q7abi97pyqu8","cmv8684sf0008q7abh4b8ftyw"],"memberLevels":{"cmv8684so000aq7ab7xldoinc":2},"loggedOut":[],"maxWaitSeconds":300,"maxWaitNoAgent":120,"mohId":null,"announceId":null,"periodicAnnounceId":null,"announceFrequency":45,"periodicAnnounceIds":[],"announceFirstDelay":30,"announceMaxPlays":0,"announceOrder":"sequence","exitKey":null,"wrapUpSeconds":5,"maxNoAnswer":3,"ringTimeout":20,"serviceLevelSeconds":20,"fallbackType":null,"fallbackId":null,"fallbackValue":null,"createdAt":"2026-10-14T13:54:09.118Z"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée une file d’attente.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","pattern":"^\\d{2,6}$"},"name":{"type":"string","minLength":1,"maxLength":100},"strategy":{"default":"longest-idle-agent","type":"string","enum":["ring-all","longest-idle-agent","round-robin","top-down","agent-with-least-talk-time","random"]},"members":{"default":[],"maxItems":100,"type":"array","items":{"type":"string"}},"memberLevels":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":1,"maximum":9}},"maxWaitSeconds":{"default":300,"type":"integer","minimum":10,"maximum":3600},"maxWaitNoAgent":{"default":120,"type":"integer","minimum":5,"maximum":3600},"mohId":{"type":["string","null"]},"announceId":{"type":["string","null"]},"periodicAnnounceId":{"type":["string","null"]},"announceFrequency":{"default":45,"type":"integer","minimum":5,"maximum":600},"periodicAnnounceIds":{"default":[],"maxItems":10,"type":"array","items":{"type":"string"}},"announceFirstDelay":{"default":30,"type":"integer","minimum":0,"maximum":600},"announceMaxPlays":{"default":0,"type":"integer","minimum":0,"maximum":100},"announceOrder":{"default":"sequence","type":"string","enum":["sequence","random"]},"exitKey":{"anyOf":[{"type":"string","pattern":"^[0-9*#]$"},{"type":"null"}]},"wrapUpSeconds":{"default":5,"type":"integer","minimum":0,"maximum":600},"maxNoAnswer":{"default":3,"type":"integer","minimum":0,"maximum":20},"ringTimeout":{"default":20,"type":"integer","minimum":5,"maximum":120},"serviceLevelSeconds":{"default":20,"type":"integer","minimum":5,"maximum":600},"fallbackType":{"anyOf":[{"type":"string","enum":["EXTENSION","RING_GROUP","IVR","QUEUE","VOICEMAIL","CONFERENCE","TIME_CONDITION","EXTERNAL","HANGUP","FLOW","RADIO","APPLICATION","SHARED_VOICEMAIL","AI_AGENT"]},{"type":"null"}]},"fallbackId":{"type":["string","null"]},"fallbackValue":{"type":["string","null"]}},"required":["number","name"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/queues/{id}":{"delete":{"summary":"Supprime une file d’attente.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie une file d’attente.","tags":["Accueil des appels"],"x-access":"admin","x-partial":true,"description":"Droits : Administrateur. Modification partielle : seuls les champs envoyés sont modifiés.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","pattern":"^\\d{2,6}$"},"name":{"type":"string","minLength":1,"maxLength":100},"strategy":{"default":"longest-idle-agent","type":"string","enum":["ring-all","longest-idle-agent","round-robin","top-down","agent-with-least-talk-time","random"]},"members":{"default":[],"maxItems":100,"type":"array","items":{"type":"string"}},"memberLevels":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":1,"maximum":9}},"maxWaitSeconds":{"default":300,"type":"integer","minimum":10,"maximum":3600},"maxWaitNoAgent":{"default":120,"type":"integer","minimum":5,"maximum":3600},"mohId":{"type":["string","null"]},"announceId":{"type":["string","null"]},"periodicAnnounceId":{"type":["string","null"]},"announceFrequency":{"default":45,"type":"integer","minimum":5,"maximum":600},"periodicAnnounceIds":{"default":[],"maxItems":10,"type":"array","items":{"type":"string"}},"announceFirstDelay":{"default":30,"type":"integer","minimum":0,"maximum":600},"announceMaxPlays":{"default":0,"type":"integer","minimum":0,"maximum":100},"announceOrder":{"default":"sequence","type":"string","enum":["sequence","random"]},"exitKey":{"anyOf":[{"type":"string","pattern":"^[0-9*#]$"},{"type":"null"}]},"wrapUpSeconds":{"default":5,"type":"integer","minimum":0,"maximum":600},"maxNoAnswer":{"default":3,"type":"integer","minimum":0,"maximum":20},"ringTimeout":{"default":20,"type":"integer","minimum":5,"maximum":120},"serviceLevelSeconds":{"default":20,"type":"integer","minimum":5,"maximum":600},"fallbackType":{"anyOf":[{"type":"string","enum":["EXTENSION","RING_GROUP","IVR","QUEUE","VOICEMAIL","CONFERENCE","TIME_CONDITION","EXTERNAL","HANGUP","FLOW","RADIO","APPLICATION","SHARED_VOICEMAIL","AI_AGENT"]},{"type":"null"}]},"fallbackId":{"type":["string","null"]},"fallbackValue":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/queues/{id}/agents/{extId}/status":{"post":{"summary":"Connecte, met en pause ou déconnecte un agent de la file.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"extId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/queues/{id}/live":{"get":{"summary":"File d’attente en direct : appels en attente, agents et leur état.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"online":false,"waiting":[],"agents":[]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/queues/{id}/stats":{"get":{"summary":"Statistiques de la file : appels reçus, servis, abandonnés, temps d’attente.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"days","in":"query","required":false,"schema":{"default":7,"type":"integer","minimum":1,"maximum":365}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"offered":0,"answered":0,"abandoned":0,"timeout":0,"exited":0,"avgWaitSec":0,"maxWaitSec":0,"avgTalkSec":0,"serviceLevel":0,"serviceLevelSeconds":20,"byAgent":[]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/queues/{id}/sync":{"post":{"summary":"resynchronisation d'une file après modification des niveaux","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/ring-groups":{"get":{"summary":"Groupes d’appel.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmv8684tc000iq7abd6ovdmis","orgId":"cmv8684q90000q7abs5rcqq3y","number":"500","name":"Boutique","strategy":"SIMULTANEOUS","members":[{"id":"cmv8684rr0004q7abx95vduea","type":"extension"},{"id":"cmv8684sy000cq7ab78dozpu3","type":"extension"}],"ringSeconds":25,"mohId":null,"fallbackType":null,"fallbackId":null,"fallbackValue":null,"createdAt":"2026-10-14T13:54:09.121Z"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée un groupe d’appel.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","pattern":"^\\d{2,6}$"},"name":{"type":"string","minLength":1,"maxLength":100},"strategy":{"default":"SIMULTANEOUS","type":"string","enum":["SIMULTANEOUS","SEQUENTIAL"]},"members":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["extension","external"]},"id":{"type":"string"},"value":{"type":"string"}},"required":["type"]}},"ringSeconds":{"default":25,"type":"integer","minimum":5,"maximum":300},"mohId":{"type":["string","null"]},"fallbackType":{"anyOf":[{"type":"string","enum":["EXTENSION","RING_GROUP","IVR","QUEUE","VOICEMAIL","CONFERENCE","TIME_CONDITION","EXTERNAL","HANGUP","FLOW","RADIO","APPLICATION","SHARED_VOICEMAIL","AI_AGENT"]},{"type":"null"}]},"fallbackId":{"type":["string","null"]},"fallbackValue":{"type":["string","null"]}},"required":["number","name"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/ring-groups/{id}":{"delete":{"summary":"Supprime un groupe d’appel.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie un groupe d’appel.","tags":["Accueil des appels"],"x-access":"admin","x-partial":true,"description":"Droits : Administrateur. Modification partielle : seuls les champs envoyés sont modifiés.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","pattern":"^\\d{2,6}$"},"name":{"type":"string","minLength":1,"maxLength":100},"strategy":{"default":"SIMULTANEOUS","type":"string","enum":["SIMULTANEOUS","SEQUENTIAL"]},"members":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["extension","external"]},"id":{"type":"string"},"value":{"type":"string"}},"required":["type"]}},"ringSeconds":{"default":25,"type":"integer","minimum":5,"maximum":300},"mohId":{"type":["string","null"]},"fallbackType":{"anyOf":[{"type":"string","enum":["EXTENSION","RING_GROUP","IVR","QUEUE","VOICEMAIL","CONFERENCE","TIME_CONDITION","EXTERNAL","HANGUP","FLOW","RADIO","APPLICATION","SHARED_VOICEMAIL","AI_AGENT"]},{"type":"null"}]},"fallbackId":{"type":["string","null"]},"fallbackValue":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/settings":{"patch":{"summary":"Réglages du standard : fuseau horaire, numéro présenté par défaut, conservation des messages et enregistrements, musique d’attente.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"voicemailRetentionDays":{"type":"integer","minimum":0,"maximum":3650},"timezone":{"type":"string","maxLength":60},"defaultCallerId":{"type":["string","null"]},"recordingRetentionDays":{"type":"integer","minimum":1,"maximum":180},"recordingStopCode":{"type":"string","pattern":"^\\*\\d$"},"country":{"type":"string","minLength":2,"maxLength":2},"mohId":{"type":["string","null"]},"announceOverMusic":{"type":"boolean"},"announceMode":{"type":"string","enum":["alone","restart","continuous"]},"announceMusicLevel":{"type":"integer","minimum":5,"maximum":80}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/stats":{"get":{"summary":"Statistiques du standard (appels, durées, postes les plus actifs).","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"days","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":365}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"total":0,"answered":0,"asr":0,"acdSec":0,"talkSec":0,"inboundMissed":0,"costCents":0,"perDay":[{"day":"2026-10-22","inbound":0,"outbound":0,"internal":0,"missed":0},{"day":"2026-10-23","inbound":0,"outbound":0,"internal":0,"missed":0}],"byHour":[{"hour":0,"calls":0},{"hour":1,"calls":0}],"byDid":[]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/status":{"get":{"summary":"État du standard : activé, nombre de postes, numéros, groupes, files, menus.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"enabled":true,"settings":{"voicemailRetentionDays":0,"blockPremium":true,"blockShortNumbers":true,"postalCode":"69002","inseeCode":"69382","city":"Lyon","timezone":"Europe/Paris","defaultCallerId":null,"recordingRetentionDays":90,"recordingStopCode":"*5","maxRetentionDays":180,"maxChannels":null,"country":"FR","mohId":null,"announceOverMusic":false,"announceMode":"alone","announceMusicLevel":25},"engine":{"online":false,"activeCalls":0},"outboundTrunks":7,"counts":{"extensions":5,"numbers":1,"trunks":1,"ringGroups":1,"ivrs":1,"queues":1}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/time-conditions":{"get":{"summary":"Horaires.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmv8684tj000mq7abf58lstdi","orgId":"cmv8684q90000q7abs5rcqq3y","name":"Horaires de la boutique","rules":[{"to":"19:30","days":[2,3],"from":"07:00"},{"to":"13:00","days":[7],"from":"07:00"}],"holidays":[],"matchType":null,"matchId":null,"matchValue":null,"elseType":null,"elseId":null,"elseValue":null,"createdAt":"2026-10-14T13:54:09.127Z"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée un horaire.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"rules":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"days":{"minItems":1,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"from":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"to":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},"required":["days","from","to"]}},"holidays":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"matchType":{"anyOf":[{"type":"string","enum":["EXTENSION","RING_GROUP","IVR","QUEUE","VOICEMAIL","CONFERENCE","TIME_CONDITION","EXTERNAL","HANGUP","FLOW","RADIO","APPLICATION","SHARED_VOICEMAIL","AI_AGENT"]},{"type":"null"}]},"matchId":{"type":["string","null"]},"matchValue":{"type":["string","null"]},"elseType":{"anyOf":[{"type":"string","enum":["EXTENSION","RING_GROUP","IVR","QUEUE","VOICEMAIL","CONFERENCE","TIME_CONDITION","EXTERNAL","HANGUP","FLOW","RADIO","APPLICATION","SHARED_VOICEMAIL","AI_AGENT"]},{"type":"null"}]},"elseId":{"type":["string","null"]},"elseValue":{"type":["string","null"]}},"required":["name"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/time-conditions/{id}":{"delete":{"summary":"Supprime un horaire.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie un horaire.","tags":["Accueil des appels"],"x-access":"admin","x-partial":true,"description":"Droits : Administrateur. Modification partielle : seuls les champs envoyés sont modifiés.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"rules":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"days":{"minItems":1,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"from":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"to":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},"required":["days","from","to"]}},"holidays":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"matchType":{"anyOf":[{"type":"string","enum":["EXTENSION","RING_GROUP","IVR","QUEUE","VOICEMAIL","CONFERENCE","TIME_CONDITION","EXTERNAL","HANGUP","FLOW","RADIO","APPLICATION","SHARED_VOICEMAIL","AI_AGENT"]},{"type":"null"}]},"matchId":{"type":["string","null"]},"matchValue":{"type":["string","null"]},"elseType":{"anyOf":[{"type":"string","enum":["EXTENSION","RING_GROUP","IVR","QUEUE","VOICEMAIL","CONFERENCE","TIME_CONDITION","EXTERNAL","HANGUP","FLOW","RADIO","APPLICATION","SHARED_VOICEMAIL","AI_AGENT"]},{"type":"null"}]},"elseId":{"type":["string","null"]},"elseValue":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/trunks":{"get":{"summary":"Trunks d’opérateur.","tags":["Trunks SIP"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdjq2f0009q7rr4yqn5952","orgId":"cmv8684q90000q7abs5rcqq3y","name":"Trunk opérateur","host":"sip.exemple.invalid","port":5060,"transport":"UDP","register":true,"username":null,"authUsername":null,"realm":null,"fromUser":null,"fromDomain":null,"outboundProxy":null,"numberFormat":"E164","dialPrefix":"","country":"FR","usePai":false,"paiNumber":null,"paiReplaceFrom":false,"codecs":"PCMA,PCMU","maxChannels":null,"inboundIps":[],"priority":10,"outboundPreferred":false,"outbound":true,"paniMode":"EMERGENCY","paniAccessType":"IEEE-802.3","paniR1R2":"","secondaryHost":null,"shared":true,"enabled":true,"lastStatus":null,"lastStatusAt":null,"createdAt":"2026-11-16T14:44:17.463Z","updatedAt":"2026-11-16T14:44:17.463Z","_count":{"numbers":0},"hasPassword":false}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée un trunk.","tags":["Trunks SIP"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"host":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9.\\-:[\\]]+$"},"port":{"default":5060,"type":"integer","minimum":1,"maximum":65535},"transport":{"default":"UDP","type":"string","enum":["UDP","TCP","TLS"]},"register":{"default":true,"type":"boolean"},"username":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"authUsername":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"password":{"type":"string","maxLength":200},"realm":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"fromUser":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"fromDomain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"outboundProxy":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"numberFormat":{"default":"E164","type":"string","enum":["E164","E164_NOPLUS","NATIONAL"]},"dialPrefix":{"default":"","type":"string","maxLength":10},"country":{"default":"FR","type":"string","minLength":2,"maxLength":2},"usePai":{"default":false,"type":"boolean"},"paiNumber":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"paiReplaceFrom":{"default":false,"type":"boolean"},"codecs":{"default":"PCMA,PCMU","type":"string","maxLength":100},"maxChannels":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"inboundIps":{"default":[],"maxItems":20,"type":"array","items":{"anyOf":[{"type":"string","format":"ipv4","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"},{"type":"string","format":"ipv6","pattern":"^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$"}]}},"priority":{"default":10,"type":"integer","minimum":0,"maximum":1000},"outboundPreferred":{"default":false,"type":"boolean"},"outbound":{"default":true,"type":"boolean"},"paniMode":{"default":"EMERGENCY","type":"string","enum":["OFF","EMERGENCY","ALL"]},"paniAccessType":{"default":"IEEE-802.3","type":"string","pattern":"^[\\w.+-]{1,40}$"},"paniR1R2":{"default":"","type":"string","pattern":"^(\\d{2})?$"},"secondaryHost":{"anyOf":[{"type":"string","maxLength":200,"pattern":"^[a-zA-Z0-9.-]*$"},{"type":"null"}]},"shared":{"default":true,"type":"boolean"},"enabled":{"default":true,"type":"boolean"}},"required":["name","host"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/trunks/{id}":{"delete":{"summary":"Supprime un trunk.","tags":["Trunks SIP"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie un trunk.","tags":["Trunks SIP"],"x-access":"admin","x-partial":true,"description":"Droits : Administrateur. Modification partielle : seuls les champs envoyés sont modifiés.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"host":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9.\\-:[\\]]+$"},"port":{"default":5060,"type":"integer","minimum":1,"maximum":65535},"transport":{"default":"UDP","type":"string","enum":["UDP","TCP","TLS"]},"register":{"default":true,"type":"boolean"},"username":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"authUsername":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"password":{"type":"string","maxLength":200},"realm":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"fromUser":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"fromDomain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"outboundProxy":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"numberFormat":{"default":"E164","type":"string","enum":["E164","E164_NOPLUS","NATIONAL"]},"dialPrefix":{"default":"","type":"string","maxLength":10},"country":{"default":"FR","type":"string","minLength":2,"maxLength":2},"usePai":{"default":false,"type":"boolean"},"paiNumber":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"paiReplaceFrom":{"default":false,"type":"boolean"},"codecs":{"default":"PCMA,PCMU","type":"string","maxLength":100},"maxChannels":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"inboundIps":{"default":[],"maxItems":20,"type":"array","items":{"anyOf":[{"type":"string","format":"ipv4","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"},{"type":"string","format":"ipv6","pattern":"^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$"}]}},"priority":{"default":10,"type":"integer","minimum":0,"maximum":1000},"outboundPreferred":{"default":false,"type":"boolean"},"outbound":{"default":true,"type":"boolean"},"paniMode":{"default":"EMERGENCY","type":"string","enum":["OFF","EMERGENCY","ALL"]},"paniAccessType":{"default":"IEEE-802.3","type":"string","pattern":"^[\\w.+-]{1,40}$"},"paniR1R2":{"default":"","type":"string","pattern":"^(\\d{2})?$"},"secondaryHost":{"anyOf":[{"type":"string","maxLength":200,"pattern":"^[a-zA-Z0-9.-]*$"},{"type":"null"}]},"shared":{"default":true,"type":"boolean"},"enabled":{"default":true,"type":"boolean"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/trunks/{id}/status":{"get":{"summary":"État d’enregistrement d’un trunk d’opérateur.","tags":["Trunks SIP"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"state":"UNKNOWN","info":"Moteur Centrex injoignable"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/voiceboxes":{"get":{"summary":"Messageries partagées.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdjq2k000dq7rr0gnctv94","orgId":"cmv8684q90000q7abs5rcqq3y","name":"Messagerie commune","number":null,"greetingAudioId":null,"memberExtensionIds":[],"notifyEmails":"","notifyMembers":true,"maxSeconds":120,"membersCanDelete":false,"retentionDays":90,"enabled":true,"createdAt":"2026-11-16T14:44:17.468Z","members":[],"counts":{"total":0,"pending":0}}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée une messagerie partagée.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"number":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^\\d{2,6}$"},{"type":"null"}]},{"type":"string","const":""}]},"greetingAudioId":{"type":["string","null"]},"memberExtensionIds":{"maxItems":500,"type":"array","items":{"type":"string"}},"notifyEmails":{"default":"","type":"string","maxLength":1000},"notifyMembers":{"default":true,"type":"boolean"},"maxSeconds":{"default":120,"type":"integer","minimum":15,"maximum":600},"membersCanDelete":{"default":false,"type":"boolean"},"retentionDays":{"default":90,"type":"integer","minimum":1,"maximum":3650},"enabled":{"default":true,"type":"boolean"}},"required":["name","memberExtensionIds"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/voiceboxes/{id}":{"delete":{"summary":"Supprime une messagerie partagée.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie une messagerie partagée.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"number":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^\\d{2,6}$"},{"type":"null"}]},{"type":"string","const":""}]},"greetingAudioId":{"type":["string","null"]},"memberExtensionIds":{"maxItems":500,"type":"array","items":{"type":"string"}},"notifyEmails":{"default":"","type":"string","maxLength":1000},"notifyMembers":{"default":true,"type":"boolean"},"maxSeconds":{"default":120,"type":"integer","minimum":15,"maximum":600},"membersCanDelete":{"default":false,"type":"boolean"},"retentionDays":{"default":90,"type":"integer","minimum":1,"maximum":3650},"enabled":{"default":true,"type":"boolean"}},"required":["name","memberExtensionIds"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/webhooks":{"get":{"summary":"Webhooks.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdjq2m000fq7rr3nmw95pw","orgId":"cmv8684q90000q7abs5rcqq3y","url":"https://exemple.invalid/webhook","events":["call.completed"],"secret":"••••••••","enabled":true,"lastStatus":null,"createdAt":"2026-11-16T14:44:17.470Z"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée un webhook.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"default":["call.completed"],"type":"array","items":{"type":"string","enum":["call.completed","voicemail.new","sms.status","porting.status","number.assigned","invoice.created","invoice.paid"]}},"enabled":{"default":true,"type":"boolean"}},"required":["url"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/webhooks/{id}":{"delete":{"summary":"Supprime un webhook.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie un webhook.","tags":["Intégrations"],"x-access":"admin","x-partial":true,"description":"Droits : Administrateur. Modification partielle : seuls les champs envoyés sont modifiés.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"default":["call.completed"],"type":"array","items":{"type":"string","enum":["call.completed","voicemail.new","sms.status","porting.status","number.assigned","invoice.created","invoice.paid"]}},"enabled":{"default":true,"type":"boolean"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/webhooks/{id}/deliveries":{"get":{"summary":"Journal des envois du webhook (14 jours) : état, nombre d’essais, prochain essai, réponse reçue, contenu envoyé.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/webhooks/{id}/deliveries/{delivery}/retry":{"post":{"summary":"Renvoie tout de suite un envoi.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"delivery","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/centrex/webhooks/{id}/test":{"post":{"summary":"Envoie un événement de test au webhook.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/config-backups":{"get":{"summary":"Sauvegardes de configuration.","tags":["Support et dépannage"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmw3826bk2nkoq7dmrh54cyl4","name":"Sauvegarde automatique du 05/11/2026","kind":"auto","size":1304,"summary":{"org":"Boulangerie Martin","audio":1,"queues":1,"numbers":0,"contacts":0,"ivrMenus":1,"callFlows":0,"createdAt":"2026-11-05T07:26:21.823Z","extensions":5,"ringGroups":1,"conferences":0,"timeConditions":1},"createdBy":"plateforme","createdAt":"2026-11-05T07:26:21.825Z"},{"id":"cmvsv48zh0v49q7dmy7s7qb78","name":"Sauvegarde automatique du 29/10/2026","kind":"auto","size":1304,"summary":{"org":"Boulangerie Martin","audio":1,"queues":1,"numbers":0,"contacts":0,"ivrMenus":1,"callFlows":0,"createdAt":"2026-10-29T01:26:21.818Z","extensions":5,"ringGroups":1,"conferences":0,"timeConditions":1},"createdBy":"plateforme","createdAt":"2026-10-29T01:26:21.822Z"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée une sauvegarde.","tags":["Support et dépannage"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"default":"","type":"string","maxLength":100}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/config-backups/{id}":{"delete":{"summary":"Supprime une sauvegarde.","tags":["Support et dépannage"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/config-backups/{id}/download":{"get":{"summary":"Télécharge une sauvegarde de configuration.","tags":["Support et dépannage"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/config-backups/{id}/restore":{"post":{"summary":"Restauration : une sauvegarde automatique de l'état actuel est faite juste avant.","tags":["Support et dépannage"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sections":{"default":["settings","audio","extensions","routing","numbers","contacts"],"minItems":1,"type":"array","items":{"type":"string","enum":["settings","audio","extensions","routing","numbers","contacts"]}}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/config-backups/upload":{"post":{"summary":"Fichier .hcfg déposé : vérifié, conservé dans l'espace, résumé renvoyé (l'import se fait ensuite).","tags":["Support et dépannage"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"Sauvegarde téléchargée auparavant"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/contacts":{"get":{"summary":"Contacts.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"scope","in":"query","required":false,"schema":{"default":"all","type":"string","enum":["all","personal","shared"]}},{"name":"favorites","in":"query","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdk0wz0005q7ejuck81c7i","orgId":"cmv8684q90000q7abs5rcqq3y","ownerId":null,"firstName":"Paul","lastName":"Martin","company":"Société Martin & Fils","jobTitle":"","emails":[],"phones":[{"label":"Bureau","number":"+33472102030"}],"favorite":false,"notes":"","tags":[],"createdAt":"2026-11-16T14:44:31.524Z","updatedAt":"2026-11-16T14:44:31.524Z","shared":true}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée un contact.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"default":"","type":"string","maxLength":100},"lastName":{"default":"","type":"string","maxLength":100},"company":{"default":"","type":"string","maxLength":150},"jobTitle":{"default":"","type":"string","maxLength":150},"emails":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"phones":{"default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"label":{"default":"Mobile","type":"string","maxLength":40},"number":{"type":"string","minLength":1,"maxLength":40}},"required":["number"]}},"favorite":{"default":false,"type":"boolean"},"notes":{"default":"","type":"string","maxLength":5000},"tags":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","maxLength":40}},"shared":{"default":false,"type":"boolean"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/contacts/{id}":{"delete":{"summary":"Supprime un contact.","tags":["Espace utilisateur"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie un contact.","tags":["Espace utilisateur"],"x-access":"user","x-partial":true,"description":"Droits : Utilisateur. Modification partielle : seuls les champs envoyés sont modifiés.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"default":"","type":"string","maxLength":100},"lastName":{"default":"","type":"string","maxLength":100},"company":{"default":"","type":"string","maxLength":150},"jobTitle":{"default":"","type":"string","maxLength":150},"emails":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"phones":{"default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"label":{"default":"Mobile","type":"string","maxLength":40},"number":{"type":"string","minLength":1,"maxLength":40}},"required":["number"]}},"favorite":{"default":false,"type":"boolean"},"notes":{"default":"","type":"string","maxLength":5000},"tags":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","maxLength":40}},"shared":{"default":false,"type":"boolean"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/contacts/{id}/calls":{"get":{"summary":"Appels passés et reçus avec un contact : historique de l'utilisateur, et journal de l'entreprise pour les administrateurs.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"mine":[],"company":null}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/contacts/export.csv":{"get":{"summary":"Export CSV des contacts.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/contacts/import":{"post":{"summary":"Import CSV : colonnes reconnues prénom, nom, société, fonction, email, téléphone, mobile.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":1},"shared":{"default":false,"type":"boolean"}},"required":["csv"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/contacts/lookup":{"get":{"summary":"Recherche de l'appelant à partir d'un numéro (affichage du nom lors d'un appel entrant).","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"number","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/devices":{"get":{"summary":"Appareils (applications mobiles et de bureau).","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée un appareil.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"string","enum":["IOS","ANDROID","WEB","DESKTOP"]},"pushType":{"default":"NONE","type":"string","enum":["APNS_VOIP","FCM","NONE"]},"pushToken":{"type":"string","minLength":10,"maxLength":4096},"bundleId":{"type":"string","maxLength":200},"name":{"default":"","type":"string","maxLength":200},"appVersion":{"type":"string","maxLength":50},"sandbox":{"default":false,"type":"boolean"}},"required":["platform"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/devices/{id}":{"delete":{"summary":"Supprime un appareil.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/devices/error":{"post":{"summary":"Erreurs de l'application mobile (exception non rattrapée, écran en échec) : tracées dans le journal du serveur (recherche « erreur application ») pour comprendre les plantages signalés. Limité : 20 par minute et par compte.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","maxLength":500},"stack":{"type":"string","maxLength":3000},"fatal":{"type":"boolean"},"where":{"type":"string","maxLength":80},"platform":{"type":"string","maxLength":20},"version":{"type":"string","maxLength":20},"state":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":100},{"type":"number"},{"type":"boolean"}]}}},"required":["message"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/devices/test-push":{"post":{"summary":"Envoie un appel de test sur les téléphones de l'utilisateur (vérifie le réveil).","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/devices/unregister":{"post":{"summary":"Déconnexion de l'application : le téléphone n'est plus réveillé pour ce compte.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pushToken":{"type":"string","minLength":10,"maxLength":4096}},"required":["pushToken"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/directory":{"get":{"summary":"Annuaire des collègues (extensions de l'entreprise) avec présence en temps réel.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmv8684t7000eq7aboj5azw5o","name":"Julie Martin","email":"demo-documentation@hcloud.invalid","extensions":[],"presence":"offline"},{"id":"cmwjdhkg40001q7e0y8y40faf","name":"Thomas Bernard","email":"demo-utilisateur@hcloud.invalid","extensions":["102"],"presence":"offline"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/integrations/whmcs/call":{"post":{"summary":"Module WHMCS : lance un appel depuis la fiche client.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/integrations/whmcs/events":{"get":{"summary":"Appels terminés et analyses IA depuis les curseurs donnés (synchronisation des notes).","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/integrations/whmcs/live":{"get":{"summary":"Module WHMCS : appels en cours par poste (fiche client à l’appel).","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/integrations/whmcs/lookup":{"put":{"summary":"Le module déclare l'adresse de son point d'interrogation (lookup.php) et un secret partagé (codes support).","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/integrations/whmcs/ping":{"get":{"summary":"Module WHMCS : test de connexion.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/integrations/whmcs/supervision":{"get":{"summary":"Supervision : files d'attente (appelants en attente, agents), appels en cours sur les postes.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/integrations/whmcs/update":{"get":{"summary":"Mise à jour automatique du module : version disponible, puis archive (vérifiée par son empreinte).","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/integrations/whmcs/update.zip":{"get":{"summary":"Module WHMCS : dernière version.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/2fa":{"get":{"summary":"État de la double authentification.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"enabled":false,"recoveryCodesLeft":0,"passkeys":0}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/2fa/disable":{"post":{"summary":"Désactive la double authentification.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","minLength":1},"code":{"type":"string","minLength":6,"maxLength":20}},"required":["password","code"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/2fa/enable":{"post":{"summary":"Active la double authentification (code de l’application d’authentification).","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":6,"maxLength":10}},"required":["code"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/2fa/setup":{"post":{"summary":"Nouveau secret (en attente de confirmation par un premier code).","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/ai":{"get":{"summary":"Analyses IA de ses propres appels.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"available":false,"avgScore":null,"items":[]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/ai/{id}":{"get":{"summary":"Analyse IA d’un de ses appels.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/call-context":{"get":{"summary":"Contexte d’un appel entrant passé par un scénario : par jeton (en-tête SIP X-VX-Ctx de l’appel) ou, à défaut, l’appel le plus récent de ce numéro (3 minutes). Renvoie la fiche CRM, l’ouverture au décroché et les variables du scénario. null si aucun.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"token","in":"query","required":false,"schema":{"type":"string","pattern":"^[\\w-]{32}$"}},{"name":"caller","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/call-context/{token}/answered":{"post":{"summary":"L’utilisateur a décroché : le premier qui répond déclenche la requête configurée vers le CRM (une seule fois par appel, signée) ; renvoie la fiche et first: true/false.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"string","pattern":"^[\\w-]{32}$"}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/calls/{callId}/state":{"get":{"summary":"État d'un appel entrant (utilisé par l'app réveillée par push pour détecter une annulation).","tags":["Appels et journal"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"callId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"callId":"exemple","state":"unknown"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/centrex":{"get":{"summary":"Ses postes : renvois, ne pas déranger, messagerie vocale.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmv8684sf0008q7abh4b8ftyw","number":"102","displayName":"Thomas Bernard","dnd":false,"forwardAlways":null,"forwardBusy":null,"forwardNoAnswer":null,"noAnswerSeconds":25,"voicemailEnabled":true,"voicemailEmail":null,"recordCalls":false}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/centrex/{id}":{"patch":{"summary":"Modifie un de ses postes : renvoi immédiat, sur occupation, sans réponse, ne pas déranger.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/click-to-call":{"post":{"summary":"Appelle un numéro depuis son poste (le poste sonne puis le numéro est composé).","tags":["Appels et journal"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","minLength":2,"maxLength":40},"extension":{"type":"string","maxLength":40},"autoAnswer":{"default":false,"type":"boolean"},"label":{"type":"string","maxLength":40}},"required":["to"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/click-to-call/{id}":{"delete":{"summary":"Raccroche un appel lancé.","tags":["Appels et journal"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"get":{"summary":"État d’un appel lancé (sonnerie, numérotation, en cours, terminé).","tags":["Appels et journal"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/login-cards":{"get":{"summary":"Cartes de connexion.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée une carte de connexion.","tags":["Authentification et sécurité"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":60}},"required":["password","name"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/login-cards/{id}":{"delete":{"summary":"Supprime une carte de connexion.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/mobile-lines":{"get":{"summary":"Lignes mobiles attribuées à l’utilisateur connecté : numéro, offre, consommation, sonnerie avec son poste, eSIM.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/mobile-lines/{id}":{"patch":{"summary":"L’utilisateur règle la sonnerie de son mobile pour les appels de son poste : ringMode off, simultaneous ou delayed (ringDelaySec).","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/mobile-lines/{id}/esim":{"get":{"summary":"QR code eSIM de la ligne de l’utilisateur (contenu LPA et code de saisie manuelle). Tracé dans le journal d’audit.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/passkeys":{"get":{"summary":"Clés d’accès (passkeys).","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée une clé d’accès.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":10},"response":{"type":"object","properties":{"id":{"type":"string","minLength":10,"maxLength":1500}},"required":["id"],"additionalProperties":{}},"name":{"type":"string","minLength":1,"maxLength":60}},"required":["token","response","name"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/passkeys/{id}":{"delete":{"summary":"Supprime une clé d’accès.","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","minLength":1}},"required":["password"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/passkeys/options":{"post":{"summary":"Ajout : le mot de passe est redemandé (une session volée ne doit pas pouvoir ajouter sa propre clé).","tags":["Authentification et sécurité"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","minLength":1}},"required":["password"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/presence":{"get":{"summary":"Sa présence (disponible, occupé, absent…).","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"status":"offline"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Change sa présence.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["available","busy","dnd","away","on-call","offline"]}},"required":["status"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/provisioning":{"post":{"summary":"QR code de connexion d'une application mobile/bureau (valable 15 minutes, usage unique).","tags":["Postes et téléphones"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/queues":{"get":{"summary":"Ses files d’attente et son état dans chacune (connecté, en pause).","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"online":false,"queues":[{"id":"cmv8684ta000gq7abhezk2dgn","name":"Service client","number":"600","extensionId":"cmv8684sf0008q7abh4b8ftyw","extension":"102","active":true,"waiting":0}],"agents":[{"extensionId":"cmv8684sf0008q7abh4b8ftyw","number":"102","status":"Logged Out"}]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Choix en une fois : `active` = files gardées (toutes les autres sont quittées ; [] = absent de toutes).","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"maxItems":200,"type":"array","items":{"type":"string"}}},"required":["active"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/queues/{id}":{"put":{"summary":"Entrer dans une file ou en sortir.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"}},"required":["active"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/queues/status":{"post":{"summary":"Se connecte, se met en pause ou se déconnecte de ses files.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["Available","On Break","Logged Out"]}},"required":["status"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/ringtone":{"get":{"summary":"Sa sonnerie (interne et externe).","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"org":{"ringtone":"classic","file":0},"user":{"ringtone":"","ringtoneInternal":"","ringCrescendo":false,"ringMaxSec":0,"waitingTone":true,"ringWhenDnd":false,"file":0}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Change sa sonnerie.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ringtone":{"default":"","type":"string","enum":["","classic","double","modern","soft","digital","marimba","custom"]},"ringtoneInternal":{"default":"","type":"string","enum":["","classic","double","modern","soft","digital","marimba","custom"]},"ringCrescendo":{"default":false,"type":"boolean"},"ringMaxSec":{"default":0,"type":"integer","minimum":0,"maximum":120},"waitingTone":{"default":true,"type":"boolean"},"ringWhenDnd":{"default":false,"type":"boolean"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/ringtone/file":{"delete":{"summary":"Supprime sa sonnerie personnalisée.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"get":{"summary":"Écoute sa sonnerie personnalisée.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Choisit sa sonnerie personnalisée (multipart : file, audio, 2 Mo).","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"Sonnerie (audio, 2 Mo)"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/sip-accounts":{"get":{"summary":"Réglages Centrex personnels : renvois, ne pas déranger, messagerie vocale. Mes comptes SIP (postes du standard hébergé) pour un téléphone de bureau ou une application tierce.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"extensionId":"cmv8684sf0008q7abh4b8ftyw","number":"102","displayName":"Thomas Bernard","username":"102","authUsername":"102","password":"••••••••","domain":"demo-documentation.demo.invalid","server":"localhost","port":5066,"transports":["UDP","TCP"],"outboundProxy":"localhost:5066","voicemailNumber":"*97","codecs":["G.722","G.711 A (PCMA)"],"registrations":[]}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/softphone":{"get":{"summary":"Configuration complète du softphone (comptes SIP, serveurs WebSocket, ICE/TURN).","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"user":{"id":"cmwjdhkg40001q7e0y8y40faf","name":"Thomas Bernard","email":"demo-utilisateur@hcloud.invalid","role":"USER"},"org":{"id":"cmv8684q90000q7abs5rcqq3y","name":"Boulangerie Martin","status":"ACTIVE","sipDomain":"demo-documentation.demo.invalid","apps":["radio","hotel"],"centrexEnabled":true},"service":{"ok":true},"features":{"web":true,"chat":true,"push":true,"mobile":true,"desktop":true,"gateway":true,"presence":true,"recording":true,"conference":true,"maxSipServers":5,"video":false},"accounts":[{"extensionId":"cmv8684sf0008q7abh4b8ftyw","number":"102","displayName":"Thomas Bernard","callerId":null,"serverName":"Centrex VoxNova","mode":"GATEWAY","pushCapable":true,"wsServers":["ws://127.0.0.1:18080"],"uri":"sip:102@demo-documentation.demo.invalid","authorizationUser":"102","password":"••••••••","realm":"demo-documentation.demo.invalid","voicemailNumber":"*97","registerExpires":300}],"iceServers":[{"urls":["stun:stun.l.google.com:19302"]}],"brandName":"VoxNova","serverTime":"2026-11-20T22:38:56.620Z"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/voiceboxes":{"get":{"summary":"Messageries partagées dont il est membre et leurs messages.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/voiceboxes/messages/{id}":{"delete":{"summary":"Supprime un message d’une messagerie partagée.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/voiceboxes/messages/{id}/handled":{"post":{"summary":"Traité / à traiter, avec une note facultative (« rappelé, devis envoyé »).","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/voiceboxes/messages/{id}/listen":{"post":{"summary":"Écoute : lien signé de quelques minutes, écoute notée (qui et quand).","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/voicemail":{"get":{"summary":"Ses messages vocaux (tous ses postes).","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"boxes":[{"extensionId":"cmv8684sf0008q7abh4b8ftyw","number":"102","name":"Thomas Bernard","emailNotify":null,"settings":{"enabled":true,"email":null,"noAnswerSeconds":25,"hasGreeting":false},"messages":[]}],"unread":0}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/voicemail/{ext}/{uuid}":{"delete":{"summary":"Supprime un de ses messages vocaux.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"ext","in":"path","required":true,"schema":{"type":"string"}},{"name":"uuid","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/voicemail/{ext}/{uuid}/listen":{"post":{"summary":"Écoute : lien signé et message marqué lu.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"ext","in":"path","required":true,"schema":{"type":"string"}},{"name":"uuid","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/voicemail/{ext}/{uuid}/read":{"post":{"summary":"Marque un message vocal comme écouté.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"ext","in":"path","required":true,"schema":{"type":"string"}},{"name":"uuid","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/voicemail/{ext}/greeting":{"delete":{"summary":"Retour à l'annonce standard.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"ext","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Annonce personnelle : fichier (MP3, WAV, AAC, M4A…) ou enregistrement fait dans le navigateur (WebM / Ogg).","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"ext","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/voicemail/{ext}/greeting/listen":{"post":{"summary":"Écoute son annonce d’accueil (lien d’écoute de quelques minutes).","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"ext","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/me/voicemail/{ext}/settings":{"put":{"summary":"Activation, code d'accès (consultation par *97 / *98), copie par courriel, délai avant la messagerie.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"ext","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/media":{"get":{"summary":"Lecture en continu par lien signé (balise <audio>) : pas de session nécessaire, lien de quelques minutes.","tags":["Espace utilisateur"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/messages":{"post":{"summary":"Envoie un message instantané à un collègue.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"peer":{"type":"string","minLength":1,"maxLength":100},"body":{"type":"string","minLength":1,"maxLength":5000},"direction":{"type":"string","enum":["INBOUND","OUTBOUND"]}},"required":["peer","body","direction"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/messages/{peer}":{"get":{"summary":"Conversation avec un collègue.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"peer","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/messages/{peer}/read":{"post":{"summary":"Marque la conversation comme lue.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"peer","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/messages/conversations":{"get":{"summary":"Conversations de messagerie instantanée.","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/music":{"get":{"summary":"Catalogue de musiques d’attente libres de droits.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwhtzmc1000pq7zqiiwf3ts2","name":"Douce mwhtzkhd","artist":"","genre":"Piano","description":"","durationSec":40,"priceCents":0,"active":true,"sort":0,"owned":false,"inLibrary":false}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/music/{id}/acquire":{"post":{"summary":"Acquisition : gratuite, ou achat unique (facturé sur la prochaine facture télécom) ; copie dans les musiques.","tags":["Accueil des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmPriceCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"setDefault":{"default":false,"type":"boolean"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/music/{id}/preview":{"get":{"summary":"extrait (30 s) : écoute libre pour les utilisateurs connectés","tags":["Accueil des appels"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org":{"patch":{"summary":"Modifie la fiche de l’entreprise (nom, adresse, e-mail de facturation, SIRET…).","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"billingEmail":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"vatNumber":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"country":{"type":"string","minLength":2,"maxLength":2},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"postalCode":{"type":"string","maxLength":10},"inseeCode":{"anyOf":[{"type":"string","maxLength":5},{"type":"null"}]},"blockPremium":{"type":"boolean"},"blockShortNumbers":{"type":"boolean"},"rejectAnonymous":{"type":"boolean"},"rejectNpv":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/audit":{"get":{"summary":"Journal d’audit : qui a fait quoi, quand (actions faites avec une clé d’API comprises).","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"page","in":"query","required":false,"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwpjb4iy0007q7koj4nlalkq","orgId":"cmv8684q90000q7abs5rcqq3y","userId":"cmv8684t7000eq7aboj5azw5o","action":"extension.sip_account","target":"100","meta":null,"ip":"127.0.0.1","createdAt":"2026-11-20T22:12:11.050Z"},{"id":"cmwp5b8fk0007q74qrfz0kzed","orgId":"cmv8684q90000q7abs5rcqq3y","userId":"cmv8684t7000eq7aboj5azw5o","action":"extension.sip_account","target":"100","meta":null,"ip":"127.0.0.1","createdAt":"2026-11-20T15:40:21.489Z"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/callback-blocks":{"get":{"summary":"Numéros bloqués pour les rappels.","tags":["Rappels et widget"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée un blocage.","tags":["Rappels et widget"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["number","prefix"]},"value":{"type":"string","minLength":2,"maxLength":30},"reason":{"default":"","type":"string","maxLength":200}},"required":["kind","value"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/callback-blocks/{id}":{"delete":{"summary":"Supprime un blocage.","tags":["Rappels et widget"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/callback-widgets":{"post":{"summary":"Crée un widget de rappel.","tags":["Rappels et widget"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"targetType":{"type":"string","enum":["queue","extension"]},"targetId":{"type":"string","minLength":1,"maxLength":40},"origins":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","maxLength":120}},"days":{"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"fromTime":{"type":"string","pattern":"^\\d\\d:\\d\\d$"},"toTime":{"type":"string","pattern":"^\\d\\d:\\d\\d$"},"title":{"type":"string","minLength":1,"maxLength":60},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"enabled":{"type":"boolean"}},"required":["name","targetType","targetId","days","fromTime","toTime","title","color","enabled"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/callback-widgets/{id}":{"delete":{"summary":"Supprime un widget de rappel.","tags":["Rappels et widget"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie un widget de rappel.","tags":["Rappels et widget"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"targetType":{"type":"string","enum":["queue","extension"]},"targetId":{"type":"string","minLength":1,"maxLength":40},"origins":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","maxLength":120}},"days":{"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"fromTime":{"type":"string","pattern":"^\\d\\d:\\d\\d$"},"toTime":{"type":"string","pattern":"^\\d\\d:\\d\\d$"},"title":{"type":"string","minLength":1,"maxLength":60},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"enabled":{"type":"boolean"}},"required":["name","targetType","targetId","days","fromTime","toTime","title","color","enabled"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/callbacks":{"get":{"summary":"Demandes de rappel.","tags":["Rappels et widget"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"widgets":[{"id":"cmwjdjq2w000nq7rr5z041sds","orgId":"cmv8684q90000q7abs5rcqq3y","name":"Rappel site web","key":"••••••••","targetType":"EXTENSION","targetId":"cmv8684rr0004q7abx95vduea","origins":[],"days":[1,2],"fromTime":"09:00","toTime":"18:00","title":"Être rappelé maintenant","color":"#4f46e5","enabled":true,"createdAt":"2026-11-16T14:44:17.480Z"}],"requests":[{"id":"cmwjdjq2y000pq7rryvmtbv99","orgId":"cmv8684q90000q7abs5rcqq3y","targetType":"EXTENSION","targetId":"cmv8684rr0004q7abx95vduea","number":"+33612345678","name":null,"note":null,"source":"widget","widgetId":null,"status":"pending","attempts":0,"triedAgents":[],"agent":null,"lastError":null,"ip":null,"nextAt":"2026-11-16T14:44:17.483Z","doneAt":null,"createdAt":"2026-11-16T14:44:17.483Z"}],"queues":[{"id":"cmv8684ta000gq7abhezk2dgn","name":"Service client"}],"extensions":[{"id":"cmv8684rr0004q7abx95vduea","name":"100 · Accueil"},{"id":"cmv8684s40006q7abi97pyqu8","name":"101 · Julie Martin"}],"scriptBase":"http://localhost:5173/api/public/cbw/"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée une demande de rappel.","tags":["Rappels et widget"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","minLength":6,"maxLength":25},"name":{"type":"string","maxLength":100},"note":{"type":"string","maxLength":300},"website":{"type":"string","maxLength":100},"t":{"type":"integer","minimum":0,"maximum":9007199254740991},"targetType":{"type":"string","enum":["queue","extension"]},"targetId":{"type":"string","maxLength":40}},"required":["phone","targetType","targetId"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/callbacks/{id}":{"delete":{"summary":"Supprime une demande de rappel.","tags":["Rappels et widget"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/callbacks/{id}/block":{"post":{"summary":"Depuis une demande : bloque son numéro (entreprise) et, pour l'éditeur, bannit l'adresse IP de l'auteur.","tags":["Rappels et widget"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"default":true,"type":"boolean"},"ip":{"default":false,"type":"boolean"},"global":{"default":false,"type":"boolean"},"reason":{"default":"","type":"string","maxLength":200}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/calls":{"get":{"summary":"Historiques d’appels des applications de tous les utilisateurs (filtre userId) ; le journal complet du standard est GET /api/centrex/cdr.","tags":["Appels et journal"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"page","in":"query","required":false,"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"userId","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"items":[],"total":0}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/crm":{"get":{"summary":"Réglages de la fiche CRM à la prise d’appel : mode (off, open : le softphone ouvre la fiche, request : requête de la plateforme, both), modèle de la fiche, adresse et méthode de la requête, secret de signature présent ou non.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"mode":"off","url":"","requestUrl":"","requestMethod":"POST","hasSecret":false}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Enregistre la fiche CRM. Modèles avec variables encodées automatiquement : {{caller}}, {{did}}, {{var.<nom>}} (variables du scénario : code tapé, client identifié, réponse d’une requête…). Adresses http(s) uniquement. Un secret de signature est créé au premier enregistrement.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["off","open","request","both"]},"url":{"type":"string","maxLength":2000},"requestUrl":{"type":"string","maxLength":2000},"requestMethod":{"type":"string","enum":["POST","GET"]}},"required":["mode","url","requestUrl","requestMethod"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/crm/secret":{"post":{"summary":"Nouveau secret de signature des requêtes (vxc_…), affiché une seule fois. Vérifiez X-VoxNova-Signature: sha256=<HMAC-SHA256 du corps>.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/crm/test":{"post":{"summary":"Envoie une requête d’essai (variables d’exemple, champ test: true) et renvoie le statut obtenu.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/devices":{"get":{"summary":"Appareils (applications) des utilisateurs de l’entreprise.","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwk30kr10007q76a1mfjdvj6","userId":"cmv8684t7000eq7aboj5azw5o","platform":"WEB","pushType":"NONE","pushToken":null,"bundleId":null,"name":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/153.0.8010.12 Safari/537.36","appVersion":"1.0.0","sandbox":false,"lastSeenAt":"2026-11-17T02:37:14.126Z","lastPushAt":null,"missedWakes":0,"createdAt":"2026-11-17T02:37:14.126Z","user":{"name":"Julie Martin","email":"demo-documentation@hcloud.invalid"}},{"id":"cmwk30jbg0005q76a913c30vj","userId":"cmv8684t7000eq7aboj5azw5o","platform":"WEB","pushType":"NONE","pushToken":null,"bundleId":null,"name":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/153.0.8010.12 Safari/537.36","appVersion":"1.0.0","sandbox":false,"lastSeenAt":"2026-11-17T02:37:12.268Z","lastPushAt":null,"missedWakes":0,"createdAt":"2026-11-17T02:37:12.268Z","user":{"name":"Julie Martin","email":"demo-documentation@hcloud.invalid"}}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/domain":{"get":{"summary":"Domaine SIP de l’entreprise.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"current":"demo-documentation.demo.invalid","bases":["sip.localhost"],"default":"sip.localhost","base":null,"label":null,"custom":true,"verifyToken":"••••••••","targetIp":"127.0.0.1","sipPort":5066,"phones":5}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Change le domaine SIP (sous-domaine de la plateforme ou domaine personnalisé).","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"base":{"type":"string"},"custom":{"type":"string","maxLength":100}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/domain/check":{"post":{"summary":"Vérifie qu’un domaine personnalisé pointe bien vers la plateforme.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","maxLength":100}},"required":["domain"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/extensions":{"get":{"summary":"Postes.","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmv8684rr0004q7abx95vduea","orgId":"cmv8684q90000q7abs5rcqq3y","sipServerId":"cmv8684qp0002q7abqpr2oefx","userId":null,"number":"100","displayName":"Accueil","authUsername":"100","callerId":null,"gatewayUuid":"gwsumkctr94pa5vljk","enabled":true,"voicemailEnabled":true,"voicemailPin":"••••••••","voicemailEmail":null,"voicemailGreeting":null,"forwardAlways":null,"forwardBusy":null,"forwardNoAnswer":null,"noAnswerSeconds":25,"dnd":false,"recordCalls":false,"outboundCallerId":null,"callPermission":"NATIONAL","emergencyPostalCode":null,"emergencyInsee":null,"emergencyCity":null,"teamsNumber":null,"voiceAppId":null,"createdAt":"2026-10-14T13:54:09.064Z","updatedAt":"2026-10-14T13:54:09.064Z","user":null,"sipServer":{"id":"cmv8684qp0002q7abqpr2oefx","name":"Centrex VoxNova","mode":"GATEWAY","kind":"HOSTED"}},{"id":"cmv8684s40006q7abi97pyqu8","orgId":"cmv8684q90000q7abs5rcqq3y","sipServerId":"cmv8684qp0002q7abqpr2oefx","userId":null,"number":"101","displayName":"Julie Martin","authUsername":"101","callerId":null,"gatewayUuid":"gw1mf8atsdxtbsonto","enabled":true,"voicemailEnabled":true,"voicemailPin":"••••••••","voicemailEmail":null,"voicemailGreeting":null,"forwardAlways":null,"forwardBusy":null,"forwardNoAnswer":null,"noAnswerSeconds":25,"dnd":false,"recordCalls":false,"outboundCallerId":null,"callPermission":"NATIONAL","emergencyPostalCode":null,"emergencyInsee":null,"emergencyCity":null,"teamsNumber":null,"voiceAppId":null,"createdAt":"2026-10-14T13:54:09.076Z","updatedAt":"2026-10-14T13:54:09.076Z","user":null,"sipServer":{"id":"cmv8684qp0002q7abqpr2oefx","name":"Centrex VoxNova","mode":"GATEWAY","kind":"HOSTED"}}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée un poste.","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sipServerId":{"type":"string"},"userId":{"type":["string","null"]},"number":{"type":"string","minLength":1,"maxLength":20,"pattern":"^[0-9*#+]+$"},"displayName":{"type":"string","minLength":1,"maxLength":100},"authUsername":{"type":"string","minLength":1,"maxLength":100},"password":{"type":"string","minLength":1,"maxLength":200},"callerId":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"enabled":{"default":true,"type":"boolean"},"voicemailEnabled":{"type":"boolean"},"voicemailPin":{"type":"string","pattern":"^\\d{4,10}$"},"voicemailEmail":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"forwardAlways":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"forwardBusy":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"forwardNoAnswer":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"noAnswerSeconds":{"type":"integer","minimum":5,"maximum":120},"dnd":{"type":"boolean"},"recordCalls":{"type":"boolean"},"outboundCallerId":{"type":["string","null"]},"callPermission":{"type":"string","enum":["INTERNAL","NATIONAL","INTERNATIONAL"]}},"required":["sipServerId","number","displayName","authUsername"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/extensions/{id}":{"delete":{"summary":"Supprime un poste.","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie un poste.","tags":["Postes et téléphones"],"x-access":"admin","x-partial":true,"description":"Droits : Administrateur. Modification partielle : seuls les champs envoyés sont modifiés.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sipServerId":{"type":"string"},"userId":{"type":["string","null"]},"number":{"type":"string","minLength":1,"maxLength":20,"pattern":"^[0-9*#+]+$"},"displayName":{"type":"string","minLength":1,"maxLength":100},"authUsername":{"type":"string","minLength":1,"maxLength":100},"password":{"type":"string","minLength":1,"maxLength":200},"callerId":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"enabled":{"default":true,"type":"boolean"},"voicemailEnabled":{"type":"boolean"},"voicemailPin":{"type":"string","pattern":"^\\d{4,10}$"},"voicemailEmail":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"forwardAlways":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"forwardBusy":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"forwardNoAnswer":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"noAnswerSeconds":{"type":"integer","minimum":5,"maximum":120},"dnd":{"type":"boolean"},"recordCalls":{"type":"boolean"},"outboundCallerId":{"type":["string","null"]},"callPermission":{"type":"string","enum":["INTERNAL","NATIONAL","INTERNATIONAL"]}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/extensions/{id}/location":{"put":{"summary":"Site du poste (télétravail, agence) pour les appels d'urgence ; null = commune de l'entreprise.","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"postalCode":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"inseeCode":{"anyOf":[{"type":"string","maxLength":5},{"type":"null"}]}},"required":["postalCode"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/extensions/{id}/phone":{"post":{"summary":"Associe un téléphone de bureau au poste par son adresse MAC : il se configure tout seul au branchement (constructeur détecté d’après la MAC, ou précisé).","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","maxLength":40},"mac":{"type":"string","minLength":12,"maxLength":17},"model":{"type":"string","maxLength":100},"serial":{"type":"string","maxLength":64}},"required":["mac"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/extensions/{id}/phone/{provider}/{mac}":{"delete":{"summary":"Dissocie un téléphone de bureau du poste.","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"provider","in":"path","required":true,"schema":{"type":"string"}},{"name":"mac","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/extensions/{id}/sip-account":{"get":{"summary":"Paramètres SIP du poste à saisir dans un téléphone de bureau ou une application SIP.","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"extensionId":"cmv8684rr0004q7abx95vduea","number":"100","displayName":"Accueil","username":"100","authUsername":"100","password":"••••••••","domain":"demo-documentation.demo.invalid","server":"localhost","port":5066,"transports":["UDP","TCP"],"outboundProxy":"localhost:5066","voicemailNumber":"*97","codecs":["G.722","G.711 A (PCMA)"],"registrations":[]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/extensions/{id}/sip-password":{"post":{"summary":"Nouveau mot de passe SIP : les téléphones configurés avec l'ancien sont déconnectés.","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/extensions/{id}/status":{"get":{"summary":"État d'enregistrement de la passerelle auprès du PBX pour cette extension.","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"registered":false,"error":"KAMAILIO_RPC_URL non configurée"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/extensions/{id}/teams":{"put":{"summary":"Numéro Teams d'un collaborateur (attribué dans Teams par Set-CsPhoneNumberAssignment).","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"teamsNumber":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]}},"required":["teamsNumber"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/features":{"get":{"summary":"Fonctions activées ou masquées dans l’entreprise.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"key":"••••••••","label":"Rappels","description":"Bouton « Être rappelé » sur votre site, API et file virtuelle de rappel","kind":"free","group":"Accueil des appels","available":true,"active":false},{"key":"••••••••","label":"SMS et WhatsApp","description":"Envoi automatique de SMS ou de messages WhatsApp depuis vos scénarios","kind":"granted","group":"Accueil des appels","available":true,"active":true}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/features/{key}":{"put":{"summary":"Active ou masque une fonction.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"on":{"type":"boolean"}},"required":["on"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/kyc":{"get":{"summary":"Identification de l’entreprise : état du dossier et pièces déposées.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"allowIndividual":false,"type":null,"status":"legacy","data":{},"submittedAt":null,"decidedAt":null,"note":null,"documents":[]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Dépose le dossier d’identification (type de client, représentant, adresse). Obligatoire avant l’attribution d’un numéro.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["pro","asso","particulier"]},"legalName":{"type":"string","maxLength":200},"siret":{"type":"string","maxLength":20},"rna":{"type":"string","maxLength":12},"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"role":{"type":"string","maxLength":80},"birthDate":{"type":"string","maxLength":10},"address":{"type":"string","minLength":3,"maxLength":200},"postalCode":{"type":"string","minLength":4,"maxLength":10},"city":{"type":"string","minLength":1,"maxLength":100},"country":{"default":"FR","type":"string","enum":["FR","CH","BE","LU","MC"]},"certify":{"type":"boolean","const":true}},"required":["type","firstName","lastName","address","postalCode","city","certify"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/kyc/documents":{"post":{"summary":"Ajoute une pièce justificative (multipart : champs kind et file ; PDF, PNG, JPEG ; 10 Mo).","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["kind","file"],"properties":{"kind":{"type":"string","enum":["kbis","id","address","other"],"description":"Nature de la pièce"},"file":{"type":"string","format":"binary","description":"PDF, PNG ou JPEG, 10 Mo"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/kyc/documents/{id}":{"delete":{"summary":"Retire une pièce justificative.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/kyc/online":{"get":{"summary":"Vérification d’identité en ligne : disponibilité et dernière vérification (état, score).","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"available":false,"last":null}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Démarre la vérification en ligne (type pro, asso ou particulier). Identité imposée facultative : firstName, lastName, birthDate, siren, rna, legalName — la pièce doit être à ce nom et la structure conforme au registre : renvoie l’adresse de la page sécurisée où le représentant filme sa pièce d’identité. Entreprise et association : contrôle du registre et du dirigeant (KYB).","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["pro","asso","particulier"]},"siren":{"type":"string","maxLength":20},"rna":{"type":"string","maxLength":12},"legalName":{"type":"string","maxLength":200},"firstName":{"type":"string","maxLength":80},"lastName":{"type":"string","maxLength":80},"birthDate":{"type":"string","maxLength":10}},"required":["type"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/kyc/online/refresh":{"post":{"summary":"Relit le résultat de la vérification en ligne (au retour de la page) et renvoie l’état de l’identification.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/label":{"get":{"summary":"Nom affiché de l’entreprise et identifiant court.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"available":true,"enabled":false,"stats":{"calls":0,"answered":0,"rate":0,"avgSec":null,"measured":false,"since":"2026-10-21T22:38:56.797Z"},"page":null,"svg":null,"embed":null}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Change le nom affiché.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/messaging":{"get":{"summary":"SMS et WhatsApp : plafonds, consommation, crédits, état de WhatsApp, journal des envois.","tags":["SMS et WhatsApp"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"limits":{"sms":0,"whatsapp":0},"usage":{"sms":0,"whatsapp":0},"sender":null,"smsReady":false,"credits":{"monthlyLimit":0,"monthlyUsed":0,"monthlyLeft":0,"balance":0,"available":0,"metered":{"enabled":false,"unitPriceCents":0,"unitPriceDeci":0,"cap":null,"monthUsed":0,"monthCents":0,"left":null}},"session":{"status":"off"},"logs":[],"diagnostic":{"tokens":0,"lidMappings":0,"logs":[]}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/messaging/auto-replies":{"get":{"summary":"Réponses automatiques WhatsApp (par mot-clé).","tags":["SMS et WhatsApp"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie les réponses automatiques WhatsApp.","tags":["SMS et WhatsApp"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"keyword":{"type":"string","minLength":2,"maxLength":40},"text":{"type":"string","minLength":1,"maxLength":1000}},"required":["keyword","text"]}}},"required":["rules"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/messaging/history":{"get":{"summary":"Historique complet des SMS et WhatsApp, page par page (?month=AAAA-MM, channel, status, q) : crédits utilisés et montant au comptage de chaque SMS, totaux de la période.","tags":["SMS et WhatsApp"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"month","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}},{"name":"channel","in":"query","required":false,"schema":{"type":"string","enum":["sms","whatsapp"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":20}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"page","in":"query","required":false,"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"items":[],"total":0,"page":1,"pageSize":50,"totals":{"smsSegments":0,"meteredSegments":0,"meteredCents":0}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/messaging/test":{"post":{"summary":"Envoie un SMS ou un WhatsApp de test.","tags":["SMS et WhatsApp"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","minLength":6,"maxLength":25},"text":{"type":"string","minLength":1,"maxLength":1000},"pref":{"type":"string","enum":["wa_sms","sms","wa"]},"inviteText":{"type":"string","maxLength":600}},"required":["to","text","pref"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/messaging/whatsapp/connect":{"post":{"summary":"Connecte WhatsApp (QR code à scanner, voir GET /api/org/messaging).","tags":["SMS et WhatsApp"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/messaging/whatsapp/logout":{"post":{"summary":"Déconnecte WhatsApp.","tags":["SMS et WhatsApp"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/mobile-lines":{"get":{"summary":"Lignes mobiles de l’entreprise : numéro, carte SIM, offre, état, consommation data du jour et du mois, quota.","tags":["Numéros"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/mobile-lines/{id}":{"get":{"summary":"Détail d’une ligne mobile, relu chez l’opérateur : consommation à jour et options (appels, SMS, MMS, messagerie, conférence).","tags":["Numéros"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Nom de la ligne (label) et utilisateur raccordé (userId) : la ligne apparaît dans son espace, il reçoit l’e-mail de l’eSIM et les alertes data (80 %, 100 %), ses appels depuis ce mobile sont reconnus. ringMode : off, simultaneous (le mobile sonne avec son poste) ou delayed (après ringDelaySec secondes).","tags":["Numéros"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/mobile-lines/{id}/esim":{"get":{"summary":"eSIM : code d’activation (code) et contenu du QR code à scanner sur le téléphone (qr, chaîne LPA). 404 tant que l’opérateur n’a pas préparé la carte (esim.available dans la liste). Chaque lecture est inscrite au journal d’audit.","tags":["Numéros"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/mobile-lines/{id}/options":{"put":{"summary":"Active ou coupe les options : incomingCalls, outgoingCalls, incomingSms, outgoingSms, mms, voicemail, conferenceCalls (booléens, les absents restent inchangés). Appliqué en quelques minutes (messagerie : le lendemain), de 5 h 05 à 21 h 55.","tags":["Numéros"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/mobile-lines/{id}/reconnect":{"post":{"summary":"Reconnecte la carte SIM au réseau (prise en compte d’un changement, souci de connexion data).","tags":["Numéros"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/mobile-lines/offers":{"get":{"summary":"Forfaits mobiles proposés : data, réseau (4G/5G), eSIM ou carte SIM, appels et SMS, prix HT par mois (priceCents) et mise en service (setupCents). Liste vide si la vente n’est pas ouverte.","tags":["Numéros"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/mobile-lines/orders":{"get":{"summary":"Commandes de lignes mobiles de l’entreprise et leur état : pending (validation), ordering, ordered (activation en cours), active, failed (le support reprend la main), rejected, cancelled.","tags":["Numéros"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Commande une ligne mobile (offerId d’une offre de /offers). Prix figés à la commande, facturés chaque mois sur la facture télécom (au prorata le premier mois). eSIM : le QR code apparaît dans la ligne (/mobile-lines/{id}/esim) dès qu’elle est prête.","tags":["Numéros"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"offerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lineLabel":{"type":"string","maxLength":100},"contactName":{"type":"string","maxLength":100},"contactEmail":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"contactPhone":{"type":"string","maxLength":30}},"required":["offerId"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/mobile-lines/orders/{id}":{"delete":{"summary":"Annule une commande encore en attente de validation.","tags":["Numéros"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/mode":{"post":{"summary":"Passe du mode simple au mode avancé (ou l’inverse).","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"simple":{"type":"boolean"}},"required":["simple"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/onboarding":{"get":{"summary":"Étapes de mise en route restantes.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"product":"CENTREX","steps":[{"key":"••••••••","title":"Raccorder vos lignes","text":"Ajoutez votre trunk SIP (hébergeur, hébergeur…) et déclarez vos numéros, ou utilisez les nôtres.","to":"/admin/centrex/trunks","done":true},{"key":"••••••••","title":"Ajouter vos collaborateurs","text":"Chaque utilisateur reçoit un poste du standard hébergé.","to":"/admin/users","done":true}],"dismissed":true,"completed":false,"centrexHostedName":"Centrex by VoxNova"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Termine la mise en route.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"done":{"type":"boolean"}},"required":["done"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/overview":{"get":{"summary":"Tableau de bord : appels des 30 derniers jours, postes, numéros, consommation.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"org":{"id":"cmv8684q90000q7abs5rcqq3y","sandbox":false,"sandboxOwnerId":null,"name":"Boulangerie Martin","slug":"demo-documentation","sipDomain":"demo-documentation.demo.invalid","status":"ACTIVE","billingEmail":null,"vatNumber":null,"address":null,"country":"FR","trialEndsAt":null,"settings":{"phonebookToken":"••••••••"},"centrexEnabled":true,"timezone":"Europe/Paris","defaultCallerId":null,"recordingRetentionDays":90,"maxChannels":null,"pbxNodeId":null,"pbxHomeNodeId":null,"pbxPinned":false,"lat":null,"lon":null,"telecomBilledMonth":"2026-10","apps":["radio","hotel"],"mohId":null,"announceOverMusic":false,"announceMode":"alone","announceMusicLevel":25,"simpleMode":false,"product":"CENTREX","onboardingDone":true,"aiGranted":false,"postalCode":"69002","inseeCode":"69382","city":"Lyon","blockPremium":true,"blockShortNumbers":true,"specialCapCents":3000,"internationalCapCents":3000},"usage":{"used":2,"seats":0,"available":0},"service":{"ok":true},"license":null,"counts":{"sipServers":1,"extensions":5,"devices":4,"calls30d":0,"talkTimeSec":0},"callsPerDay":[{"day":"2026-10-22","inbound":0,"outbound":0,"missed":0},{"day":"2026-10-23","inbound":0,"outbound":0,"missed":0}]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/permissions":{"get":{"summary":"Liste des droits attribuables aux utilisateurs.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"cdr":"Journal des appels","stats":"Statistiques","supervision":"Supervision en direct","satisfaction":"Satisfaction client"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/phonebook":{"get":{"summary":"Adresse de l’annuaire pour téléphones de bureau.","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"urls":{"yealink":"http://localhost:5173/api/public/phonebook/1OWydKJT6cpxAwN78FHrDN4tcSHtpGFH/yealink.xml","snom":"http://localhost:5173/api/public/phonebook/1OWydKJT6cpxAwN78FHrDN4tcSHtpGFH/snom.xml","grandstream":"http://localhost:5173/api/public/phonebook/1OWydKJT6cpxAwN78FHrDN4tcSHtpGFH/grandstream.xml"}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/phonebook/rotate":{"post":{"summary":"Renouvelle l’adresse secrète de l’annuaire.","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/phones":{"get":{"summary":"Téléphones enregistrés (appareil, adresse IP, poste).","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/phones/import":{"post":{"summary":"Import en masse : [{extension: \"101\", mac, serial?, provider?}] (200 lignes maximum), résultat ligne par ligne.","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","maxLength":40},"rows":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"extension":{"type":"string","minLength":1,"maxLength":20},"mac":{"type":"string","minLength":12,"maxLength":17},"serial":{"type":"string","maxLength":64},"provider":{"type":"string","maxLength":40},"model":{"type":"string","maxLength":100}},"required":["extension","mac"]}}},"required":["rows"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/product":{"post":{"summary":"Change le type de service (standard hébergé, relais vers votre PBX, trunk, plateforme développeurs).","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"product":{"type":"string","enum":["CENTREX_HOSTED","CENTREX","RELAY","TRUNK","DEVELOPER"]}},"required":["product"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/provisioned-phones":{"get":{"summary":"Téléphones de bureau associés (MAC, poste, dernière configuration récupérée).","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/provisioning/{provider}/models":{"get":{"summary":"Modèles de téléphones d’un constructeur.","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/provisioning/providers":{"get":{"summary":"Fournisseurs activés par l'éditeur, avec ce qu'il faut choisir (modèle, gamme).","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/receptionist":{"get":{"summary":"Réglages du standardiste IA.","tags":["Standardiste IA et analyse des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"settings":{"id":"cmwjdhlt6000aq7e0vgnn3tdp","orgId":"cmv8684q90000q7abs5rcqq3y","enabled":true,"name":"Léa","voice":"Aoede","language":"fr-FR","tone":"chaleureux","greeting":"","companyInfo":"","hoursInfo":"","faq":[],"instructions":"","forbidden":"","collect":[],"transfers":[],"notifyEmails":"","satisfaction":true,"closing":"","maxMinutes":8,"createdAt":"2026-11-16T14:42:38.634Z","updatedAt":"2026-11-16T14:42:38.634Z"},"active":false,"priceCents":3900,"includedMinutes":300,"overageCents":10,"usage":{"calls":0,"minutes":0},"voices":[{"id":"Aoede","label":"Aoede — féminine, douce"},{"id":"Kore","label":"Kore — féminine, posée"}],"tones":["professionnel","chaleureux"],"platformReady":true,"routed":0}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Configure le standardiste IA (voix, consignes, transferts).","tags":["Standardiste IA et analyse des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string","minLength":1,"maxLength":40},"voice":{"type":"string","enum":["Aoede","Kore","Leda","Zephyr","Puck","Charon","Fenrir","Orus"]},"language":{"type":"string","enum":["fr-FR","en-US","es-ES","de-DE","it-IT"]},"tone":{"type":"string","enum":["professionnel","chaleureux","dynamique"]},"greeting":{"type":"string","maxLength":500},"companyInfo":{"type":"string","maxLength":8000},"hoursInfo":{"type":"string","maxLength":2000},"faq":{"maxItems":60,"type":"array","items":{"type":"object","properties":{"q":{"type":"string","maxLength":300},"a":{"type":"string","maxLength":1500}},"required":["q","a"]}},"instructions":{"type":"string","maxLength":4000},"forbidden":{"type":"string","maxLength":1000},"collect":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"required":{"type":"boolean"}},"required":["label","required"]}},"transfers":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"when":{"type":"string","maxLength":300},"destType":{"type":"string","enum":["EXTENSION","RING_GROUP","QUEUE","EXTERNAL","VOICEMAIL","SHARED_VOICEMAIL"]},"destId":{"type":["string","null"]},"destValue":{"type":["string","null"]}},"required":["label","when","destType"]}},"notifyEmails":{"type":"string","maxLength":500},"satisfaction":{"type":"boolean"},"closing":{"type":"string","maxLength":500},"maxMinutes":{"type":"integer","minimum":1,"maximum":30}},"required":["enabled","name","voice","language","tone","greeting","companyInfo","hoursInfo","faq","instructions","forbidden","collect","transfers","notifyEmails","satisfaction","closing","maxMinutes"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/receptionist/calls":{"get":{"summary":"Appels traités par le standardiste IA.","tags":["Standardiste IA et analyse des appels"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"page","in":"query","required":false,"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"outcome","in":"query","required":false,"schema":{"type":"string","maxLength":20}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"items":[],"total":0,"satisfaction":{"average":null,"count":0}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/referral":{"get":{"summary":"Lien de parrainage et filleuls.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"code":"UJVS6MW","link":"http://localhost:5173/signup?parrain=UJVS6MW","reward":"1 mois offert pour vous et pour votre filleul dès qu’il devient client","referrals":[]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/ringtone":{"put":{"summary":"Sonnerie par défaut de l’entreprise.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ringtone":{"type":"string","enum":["classic","double","modern","soft","digital","marimba","custom"]}},"required":["ringtone"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/ringtone/file":{"delete":{"summary":"Supprime la sonnerie personnalisée de l’entreprise.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"get":{"summary":"Écoute la sonnerie personnalisée de l’entreprise.","tags":["Entreprise et réglages"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Sonnerie personnalisée (multipart : file, audio).","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"Sonnerie (audio, 2 Mo)"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/rio":{"get":{"summary":"RIO de vos numéros (pour les transférer vers un autre opérateur).","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"number":"+33199001234","rio":null}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/sandboxes":{"get":{"summary":"Vos entreprises d’essai.","tags":["Comptes d’essai"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjeqkwu0001q7zl3agul6yc","slug":"essai-5l2jlgvco1g","name":"Démo console","sandbox":true,"createdAt":"2026-11-16T15:17:36.990Z","consoleUrl":"http://localhost:5173/api/sandbox/console/o.cmwjeqkwu0001q7zl3agul6yc.o9NkCTj7uGIxKpKAg8Bczsrs"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée une entreprise d’essai fictive (utilisateurs, postes, file d’attente, standard vocal, numéros fictifs) et renvoie sa clé d’API vxk_test_… (une seule fois) et l’adresse de sa console d’essai.","tags":["Comptes d’essai"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/sandboxes/{id}":{"delete":{"summary":"Supprime une entreprise d’essai et tout son contenu.","tags":["Comptes d’essai"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/sandboxes/{id}/login-link":{"post":{"summary":"Lien de connexion (5 minutes) au panneau de l’entreprise d’essai.","tags":["Comptes d’essai"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/sandboxes/{id}/reset":{"post":{"summary":"Remet l’entreprise d’essai dans son état d’origine ; clé d’API et console inchangées.","tags":["Comptes d’essai"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/sip-servers":{"get":{"summary":"Serveurs SIP (PBX raccordés).","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmv8684qp0002q7abqpr2oefx","orgId":"cmv8684q90000q7abs5rcqq3y","name":"Centrex VoxNova","kind":"HOSTED","host":"127.0.0.1","port":5082,"transport":"UDP","domain":"demo-documentation.demo.invalid","outboundProxy":null,"mode":"GATEWAY","wssUrl":null,"registerExpires":3600,"voicemailNumber":"*97","notes":null,"lastCheckAt":null,"lastCheckOk":null,"lastCheckInfo":null,"createdAt":"2026-10-14T13:54:09.025Z","updatedAt":"2026-10-14T13:54:09.104Z","_count":{"extensions":5}}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée un serveur SIP.","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"host":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9.\\-:[\\]]+$"},"port":{"default":5060,"type":"integer","minimum":1,"maximum":65535},"transport":{"default":"UDP","type":"string","enum":["UDP","TCP","TLS"]},"domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"outboundProxy":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"mode":{"default":"GATEWAY","type":"string","enum":["GATEWAY","DIRECT"]},"wssUrl":{"anyOf":[{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},{"type":"string","const":""}]},"registerExpires":{"default":600,"type":"integer","minimum":60,"maximum":7200},"voicemailNumber":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["name","host"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/sip-servers/{id}":{"delete":{"summary":"Supprime un serveur SIP.","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie un serveur SIP.","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/sip-servers/{id}/test":{"post":{"summary":"Teste la connectivité avec le PBX (SIP OPTIONS) et, si demandé, l'URL WebSocket.","tags":["Postes et téléphones"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/sip-trunks":{"get":{"summary":"Trunks SIP de la plateforme.","tags":["Trunks SIP"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/sip-trunks/{id}":{"patch":{"summary":"Réglages modifiables par le client : adresses de son PBX, numéro de secours, libellés des numéros.","tags":["Trunks SIP"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allowedIps":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F:.]+(\\/\\d{1,3})?$"}},"targetHost":{"anyOf":[{"type":"string","maxLength":255,"pattern":"^[a-zA-Z0-9.\\-:[\\]]+$"},{"type":"null"}]},"targetPort":{"type":"integer","minimum":1,"maximum":65535},"failoverNumber":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/sip-trunks/{id}/numbers":{"get":{"summary":"Numéros présentables (pour le PBX du client).","tags":["Trunks SIP"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/sip-trunks/{id}/password":{"post":{"summary":"Génère un nouveau mot de passe pour le trunk SIP (affiché une seule fois).","tags":["Trunks SIP"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/sms":{"get":{"summary":"SMS : crédits, expéditeur, réglages.","tags":["SMS et WhatsApp"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"enabled":true,"sender":null,"credits":{"monthlyLimit":0,"monthlyUsed":0,"monthlyLeft":0,"balance":0,"available":0,"metered":{"enabled":false,"unitPriceCents":0,"unitPriceDeci":0,"cap":null,"monthUsed":0,"monthCents":0,"left":null}},"packs":[{"id":"cmwl0zk2t0007q77z855uoci3","resellerId":null,"name":"Pack 500","kind":"LIFETIME","credits":500,"priceCents":3000,"active":true,"createdAt":"2026-11-17T18:28:13.542Z"},{"id":"cmwl12icy0007q7lxfx1mvsfi","resellerId":null,"name":"Pack 500","kind":"LIFETIME","credits":500,"priceCents":3000,"active":true,"createdAt":"2026-11-17T18:30:31.283Z"}]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/sms/messages/{id}":{"get":{"summary":"Détail d’un SMS envoyé (statut de remise).","tags":["SMS et WhatsApp"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/specials":{"get":{"summary":"Numéros spéciaux et courts : blocage et plafond mensuel.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"blockPremium":true,"blockShortNumbers":true,"capCents":3000,"spentCents":0,"defaultPerMinute":0.8}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/teams":{"get":{"summary":"Microsoft Teams : état du raccordement et numéros.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"platform":{"enabled":false,"certReady":false,"port":5061,"baseDomain":"teams.sip.localhost","dns":false},"enabled":false,"fqdn":null,"gateways":[],"users":[{"id":"cmv8684rr0004q7abx95vduea","number":"100","name":"Accueil","email":null,"teamsNumber":null},{"id":"cmv8684s40006q7abi97pyqu8","number":"101","name":"Julie Martin","email":null,"teamsNumber":null}],"powershell":null}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/teams/setup":{"post":{"summary":"Mise en service : sous-domaine du SBC, enregistrement DNS, passerelles vers Microsoft.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/teams/verification":{"post":{"summary":"Code de vérification du domaine donné par Microsoft 365 (« MS=ms12345678 ») : enregistrement TXT.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","pattern":"^MS=ms\\d{6,12}$"}},"required":["value"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/telecom":{"get":{"summary":"Numéros présentables et lignes (pour configurer un PBX).","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"month":"2026-11","label":"novembre 2026","lines":[],"subtotalCents":0}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/trial":{"get":{"summary":"Période d’essai : jours et minutes restants.","tags":["Entreprise et réglages"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"isTrial":false,"trialEndsAt":null,"minutesAllowed":35,"minutesUsed":0,"requests":[]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/trial/free-numbers":{"get":{"summary":"Numéros libres proposés au client (il choisit ; l'éditeur valide).","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"area","in":"query","required":false,"schema":{"default":"01","type":"string","maxLength":12}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":["+33170489735","+33171048584"]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/trial/requests":{"post":{"summary":"Demande un numéro ou une démo étendue pendant l’essai.","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["number","extension","telemarketing"]},"area":{"type":"string","enum":["01","02","03","04","05","09"]},"number":{"type":"string","pattern":"^\\+33\\d{9}$"},"note":{"default":"","type":"string","maxLength":1000}},"required":["kind"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/troubleshoot":{"get":{"summary":"Diagnostic : postes, enregistrements, numéros, derniers appels en échec.","tags":["Support et dépannage"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"kind","in":"query","required":false,"schema":{"default":"org","type":"string","enum":["org","number","extension","user","flow"]}},{"name":"id","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"kind":"org","target":"Boulangerie Martin","org":{"id":"cmv8684q90000q7abs5rcqq3y","name":"Boulangerie Martin"},"generatedAt":"2026-11-20T22:38:57.357Z","level":"error","summary":"4 problèmes bloquants","path":["▸ +33199001234 (Accueil)","✖ aucune destination : appel rejeté"],"checks":[{"section":"Plateforme","level":"error","title":"Serveur téléphonique injoignable","fix":"Incident en cours : notre équipe est prévenue."},{"section":"Plateforme","level":"error","title":"Passerelle SIP injoignable (connexion des postes)"}],"calls":[],"text":"Diagnostic — Boulangerie Martin (Boulangerie Martin)\nLe 20/11/2026 23:38:57 — 4 problèmes bloquants\n\n✖ [Plateforme] Serveur téléphonique injoignable\n    → Incid…"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/troubleshoot/call":{"post":{"summary":"Lance un appel de test vers un poste ou un numéro.","tags":["Support et dépannage"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["ring","between","inbound"]},"extensionId":{"type":"string","maxLength":40},"toExtensionId":{"type":"string","maxLength":40},"number":{"type":"string","maxLength":30}},"required":["kind"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/troubleshoot/targets":{"get":{"summary":"Cibles possibles pour l’appel de test.","tags":["Support et dépannage"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"numbers":[{"id":"+33199001234","label":"+33199001234 — Accueil"}],"extensions":[{"id":"cmv8684rr0004q7abx95vduea","label":"100 — Accueil"},{"id":"cmv8684s40006q7abi97pyqu8","label":"101 — Julie Martin"}],"flows":[{"id":"cmwjdjq2o000hq7rrofua0gzt","label":"Accueil horaires"}]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/troubleshoot/ticket":{"post":{"summary":"Ouvre un ticket de support avec le diagnostic joint.","tags":["Support et dépannage"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"default":"org","type":"string","enum":["org","number","extension","user","flow"]},"id":{"type":"string","maxLength":100},"message":{"default":"","type":"string","maxLength":5000}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/twilio-compat":{"get":{"summary":"Compatibilité Twilio : Account SID de l’entreprise (null s’il n’est pas encore créé) et adresses à utiliser à la place de celles de Twilio.","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"accountSid":null,"endpoints":{"api":"http://localhost:5173/api/twilio","verify":"http://localhost:5173/api/twilio/verify","lookups":"http://localhost:5173/api/twilio/lookups"}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/twilio-compat/token":{"post":{"summary":"Crée les identifiants de compatibilité Twilio, ou un nouvel Auth Token (l’ancien cesse de fonctionner). Le jeton n’est affiché qu’une fois. Voir le guide « Compatibilité Twilio ».","tags":["Intégrations"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/users":{"get":{"summary":"Utilisateurs.","tags":["Utilisateurs"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmv8684t7000eq7aboj5azw5o","email":"demo-documentation@hcloud.invalid","name":"Julie Martin","role":"ORG_ADMIN","orgId":"cmv8684q90000q7abs5rcqq3y","locale":"fr","status":"ACTIVE","permissions":[],"emailVerified":true,"newsletterOptOut":false,"lastLoginAt":null,"createdAt":"2026-10-14T13:54:09.116Z","extensions":[],"devices":[{"id":"cmv8dw7680001q7bay9ov0htz","platform":"WEB","name":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/153.0.0.0 Safari/537.36","lastSeenAt":"2026-10-14T17:28:49.232Z"},{"id":"cmv8685xp05jeq786sg9tlpux","platform":"WEB","name":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/153.0.0.0 Safari/537.36","lastSeenAt":"2026-10-14T13:54:10.573Z"}],"presence":"offline"},{"id":"cmwjdhkg40001q7e0y8y40faf","email":"demo-utilisateur@hcloud.invalid","name":"Thomas Bernard","role":"USER","orgId":"cmv8684q90000q7abs5rcqq3y","locale":"fr","status":"ACTIVE","permissions":[],"emailVerified":false,"newsletterOptOut":false,"lastLoginAt":null,"createdAt":"2026-11-16T14:42:36.868Z","extensions":[{"id":"cmv8684sf0008q7abh4b8ftyw","number":"102"}],"devices":[],"presence":"offline"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crée un utilisateur.","tags":["Utilisateurs"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","minLength":2,"maxLength":100},"role":{"default":"USER","type":"string","enum":["USER","ORG_ADMIN"]},"sendInvite":{"default":true,"type":"boolean"},"createExtension":{"type":"object","properties":{"sipServerId":{"type":"string"},"number":{"type":"string"},"authUsername":{"type":"string"},"password":{"type":"string"}},"required":["sipServerId","number"]}},"required":["email","name"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/users/{id}":{"delete":{"summary":"Supprime un utilisateur.","tags":["Utilisateurs"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Modifie un utilisateur.","tags":["Utilisateurs"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["USER","ORG_ADMIN"]},"status":{"type":"string","enum":["ACTIVE","DISABLED"]},"syncExtensions":{"default":true,"type":"boolean"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/users/{id}/invite":{"post":{"summary":"Renvoie l’invitation par e-mail.","tags":["Utilisateurs"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/users/{id}/permissions":{"put":{"summary":"Rôles spécialisés : un utilisateur voit certaines données de l'entreprise (journal des appels…).","tags":["Utilisateurs"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"permissions":{"maxItems":10,"type":"array","items":{"type":"string","enum":["cdr","stats","supervision","satisfaction"]}}},"required":["permissions"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/users/{id}/provisioning":{"post":{"summary":"QR code de connexion pour l'application mobile d'un collaborateur.","tags":["Utilisateurs"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/org/users/{id}/security-reset":{"post":{"summary":"Collaborateur qui a perdu son téléphone : double authentification et verrouillage réinitialisés.","tags":["Utilisateurs"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/porting":{"get":{"summary":"Demandes de portabilité de l’entreprise.","tags":["Portabilité"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdk0xj0007q7ejkmv67086","orgId":"cmv8684q90000q7abs5rcqq3y","numbers":["+33478112233"],"numberType":"FIXE","holderName":"Boulangerie Martin","siret":"","address":"","currentOperator":"Opérateur actuel","rio":"","desiredDate":null,"contactName":"Julie Martin","contactEmail":"demo-documentation@hcloud.invalid","contactPhone":"","notes":"","files":[],"operatorLookup":[],"signDocumentId":null,"signRecipientId":null,"signUrl":null,"signSentAt":null,"signedAt":null,"signReminders":0,"status":"SUBMITTED","scheduledAt":null,"adminNote":"","history":[],"createdBy":"demo","createdAt":"2026-11-16T14:44:31.543Z","updatedAt":"2026-11-16T14:44:31.543Z"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Nouvelle demande : formulaire (champ « data », JSON) + documents (facture, mandat signé ; PDF ou image, 10 Mo).","tags":["Portabilité"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["numbers","holderName","contactName","contactEmail"],"properties":{"numbers":{"type":"string","description":"Numéros à porter, séparés par des virgules (200 au plus)"},"numberType":{"type":"string","enum":["FIXE","MOBILE"],"default":"FIXE"},"holderName":{"type":"string","description":"Titulaire de la ligne chez l’opérateur actuel"},"siret":{"type":"string"},"address":{"type":"string"},"rio":{"type":"string","description":"Obligatoire pour un mobile (12 caractères)"},"desiredDate":{"type":"string","format":"date"},"contactName":{"type":"string"},"contactEmail":{"type":"string","format":"email"},"contactPhone":{"type":"string"},"notes":{"type":"string"},"file":{"type":"string","format":"binary","description":"Facture récente ou mandat signé (facultatif quand le mandat est signé en ligne), jusqu’à 5 fichiers"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/porting/{id}/cancel":{"post":{"summary":"Annule une demande de portabilité (avant la date fixée).","tags":["Portabilité"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/porting/{id}/check-signature":{"post":{"summary":"Retour du client après signature : état vérifié tout de suite (sans attendre le webhook).","tags":["Portabilité"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/porting/{id}/files/{index}":{"get":{"summary":"Document joint (client propriétaire ou éditeur).","tags":["Portabilité"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/porting/{id}/sign":{"get":{"summary":"Lien de signature du mandat (reprise d'une signature commencée).","tags":["Portabilité"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/porting/config":{"get":{"summary":"Réglages utiles au formulaire : mandat signé en ligne (pas de document à joindre).","tags":["Portabilité"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"esign":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/porting/operator":{"get":{"summary":"Opérateur actuel d'un numéro, pendant la saisie de la demande (bases de portabilité).","tags":["Portabilité"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"number","in":"query","required":true,"schema":{"type":"string","minLength":9,"maxLength":20}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/satisfaction":{"get":{"summary":"Résultats des enquêtes de satisfaction.","tags":["Satisfaction"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"addon":true,"surveys":[{"id":"cmv8dvzq30003q7ec0r6kjfkq","orgId":"cmv8684q90000q7abs5rcqq3y","name":"Satisfaction après appel","enabled":true,"maxScore":5,"introAudioId":null,"thanksAudioId":null,"invalidAudioId":null,"criteria":[{"id":"acc","label":"Accueil","audioId":"demo-sat-audio"},{"id":"rap","label":"Rapidité","audioId":"demo-sat-audio"}],"allQueues":true,"queueIds":[],"extensionIds":[],"createdAt":"2026-10-14T17:28:39.580Z","updatedAt":"2026-10-14T17:28:39.580Z","_count":{"responses":133},"responses":133}]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/satisfaction/export.csv":{"get":{"summary":"Export CSV des réponses.","tags":["Satisfaction"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"days","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":366}},{"name":"surveyId","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"queueId","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"agent","in":"query","required":false,"schema":{"type":"string","maxLength":20}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/satisfaction/report":{"get":{"summary":"Rapport par agent, file et critère.","tags":["Satisfaction"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"days","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":366}},{"name":"surveyId","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"queueId","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"agent","in":"query","required":false,"schema":{"type":"string","maxLength":20}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"responses":0,"complete":0,"average":null,"csat":null,"responseRate":null,"eligible":0,"byCriterion":[],"byAgent":[],"byQueue":[],"trend":[],"distribution":[0,0],"recent":[],"criteria":{"acc":"Accueil","rap":"Rapidité","sol":"Solution apportée"},"previous":{"average":3.8,"csat":48,"responses":102,"responseRate":null}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/satisfaction/surveys":{"post":{"summary":"Crée une enquête.","tags":["Satisfaction"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"enabled":{"default":true,"type":"boolean"},"maxScore":{"default":5,"type":"integer","minimum":2,"maximum":9},"introAudioId":{"default":null,"type":["string","null"]},"thanksAudioId":{"default":null,"type":["string","null"]},"invalidAudioId":{"default":null,"type":["string","null"]},"criteria":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":20},"label":{"type":"string","minLength":1,"maxLength":60},"audioId":{"type":["string","null"]}},"required":["label","audioId"]}},"allQueues":{"default":false,"type":"boolean"},"queueIds":{"default":[],"maxItems":100,"type":"array","items":{"type":"string"}},"extensionIds":{"default":[],"maxItems":500,"type":"array","items":{"type":"string"}}},"required":["name","criteria"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/satisfaction/surveys/{id}":{"delete":{"summary":"Supprime une enquête.","tags":["Satisfaction"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie une enquête.","tags":["Satisfaction"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"enabled":{"default":true,"type":"boolean"},"maxScore":{"default":5,"type":"integer","minimum":2,"maximum":9},"introAudioId":{"default":null,"type":["string","null"]},"thanksAudioId":{"default":null,"type":["string","null"]},"invalidAudioId":{"default":null,"type":["string","null"]},"criteria":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":20},"label":{"type":"string","minLength":1,"maxLength":60},"audioId":{"type":["string","null"]}},"required":["label","audioId"]}},"allQueues":{"default":false,"type":"boolean"},"queueIds":{"default":[],"maxItems":100,"type":"array","items":{"type":"string"}},"extensionIds":{"default":[],"maxItems":500,"type":"array","items":{"type":"string"}}},"required":["name","criteria"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/search":{"get":{"summary":"Recherche globale (contacts, collègues, appels, numéros).","tags":["Espace utilisateur"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":100}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/services":{"get":{"summary":"Services proposés (internet, mobile, cybersécurité) et leurs offres.","tags":["Services"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"orders":[{"id":"cmwjdjq36000vq7rrmpluo24p","orgId":"cmv8684q90000q7abs5rcqq3y","kind":"fiber","status":"REQUESTED","title":"Accès internet","address":null,"offer":null,"priceMonthlyCents":0,"priceSetupCents":0,"details":{},"adminNote":"","history":[],"createdBy":"demo","createdAt":"2026-11-16T14:44:17.490Z","updatedAt":"2026-11-16T14:44:17.490Z"}],"boxTests":[],"statusLabels":{"REQUESTED":"Demande reçue","QUOTED":"Devis envoyé","ORDERED":"Commandé","SCHEDULED":"Installation planifiée","ACTIVE":"En service","CANCELLED":"Annulé"},"telephony":null,"eligibilityAvailable":true,"cyber":[{"cta":{"href":"/contact","label":"Demander"},"from":false,"name":"Cyber Poste","unit":"","badge":"","tagline":"Protection pour un poste","features":["Sauvegardes quotidiennes","Antivirus nouvelle génération"],"highlight":false,"priceCents":null},{"cta":{"href":"/contact","label":"Demander"},"from":false,"name":"Cyber VM","unit":"","badge":"","tagline":"Protection d’une machine virtuelle","features":["Sauvegarde et restauration","Copies immuables"],"highlight":true,"priceCents":null}],"mobile":[{"cta":{"href":"/contact","label":"Demander un devis"},"from":false,"name":"Essential","unit":"","badge":"","tagline":"Pour les besoins essentiels","features":["Appels et SMS illimités en France","Data selon le forfait"],"highlight":false,"priceCents":null},{"cta":{"href":"/contact","label":"Demander un devis"},"from":false,"name":"Professional","unit":"","badge":"Populaire","tagline":"L’offre la plus demandée","features":["150 Go","Appels et SMS illimités, international inclus"],"highlight":true,"priceCents":null}]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/services/box-tests":{"post":{"summary":"Enregistre le résultat d’un test de box (débit, latence).","tags":["Services"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"downMbps":{"type":"number","minimum":0,"maximum":100000},"upMbps":{"type":"number","minimum":0,"maximum":100000},"pingMs":{"type":"number","minimum":0,"maximum":60000},"jitterMs":{"type":"number","minimum":0,"maximum":60000},"orderId":{"type":"string"}},"required":["downMbps","upMbps","pingMs","jitterMs"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/services/eligibility":{"post":{"summary":"Test d’éligibilité d’une adresse à la fibre : offres disponibles et prix.","tags":["Services"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"object","properties":{"label":{"type":"string","minLength":5,"maxLength":200},"housenumber":{"type":"string","maxLength":10},"street":{"type":"string","maxLength":150},"postcode":{"type":"string","pattern":"^\\d{5}$"},"city":{"type":"string","maxLength":100},"citycode":{"type":"string","pattern":"^\\w{5}$"},"rivoli":{"type":"string","maxLength":6},"lon":{"type":"number","minimum":-180,"maximum":180},"lat":{"type":"number","minimum":-90,"maximum":90}},"required":["label","housenumber","street","postcode","city","citycode","rivoli","lon","lat"]}},"required":["address"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/services/orders":{"get":{"summary":"Commandes de services de l’entreprise.","tags":["Services"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdjq36000vq7rrmpluo24p","orgId":"cmv8684q90000q7abs5rcqq3y","kind":"fiber","status":"REQUESTED","title":"Accès internet","address":null,"offer":null,"priceMonthlyCents":0,"priceSetupCents":0,"details":{},"adminNote":"","history":[],"createdBy":"demo","createdAt":"2026-11-16T14:44:17.490Z","updatedAt":"2026-11-16T14:44:17.490Z"}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Demande de service : pas d'achat immédiat, l'éditeur confirme (devis, commande, installation).","tags":["Services"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"FIBRE"},"address":{"type":"object","properties":{"label":{"type":"string","minLength":5,"maxLength":200},"housenumber":{"type":"string","maxLength":10},"street":{"type":"string","maxLength":150},"postcode":{"type":"string","pattern":"^\\d{5}$"},"city":{"type":"string","maxLength":100},"citycode":{"type":"string","pattern":"^\\w{5}$"},"rivoli":{"type":"string","maxLength":6},"lon":{"type":"number","minimum":-180,"maximum":180},"lat":{"type":"number","minimum":-90,"maximum":90}},"required":["label","housenumber","street","postcode","city","citycode","rivoli","lon","lat"]},"offerId":{"type":"string","maxLength":60},"engagementMonths":{"default":36,"anyOf":[{"type":"number","const":12},{"type":"number","const":24},{"type":"number","const":36}]},"smoothFees":{"default":false,"type":"boolean"},"contactPhone":{"default":"","type":"string","maxLength":40},"notes":{"default":"","type":"string","maxLength":2000}},"required":["kind","address","offerId"]},{"type":"object","properties":{"kind":{"type":"string","const":"CYBER"},"offer":{"type":"string","minLength":1,"maxLength":120},"quantity":{"default":1,"type":"integer","minimum":1,"maximum":10000},"notes":{"default":"","type":"string","maxLength":2000}},"required":["kind","offer"]},{"type":"object","properties":{"kind":{"type":"string","const":"MOBILE"},"offer":{"default":"","type":"string","maxLength":120},"quantity":{"default":1,"type":"integer","minimum":1,"maximum":10000},"notes":{"default":"","type":"string","maxLength":2000}},"required":["kind"]}]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/services/orders/{id}/cancel":{"post":{"summary":"Annule une commande pas encore passée.","tags":["Services"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/services/speedtest/down":{"get":{"summary":"Test de débit descendant (téléchargement).","tags":["Services"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"mb","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":50}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/services/speedtest/ping":{"get":{"summary":"Test de latence.","tags":["Services"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"t":1795214338098}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/services/speedtest/up":{"post":{"summary":"Test de débit montant (envoi).","tags":["Services"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/simple/numbers/{id}":{"put":{"summary":"Destination d'un numéro : un utilisateur, plusieurs (sonnerie simultanée) ou une messagerie.","tags":["Numéros"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["user","group","voicemail","none"]},"extIds":{"default":[],"maxItems":50,"type":"array","items":{"type":"string"}},"label":{"type":"string","maxLength":100}},"required":["mode"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/simple/overview":{"get":{"summary":"Mode simple : vue d’ensemble (utilisateurs, numéros, accueil, appels en cours).","tags":["Entreprise et réglages"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"org":{"id":"cmv8684q90000q7abs5rcqq3y","name":"Boulangerie Martin","sipDomain":"demo-documentation.demo.invalid","status":"ACTIVE","trialEndsAt":null,"maxChannels":null,"mohId":null,"simpleMode":false},"license":null,"usage":{"users":5,"seats":0,"numbers":1,"liveCalls":0,"phonesOnline":0},"users":[{"extensionId":"cmv8684rr0004q7abx95vduea","number":"100","name":"Accueil","enabled":true,"outboundCallerId":null,"voicemailEmail":null,"forwardNoAnswer":null,"dnd":false,"emergencyPostalCode":null,"emergencyInsee":null,"emergencyCity":null,"user":null,"appOnline":false,"phones":[]},{"extensionId":"cmv8684s40006q7abi97pyqu8","number":"101","name":"Julie Martin","enabled":true,"outboundCallerId":null,"voicemailEmail":null,"forwardNoAnswer":null,"dnd":false,"emergencyPostalCode":null,"emergencyInsee":null,"emergencyCity":null,"user":null,"appOnline":false,"phones":[]}],"numbers":[{"id":"cmwjdjq2h000bq7rrooociqwr","number":"+33199001234","label":"Accueil","mode":"none","extIds":[],"summary":"Non attribué"}],"holdMusic":[],"nextNumber":"105"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/simple/users":{"post":{"summary":"Ajout d'un utilisateur : son poste, et éventuellement son compte (e-mail) et son numéro direct.","tags":["Utilisateurs"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""}]},"number":{"anyOf":[{"type":"string","pattern":"^\\d{2,6}$"},{"type":"string","const":""}]},"numberId":{"type":["string","null"]},"role":{"default":"USER","type":"string","enum":["USER","ORG_ADMIN"]},"sendInvite":{"default":true,"type":"boolean"}},"required":["name"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/simple/users/{id}":{"delete":{"summary":"Supprime un utilisateur.","tags":["Utilisateurs"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie un utilisateur.","tags":["Utilisateurs"],"x-access":"admin","description":"Droits : Administrateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/support/meta":{"get":{"summary":"Support : disponible ou non (clients d’un revendeur : support assuré par le revendeur), catégories.","tags":["Support et dépannage"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"available":true,"categories":{"technique":"Appels et téléphones","facturation":"Facturation","portabilite":"Portabilité","internet":"Fibre et Internet","mobile":"Mobile","compte":"Compte et accès","commercial":"Commercial","autre":"Autre"},"statuses":{"OPEN":"Nouveau","IN_PROGRESS":"En cours","WAITING_CUSTOMER":"En attente de votre réponse","RESOLVED":"Résolu","CLOSED":"Fermé"}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/support/tickets":{"get":{"summary":"Tickets de support de l’entreprise.","tags":["Support et dépannage"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"status","in":"query","required":false,"schema":{"default":"all","type":"string","enum":["open","closed","all"]}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Ouvre un ticket (multipart possible : pièce jointe dans file).","tags":["Support et dépannage"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"$ref":"#/components/parameters/User"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["subject","body"],"properties":{"subject":{"type":"string"},"body":{"type":"string"},"category":{"type":"string"},"priority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"]},"file":{"type":"string","format":"binary","description":"Pièce jointe (facultative)"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/support/tickets/{id}":{"get":{"summary":"Détail d’un ticket et ses messages.","tags":["Support et dépannage"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/support/tickets/{id}/close":{"post":{"summary":"Ferme un ticket résolu (note de satisfaction facultative).","tags":["Support et dépannage"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/support/tickets/{id}/files/{msg}/{file}":{"get":{"summary":"Télécharge une pièce jointe.","tags":["Support et dépannage"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"msg","in":"path","required":true,"schema":{"type":"string"}},{"name":"file","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/support/tickets/{id}/reply":{"post":{"summary":"Répond dans un ticket.","tags":["Support et dépannage"],"x-access":"user","description":"Droits : Utilisateur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/User"}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/v1/callbacks":{"post":{"summary":"Demander à être rappelé (file d’attente ou poste)","tags":["Appels et journal"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["phone","targetType","targetId"],"properties":{"phone":{"type":"string","minLength":6,"maxLength":25},"name":{"type":"string","maxLength":100},"note":{"type":"string","maxLength":300},"targetType":{"enum":["queue","extension"]},"targetId":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}},"x-access":"admin","description":""}},"/api/v1/verify":{"post":{"summary":"Envoyer un code de vérification (SMS, WhatsApp, ou WhatsApp sinon SMS)","description":"Code à usage unique tiré au hasard, jamais renvoyé ni stocké en clair. Nouveau code si une vérification est en cours pour ce numéro. Limites : 1 envoi / 30 s et 5 / heure par numéro, 1 000 / heure par entreprise ; numéros surtaxés refusés. Compté comme un SMS transactionnel (étiquette verify).","tags":["SMS et WhatsApp"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["to"],"properties":{"to":{"type":"string","description":"Numéro du destinataire"},"channel":{"enum":["sms","whatsapp","auto"],"default":"sms"},"codeLength":{"type":"integer","minimum":4,"maximum":10,"default":6},"ttlSeconds":{"type":"integer","minimum":60,"maximum":1800,"default":600},"brand":{"type":"string","maxLength":30,"description":"Nom affiché dans le message (défaut : votre entreprise)"},"locale":{"enum":["fr","en"],"default":"fr"},"tag":{"type":"string","maxLength":100}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Verification"}}}}},"x-access":"admin"}},"/api/v1/verify/check":{"post":{"summary":"Contrôler le code saisi","description":"Par identifiant de vérification, ou par numéro (dernière vérification en cours). valid: true une seule fois ; 5 essais au plus, ensuite status: failed.","tags":["SMS et WhatsApp"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["code"],"properties":{"id":{"type":"string"},"to":{"type":"string"},"code":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Verification"},{"type":"object","properties":{"valid":{"type":"boolean"}}}]}}}}},"x-access":"admin"}},"/api/v1/verify/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"}],"get":{"summary":"État d’une vérification (pending, approved, expired, failed, canceled)","tags":["SMS et WhatsApp"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Verification"}}}}},"x-access":"admin","description":""}},"/api/v1/verify/{id}/cancel":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"}],"post":{"summary":"Annuler une vérification en cours","tags":["SMS et WhatsApp"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Verification"}}}}},"x-access":"admin","description":""}},"/api/v1/lookup/{number}":{"parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"string"},"description":"Numéro (national ou E.164 encodé : %2B33…)"}],"get":{"summary":"Consulter un numéro : validité, pays, type de ligne (mobile, fixe, VoIP, gratuit, surtaxé, objets connectés), formats national et international","description":"Calculé à partir du plan de numérotation, sans service extérieur ni enregistrement. L’opérateur n’est pas indiqué (carrier: null) : avec la portabilité, l’opérateur d’origine ne dit pas qui exploite le numéro.","tags":["Numéros"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lookup"}}}}},"x-access":"admin"}},"/api/v1/call-context/{token}":{"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"},"description":"Jeton de l’appel (en-tête SIP X-VX-Ctx reçu par le softphone)"}],"get":{"summary":"Contexte d’un appel passé par un scénario : fiche CRM, variables (code tapé, client identifié…), appelant, numéro appelé. Pour un softphone intégré à votre logiciel (webphone : option resolveContext).","tags":["Appels et journal"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"caller":{"type":"string"},"did":{"type":"string"},"crmUrl":{"type":["string","null"]},"openOnAnswer":{"type":"boolean"},"vars":{"type":"object"}}}}}}},"x-access":"admin","description":""}},"/api/v1/callbacks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"}],"get":{"summary":"État d’une demande de rappel","tags":["Appels et journal"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}},"x-access":"admin","description":""}},"/api/v1/cdr":{"get":{"summary":"Journal des appels","tags":["Appels et journal"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}},"x-access":"admin","description":""}},"/api/v1/recordings":{"get":{"summary":"Enregistrements (instruction record)","tags":["Appels et journal"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"callId","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}},"x-access":"admin","description":""}},"/api/v1/recordings/{id}/url":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"}],"post":{"summary":"Lien d’écoute signé (5 min, lecture en continu)","tags":["Appels et journal"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expiresIn":{"type":"integer"}}}}}}},"x-access":"admin","description":""}},"/api/v1/recordings/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"}],"delete":{"summary":"Supprimer","tags":["Appels et journal"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}}},"x-access":"admin","description":""}},"/api/v1/click-to-call":{"parameters":[{"$ref":"#/components/parameters/Organization"},{"$ref":"#/components/parameters/IdempotencyKey"}],"post":{"summary":"Clic pour appeler : le poste sonne, puis le numéro est appelé au décroché (droits du poste)","tags":["Appels et journal"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["to"],"properties":{"to":{"type":"string","description":"Numéro à appeler (chiffres, +, *, #)","example":"0612345678"},"extension":{"type":"string","description":"Poste qui sonne : identifiant ou numéro interne (ou « user »)","example":"101"},"user":{"type":"string","description":"Utilisateur dont le poste sonne : identifiant ou e-mail (au lieu de « extension »)"},"autoAnswer":{"type":"boolean","default":false,"description":"Décroché automatique du poste (applications VoxNova, téléphones de bureau compatibles)"},"label":{"type":"string","description":"Nom affiché sur le poste qui sonne","example":"Client Dupont"}}}}}},"responses":{"201":{"description":"Appel lancé","content":{"application/json":{"schema":{"type":"object","properties":{"callId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["ringing","dialing","in_progress","completed","not_answered","failed"]},"extension":{"type":"string"},"to":{"type":"string"},"durationSec":{"type":"integer"},"hangupCause":{"type":"string"}}}}}}},"x-access":"admin","description":""}},"/api/v1/click-to-call/{id}":{"parameters":[{"$ref":"#/components/parameters/Organization"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"callId renvoyé au lancement"}],"get":{"summary":"État : ringing (le poste sonne), dialing (numéro composé), in_progress, completed, not_answered, failed","tags":["Appels et journal"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"callId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["ringing","dialing","in_progress","completed","not_answered","failed"]},"extension":{"type":"string"},"to":{"type":"string"},"durationSec":{"type":"integer"},"hangupCause":{"type":"string"}}}}}}},"x-access":"admin","description":""},"delete":{"summary":"Raccrocher (qu’il sonne encore ou soit en cours)","tags":["Appels et journal"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"callId":{"type":"string"},"cancelled":{"type":"boolean"}}}}}}},"x-access":"admin","description":""}},"/api/v1/sms":{"get":{"summary":"Liste des SMS (filtres : status, to, tag, since)","tags":["SMS et WhatsApp"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","maximum":100}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"to","in":"query","schema":{"type":"string"}},{"name":"tag","in":"query","schema":{"type":"string"}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}},{"$ref":"#/components/parameters/Organization"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Sms"}},"total":{"type":"integer"},"page":{"type":"integer"}}}}}}},"x-access":"admin","description":""},"post":{"summary":"Envoyer un SMS : mis en file, part en quelques secondes ; statuts par webhook sms.status ou GET /api/v1/sms/{id}","tags":["SMS et WhatsApp"],"parameters":[{"$ref":"#/components/parameters/Organization"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sms"}}}}},"x-access":"admin","description":""}},"/api/v1/sms/callback-secret":{"get":{"summary":"Secret de signature des rappels de statut propres à un message (statusCallback) : X-VoxNova-Signature: sha256=<HMAC-SHA256 du corps>","tags":["SMS et WhatsApp"],"parameters":[{"$ref":"#/components/parameters/Organization"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"}}}}}}},"x-access":"admin","description":""}},"/api/v1/sms/balance":{"get":{"summary":"Crédits SMS : forfait du mois et solde à vie","tags":["SMS et WhatsApp"],"parameters":[{"$ref":"#/components/parameters/Organization"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsCredits"}}}}},"x-access":"admin","description":""}},"/api/v1/sms/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant ou messageId du fournisseur"},{"$ref":"#/components/parameters/Organization"}],"get":{"summary":"Un SMS et ses événements de remise (accepted, sent, delivered…)","tags":["SMS et WhatsApp"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sms"}}}}},"x-access":"admin","description":""}},"/api/v1/webhooks":{"parameters":[{"$ref":"#/components/parameters/Organization"}],"get":{"summary":"Webhooks de l’entreprise","tags":["Intégrations"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}}}},"x-access":"admin","description":""},"post":{"summary":"Créer un webhook (le secret de signature est renvoyé une fois)","tags":["Intégrations"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}}},"x-access":"admin","description":""}},"/api/v1/webhooks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"},{"$ref":"#/components/parameters/Organization"}],"patch":{"summary":"Modifier","tags":["Intégrations"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}}},"x-access":"admin","description":""},"delete":{"summary":"Supprimer","tags":["Intégrations"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}}},"x-access":"admin","description":""}},"/api/v1/porting":{"get":{"summary":"Demandes de portabilité (filtres : status, number)","tags":["Portabilité"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","maximum":100}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"number","in":"query","schema":{"type":"string"}},{"$ref":"#/components/parameters/Organization"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Porting"}},"total":{"type":"integer"},"page":{"type":"integer"}}}}}}},"x-access":"admin","description":""},"post":{"summary":"Demander la portabilité de numéros (JSON avec documents en base64, ou multipart : champ data + fichiers)","tags":["Portabilité"],"parameters":[{"$ref":"#/components/parameters/Organization"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortingInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Porting"}}}}},"x-access":"admin","description":""}},"/api/v1/porting/config":{"get":{"summary":"Mandat signé en ligne (esign) et limites des documents","tags":["Portabilité"],"parameters":[{"$ref":"#/components/parameters/Organization"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"esign":{"type":"boolean"},"documents":{"type":"object"}}}}}}},"x-access":"admin","description":""}},"/api/v1/porting/operator":{"get":{"summary":"Opérateur actuel d’un numéro (bases de portabilité)","tags":["Portabilité"],"parameters":[{"name":"number","in":"query","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Organization"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operator":{"type":["string","null"]},"inProgress":{"type":["boolean","null"]}}}}}}},"x-access":"admin","description":""}},"/api/v1/porting/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"},{"$ref":"#/components/parameters/Organization"}],"get":{"summary":"Une demande : état, historique, documents","tags":["Portabilité"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Porting"}}}}},"x-access":"admin","description":""}},"/api/v1/porting/{id}/sign":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"},{"$ref":"#/components/parameters/Organization"}],"get":{"summary":"Lien de signature du mandat (état AWAITING_SIGNATURE)","tags":["Portabilité"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}}}}}}},"x-access":"admin","description":""}},"/api/v1/porting/{id}/files/{index}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"},{"name":"index","in":"path","required":true,"schema":{"type":"string"},"description":"Position du document"},{"$ref":"#/components/parameters/Organization"}],"get":{"summary":"Télécharger un document","tags":["Portabilité"],"responses":{"200":{"description":"Fichier"}},"x-access":"admin","description":""}},"/api/v1/porting/{id}/cancel":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"},{"$ref":"#/components/parameters/Organization"}],"post":{"summary":"Annuler une demande (états : mandat à signer, reçue, en cours ; plus possible une fois la date de portage fixée)","tags":["Portabilité"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Porting"}}}}},"x-access":"admin","description":""}},"/api/v1/voicemail":{"get":{"summary":"Boîtes vocales et messages (filtres : extension, unread)","tags":["Espace utilisateur"],"parameters":[{"name":"extension","in":"query","schema":{"type":"string"},"description":"Identifiant ou numéro du poste"},{"name":"unread","in":"query","schema":{"type":"boolean"}},{"$ref":"#/components/parameters/Organization"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"boxes":{"type":"array","items":{"$ref":"#/components/schemas/VoicemailBox"}},"unread":{"type":"integer"}}}}}}},"x-access":"admin","description":""}},"/api/v1/voicemail/{ext}/{uuid}":{"parameters":[{"name":"ext","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant ou numéro du poste"},{"name":"uuid","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant du message"},{"$ref":"#/components/parameters/Organization"}],"get":{"summary":"Un message","tags":["Espace utilisateur"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoicemailMessage"}}}}},"x-access":"admin","description":""},"delete":{"summary":"Supprimer un message","tags":["Espace utilisateur"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}}},"x-access":"admin","description":""}},"/api/v1/voicemail/{ext}/{uuid}/url":{"parameters":[{"name":"ext","in":"path","required":true,"schema":{"type":"string"},"description":"Poste"},{"name":"uuid","in":"path","required":true,"schema":{"type":"string"},"description":"Message"},{"$ref":"#/components/parameters/Organization"}],"post":{"summary":"Lien d’écoute signé (5 min, lecture en continu) ; marque le message lu","tags":["Espace utilisateur"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expiresIn":{"type":"integer"}}}}}}},"x-access":"admin","description":""}},"/api/v1/voicemail/{ext}/{uuid}/read":{"parameters":[{"name":"ext","in":"path","required":true,"schema":{"type":"string"},"description":"Poste"},{"name":"uuid","in":"path","required":true,"schema":{"type":"string"},"description":"Message"},{"$ref":"#/components/parameters/Organization"}],"post":{"summary":"Marquer lu / non lu","tags":["Espace utilisateur"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["read"],"properties":{"read":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}}},"x-access":"admin","description":""}}}}