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}/verifyفحص DNS
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}