User Account

Initialize authentication session

Changed on

Start a server-side authentication session and discover which sign-in methods are configured for the organization. This is the first step in the multi-step login flow.

Request body (optional)

  • You may omit the body, send an empty JSON object {}, or send { "email": "..." }.
  • email in the body is optional and kept for legacy reasons; omitting it does not prevent initialization. The web client typically calls this endpoint without a body and sends email on /authenticate instead.
  • When provided, email is stored on the session for correlation with subsequent steps.

Flow:

  1. Call this endpoint (optional JSON body as above).
  2. Receive a session token in the x-session-token response header.
  3. Send that token on subsequent /authenticate requests (x-session-token header).
  4. Use allowedMethods and authProviders from the response to render the login UI.

Session token

  • Returned as header x-session-token.
  • Required for /authenticate (and related steps) until it expires.

Multi-factor authentication

If the organization has MFA, complete multiple authentication steps; each step may return the next step's allowed methods.

post/userAccount/initAuth

Request

  • Base URL
    https://app.pipeshub.com/api/v1
  • URL
    https://app.pipeshub.com/api/v1/userAccount/initAuth
  • Auth
    none required

Request body

emailstring email

Optional; retained for legacy reasons. When set, stored on the auth session for correlation with later /authenticate calls (RFC 5321 compliant address). When the property is present it must be a well-formed address of at most 254 characters: an empty string, null or a malformed address is answered 400.

Example request

{
  "email": "user@example.com"
}

Response

Authentication session initialized successfully

currentStepinteger required

Current authentication step (0-indexed). Always 0 for initial response.

allowedMethodsstring[] required

List of allowed authentication methods for the current step

messagestring required

Response message

jitEnabledboolean required

True when at least one allowed external provider has JIT provisioning enabled

Example response

{
  "allowedMethods": [
    "password",
    "google",
    "otp"
  ],
  "message": "Authentication initialized"
}

Changes

    • breaking

      added the pattern ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9-]*\.)+[A-Za-z]{2,}$ to the request property

    • warning

      the request property's maxLength was set to 254

    • info

      added the media type application/x-www-form-urlencoded to the request body

    • info

      added the optional property // to the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • info

      removed the azureAd enum value from the / response property for the response status

    • info

      removed the oauth enum value from the / response property for the response status

    • info

      removed the samlSso enum value from the / response property for the response status