API Auth
This content is not available in your language yet.
L’API Pionne utilise Laravel Sanctum. Après login, tu reçois un token à passer dans Authorization: Bearer <token> pour toutes les routes protégées.
Base URL : https://api.pionne.app
POST /api/auth/register
Section intitulée « POST /api/auth/register »Crée un compte. Démarre automatiquement un essai de 30 jours.
{ "email": "you@example.com", "password": "min8chars", "name": "Jane Doe"}Response 201
Section intitulée « Response 201 »{ "user": { "id": "usr_a1b2c3", "email": "you@example.com", "name": "Jane Doe", "trial_ends_at": "2026-06-04T12:00:00Z" }, "token": "1|abcXYZ..."}422— Email déjà pris ou format invalide.
POST /api/auth/login
Section intitulée « POST /api/auth/login »{ "email": "you@example.com", "password": "..."}Response 200
Section intitulée « Response 200 »{ "user": { "id": "usr_a1b2c3", "email": "you@example.com", "name": "Jane Doe" }, "token": "2|defGHI..."}401— Email/mot de passe incorrect.429— Trop de tentatives (rate limit).
POST /api/auth/logout
Section intitulée « POST /api/auth/logout »Révoque le token courant.
Authorization: Bearer <token>Response 204
Section intitulée « Response 204 »Pas de body.
GET /api/auth/me
Section intitulée « GET /api/auth/me »Renvoie l’utilisateur courant.
Authorization: Bearer <token>Response 200
Section intitulée « Response 200 »{ "id": "usr_a1b2c3", "email": "you@example.com", "name": "Jane Doe", "subscription": { "status": "trialing", "trial_ends_at": "2026-06-04T12:00:00Z", "plan": "monthly" }}