Skip to content
SoulFire LogoSoulFire

Start login flow

POST
/v1/login

Initiates a login flow for the specified email address.

If the email is registered, a six-digit verification code is sent to that address. The response always indicates that an email code step is next, regardless of whether the email exists, to prevent email enumeration attacks.

Request Body

application/json
  1. body

Request message for initiating a login flow with an email address.

email*string

The email address of the user attempting to log in. If a user with this email exists, a six-digit verification code will be sent to this address. For security reasons, the response is the same whether or not the email is registered, preventing enumeration attacks.

Formatemail

Response Body

Response message representing the next step in the authentication flow.

application/json
  1. response

Response message representing the next step in the authentication flow. This is a polymorphic response that indicates what action should be taken next.

authFlowToken*string

A unique token identifying this authentication flow session. This token must be included in subsequent requests (e.g., EmailCodeRequest) to continue the flow. The token is a UUID string and expires after 15 minutes of inactivity.

Formatuuid
emailCode?

Set when the client should prompt the user to enter the email verification code. This is the response after a successful Login RPC call.

success?

Set when authentication is complete and successful. Contains the JWT token for authenticated API access.

failure?

Set when authentication has failed. Contains the reason for the failure.

Example Request
curl -X POST 'http://127.0.0.1:38765/v1/login' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": ""
}'
Example Response
{
  "authFlowToken": "f7af6c1d-a324-4e10-abb9-7a86eaca85d7",
  "emailCode": {},
  "success": {
    "token": "string"
  },
  "failure": {
    "reason": "INVALID_CODE"
  }
}

Was this page helpful?