Sign Up (New Users)
Creating a new Flowtask account is a two-step process. First, you request a one-time passcode (OTP) sent to your email. Then you verify the OTP along with your password to complete registration. A session is created for you automatically on success.Send OTP to your email
Submit your email address to receive a one-time passcode. The OTP is valid for 5 minutes.Response — Check your inbox for the six-digit code and proceed to the next step before it expires.
200 OKVerify OTP and create your account
Submit the OTP code along with your email and a password of your choice. On success, your account is created and a session cookie is set automatically.Response —
200 OKThe response includes a Set-Cookie header containing your session cookie. In browser environments, the cookie is stored and sent automatically. For non-browser clients, capture and store this cookie for use in all subsequent requests.Sign In (Existing Users)
If you already have a Flowtask account, exchange your email and password for a session cookie directly — no OTP step required.200 OK
A session cookie is set in the response. All protected API endpoints will recognise you as authenticated as long as this cookie is present and valid.
Check Authentication Status
Use the auth-check endpoint to verify whether your current session is still valid. This is useful for conditionally redirecting users to a sign-in screen or refreshing UI state.200 OK. Read the isAuthenticated field in the response body to determine session state:
Response — 200 OK (authenticated)
200 OK (not authenticated)
isAuthenticated is false, redirect the user to your sign-in screen. No request body is required.
Sign Out
Sending a logout request destroys your server-side session and clears the session cookie. After this call, any further requests to protected endpoints will return401 until you sign in again.
200 OK
No request body is required. The session cookie is cleared automatically.
Using the Session Cookie
Once you are signed in, you need to include your session cookie on every request to a protected endpoint. All v2 endpoints (/api/v2/...) require authentication and will return 401 if the cookie is missing or expired.
- Browser (fetch)
- Server-side / non-browser
Pass
credentials: 'include' to every fetch call. The browser attaches the session cookie automatically.Error Responses
| Status | When it happens |
|---|---|
400 | Invalid credentials or missing required fields in the request body |
401 | Session missing or expired — sign in again to get a new session cookie |
429 | OTP rate limit exceeded — wait 24 hours before requesting another OTP for this email |