Docuflex › E-signature › API › Auth
API reference: Auth
Session endpoints used by the web app; dev-login is never available in production.
Create a Docuflex account Read the API reference Connect your AI agent
| Method | Path | What it does |
|---|---|---|
POST | /v1/auth/dev-login | Dev-only login (mints a session without Google/Clerk) 404 unless AUTH_DEV_LOGIN_ENABLED; never available in production. |
POST | /v1/auth/logout | Revoke the current web session and clear the cookie |
GET | /v1/auth/me | Current principal + user + memberships (account switcher) |
POST | /v1/auth/clerk/sync | Ensure Clerk-user provisioning ran; returns the me payload Provisioning (user + personal account + owner membership) happens on first authenticated request; this endpoint exists so the web app can force it after sign-up. |
Conventions
- Base URL:
https://api.docuflex.net; tenant routes are/v1/accounts/{accountId}/.... - Auth:
x-api-key: dfx_live_..., orAuthorization: Bearer <OAuth2 access token>. - Errors: always
{"error":{"code","message","details","requestId"}}; the requestId is also in thex-request-idheader. - Pagination: offset (
?page=&pageSize=, max 100) or cursor (?cursor=&limit=, follownextCursoruntilhasMoreis false). - Idempotency: any POST or PUT accepts
Idempotency-Key; same key + different body is409 IDEMPOTENCY_KEY_REUSED. - Rate limits:
X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reseton every response;429 RATE_LIMITEDwithRetry-After. - Tabs: coordinates are fractions of the page (origin top-left);
documentIndexandrecipientIndexrefer to positions in the same request. - Spec: /openapi.json (OpenAPI 3). TypeScript client
@docuflex/sdk; Postman and Bruno collections ship with the repo.