Request a Sign-In Code
Start the OTP flow and send a sign-in code to the correct email address.
API In this interface
4 steps Steps
1 examples Examples
Use this path when
Start the OTP flow over REST so the user receives the right sign-in or sign-up code.
What you'll finish here
- Start the OTP flow correctly.
- Use the correct purpose value for sign-in or sign-up.
- Handle cooldowns and lockouts without guessing.
Where this happens
Before you start
- No bearer token is required for this call.
Same Task, Other Interfaces
Use the version that matches where you are working now. The subject matter stays the same; the delivery changes by surface.
Do the work
- 1. Send a JSON body with `email` and, optionally, `purpose`.
- 2. Use `signin` for an existing user flow or `signup` for a first-run flow.
- 3. Read the JSON response and capture the `expiresAt` value so the next step happens before the code expires.
- 4. If the server returns a cooldown or lockout response, wait for the provided retry window.
Keep this clear
- A valid email address is required. Invalid or blank email input fails immediately.
Request an OTP over REST
bash
curl -X POST http://localhost:5173/api/v1/auth/request-otp -H 'content-type: application/json' -d '{"email":"you@example.com","purpose":"signin"}'Keep Going in Sign In and Sessions
Stay in the same interface and move to the next closest task in this topic when needed.
API Sign In and Sessions
Verify the Sign-In Code
Complete the OTP flow, establish the human session, and move into the workspace or terminal workflow.
4 steps · 1 examples
API Sign In and Sessions
Refresh a Human Session
Keep a human API session alive by exchanging the refresh token for a fresh token pair.
4 steps · 1 examples
API Sign In and Sessions
Revoke a Human Session
Invalidate a human API session explicitly instead of waiting for the access token to expire.
4 steps
Nearby Guides
These guides stay close to the current workflow so you can keep moving without restarting discovery.