HTTP API
Temel URL https://addtothese.com/api/v1. Kimlik doğrulaması Authorization: Bearer att_... (API token'ı) ya da tarayıcı oturumu ile birlikte X-CSRF-Token kullanılarak yapılır. Tüm gövdeler JSON'dur; hatalar {"error": "...", "code": "..."} biçimindedir.
| Yöntem | Yol | Amaç |
|---|---|---|
| POST | /auth/register | {email, password, name} |
| POST | /auth/login | {email, password}; {mfa_required: true} yanıtı dönebilir |
| POST | /auth/totp/verify | {code} |
| POST | /auth/logout | |
| POST | /auth/password/forgot | /auth/password/reset | {email} | {token, password} |
| GET | /auth/oauth/{google|github} | OAuth'u başlatır |
| GET/PATCH | /me | hesap; PATCH {name} |
| POST | /me/totp/setup | enable | disable | iki adımlı doğrulama |
| POST | /me/password | {current_password, new_password} |
| GET/POST/DELETE | /tokens[/{id}] | API token'ları; POST {name} sırrı bir kez döndürür |
| GET/POST/DELETE | /endpoints[/{id}] | POST {subdomain, protocol} |
| POST | /endpoints/ephemeral | {protocol} rastgele ad |
| GET/POST/DELETE | /domains[/{id}] | POST {domain, endpoint_id} |
| POST | /domains/{id}/verify | DNS kontrolü |
| POST | /agent-token | {endpoints: []} {token, upstream_url, endpoints, expires_at} döndürür |
| GET | /usage | mevcut dönem ve geçmiş |
| GET | /tunnels | bağlı ajanlar |
| GET | /billing/prices | planlar ve Stripe fiyatları |
| POST | /billing/checkout | /billing/portal | {price} {url} döndürür |