API HTTP
URL de base https://addtothese.com/api/v1. Authentifiez-vous avec Authorization: Bearer att_... (jeton API) ou avec la session du navigateur plus X-CSRF-Token. Tous les corps sont en JSON ; les erreurs ont la forme {"error": "...", "code": "..."}.
| Méthode | Chemin | Usage |
|---|---|---|
| POST | /auth/register | {email, password, name} |
| POST | /auth/login | {email, password} ; peut répondre {mfa_required: true} |
| POST | /auth/totp/verify | {code} |
| POST | /auth/logout | |
| POST | /auth/password/forgot | /auth/password/reset | {email} | {token, password} |
| GET | /auth/oauth/{google|github} | lance OAuth |
| GET/PATCH | /me | compte ; PATCH {name} |
| POST | /me/totp/setup | enable | disable | double authentification |
| POST | /me/password | {current_password, new_password} |
| GET/POST/DELETE | /tokens[/{id}] | jetons API ; POST {name} renvoie le secret une seule fois |
| GET/POST/DELETE | /endpoints[/{id}] | POST {subdomain, protocol} |
| POST | /endpoints/ephemeral | {protocol} nom aléatoire |
| GET/POST/DELETE | /domains[/{id}] | POST {domain, endpoint_id} |
| POST | /domains/{id}/verify | vérification DNS |
| POST | /agent-token | {endpoints: []} renvoie {token, upstream_url, endpoints, expires_at} |
| GET | /usage | période en cours et historique |
| GET | /tunnels | agents connectés |
| GET | /billing/prices | plans et prix Stripe |
| POST | /billing/checkout | /billing/portal | {price} renvoie {url} |