{"info":{"version":"1.0.0","description":"Envoi de SMS vers les mobiles camerounais. Documentation complète : https://v2.smspro.cm/docs/api","title":"API SMSPro"},"components":{"schemas":{"Balance":{"type":"object","properties":{"balance":{"type":"integer","description":"SMS disponibles"},"currency":{"type":"string","example":"SMS"},"reserved_balance":{"type":"integer"},"spent_balance":{"type":"integer"}}},"BulkRequest":{"type":"object","required":["to","message","from"],"properties":{"message":{"type":"string"},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string","example":"+237699000001"},"maxItems":1000},"scheduled_at":{"type":"string","description":"Facultatif : envoi programmé (ISO 8601). Sans fuseau = heure du Cameroun. 10 minutes à 90 jours. Crédit réservé dès la requête.","example":"2026-11-10T09:00:00"}}},"BulkResponse":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"error":{"type":"string"},"status":{"type":"string","enum":["queued","failed"]},"to":{"type":"string"},"scheduled_at":{"type":"string","format":"date-time","description":"Présent si programmé"},"error_code":{"type":"string"},"message_id":{"type":"string","format":"uuid"}}}},"summary":{"type":"object","properties":{"total":{"type":"integer"},"failed":{"type":"integer"},"sent":{"type":"integer"}}}}},"Campaign":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"message":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["scheduled","running","completed","cancelled","paused"]},"started_at":{"type":["string","null"],"format":"date-time"},"from":{"type":"string"},"counts":{"type":"object","properties":{"pending":{"type":"integer"},"failed":{"type":"integer"},"sent":{"type":"integer"},"delivered":{"type":"integer"},"skipped":{"type":"integer","description":"Désabonnés, doublons récents ou campagne annulée"}}},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"scheduled_at":{"type":["string","null"],"format":"date-time"},"recipients":{"type":"integer"},"reserved_sms":{"type":"integer"}}},"CampaignCancelResponse":{"type":"object","properties":{"status":{"type":"string","example":"cancelled"},"success":{"type":"boolean"},"campaign_id":{"type":"string","format":"uuid"},"refunded_sms":{"type":"integer"}}},"CampaignCreateRequest":{"type":"object","required":["name","from","message"],"properties":{"message":{"type":"string","example":"Bonjour {Prénom}, -20% ce samedi !"},"name":{"type":"string","example":"Promo du samedi"},"from":{"type":"string","description":"Sender ID, sensible à la casse","example":"MONAPP"},"to":{"type":"array","description":"Destinataires (ou contact_list_id)","items":{"$ref":"#/components/schemas/ContactEntry"},"maxItems":10000},"scheduled_at":{"type":"string","description":"Facultatif, ISO 8601. Sans fuseau = heure du Cameroun. 10 minutes à 90 jours.","example":"2026-11-14T09:00:00"},"contact_list_id":{"type":"string","format":"uuid","description":"Groupe de contacts (ou to)"},"marketing_page_id":{"type":"string","format":"uuid","description":"Facultatif : page SMS enrichi PUBLIÉE ; son URL remplace {Lien}, ajouté en fin de message s'il manque"},"track_recipients":{"default":true,"type":"boolean","description":"Avec marketing_page_id : un lien personnel par destinataire (visites suivies). false = même URL pour tous"}}},"CampaignCreateResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"},"excluded":{"type":"object","properties":{"invalid":{"type":"array","items":{}},"duplicates":{"type":"integer"},"uncovered_operator":{"type":"array","description":"Camtel/Nexttel, non couverts","items":{"type":"string"}}}}}},"CampaignEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}}},"CampaignPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}},"meta":{"type":"object","properties":{"total":{"type":"integer"},"page":{"type":"integer"},"per_page":{"type":"integer"}}}}},"CancelResponse":{"type":"object","properties":{"status":{"type":"string","example":"cancelled"},"success":{"type":"boolean"},"message_id":{"type":"string","format":"uuid"},"refunded_sms":{"type":"integer","description":"SMS rendus au solde"}}},"Contact":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{"type":"string"}},"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"phone":{"type":"string","example":"+237699000001"}}},"ContactEntry":{"description":"Un numéro, ou un objet dont les autres champs deviennent des variables {Prénom}","oneOf":[{"type":"string","example":"677123456"},{"type":"object","required":["phone"],"properties":{"phone":{"type":"string","example":"+237699000001"}},"example":{"Prénom":"Jean","phone":"677123456"},"additionalProperties":{"type":"string"}}]},"ContactList":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"variables":{"type":"array","description":"Variables de personnalisation","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"contacts_count":{"type":"integer"}}},"ContactListCreateRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","example":"Clients VIP"},"description":{"type":"string"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/ContactEntry"},"maxItems":1000}}},"ContactListCreateResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ContactList"},"import":{"$ref":"#/components/schemas/ImportReport"}}},"ContactListEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ContactList"}}},"ContactListUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"]}}},"ContactPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"meta":{"type":"object","properties":{"total":{"type":"integer"},"page":{"type":"integer"},"per_page":{"type":"integer"}}}}},"ContactsAddRequest":{"type":"object","required":["contacts"],"properties":{"contacts":{"type":"array","items":{"$ref":"#/components/schemas/ContactEntry"},"maxItems":1000,"minItems":1}}},"Deleted":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"success":{"type":"boolean"}}},"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"error_code":{"type":"string"}}},"ImportEnvelope":{"type":"object","properties":{"import":{"$ref":"#/components/schemas/ImportReport"}}},"ImportReport":{"type":"object","properties":{"invalid":{"type":"array","description":"Entrées écartées (numéro invalide)","items":{}},"added":{"type":"integer"},"duplicates":{"type":"integer","description":"Déjà dans le groupe ou répétés dans la requête"}}},"Message":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","sending","sent","delivered","failed","unknown","cancelled"]},"to":{"type":"string","example":"+237699000001"},"error_message":{"type":["string","null"]},"scheduled_at":{"type":["string","null"],"format":"date-time"},"error_code":{"type":["string","null"]},"segments":{"type":"integer"},"sent_at":{"type":"string","format":"date-time"},"provider_message_id":{"type":["string","null"]},"dlr_status":{"type":["string","null"]},"dlr_timestamp":{"type":["string","null"],"format":"date-time"},"delivery_confirmed":{"type":"boolean"},"delivery_state":{"type":"string","enum":["pending","awaiting_confirmation","delivered","transmitted","failed","cancelled"]}}},"MessageList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"meta":{"type":"object","properties":{"total":{"type":"integer"},"page":{"type":"integer"},"per_page":{"type":"integer"}}}}},"OtpSendRequest":{"type":"object","required":["to","from"],"properties":{"message":{"type":"string","description":"Facultatif. Doit contenir {code}. Par défaut : « Votre code de vérification est 123456. Valable 5 minutes. »","example":"MONAPP : votre code est {code}"},"length":{"default":6,"maximum":8,"type":"integer","description":"Nombre de chiffres","minimum":4},"from":{"type":"string","description":"Sender ID, sensible à la casse","example":"MONAPP"},"to":{"type":"string","description":"Mobile camerounais, 237 + 9 chiffres","example":"+237699000001"},"expiry":{"default":300,"maximum":900,"type":"integer","description":"Validité en secondes","minimum":60}}},"OtpSendResponse":{"type":"object","properties":{"success":{"type":"boolean"},"to":{"type":"string","example":"+237699000001"},"expires_at":{"type":"string","format":"date-time"},"segments":{"type":"integer"},"message_id":{"type":"string","format":"uuid"},"otp_id":{"type":"string","format":"uuid","description":"À conserver pour la vérification"}}},"OtpVerifyRequest":{"type":"object","required":["otp_id","code"],"properties":{"code":{"type":"string","example":"847291"},"otp_id":{"type":"string","format":"uuid"}}},"OtpVerifyResponse":{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["invalid_code","expired","too_many_attempts","already_used","superseded"],"description":"Présent si valid vaut false"},"valid":{"type":"boolean"},"otp_id":{"type":"string","format":"uuid"},"attempts_remaining":{"type":"integer","description":"Présent si valid vaut false"}}},"SendRequest":{"type":"object","required":["to","message","from"],"properties":{"message":{"type":"string","example":"Bonjour depuis SMSPro"},"from":{"type":"string","description":"Sender ID, sensible à la casse","example":"MONAPP"},"to":{"type":"string","description":"Mobile camerounais, 237 + 9 chiffres","example":"+237699000001"},"scheduled_at":{"type":"string","description":"Facultatif : envoi programmé (ISO 8601). Sans fuseau = heure du Cameroun. 10 minutes à 90 jours. Crédit réservé dès la requête.","example":"2026-11-10T09:00:00"}}},"SendResponse":{"type":"object","properties":{"status":{"type":"string","example":"pending"},"warning":{"type":"string"},"success":{"type":"boolean"},"to":{"type":"string","example":"+237699000001"},"scheduled_at":{"type":["string","null"],"format":"date-time","description":"Heure d'envoi prévue (UTC), null si immédiat"},"segments":{"type":"integer","example":1},"message_id":{"type":"string","format":"uuid"},"sender_id_used":{"type":"string","description":"Présent si le Sender ID envoyé n'avait pas la casse exacte"}}},"SenderId":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","example":"approved"},"approved_at":{"type":["string","null"],"format":"date-time"}}}},"securitySchemes":{"apiKeyQuery":{"in":"query","name":"api_key","type":"apiKey","description":"Repli pour les logiciels qui ne peuvent pas poser d'en-tête"},"bearerAuth":{"scheme":"bearer","type":"http","description":"Clé API (Hub Développeur)"}}},"paths":{"/api/v1/balance":{"get":{"summary":"Solde du compte","responses":{"200":{"description":"Solde en SMS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}}},"401":{"description":"Clé API absente, invalide ou révoquée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getBalance"}},"/api/v1/campaigns":{"get":{"parameters":[{"in":"query","name":"page","description":"Page, à partir de 1","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","description":"Campagnes par page, 100 maximum (20 par défaut)","required":false,"schema":{"type":"integer"}}],"summary":"Lister vos campagnes","responses":{"200":{"description":"Campagnes paginées","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPage"}}}},"401":{"description":"Clé API absente, invalide ou révoquée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listCampaigns"},"post":{"description":"Même lanceur que le site : le coût total est réservé à la création. Destinataires : contact_list_id OU to.","summary":"Créer une campagne (immédiate ou programmée)","responses":{"201":{"description":"Campagne créée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreateResponse"}}}},"400":{"description":"Paramètre manquant, destinataires absents ou en double source, scheduled_at invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Clé API absente, invalide ou révoquée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Solde insuffisant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"SMS enrichi pas encore ouvert sur ce compte (avec marketing_page_id)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Sender ID, groupe ou page SMS enrichi (non publiée) introuvable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Aucun destinataire valide, ou Sender ID ambigu","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Quota journalier de la clé API dépassé","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createCampaign","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreateRequest"}}}}}},"/api/v1/campaigns/{id}":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"summary":"Statut et compteurs d'une campagne","responses":{"200":{"description":"Campagne","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignEnvelope"}}}},"404":{"description":"Campagne introuvable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getCampaign"},"delete":{"description":"Rend tout le crédit réservé. Impossible pour un envoi immédiat ou à moins d'une minute de l'heure prévue.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"summary":"Annuler une campagne programmée","responses":{"200":{"description":"Annulée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCancelResponse"}}}},"404":{"description":"Campagne introuvable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"too_late, already_started ou already_cancelled (error_code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"cancelCampaign"}},"/api/v1/contact-lists":{"get":{"summary":"Lister vos groupes de contacts","responses":{"200":{"description":"Groupes","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactList"}}}}}}},"401":{"description":"Clé API absente, invalide ou révoquée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listContactLists"},"post":{"summary":"Créer un groupe (avec contacts en option)","responses":{"201":{"description":"Groupe créé, avec le compte rendu d'import","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactListCreateResponse"}}}},"400":{"description":"name manquant, contacts mal formé ou plus de 1000 contacts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Clé API absente, invalide ou révoquée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createContactList","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactListCreateRequest"}}}}}},"/api/v1/contact-lists/{id}":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"summary":"Un groupe de contacts","responses":{"200":{"description":"Groupe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactListEnvelope"}}}},"404":{"description":"Groupe introuvable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getContactList"},"delete":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"summary":"Supprimer un groupe et ses contacts","responses":{"200":{"description":"Supprimé","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"404":{"description":"Groupe introuvable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Groupe utilisé par une campagne récurrente","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteContactList"},"patch":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"summary":"Renommer un groupe ou changer sa description","responses":{"200":{"description":"Groupe modifié","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactListEnvelope"}}}},"400":{"description":"name vide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Groupe introuvable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateContactList","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactListUpdateRequest"}}}}}},"/api/v1/contact-lists/{id}/contacts":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"query","name":"page","description":"Page, à partir de 1","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","description":"Contacts par page, 500 maximum (50 par défaut)","required":false,"schema":{"type":"integer"}}],"summary":"Contacts d'un groupe (paginés)","responses":{"200":{"description":"Contacts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactPage"}}}},"404":{"description":"Groupe introuvable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listContacts"},"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"summary":"Ajouter des contacts (1000 maximum par requête)","responses":{"200":{"description":"Compte rendu d'import","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportEnvelope"}}}},"400":{"description":"contacts vide, mal formé ou plus de 1000","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Groupe introuvable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"addContacts","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactsAddRequest"}}}}}},"/api/v1/contact-lists/{id}/contacts/{contact_id}":{"delete":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"contact_id","required":true,"schema":{"type":"string","format":"uuid"}}],"summary":"Retirer un contact d'un groupe","responses":{"200":{"description":"Retiré","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"404":{"description":"Groupe ou contact introuvable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteContact"}},"/api/v1/messages":{"get":{"parameters":[{"in":"query","name":"page","description":"Page, à partir de 1","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","description":"Messages par page, 100 maximum (20 par défaut)","required":false,"schema":{"type":"integer"}}],"summary":"Lister vos messages","responses":{"200":{"description":"Liste paginée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageList"}}}},"400":{"description":"Paramètres d'envoi sur la route de liste : il manque /send","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Clé API absente, invalide ou révoquée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listMessages"},"post":{"summary":"Envoyer un SMS","responses":{"201":{"description":"Accepté pour envoi (ou programmé)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendResponse"}}}},"400":{"description":"Paramètre requis manquant ou scheduled_at invalide (invalid_schedule)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Clé API absente, invalide ou révoquée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Solde insuffisant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Sender ID introuvable ou rejeté","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Numéro non routable (invalid_recipient) ou Sender ID ambigu","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Quota journalier de la clé API dépassé","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"sendMessage","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRequest"}}}}}},"/api/v1/messages/bulk":{"post":{"summary":"Envoyer en masse (1000 destinataires maximum)","responses":{"207":{"description":"Résultat par destinataire","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResponse"}}}},"400":{"description":"Paramètre requis manquant ou scheduled_at invalide (invalid_schedule)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Clé API absente, invalide ou révoquée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Solde insuffisant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Sender ID introuvable ou rejeté","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Quota journalier de la clé API dépassé","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"sendBulk","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRequest"}}}}}},"/api/v1/messages/send":{"get":{"description":"Même action que POST /api/v1/messages. Le contenu et le numéro transitent dans l'URL : préférez le POST.","parameters":[{"in":"query","name":"recipient","description":"Numéro du destinataire","required":true,"schema":{"type":"string"}},{"in":"query","name":"text","description":"Contenu du SMS","required":true,"schema":{"type":"string"}},{"in":"query","name":"sender","description":"Sender ID (sensible à la casse)","required":true,"schema":{"type":"string"}}],"summary":"Envoyer un SMS (logiciels limités au GET)","responses":{"201":{"description":"Accepté pour envoi","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendResponse"}}}},"400":{"description":"Paramètre requis manquant ou scheduled_at invalide (invalid_schedule)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Clé API absente, invalide ou révoquée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Solde insuffisant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Sender ID introuvable ou rejeté","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Numéro non routable (invalid_recipient) ou Sender ID ambigu","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Quota journalier de la clé API dépassé","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"sendMessageGet"}},"/api/v1/messages/{id}":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"summary":"Statut d'un message","responses":{"200":{"description":"Message","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Message"}}}}}},"401":{"description":"Clé API absente, invalide ou révoquée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Message introuvable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getMessage"},"delete":{"description":"Rend le crédit réservé. Possible tant que le message est programmé, en attente, et à plus d'une minute de son heure d'envoi.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"summary":"Annuler un envoi programmé","responses":{"200":{"description":"Annulé","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelResponse"}}}},"401":{"description":"Clé API absente, invalide ou révoquée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Message introuvable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Non annulable : already_sent, already_cancelled, not_scheduled ou too_late (error_code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"cancelMessage"}},"/api/v1/otp/send":{"post":{"description":"Nous générons le code, l'envoyons par SMS (facturé 1 SMS) et le vérifions via /api/v1/otp/verify. Le code n'est jamais renvoyé. Un nouveau code au même numéro annule le précédent.","summary":"OTP géré : générer et envoyer un code","responses":{"201":{"description":"Code envoyé","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpSendResponse"}}}},"400":{"description":"Paramètre requis manquant ou scheduled_at invalide (invalid_schedule)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Clé API absente, invalide ou révoquée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Solde insuffisant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Sender ID introuvable ou rejeté","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Numéro non routable (invalid_recipient) ou Sender ID ambigu","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Quota de la clé dépassé ou plus de 5 codes en 10 minutes pour ce numéro","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"sendOtp","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpSendRequest"}}}}}},"/api/v1/otp/verify":{"post":{"summary":"OTP géré : vérifier un code","responses":{"200":{"description":"Résultat (valid true ou false)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpVerifyResponse"}}}},"400":{"description":"Paramètre requis manquant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Clé API absente, invalide ou révoquée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"OTP introuvable (ou appartenant à un autre compte)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"verifyOtp","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpVerifyRequest"}}}}}},"/api/v1/sender-ids":{"get":{"summary":"Vos Sender ID approuvés","responses":{"200":{"description":"Sender ID approuvés","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SenderId"}}}}}}},"401":{"description":"Clé API absente, invalide ou révoquée","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listSenderIds"}}},"openapi":"3.1.0","security":[{"bearerAuth":[]},{"apiKeyQuery":[]}],"servers":[{"url":"https://v2.smspro.cm"}]}