Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.useveil.co/llms.txt

Use this file to discover all available pages before exploring further.

Five tools manage your Veil session inside a chat. Start every workflow with veil_get_session_status to check whether you are already logged in before prompting for credentials.

veil_get_session_status

Check whether there is an active Veil session for this installation. Use this at the start of any workflow. Inputs None. Outputs
status
string
required
authenticated when logged in, unauthenticated when not.
user
object
Present when status is authenticated. Contains id, email, onboardingStatus, accountType, username (null if not claimed), displayUsername, and activeMode (sandbox or live).
expiresAt
string
ISO 8601 timestamp when the current session expires.
Example
[calls veil_get_session_status]
→ status: "authenticated", user.email: "you@example.com",
  user.activeMode: "sandbox", expiresAt: "2026-05-14T15:00:00Z"

veil_request_otp

Send a one-time password to the user’s email to begin login. Inputs
email
string
required
Email address to send the login code to.
Outputs
status
string
required
sent on success. rate_limited if too many requests were made recently. email_send_failed or error on failure.
requestId
string
ID to pass to veil_verify_otp along with the code.
expiresInSeconds
number
How long the code is valid.
retryAfterSeconds
number
Seconds to wait before retrying when status is rate_limited.
reason
string
Error description on failure.
Example
[calls veil_request_otp with email="you@example.com"]
→ status: "sent", requestId: "req_abc123", expiresInSeconds: 300

veil_verify_otp

Complete login by submitting the six-digit code from the user’s email. Inputs
requestId
string
required
From a previous veil_request_otp call.
otp
string
required
The six-digit numeric code from the email.
Outputs
status
string
required
logged_in on success. invalid, expired, too_many_attempts, already_used, or error on failure.
user
object
Present when status is logged_in. Contains id, email, isNewUser, onboardingStatus, and accountType.
attemptsRemaining
number
Remaining attempts when status is invalid.
reason
string
Error description on failure.
Example
[calls veil_verify_otp with requestId="req_abc123", otp="482910"]
→ status: "logged_in", user.email: "you@example.com", user.isNewUser: false

veil_logout

Revoke the current Veil session. Safe to call when already logged out. Inputs None. Outputs
status
string
required
logged_out if there was an active session, not_logged_in if already logged out, error on failure.
reason
string
Error description when status is error.
Example
[calls veil_logout]
→ status: "logged_out"

veil_set_mode

Switch this installation between sandbox (test) and live (real money) modes.
Mode switching affects only this installation. The dashboard and other paired devices are not changed. Use the dashboard’s mode toggle to change all surfaces at once.
veil_set_mode is a write operation, so it’s subject to a tighter rate limit than the read-only session tools. Inputs
mode
string
required
sandbox or live.
Outputs
status
string
required
switched on success, error on failure.
activeMode
string
The mode now active: sandbox or live.
reason
string
Error description when status is error.
Example
[calls veil_set_mode with mode="live"]
→ status: "switched", activeMode: "live"

See also

  • In-chat flow — how the login sequence fits into an offramp conversation