HTTP API

ベース URL は https://addtothese.com/api/v1 です。Authorization: Bearer att_...(API トークン)、またはブラウザのセッションと X-CSRF-Token で認証します。ボディはすべて JSON で、エラーは {"error": "...", "code": "..."} の形式です。

メソッドパス用途
POST/auth/register{email, password, name}
POST/auth/login{email, password}。{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}OAuth を開始
GET/PATCH/meアカウント。PATCH {name}
POST/me/totp/setup | enable | disable二要素認証
POST/me/password{current_password, new_password}
GET/POST/DELETE/tokens[/{id}]API トークン。POST {name} はシークレットを一度だけ返す
GET/POST/DELETE/endpoints[/{id}]POST {subdomain, protocol}
POST/endpoints/ephemeral{protocol} ランダムな名前
GET/POST/DELETE/domains[/{id}]POST {domain, endpoint_id}
POST/domains/{id}/verifyDNS チェック
POST/agent-token{endpoints: []} で {token, upstream_url, endpoints, expires_at} を返す
GET/usage現在の期間と履歴
GET/tunnels接続中のエージェント
GET/billing/pricesプランと Stripe の価格
POST/billing/checkout | /billing/portal{price} で {url} を返す