{"openapi":"3.1.0","info":{"title":"API VoxNova — plateforme développeurs","version":"1.0.0","description":"Téléphonie programmable : endpoints SIP (téléphones, softphones, applications), numéros, appels et dial plan en code.\n\n**Authentification** : `Authorization: Bearer vxk_…` (clé d’entreprise, portail développeurs) ou `Authorization: Bearer vxr_…` (clé revendeur).\n\n**Revendeurs** : avec une clé `vxr_…`, les routes `/api/reseller/*` gèrent votre activité (clients, offres, factures, SMS, webhooks) ; en ajoutant `X-Organization: <identifiant du client>`, TOUTES les routes du panneau d’un client (utilisateurs, postes, files, scénarios d’appel, numéros…) et de l’API v1 sont utilisables à sa place. Vous pouvez ainsi construire votre propre espace client.\n\n**Dial plan en code** : un numéro (ou un endpoint) relié à une application déclenche un `POST` signé vers son `voiceUrl`.\nVotre serveur répond par une liste JSON d’instructions (`play`, `say`, `gather`, `dial`, `record`, `pause`, `set`, `redirect`,\n`queue`, `conference`, `voicemail`, `transfer`, `hangup`). Les instructions avec `action` rappellent cette URL avec le résultat\n(`digits`, `dial.status`, `recording`). Signature : en-tête `X-VoxNova-Signature: t=<ts>,v1=<hex>` = HMAC-SHA256(secret, \"<ts>.<corps>\").\n\nVoir la documentation complète : chapitre « Plateforme développeurs »."},"servers":[{"url":"https://api.hcloud.fr"}],"security":[{"apiKey":[]},{"resellerKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Clé API d’entreprise vxk_…"},"resellerKey":{"type":"http","scheme":"bearer","description":"Clé API revendeur vxr_… : routes /api/reseller/*, et avec l’en-tête X-Organization toutes les routes du panneau et de l’API v1 au nom d’un de vos clients"}},"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,"description":"Avec une clé revendeur et X-Organization : identifiant ou e-mail d’un utilisateur du client, au nom duquel agir. Toutes les routes `/api/me/…` (softphone, messagerie, contacts, historique) deviennent utilisables pour construire votre espace utilisateur.","schema":{"type":"string"}},"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"}}}},"paths":{"/api/v1/account":{"get":{"summary":"Compte, limites et utilisation","tags":["Compte"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/usage":{"get":{"summary":"Consommation du mois en cours (numéros, minutes)","tags":["Compte"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/applications":{"get":{"summary":"Liste des applications","tags":["Applications"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Application"}}}}}}},"post":{"summary":"Créer une application","tags":["Applications"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}}}}},"/api/v1/applications/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"}],"get":{"summary":"Détail","tags":["Applications"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}}}},"patch":{"summary":"Modifier","tags":["Applications"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}}}},"delete":{"summary":"Supprimer (les numéros reliés sont détachés)","tags":["Applications"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}}}}},"/api/v1/applications/{id}/secret":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"}],"post":{"summary":"Nouvelle clé de signature","tags":["Applications"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}}}}},"/api/v1/endpoints":{"get":{"summary":"Liste des endpoints SIP (état d’enregistrement)","tags":["Endpoints"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Endpoint"}}}}}}},"post":{"summary":"Créer un endpoint SIP","tags":["Endpoints"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointInput"}}}},"responses":{"201":{"description":"Créé","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Endpoint"}}}}}}},"/api/v1/endpoints/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant ou numéro interne"}],"get":{"summary":"Détail avec identifiants SIP et enregistrements","tags":["Endpoints"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Endpoint"}}}}}},"patch":{"summary":"Modifier","tags":["Endpoints"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Endpoint"}}}}}},"delete":{"summary":"Supprimer","tags":["Endpoints"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}}}}},"/api/v1/endpoints/{id}/registrations":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"}],"get":{"summary":"Appareils enregistrés","tags":["Endpoints"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Registration"}}}}}}}},"/api/v1/endpoints/{id}/password":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"}],"post":{"summary":"Générer un nouveau mot de passe SIP (déconnecte les appareils)","tags":["Endpoints"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Endpoint"}}}}}}},"/api/v1/endpoints/{id}/disconnect":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"}],"post":{"summary":"Déconnecter les appareils enregistrés","tags":["Endpoints"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}}}}},"/api/v1/numbers":{"get":{"summary":"Vos numéros","tags":["Numéros"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Number"}}}}}}},"post":{"summary":"Acheter un numéro","tags":["Numéros"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["number"],"properties":{"number":{"type":"string"},"applicationId":{"type":"string"},"label":{"type":"string"}}}}}},"responses":{"201":{"description":"Acheté","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Number"}}}}}}},"/api/v1/numbers/available":{"get":{"summary":"Numéros disponibles","tags":["Numéros"],"parameters":[{"name":"contains","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Number"}}}}}}}},"/api/v1/numbers/{number}":{"parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"string"},"description":"Numéro E.164 (encodé : %2B33…)"}],"patch":{"summary":"Router vers une application ou un endpoint","tags":["Numéros"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"applicationId":{"type":["string","null"]},"endpointId":{"type":["string","null"]},"label":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Number"}}}}}},"delete":{"summary":"Résilier (retour au stock)","tags":["Numéros"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}}}}},"/api/v1/calls":{"get":{"summary":"Appels en cours","tags":["Appels"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"Passer un appel programmable","tags":["Appels"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInput"}}}},"responses":{"201":{"description":"Lancé","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Call"}}}}}}},"/api/v1/calls/live":{"get":{"summary":"Appels en cours (détail par canal)","tags":["Appels"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"online":{"type":"boolean"},"calls":{"type":"array","items":{"type":"object"}}}}}}}}}},"/api/v1/extensions":{"get":{"summary":"Postes de l’entreprise (identifiant, numéro interne, nom, actif)","tags":["Endpoints"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"displayName":{"type":"string"},"enabled":{"type":"boolean"}}}}}}}}}},"/api/v1/callbacks":{"post":{"summary":"Demander à être rappelé (file d’attente ou poste)","tags":["Appels"],"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"}}}}}}},"/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":["Vérification"],"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"}}}}}}},"/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":["Vérification"],"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"}}}]}}}}}}},"/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":["Vérification"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Verification"}}}}}}},"/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":["Vérification"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Verification"}}}}}}},"/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":["Consultation de numéro"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lookup"}}}}}}},"/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"],"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"}}}}}}}}},"/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"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/calls/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"}],"get":{"summary":"État d’un appel (en cours ou terminé)","tags":["Appels"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/calls/{id}/hangup":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"}],"post":{"summary":"Raccrocher","tags":["Appels"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}}}}},"/api/v1/calls/{id}/redirect":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"}],"post":{"summary":"Reprendre la main (nouvelles instructions)","tags":["Appels"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"applicationId":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}}}}},"/api/v1/cdr":{"get":{"summary":"Journal des appels","tags":["Appels"],"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"}}}}}}},"/api/v1/recordings":{"get":{"summary":"Enregistrements (instruction record)","tags":["Enregistrements"],"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"}}}}}}},"/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":["Enregistrements"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expiresIn":{"type":"integer"}}}}}}}}},"/api/v1/recordings/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"}],"delete":{"summary":"Supprimer","tags":["Enregistrements"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}}}}},"/api/v1/audio":{"get":{"summary":"Fichiers audio","tags":["Audio"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"}}}}}}},"post":{"summary":"Envoyer un fichier audio (multipart, champ file)","tags":["Audio"],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"name":{"type":"string"}}}}}},"responses":{"201":{"description":"Converti"}}}},"/api/v1/logs":{"get":{"summary":"Journal des requêtes webhook (7 jours)","tags":["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"}},{"name":"applicationId","in":"query","schema":{"type":"string"}},{"name":"errors","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/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"],"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"}}}}}}}}},"/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"],"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"}}}}}}}},"delete":{"summary":"Raccrocher (qu’il sonne encore ou soit en cours)","tags":["Appels"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"callId":{"type":"string"},"cancelled":{"type":"boolean"}}}}}}}}},"/api/v1/login-links":{"parameters":[{"$ref":"#/components/parameters/Organization"},{"$ref":"#/components/parameters/IdempotencyKey"}],"post":{"summary":"Lien de connexion automatique au panneau de votre entreprise (usage unique, 60 s)","tags":["Compte"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"string","description":"E-mail ou identifiant d’un utilisateur du client (défaut : son administrateur)"},"next":{"type":"string","description":"Page d’arrivée dans le panneau : chemin relatif (ex. /admin)"},"ttlSeconds":{"type":"integer","minimum":10,"maximum":900,"default":60}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Adresse à usage unique : ouvre le panneau connecté"},"expiresAt":{"type":"string","format":"date-time"},"expiresIn":{"type":"integer"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"}}}}}}}}}}},"/api/v1/sms":{"get":{"summary":"Liste des SMS (filtres : status, to, tag, since)","tags":["SMS"],"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"}}}}}}}},"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"],"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"}}}}}}},"/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"],"parameters":[{"$ref":"#/components/parameters/Organization"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"}}}}}}}}},"/api/v1/sms/balance":{"get":{"summary":"Crédits SMS : forfait du mois et solde à vie","tags":["SMS"],"parameters":[{"$ref":"#/components/parameters/Organization"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsCredits"}}}}}}},"/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"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sms"}}}}}}},"/api/v1/webhooks":{"parameters":[{"$ref":"#/components/parameters/Organization"}],"get":{"summary":"Webhooks de l’entreprise","tags":["Webhooks"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}}}}},"post":{"summary":"Créer un webhook (le secret de signature est renvoyé une fois)","tags":["Webhooks"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}}}}},"/api/v1/webhooks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Identifiant"},{"$ref":"#/components/parameters/Organization"}],"patch":{"summary":"Modifier","tags":["Webhooks"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}}}},"delete":{"summary":"Supprimer","tags":["Webhooks"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}}}}},"/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"}}}}}}}},"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"}}}}}}},"/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"}}}}}}}}},"/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"]}}}}}}}}},"/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"}}}}}}},"/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"}}}}}}}}},"/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"}}}},"/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"}}}}}}},"/api/v1/voicemail":{"get":{"summary":"Boîtes vocales et messages (filtres : extension, unread)","tags":["Messagerie vocale"],"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"}}}}}}}}},"/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":["Messagerie vocale"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoicemailMessage"}}}}}},"delete":{"summary":"Supprimer un message","tags":["Messagerie vocale"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}}}}},"/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":["Messagerie vocale"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expiresIn":{"type":"integer"}}}}}}}}},"/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":["Messagerie vocale"],"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"}}}}}}}}}},"webhooks":{"voice":{"post":{"summary":"Requête vers votre voiceUrl / URL d’action","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRequest"}}}},"responses":{"200":{"description":"Liste d’instructions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Verb"}}}}}}}},"status":{"post":{"summary":"Fin d’appel (statusCallbackUrl)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"const":"call.completed"},"callId":{"type":"string"},"duration":{"type":"integer"},"billsec":{"type":"integer"},"hangupCause":{"type":"string"}}}}}},"responses":{"200":{"description":"Accusé"}}}}},"tags":[{"name":"SMS","description":"Envoi de SMS (POST /api/v1/sms), suivi de remise (webhook `sms.status` ou GET /api/v1/sms/{id}), crédits : forfait du mois, solde, puis SMS au comptage. Voir le guide « Envoyer un SMS »."},{"name":"Messagerie vocale","description":"Messages vocaux : liste, transcription, écoute par lien signé, lu / non lu, suppression ; webhook `voicemail.new`."},{"name":"Portabilité","description":"Demande de portabilité de numéros, suivi des états (webhook `porting.status`), mandat à signer, documents, annulation."},{"name":"Webhooks","description":"Événements signés : `call.completed`, `sms.status`, `porting.status`. En-têtes `X-VoxNova-Event` et `X-VoxNova-Signature: sha256=<hmac-sha256 du corps avec le secret>`."},{"name":"Revendeur · SMS","description":"Packs, attribution de crédits et expéditeurs interdits pour vos clients."}]}