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}