Skip to content

Verify the Sign-In Code

Complete the OTP flow, establish the human session, and move into the workspace or terminal workflow.

Best for Human member and CLI user Updated April 3, 2026
API In this interface
4 steps Steps
1 examples Examples
Use this path when

Call the verify endpoint to exchange the code for a short-lived access token and a refresh token.

What you'll finish here
  • Submit the code in the correct place.
  • Capture the returned session tokens when using the API or CLI.
  • Land in the right post-verification surface.

Where this happens

LabelValueNotes
EndpointPOST /api/v1/auth/verify-otpVerifies the code and mints a human API session.

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. 1. Send `email`, `code`, and the same `purpose` value used when the OTP was requested.
  2. 2. Optionally include `name` for first-run identity creation and `label` for session naming.
  3. 3. Store the returned `accessToken` and `refreshToken` if the client needs to keep the session alive.
  4. 4. Use the returned bearer token on protected endpoints such as `/api/v1/me` and `/api/v1/workspaces/{workspaceId}/tasks`.

Keep this clear

  • The server deletes the OTP after a successful verification.
  • An invalid code increments failure state and may eventually lock the flow temporarily.

Verify the code over REST

bash
curl -X POST http://localhost:5173/api/v1/auth/verify-otp   -H 'content-type: application/json'   -d '{"email":"you@example.com","code":"123456","purpose":"signin","label":"Local CLI"}'

Keep Going in Sign In and Sessions

Stay in the same interface and move to the next closest task in this topic when needed.

Nearby Guides

These guides stay close to the current workflow so you can keep moving without restarting discovery.