---
title: "POST Perform a test login for E2E (Internal Only)"
description: "This endpoint is exclusively for End-to-End (E2E) testing. It creates a temporary user, logs them in, and can optionally create an organization for them. It is strictly disabled outside of E2E test..."
last_updated: "2026-05-06T07:33:57.709931+00:00"
canonical_url: "https://www.doc0.dev/docs/49c89830-117b-4def-8edc-b5bcc50766e0/api/auth/testlogin"
---

<APIEndpoint
  method={"POST"}
  path={"/api/auth/test-login"}
  summary={"Perform a test login for E2E (Internal Only)"}
  description={"This endpoint is exclusively for End-to-End (E2E) testing. It creates a temporary user, logs them in, and can optionally create an organization for them. It is strictly disabled outside of E2E test mode."}
  deprecated={false}
  baseUrl={""}
/>

## Request Body

User credentials and optional organization creation flag.

<APIRequestBody
  contentType={"application/json"}
  required={true}
  schema={{"type":"object"}}
/>

## Responses

<APIResponse
  statusCode={"200"}
  description={"Login successful and test user/organization created (if applicable)."}
  contentType={"application/json"}
  schema={{"type":"object"}}
/>

<APIResponse
  statusCode={"400"}
  description={"Invalid request body or sign-up/sign-in failed."}
  contentType={"application/json"}
  schema={{"type":"object"}}
/>

<APIResponse
  statusCode={"403"}
  description={"Not allowed outside of E2E test mode."}
  contentType={"application/json"}
  schema={{"type":"object"}}
/>

<APIResponse
  statusCode={"500"}
  description={"Internal server error during test login process."}
  contentType={"application/json"}
  schema={{"type":"object"}}
/>

## Try It

<APIPlayground
  method={"POST"}
  path={"/api/auth/test-login"}
  parameters={[]}
  requestBody={{"contentType":"application/json","required":true,"description":"User credentials and optional organization creation flag.","schema":{"type":"object"}}}
  baseUrl={""}
/>


## Sitemap

See the full [sitemap](https://www.doc0.dev/docs/49c89830-117b-4def-8edc-b5bcc50766e0/llms.txt) for all pages in this wiki.
