E mail et alertes
SMTP et alertes configurables.
AdminTokenAuthorizationBearer <token>PONT_ADMIN_TOKEN, pour les routes /admin.
Configuration.
application/json- response
vault?booleanconfigured*booleanhost*string|nullport*integer|nullsecurity*|nulluser*string|nullfrom*string|nullpasswordSet*booleanLe mot de passe n'est jamais renvoyé : seulement s'il existe.
curl -X GET 'http://localhost:8787/admin/email'{ "vault": true, "configured": true, "host": "string", "port": 0, "security": "none", "user": "string", "from": "string", "passwordSet": true}AdminTokenAuthorizationBearer <token>PONT_ADMIN_TOKEN, pour les routes /admin.
Supprimée.
application/json- response
vault?booleanconfigured*booleanhost*string|nullport*integer|nullsecurity*|nulluser*string|nullfrom*string|nullpasswordSet*booleanLe mot de passe n'est jamais renvoyé : seulement s'il existe.
curl -X DELETE 'http://localhost:8787/admin/email'{ "vault": true, "configured": true, "host": "string", "port": 0, "security": "none", "user": "string", "from": "string", "passwordSet": true}AdminTokenAuthorizationBearer <token>PONT_ADMIN_TOKEN, pour les routes /admin.
application/json- body
host*stringServeur SMTP.
1 <= length <= 255port*integerPort SMTP.
1 <= value <= 65535security*stringnone : sans chiffrement (réseau local) ; starttls : port 587 ; tls : port 465.
"none""starttls""tls"user?stringIdentifiant SMTP.
length <= 255password?stringMot de passe SMTP. Omis ou vide : l'ancien est conservé.
length <= 1000from*stringAdresse d'expédition : contact@exemple.bj ou Pont <contact@exemple.bj>.
3 <= length <= 255Configuration enregistrée.
application/json- response
vault?booleanconfigured*booleanhost*string|nullport*integer|nullsecurity*|nulluser*string|nullfrom*string|nullpasswordSet*booleanLe mot de passe n'est jamais renvoyé : seulement s'il existe.
curl -X PUT 'http://localhost:8787/admin/email' \ -H 'Content-Type: application/json' \ -d '{ "host": "smtp.exemple.bj", "port": 587, "security": "starttls", "user": "contact@exemple.bj", "from": "Pont <contact@exemple.bj>"}'{ "vault": true, "configured": true, "host": "string", "port": 0, "security": "none", "user": "string", "from": "string", "passwordSet": true}AdminTokenAuthorizationBearer <token>PONT_ADMIN_TOKEN, pour les routes /admin.
application/json- body
to*stringemailE-mail envoyé.
application/json- response
sent?booleancurl -X POST 'http://localhost:8787/admin/email/test' \ -H 'Content-Type: application/json' \ -d '{ "to": "moi@exemple.bj"}'{ "sent": true}AdminTokenAuthorizationBearer <token>PONT_ADMIN_TOKEN, pour les routes /admin.
application/json- body
to*stringemailsubject*stringtext*stringhtml?stringE-mail envoyé.
application/json- response
sent?booleancurl -X POST 'http://localhost:8787/admin/email/send' \ -H 'Content-Type: application/json' \ -d '{ "to": "moi@exemple.bj", "subject": "Bonjour", "text": "Message de test."}'{ "sent": true}AdminTokenAuthorizationBearer <token>PONT_ADMIN_TOKEN, pour les routes /admin.
Alertes.
application/json- response
vault*booleanemailConfigured*booleanrules*array<>recipients*array<>lowBalanceThreshold*integerhistory*array<>50 dernières alertes.
curl -X GET 'http://localhost:8787/admin/alerts'{ "vault": true, "emailConfigured": true, "rules": [ { "id": "payment_failed", "label": "string", "description": "string", "enabled": true } ], "recipients": [ "user@example.com" ], "lowBalanceThreshold": 0, "history": [ { "id": "string", "rule": "string", "title": "string", "detail": "string", "at": 0, "status": "sent", "error": "string" } ]}AdminTokenAuthorizationBearer <token>PONT_ADMIN_TOKEN, pour les routes /admin.
application/json- body
rules?Règle activée ou non, par identifiant (payment_failed, webhook_failed, payout_stuck, low_balance, admin_login).
recipients?array<>Destinataires, 20 au plus.
lowBalanceThreshold?integerSeuil du compte de transit pour la règle low_balance.
Alertes configurées.
application/json- response
vault*booleanemailConfigured*booleanrules*array<>recipients*array<>lowBalanceThreshold*integerhistory*array<>50 dernières alertes.
curl -X PUT 'http://localhost:8787/admin/alerts' \ -H 'Content-Type: application/json' \ -d '{ "rules": { "payment_failed": true, "admin_login": true }, "recipients": [ "moi@exemple.bj" ], "lowBalanceThreshold": 100000}'{ "vault": true, "emailConfigured": true, "rules": [ { "id": "payment_failed", "label": "string", "description": "string", "enabled": true } ], "recipients": [ "user@example.com" ], "lowBalanceThreshold": 0, "history": [ { "id": "string", "rule": "string", "title": "string", "detail": "string", "at": 0, "status": "sent", "error": "string" } ]}AdminTokenAuthorizationBearer <token>PONT_ADMIN_TOKEN, pour les routes /admin.
Alerte envoyée.
application/json- response
sent?booleancurl -X POST 'http://localhost:8787/admin/alerts/test'{ "sent": true}AdminTokenAuthorizationBearer <token>PONT_ADMIN_TOKEN, pour les routes /admin.
application/json- body
rule*"admin_login""admin_login"detail?stringÉvénement traité.
application/json- response
curl -X POST 'http://localhost:8787/admin/alerts/events' \ -H 'Content-Type: application/json' \ -d '{ "rule": "admin_login", "detail": "Connexion de ancien@exemple.bj"}'{}