{"openapi":"3.1.0","info":{"title":"API revendeur","version":"2026-11-20","description":"Gestion de votre activité de revendeur. Avec l’en-tête X-Organization, toutes les routes de l’API clients s’utilisent au nom d’un de vos clients."},"servers":[{"url":"https://api.hcloud.fr"}],"security":[{"bearer":[]}],"tags":[{"name":"Votre compte revendeur","description":"Marque (nom, logo, couleurs, domaine du panneau), préférences de facturation, fonctions proposées à vos clients, équipe, messages système."},{"name":"Espace client clé en main","description":"Connexion de vos clients à l’espace client que vous hébergez (dépôts publics voxnova-espace-client-node et voxnova-espace-client-php, prêts à installer) : vérification des identifiants avec votre clé, mot de passe oublié à vos couleurs."},{"name":"Clients","description":"Création des clients, abonnement, suspension, résiliation, fiche de facturation, SMS, lien de connexion automatique à leur panneau. Pour configurer le téléphone d’un client (utilisateurs, numéros, files…), utilisez les routes de la documentation « Clients » avec l’en-tête X-Organization."},{"name":"Offres et catalogue","description":"Vos offres (prix par poste, par canal, options) et le catalogue de la plateforme."},{"name":"Facturation","description":"Factures de vos clients (validation d’un paiement, annulation), relevés mensuels de commissions ou de reversement."},{"name":"SMS","description":"Envoyer un SMS au nom d’un client : POST /api/v1/sms avec X-Organization (voir le guide « Envoyer un SMS »). Suivi, crédits du client, packs de SMS proposés à vos clients, expéditeurs interdits."},{"name":"Au nom d’un client","description":"Routes de l’API v1 utilisées avec X-Organization : portabilité, clic pour appeler, messagerie vocale, lien de connexion. Toutes les autres routes du client sont dans la documentation « API clients »."},{"name":"Clés d’API et webhooks","description":"Clés vxr_ (lecture seule, adresses IP autorisées) et webhooks signés (messages vocaux, portabilité, SMS)."},{"name":"Dépannage","description":"Diagnostic d’un client et appel de test."},{"name":"Comptes d’essai","description":"Revendeurs fictifs avec leurs clients fictifs (voir le guide « Compte d’essai »)."}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Clé revendeur vxr_…"}},"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/reseller/api-keys":{"get":{"summary":"Vos clés d’API.","tags":["Clés d’API et webhooks"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"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é vxr_ (lecture seule et adresses IP autorisées en option). Depuis le panneau seulement ; la clé est affichée une seule fois.","tags":["Clés d’API et webhooks"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"readOnly":{"default":false,"type":"boolean"},"allowedIps":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","maxLength":60}}},"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/reseller/api-keys/{id}":{"delete":{"summary":"Supprime une clé d’API.","tags":["Clés d’API et webhooks"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"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":"Restreindre une clé existante : lecture seule et/ou adresses IP autorisées (liste vide : toutes).","tags":["Clés d’API et webhooks"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"readOnly":{"type":"boolean"},"allowedIps":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":60}}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/billing-profile":{"get":{"summary":"Vos coordonnées de facturation (en-tête des factures de vos clients).","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"id":"reseller:cmwjdhkgc0002q7e0dkez0qxp","sellerName":"Télécom Démo","sellerAddress":"","sellerSiret":"","sellerVat":"","sellerEmail":"","iban":"","bic":"","bankName":"","paymentInstructions":"","paymentTermDays":15,"renewalNoticeDays":10,"legalMentions":"","sellerSiren":"","sellerLegalForm":"","sellerCapital":"","sellerRcs":"","sellerPostalCode":"","sellerCity":"","vatOnDebits":false,"invoicePrefix":"","invoiceStart":1,"invoiceStartYear":null,"updatedAt":"2026-11-16T14:42:38.828Z"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie vos coordonnées de facturation.","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sellerName":{"type":"string","minLength":1,"maxLength":200},"sellerAddress":{"type":"string","maxLength":500},"sellerSiret":{"type":"string","maxLength":30},"sellerVat":{"type":"string","maxLength":30},"sellerEmail":{"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":""}]},"iban":{"type":"string","maxLength":50},"bic":{"type":"string","maxLength":20},"bankName":{"type":"string","maxLength":100},"paymentInstructions":{"type":"string","maxLength":1000},"paymentTermDays":{"type":"integer","minimum":0,"maximum":90},"legalMentions":{"type":"string","maxLength":2000}},"required":["sellerName","sellerAddress","sellerSiret","sellerVat","sellerEmail","iban","bic","bankName","paymentInstructions","paymentTermDays","legalMentions"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/branding":{"put":{"summary":"Votre marque : nom, logo, couleurs, e-mail et site du support, domaine du panneau.","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandName":{"type":"string","minLength":2,"maxLength":60},"logo":{"anyOf":[{"type":"string","maxLength":700000,"pattern":"^data:image\\/(png|jpeg|webp|svg\\+xml);base64,[A-Za-z0-9+/=]+$"},{"type":"null"}]},"primaryColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"supportEmail":{"anyOf":[{"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":""}]},{"type":"null"}]},"supportPhone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"website":{"anyOf":[{"anyOf":[{"type":"string","format":"uri"},{"type":"string","const":""}]},{"type":"null"}]},"supportUrl":{"anyOf":[{"anyOf":[{"type":"string","format":"uri"},{"type":"string","const":""}]},{"type":"null"}]},"domain":{"anyOf":[{"type":"string","maxLength":100},{"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/reseller/catalog":{"get":{"summary":"Offres de l'éditeur (prix de gros ou commission) et offres du revendeur (marque blanche).","tags":["Offres et catalogue"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"mode":"WHITE_LABEL","discountPercent":20,"commissionPercent":15,"basePlans":[{"id":"cmuxgv7nk001sq7zpeoa1u6o4","code":"ia-muxgv7jr","name":"Centrex IA muxgv7jr","description":"","pricePerSeatCents":0,"currency":"EUR","interval":"MONTH","minSeats":1,"maxSeats":1000,"features":{},"kind":"CENTREX","centrex":false,"channelsPerSeat":0,"numbersIncluded":0,"trunkId":"cmuxgv7n0001mq7zpuro1e81o","apps":[],"pricePerChannelCents":500,"unlimitedChannelsCents":null,"pricePerNumberCents":200,"maxChannels":20,"unlimitedCallsCents":null,"aiAnalysisCents":900,"teamsCents":null,"basePriceCents":0,"callRates":[],"unlimitedCallsScope":"BOTH","resellerId":null,"basePlanId":null,"active":true,"sortOrder":0,"createdAt":"2026-10-07T02:06:34.113Z","product":"CENTREX_HOSTED","wholesale":{"pricePerSeatCents":0,"pricePerChannelCents":400,"unlimitedChannelsCents":null,"pricePerNumberCents":160,"unlimitedCallsCents":null,"aiAnalysisCents":720,"teamsCents":null,"basePriceCents":0}},{"id":"cmuv4p4xo0001q78ywqmyr45l","code":"essentiel","name":"Essentiel","description":"Softphone web, bureau et mobile avec réveil push. Idéal pour les petites équipes.","pricePerSeatCents":990,"currency":"EUR","interval":"MONTH","minSeats":1,"maxSeats":50,"features":{"web":true,"chat":true,"push":true,"mobile":true,"desktop":true,"gateway":true,"presence":true,"recording":false,"conference":false,"maxSipServers":1},"kind":"RELAY","centrex":false,"channelsPerSeat":0,"numbersIncluded":0,"trunkId":null,"apps":[],"pricePerChannelCents":0,"unlimitedChannelsCents":null,"pricePerNumberCents":0,"maxChannels":100,"unlimitedCallsCents":null,"aiAnalysisCents":null,"teamsCents":null,"basePriceCents":0,"callRates":[],"unlimitedCallsScope":"BOTH","resellerId":null,"basePlanId":null,"active":true,"sortOrder":1,"createdAt":"2026-10-05T10:50:22.908Z","product":"RELAY","wholesale":{"pricePerSeatCents":792,"pricePerChannelCents":0,"unlimitedChannelsCents":null,"pricePerNumberCents":0,"unlimitedCallsCents":null,"aiAnalysisCents":null,"teamsCents":null,"basePriceCents":0}}],"plans":[{"id":"cmwjdjq3w001cq7rrx8sk4erc","code":"demo-revendeur-pro","name":"Offre Pro","description":"","pricePerSeatCents":1500,"currency":"EUR","interval":"MONTH","minSeats":1,"maxSeats":1000,"features":{},"kind":"RELAY","centrex":false,"channelsPerSeat":0,"numbersIncluded":0,"trunkId":null,"apps":[],"pricePerChannelCents":0,"unlimitedChannelsCents":null,"pricePerNumberCents":0,"maxChannels":100,"unlimitedCallsCents":null,"aiAnalysisCents":null,"teamsCents":null,"basePriceCents":0,"callRates":[],"unlimitedCallsScope":"BOTH","resellerId":"cmwjdhkgc0002q7e0dkez0qxp","basePlanId":null,"active":true,"sortOrder":0,"createdAt":"2026-11-16T14:44:17.517Z","_count":{"licenses":0},"product":"RELAY"}]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/clients":{"get":{"summary":"Vos clients avec leur abonnement en cours (?q= recherche).","tags":["Clients"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdhkgh0006q7e0mrvecev1","sandbox":false,"sandboxOwnerId":null,"name":"Cabinet Lefèvre","slug":"demo-client-revendeur","sipDomain":"demo-client-revendeur.demo.invalid","status":"ACTIVE","billingEmail":null,"vatNumber":null,"address":null,"country":"FR","trialEndsAt":null,"settings":{},"centrexEnabled":false,"timezone":"Europe/Paris","defaultCallerId":null,"recordingRetentionDays":90,"maxChannels":null,"pbxNodeId":null,"pbxHomeNodeId":null,"pbxPinned":false,"lat":null,"lon":null,"telecomBilledMonth":null,"apps":[],"mohId":null,"announceOverMusic":false,"announceMode":"alone","announceMusicLevel":25,"simpleMode":true,"product":"RELAY","onboardingDone":false,"aiGranted":false,"postalCode":null,"inseeCode":null,"city":null,"blockPremium":true,"blockShortNumbers":true,"specialCapCents":3000,"internationalCapCents":3000},{"id":"cmvnthjy30000q767x21lez8y","sandbox":false,"sandboxOwnerId":null,"name":"Horizon Services (démo)","slug":"demo-commerciale","sipDomain":"demo-commerciale.sip.localhost","status":"ACTIVE","billingEmail":"demo-test@hcloud.invalid","vatNumber":null,"address":"24 quai Saint-Antoine","country":"FR","trialEndsAt":null,"settings":{},"centrexEnabled":true,"timezone":"Europe/Paris","defaultCallerId":null,"recordingRetentionDays":90,"maxChannels":6,"pbxNodeId":null,"pbxHomeNodeId":null,"pbxPinned":false,"lat":null,"lon":null,"telecomBilledMonth":"2026-10","apps":["callcenter","hotel"],"mohId":null,"announceOverMusic":false,"announceMode":"alone","announceMusicLevel":25,"simpleMode":false,"product":"CENTREX_HOSTED","onboardingDone":true,"aiGranted":true,"postalCode":"69002","inseeCode":"69382","city":"Lyon","blockPremium":true,"blockShortNumbers":true,"specialCapCents":3000,"internationalCapCents":3000}]}}},"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 client : entreprise, administrateur (e-mail et mot de passe), type de service, jours d’essai.","tags":["Clients"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"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,}$"},"password":{"type":"string","minLength":10,"maxLength":200},"product":{"default":"CENTREX_HOSTED","type":"string","enum":["CENTREX_HOSTED","CENTREX","RELAY","TRUNK","DEVELOPER"]},"trialDays":{"default":14,"type":"integer","minimum":0,"maximum":60}},"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/reseller/clients/{id}":{"get":{"summary":"Fiche d’un client : utilisateurs, licences, factures, postes utilisés.","tags":["Clients"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"org":{"id":"cmwjdhkgh0006q7e0mrvecev1","sandbox":false,"sandboxOwnerId":null,"name":"Cabinet Lefèvre","slug":"demo-client-revendeur","sipDomain":"demo-client-revendeur.demo.invalid","status":"ACTIVE","billingEmail":null,"vatNumber":null,"address":null,"country":"FR","trialEndsAt":null,"settings":{},"centrexEnabled":false,"timezone":"Europe/Paris","defaultCallerId":null,"recordingRetentionDays":90,"maxChannels":null,"pbxNodeId":null,"pbxHomeNodeId":null,"pbxPinned":false,"lat":null,"lon":null,"telecomBilledMonth":null,"apps":[],"mohId":null,"announceOverMusic":false,"announceMode":"alone","announceMusicLevel":25,"simpleMode":true,"product":"RELAY","onboardingDone":false,"aiGranted":false,"postalCode":null,"inseeCode":null,"city":null,"blockPremium":true,"blockShortNumbers":true,"specialCapCents":3000,"internationalCapCents":3000},"users":[{"id":"cmwjdjq42001iq7rril3gxir3","email":"demo-client-admin@hcloud.invalid","name":"Claire Lefèvre","role":"ORG_ADMIN","orgId":"cmwjdhkgh0006q7e0mrvecev1","locale":"fr","status":"ACTIVE","permissions":[],"emailVerified":false,"newsletterOptOut":false,"lastLoginAt":null}],"licenses":[],"invoices":[],"usage":{"used":1,"seats":0,"available":0}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Suspend, réactive un client ou prolonge son essai.","tags":["Clients"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ACTIVE","SUSPENDED"]},"extendTrialDays":{"type":"integer","minimum":1,"maximum":30},"blockPremium":{"type":"boolean"},"blockShortNumbers":{"type":"boolean"},"specialCapCents":{"anyOf":[{"type":"integer","minimum":0,"maximum":1000000},{"type":"null"}]},"internationalCapCents":{"anyOf":[{"type":"integer","minimum":0,"maximum":1000000},{"type":"null"}]},"rejectAnonymous":{"type":"boolean"},"rejectNpv":{"type":"boolean"},"teamsEnabled":{"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/reseller/clients/{id}/impersonate":{"post":{"summary":"Ouvre une session dans le panneau du client, en tant que son administrateur.","tags":["Clients"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/clients/{id}/licenses":{"get":{"summary":"Licences d'un client (offre, quantités, échéances).","tags":["Clients"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"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/reseller/clients/{id}/login-link":{"post":{"summary":"Lien de connexion automatique au panneau du client (usage unique, 60 s par défaut) : WHMCS « Se connecter », espace client du revendeur. `user` : e-mail ou identifiant d'un utilisateur du client (par défaut son administrateur) ; `next` : page d'arrivée.","tags":["Clients"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"string","maxLength":120},"next":{"type":"string","maxLength":300},"ttlSeconds":{"type":"integer","minimum":10,"maximum":900}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/clients/{id}/messaging":{"put":{"summary":"Option SMS / WhatsApp d'un client : activation, plafond WhatsApp, expéditeur par défaut (les crédits SMS : packs).","tags":["Clients"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messagingEnabled":{"type":"boolean"},"waMonthlyLimit":{"type":"integer","minimum":0,"maximum":1000000},"smsSender":{"anyOf":[{"type":"string","maxLength":11,"pattern":"^[A-Za-z0-9]*$"},{"type":"null"}]}},"required":["messagingEnabled"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/clients/{id}/profile":{"patch":{"summary":"Coordonnées et réglages d'un client : raison sociale, facturation, adresse, fuseau horaire.","tags":["Clients"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"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":40},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"country":{"type":"string","minLength":2,"maxLength":2},"timezone":{"type":"string","maxLength":60}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/clients/{id}/sms":{"get":{"summary":"SMS du client : crédits et consommation.","tags":["Clients"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"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}},"blocks":[]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/clients/{id}/sms/pack":{"post":{"summary":"Ajoute un pack de SMS au client.","tags":["Clients"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"packId":{"type":"string"}},"required":["packId"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/clients/{id}/sms/sender-blocks":{"post":{"summary":"Interdit un expéditeur SMS pour ce client.","tags":["Clients"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"default":"exact","type":"string","enum":["exact","prefix","contains"]},"value":{"type":"string","minLength":2,"maxLength":30},"reason":{"default":"","type":"string","maxLength":200}},"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/reseller/clients/{id}/sms/sender-blocks/{blockId}":{"delete":{"summary":"Lève l’interdiction d’un expéditeur.","tags":["Clients"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"blockId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/clients/{id}/subscription":{"post":{"summary":"Abonne un client à une de vos offres (marque blanche, quand vous facturez vous-même) : postes, canaux, numéros, options, durée.","tags":["Clients"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/clients/{id}/terminate":{"post":{"summary":"Fin de contrat (résiliation WHMCS) : abonnements annulés et compte suspendu. Les données sont conservées.","tags":["Clients"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/domain-check":{"get":{"summary":"Vérification du domaine propre : il doit pointer vers le serveur (CNAME ou A).","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"ok":false,"domain":null,"reason":"Aucun domaine propre"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/features":{"get":{"summary":"Fonctions proposées à vos clients.","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"features":[{"key":"••••••••","label":"Rappels","description":"Bouton « Être rappelé » sur votre site, API et file virtuelle de rappel","kind":"free","group":"Accueil des appels"},{"key":"••••••••","label":"SMS et WhatsApp","description":"Envoi automatique de SMS ou de messages WhatsApp depuis vos scénarios","kind":"granted","group":"Accueil des appels"}],"disabled":[]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Masque ou propose des fonctions à tous vos clients.","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"disabled":{"maxItems":13,"type":"array","items":{"type":"string","enum":["callbacks","messaging","receptionist","conferences","music","satisfaction","ai","integrations","api","teams","porting","sso","backups"]}}},"required":["disabled"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/invoices":{"get":{"summary":"Factures de vos clients (filtre par état).","tags":["Facturation"],"x-access":"reseller","description":"Droits : Revendeur.","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":"status","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"items":[],"total":0,"canValidate":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/invoices/{id}":{"get":{"summary":"Détail d’une facture.","tags":["Facturation"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/invoices/{id}/cancel":{"post":{"summary":"Annule une facture non réglée.","tags":["Facturation"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/invoices/{id}/validate":{"post":{"summary":"Marque blanche : le revendeur encaisse ses clients et valide leurs paiements (active ou prolonge l'abonnement).","tags":["Facturation"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/me":{"get":{"summary":"Votre compte revendeur : mode (apporteur ou marque blanche), marque, réglages.","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"reseller":{"id":"cmwjdhkgc0002q7e0dkez0qxp","sandbox":false,"sandboxOwnerId":null,"disabledFeatures":[],"name":"Télécom Démo","slug":"demo-revendeur","mode":"WHITE_LABEL","status":"ACTIVE","contactEmail":null,"commissionPercent":15,"discountPercent":20,"brandName":null,"primaryColor":"#2554ea","domain":null,"cloudflareZone":null,"sipBaseDomain":null,"supportEmail":null,"supportPhone":null,"supportUrl":null,"website":null,"notes":"","systemAudios":{},"paymentMethod":"TRANSFER","paymentLabel":null,"billClients":true,"publicSite":true,"sipDomains":[],"sipDefaultDomain":null,"trialsEnabled":true,"trialDays":14,"trialMinutes":35,"createdAt":"2026-11-16T14:42:36.877Z","updatedAt":"2026-11-16T14:42:36.877Z","paymentReady":true,"hasLogo":false,"hasCloudflare":false,"url":"http://demo-revendeur.partner.sip.localhost:5173","defaultHost":"demo-revendeur.partner.sip.localhost","brand":{"name":"Télécom Démo","logoUrl":null,"primaryColor":"#2554ea","supportEmail":null,"supportPhone":null,"website":null,"supportUrl":null,"centrexHostedName":"Centrex Télécom Démo","url":"http://demo-revendeur.partner.sip.localhost:5173","whiteLabel":true,"resellerId":"cmwjdhkgc0002q7e0dkez0qxp"}},"mrr":{"activeLicenses":1,"retailCents":9400,"wholesaleCents":7520,"commissionCents":0,"marginCents":1880},"clientsByStatus":{"ACTIVE":2},"clients":2,"trials":0,"month":{"month":"2026-11","retailCents":0,"balanceCents":0,"invoices":0},"pendingInvoices":0,"signupUrl":"http://demo-revendeur.partner.sip.localhost:5173/signup","setup":{"brand":false,"plans":1,"billing":false,"domain":false},"dnsTarget":{"host":"localhost","ips":[]},"taxRatePercent":20}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/mobile/lines":{"get":{"summary":"Lignes mobiles de tous vos clients (organization), avec consommation et eSIM. Pour agir sur une ligne : routes /api/org/mobile-lines avec X-Organization.","tags":["Autres"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"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/reseller/mobile/offers":{"get":{"summary":"Forfaits mobiles proposés à vos clients et leur prix HT mensuel (ce que vous paie le client ; votre propre marge se fixe dans vos offres).","tags":["Autres"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"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/reseller/mobile/orders":{"get":{"summary":"Commandes de lignes mobiles de tous vos clients. Pour commander au nom d’un client : POST /api/org/mobile-lines/orders avec X-Organization.","tags":["Autres"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"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/reseller/payment":{"get":{"summary":"Votre moyen de paiement (reversements à la plateforme).","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"method":"TRANSFER","label":null,"ready":true,"online":false}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Choisit votre moyen de paiement (virement, carte, prélèvement).","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"method":{"type":"string","const":"TRANSFER"}},"required":["method"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/payment/setup":{"post":{"summary":"Enregistre une carte ou un mandat de prélèvement (adresse de la page sécurisée).","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"method":{"type":"string","enum":["CARD","SEPA"]}},"required":["method"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/plans":{"post":{"summary":"Crée une offre.","tags":["Offres et catalogue"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pricePerSeatCents":{"type":"integer","minimum":0,"maximum":10000000},"pricePerChannelCents":{"default":0,"type":"integer","minimum":0,"maximum":10000000},"unlimitedChannelsCents":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"pricePerNumberCents":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"unlimitedCallsCents":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"aiAnalysisCents":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"teamsCents":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"basePriceCents":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"basePlanId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":100},"description":{"default":"","type":"string","maxLength":500},"active":{"default":true,"type":"boolean"},"sortOrder":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["pricePerSeatCents","basePlanId","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/reseller/plans/{id}":{"delete":{"summary":"Supprime une offre.","tags":["Offres et catalogue"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"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 offre.","tags":["Offres et catalogue"],"x-access":"reseller","x-partial":true,"description":"Droits : Revendeur. Modification partielle : seuls les champs envoyés sont modifiés.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pricePerSeatCents":{"type":"integer","minimum":0,"maximum":10000000},"pricePerChannelCents":{"default":0,"type":"integer","minimum":0,"maximum":10000000},"unlimitedChannelsCents":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"pricePerNumberCents":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"unlimitedCallsCents":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"aiAnalysisCents":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"teamsCents":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"basePriceCents":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"name":{"type":"string","minLength":1,"maxLength":100},"description":{"default":"","type":"string","maxLength":500},"active":{"default":true,"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/reseller/portal/forgot":{"post":{"summary":"Espace client hébergé chez vous : envoie le lien de réinitialisation du mot de passe à vos couleurs (resetUrl : votre page qui reçoit ?token=, puis POST /api/auth/reset). Réponse identique que le compte existe ou non.","tags":["Espace client clé en main"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"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,}$"},"resetUrl":{"type":"string","maxLength":300,"format":"uri"},"clientIp":{"type":"string","maxLength":60}},"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/reseller/portal/login":{"post":{"summary":"Espace client hébergé chez vous : vérifie l’e-mail et le mot de passe d’un utilisateur d’un de VOS clients (puis le code de double authentification : réponse { mfaRequired: true } sans code). Ne délivre aucun jeton : agissez ensuite avec votre clé, X-Organization et X-User. Limité par clé et par adresse du visiteur (clientIp).","tags":["Espace client clé en main"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"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,}$"},"password":{"type":"string","minLength":1,"maxLength":200},"code":{"type":"string","minLength":6,"maxLength":20},"clientIp":{"type":"string","maxLength":60}},"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/reseller/preferences":{"get":{"summary":"Préférences : qui facture vos clients, essai, minutes de démo.","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"mode":"WHITE_LABEL","billClients":true,"publicSite":true,"trialsEnabled":true,"trialDays":14,"trialMinutes":35,"sipDomains":[],"sipDefaultDomain":"sip.localhost","platformDomains":["sip.localhost"],"ownDomain":null,"signupUrl":"http://demo-revendeur.partner.sip.localhost:5173/signup"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"summary":"Modifie vos préférences.","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"billClients":{"type":"boolean"},"publicSite":{"type":"boolean"},"trialsEnabled":{"type":"boolean"},"trialDays":{"type":"integer","minimum":1,"maximum":60},"trialMinutes":{"type":"integer","minimum":5,"maximum":600},"sipDomains":{"maxItems":10,"type":"array","items":{"type":"string"}},"sipDefaultDomain":{"type":["string","null"]}},"required":["billClients","publicSite","trialsEnabled","trialDays","trialMinutes","sipDomains","sipDefaultDomain"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/sandboxes":{"get":{"summary":"Vos revendeurs d’essai et leurs clients.","tags":["Comptes d’essai"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"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 revendeur d’essai avec deux clients fictifs équipés. Renvoie une seule fois la clé vxr_test_…, l’accès au panneau (e-mail, mot de passe) et la console d’essai.","tags":["Comptes d’essai"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/sandboxes/{id}":{"delete":{"summary":"Supprime un revendeur d’essai et ses clients.","tags":["Comptes d’essai"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/sandboxes/{id}/reset":{"post":{"summary":"Remet le revendeur d’essai à zéro (deux nouveaux clients fictifs) ; clé, panneau et console inchangés.","tags":["Comptes d’essai"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/sms":{"get":{"summary":"Tous les SMS des clients du revendeur (suivi de remise).","tags":["SMS"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"orgId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"total":0,"items":[]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/sms/packs":{"get":{"summary":"Packs de SMS.","tags":["SMS"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdjq3z001eq7rram33vul6","resellerId":"cmwjdhkgc0002q7e0dkez0qxp","name":"Pack 1 000 SMS","kind":"LIFETIME","credits":1000,"priceCents":0,"active":true,"createdAt":"2026-11-16T14:44:17.519Z"}]}}},"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 pack de SMS.","tags":["SMS"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["MONTHLY","LIFETIME"]},"credits":{"type":"integer","minimum":1,"maximum":10000000},"priceCents":{"default":0,"type":"integer","minimum":0,"maximum":100000000},"active":{"default":true,"type":"boolean"}},"required":["name","kind","credits"]}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/sms/packs/{id}":{"delete":{"summary":"Supprime un pack de SMS.","tags":["SMS"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"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 pack de SMS.","tags":["SMS"],"x-access":"reseller","x-partial":true,"description":"Droits : Revendeur. Modification partielle : seuls les champs envoyés sont modifiés.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["MONTHLY","LIFETIME"]},"credits":{"type":"integer","minimum":1,"maximum":10000000},"priceCents":{"default":0,"type":"integer","minimum":0,"maximum":100000000},"active":{"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/reseller/sms/sender-blocks":{"get":{"summary":"Expéditeurs SMS interdits.","tags":["SMS"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"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 expéditeur interdit.","tags":["SMS"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"default":"exact","type":"string","enum":["exact","prefix","contains"]},"value":{"type":"string","minLength":2,"maxLength":30},"reason":{"default":"","type":"string","maxLength":200}},"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/reseller/sms/sender-blocks/{id}":{"delete":{"summary":"Supprime un expéditeur interdit.","tags":["SMS"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/statements":{"get":{"summary":"Relevés mensuels (commissions ou reversements).","tags":["Facturation"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"mode":"WHITE_LABEL","commissionPercent":15,"discountPercent":20,"months":[{"month":"2026-11","mode":"WHITE_LABEL","retailCents":0,"wholesaleCents":0,"commissionCents":0,"balanceCents":0,"settled":null,"invoices":0},{"month":"2026-10","mode":"WHITE_LABEL","retailCents":0,"wholesaleCents":0,"commissionCents":0,"balanceCents":0,"settled":null,"invoices":0}]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/statements/{month}":{"get":{"summary":"Relevé d’un mois (AAAA-MM) détaillé par client.","tags":["Facturation"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"month","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"month":"2026-10","mode":"WHITE_LABEL","lines":[],"retailCents":0,"wholesaleCents":0,"commissionCents":0,"balanceCents":0,"settled":null}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/system-audio":{"delete":{"summary":"Rétablit le message système d’origine.","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"responses":{"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":"Remplace un message système par le vôtre (multipart : key, file).","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["key","file"],"properties":{"key":{"type":"string","description":"Message système (GET /api/reseller/system-audios)"},"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/system-audio/listen":{"get":{"summary":"Écoute un message système.","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/system-audios":{"get":{"summary":"Messages système (annonces de la plateforme) personnalisables.","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"key":"••••••••","label":"Bienvenue (par défaut)","hint":"Standard vocal ou scénario sans message d’accueil choisi","custom":null},{"key":"••••••••","label":"Touche invalide","hint":"Mauvaise touche dans un standard vocal ou un scénario","custom":null}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/team":{"get":{"summary":"Les membres de votre équipe revendeur.","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdhkgf0004q7e056574kiw","email":"demo-revendeur@hcloud.invalid","name":"Paul Durand","role":"RESELLER","orgId":null,"locale":"fr","status":"ACTIVE","permissions":[],"emailVerified":false,"resellerId":"cmwjdhkgc0002q7e0dkez0qxp","newsletterOptOut":false,"lastLoginAt":null}]}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Ajoute un membre à votre équipe (invitation par e-mail).","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"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,}$"},"password":{"type":"string","minLength":10,"maxLength":200}},"required":["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/reseller/team/{id}":{"delete":{"summary":"Supprime un membre de l’équipe.","tags":["Votre compte revendeur"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/troubleshoot/{orgId}":{"get":{"summary":"Diagnostic d’un client.","tags":["Dépannage"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"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}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"kind":"org","target":"Cabinet Lefèvre","org":{"id":"cmwjdhkgh0006q7e0mrvecev1","name":"Cabinet Lefèvre"},"generatedAt":"2026-11-20T22:38:57.826Z","level":"error","summary":"3 problèmes bloquants et 3 points d’attention","path":[],"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 — Cabinet Lefèvre (Cabinet Lefèvre)\nLe 20/11/2026 23:38:57 — 3 problèmes bloquants et 3 points d’attention\n\n✖ [Plateforme] Serveur téléphonique injoi…"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/troubleshoot/{orgId}/call":{"post":{"summary":"Appel de test chez un client.","tags":["Dépannage"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}],"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/reseller/troubleshoot/{orgId}/targets":{"get":{"summary":"Cibles possibles pour l’appel de test.","tags":["Dépannage"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":{"numbers":[],"extensions":[],"flows":[]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/webhooks":{"get":{"summary":"Vos webhooks (adresse, événements, état).","tags":["Clés d’API et webhooks"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"responses":{"200":{"description":"Succès","content":{"application/json":{"example":[{"id":"cmwjdjq41001gq7rrsp2vlcj9","url":"https://exemple.invalid/revendeur","events":["sms.status"],"enabled":true,"lastStatus":null,"createdAt":"2026-11-16T14:44:17.521Z"}]}}},"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 : adresse HTTPS et événements (appels, messages vocaux, SMS, portabilité, numéros, factures, vie des clients) ; secret de signature renvoyé une fois.","tags":["Clés d’API et webhooks"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"default":["sms.status"],"minItems":1,"type":"array","items":{"type":"string","enum":["call.completed","voicemail.new","sms.status","porting.status","number.assigned","invoice.created","invoice.paid","client.created","client.suspended","client.reactivated","client.terminated"]}},"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/reseller/webhooks/{id}":{"delete":{"summary":"Supprime un webhook.","tags":["Clés d’API et webhooks"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"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 webhook (adresse, événements, actif).","tags":["Clés d’API et webhooks"],"x-access":"reseller","x-partial":true,"description":"Droits : Revendeur. Modification partielle : seuls les champs envoyés sont modifiés.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"minItems":1,"type":"array","items":{"type":"string","enum":["call.completed","voicemail.new","sms.status","porting.status","number.assigned","invoice.created","invoice.paid","client.created","client.suspended","client.reactivated","client.terminated"]}},"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/reseller/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":["Clés d’API et webhooks"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"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/reseller/webhooks/{id}/deliveries/{delivery}/retry":{"post":{"summary":"Renvoie tout de suite un envoi.","tags":["Clés d’API et webhooks"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"delivery","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Succès"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/api/reseller/webhooks/{id}/test":{"post":{"summary":"Envoie un événement de test au webhook.","tags":["Clés d’API et webhooks"],"x-access":"reseller","description":"Droits : Revendeur.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"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":["Au nom d’un client"],"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":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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). Avec l’en-tête X-Organization : au nom du client.","tags":["Au nom d’un client"],"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":"reseller"}},"/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. Avec l’en-tête X-Organization : au nom du client.","tags":["Au nom d’un client"],"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":"reseller"}},"/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":["Au nom d’un client"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Verification"}}}}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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":["Au nom d’un client"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Verification"}}}}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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. Avec l’en-tête X-Organization : au nom du client.","tags":["Au nom d’un client"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lookup"}}}}},"x-access":"reseller"}},"/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":["Au nom d’un client"],"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":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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":["Au nom d’un client"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/api/v1/cdr":{"get":{"summary":"Journal des appels","tags":["Au nom d’un client"],"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":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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":["Au nom d’un client"],"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":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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":["Au nom d’un client"],"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":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."},"delete":{"summary":"Raccrocher (qu’il sonne encore ou soit en cours)","tags":["Au nom d’un client"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"callId":{"type":"string"},"cancelled":{"type":"boolean"}}}}}}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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":["Au nom d’un client"],"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"}}}}}}}}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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"}}}}}}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."},"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"}}}}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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"}}}}}}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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"}}}}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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"}}}}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/api/v1/porting":{"get":{"summary":"Demandes de portabilité (filtres : status, number)","tags":["Au nom d’un client"],"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":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."},"post":{"summary":"Demander la portabilité de numéros (JSON avec documents en base64, ou multipart : champ data + fichiers)","tags":["Au nom d’un client"],"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":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/api/v1/porting/config":{"get":{"summary":"Mandat signé en ligne (esign) et limites des documents","tags":["Au nom d’un client"],"parameters":[{"$ref":"#/components/parameters/Organization"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"esign":{"type":"boolean"},"documents":{"type":"object"}}}}}}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/api/v1/porting/operator":{"get":{"summary":"Opérateur actuel d’un numéro (bases de portabilité)","tags":["Au nom d’un client"],"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":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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":["Au nom d’un client"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Porting"}}}}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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":["Au nom d’un client"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}}}}}}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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":["Au nom d’un client"],"responses":{"200":{"description":"Fichier"}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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":["Au nom d’un client"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Porting"}}}}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/api/v1/voicemail":{"get":{"summary":"Boîtes vocales et messages (filtres : extension, unread)","tags":["Au nom d’un client"],"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":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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":["Au nom d’un client"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoicemailMessage"}}}}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."},"delete":{"summary":"Supprimer un message","tags":["Au nom d’un client"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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":["Au nom d’un client"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expiresIn":{"type":"integer"}}}}}}},"x-access":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}},"/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":["Au nom d’un client"],"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":"reseller","description":"Avec l’en-tête X-Organization : au nom du client."}}}}