> ## Documentation Index
> Fetch the complete documentation index at: https://stytch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Login Or Signup

> Sends an email OTP to the provided address for login or signup within the organization. Calls the `POST /sdk/v1/b2b/otps/email/login_or_signup` endpoint.

## Parameters

<ParamField body="organizationId" type="String" required />

<ParamField body="emailAddress" type="String" required />

<ParamField body="loginTemplateId" type="String?" />

<ParamField body="signupTemplateId" type="String?" />

<ParamField body="locale" type="String?" />

<ParamField body="loginExpirationMinutes" type="Int?" />

<ParamField body="signupExpirationMinutes" type="Int?" />

## Returns

<ResponseField name="requestId" type="String" required />

<ResponseField name="statusCode" type="Int" required />

<RequestExample>
  ```swift theme={null}
  let params = B2BOTPsEmailLoginOrSignupParameters(
      organizationId: "org-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
      emailAddress: "user@example.com"
  )
  let response = try await StytchB2B.otp.email.loginOrSignup(params)
  ```
</RequestExample>
