2.5 KiB
2.5 KiB
WEVADS IA v2 - Backend/API contract (handoff front a Claude)
Date: 2026-03-10
Scope: backend et API v2 finalises; frontend v2 a realiser cote Claude.
1) Base API
- Base URL:
https://weval-consulting.com/api/v2 - Health:
GET /health - Auth: JWT Bearer token (
Authorization: Bearer <token>)
2) Auth
POST /auth/register- body:
{ "email", "password", "name", "company?" } - output:
{ status, token, user }
- body:
POST /auth/login- body:
{ "email", "password" } - output:
{ status, token, user }
- body:
GET /auth/me(auth)- output:
{ status, user }
- output:
3) Contacts
GET /contacts(meta)GET /contacts/list?page=1&limit=25&q=(auth)POST /contacts(auth)- body:
{ email, first_name?, last_name?, company?, phone?, country?, tags?[] }
- body:
PATCH /contacts/:id(auth)DELETE /contacts/:id(auth)
4) Templates
GET /templates(meta)GET /templates/list(auth)POST /templates(auth)- body:
{ name, category?, html?, text? }
- body:
PATCH /templates/:id(auth)DELETE /templates/:id(auth)
5) Campaigns
GET /campaigns(meta)GET /campaigns/list?page=1&limit=20&q=(auth)POST /campaigns(auth)- body:
{ name, subject, content_html?, audience_size? }
- body:
GET /campaigns/:id(auth)PATCH /campaigns/:id(auth)POST /campaigns/:id/schedule(auth)- body:
{ scheduled_at }
- body:
POST /campaigns/:id/send-simulate(auth)
6) Analytics
GET /analytics(meta)GET /analytics/overview(auth)GET /analytics/deliverability(auth)
7) AI endpoints
AI module
GET /ai(meta)POST /ai/subject-optimizerPOST /ai/content-generatorPOST /ai/send-time
Brain bridge
GET /brain/statusGET /brain/configs- fallback Sentinel actif si
BrainEngine/getConfigsretourne controller-not-found
- fallback Sentinel actif si
POST /brain/ai/subject-optimizerPOST /brain/ai/content-generatorPOST /brain/ai/send-timeGET /brain/pmta/status
8) Etat de validation
Valide en live (smoke E2E):
- health/meta endpoints: OK
- register/login + bearer auth: OK
- CRUD contacts/templates/campaigns: OK
- analytics overview: OK
- AI + brain AI endpoints: OK
- non-regression globale apres deploiement: PASS (
reports/nonreg_20260310_012904.md)
9) Travail restant (front a Claude)
- Construire UI v2 (auth, dashboard, contacts, campaigns, templates, analytics)
- Brancher formulaires et tables sur les endpoints ci-dessus
- Gestion token front (login/register/logout + refresh UX)
- Ecrans d'erreur/loading v2 et validations formulaire