HTTP API

Base URL https://addtothese.com/api/v1. Xác thực bằng Authorization: Bearer att_... (token API) hoặc phiên trình duyệt kèm X-CSRF-Token. Mọi body đều là JSON; lỗi có dạng {"error": "...", "code": "..."}.

Phương thứcPathMục đích
POST/auth/register{email, password, name}
POST/auth/login{email, password}; có thể trả về {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}bắt đầu OAuth
GET/PATCH/metài khoản; PATCH {name}
POST/me/totp/setup | enable | disablexác thực hai lớp
POST/me/password{current_password, new_password}
GET/POST/DELETE/tokens[/{id}]token API; POST {name} trả về secret một lần duy nhất
GET/POST/DELETE/endpoints[/{id}]POST {subdomain, protocol}
POST/endpoints/ephemeral{protocol} tên ngẫu nhiên
GET/POST/DELETE/domains[/{id}]POST {domain, endpoint_id}
POST/domains/{id}/verifykiểm tra DNS
POST/agent-token{endpoints: []} trả về {token, upstream_url, endpoints, expires_at}
GET/usagechu kỳ hiện tại và lịch sử
GET/tunnelscác agent đang kết nối
GET/billing/pricescác gói và giá Stripe
POST/billing/checkout | /billing/portal{price} trả về {url}