# Log in to the user account

This endpoint is utilized for user authentication, granting access to secured endpoints  that mandate authentication. Following successful authentication, a `blaize_session` is generated  for the user, enabling them to access the secure endpoints.

Endpoint: POST /blaize/login
Version: 2026-10-01
Security: CookieBlaizeSession, JwtQuery, JwtHeaderXBlaizeJwt, JwtHeaderXZephrJwt, JwtBearer, JwtCookie

## Security:

  - `CookieBlaizeSession` (unknown)
    apiKey in cookie blaize_session

  - `JwtQuery` (unknown)
    apiKey in query jwt

  - `JwtHeaderXBlaizeJwt` (unknown)
    apiKey in header x-blaize-jwt

  - `JwtHeaderXZephrJwt` (unknown)
    apiKey in header x-zephr-jwt

  - `JwtBearer` (unknown)
    http bearer JWT

  - `JwtCookie` (unknown)
    apiKey in cookie blaize_jwt

## Header parameters:

  - `cookie` (string)
    The session cookie is employed to ascertain whether a user is already authenticated or has an active session.

## Request fields (application/json):

  - `identifiers` (object, required)

  - `identifiers.email_address` (string)

  - `validators` (object, required)

  - `validators.password` (string)

  - `validators.use_sso` (boolean)
    When this is present there should be no identifiers in the body. The user is identified through a blaize_session cookie.

## Response 200:

  - `200` (unknown)
    OK. The user has logged in successfully.

## Response 200 fields (application/json):

  - `cookie` (string)
    The authenticated user session.
    Example: blaize_session=443ed68f-0b44-4f32-8443-553d584cb0dd; Expires=Fri, 16 Nov 2018 12:35:56 GMT; Path=/;

  - `message` (string)
    Example: Login successful

  - `tracking_id` (string)
    The user tracking ID.
    Example: 4fac49a6-e423-4ac1-b0ad-d678979344422

## Response 200 headers (application/json):

  - `Set-Cookie` (string)
    The authenticated user session.
    Example: blaize_session=443ed68f-0b44-4f32-8443-553d584cb0dd; Expires=Fri, 16 Nov 2024 12:35:56 GMT; Path=/;

  - ` Set-Cookie` (string)
    The user tracking ID.
    Example: blaize_tracking_id=b117093c-e1f7-4ee0-8dda-6b5205f7fbee; Expires=Fri, 16 Nov 2024 12:35:56 GMT; Path=/;

  - `  Set-Cookie` (string)
    The anonymous user session before authentication.
    Example: blaize_prev_anon_session=b117093c-e1f7-4ee0-8dda-6b5205f7fbee; Expires=Fri, 16 Nov 2024 12:35:56 GMT; Path=/;

## Response 400:

  - `400` (unknown)
    Bad Request. The server could not understand the request due to  invalid syntax or missing required parameters.

## Response 401:

  - `401` (unknown)
    Unauthorized. The user is unable to authenticate due to invalid login credentials,  resulting in a lack of authentication.

