Send Discovery Email OTP

POST
https://test.stytch.com/v1/b2b/otps/email/discovery/send

Send a discovery OTP to an email address. The OTP is valid for 10 minutes. Only the most recently sent OTP is valid: when an OTP is sent, all OTPs previously sent to the same email address are invalidated, even if unused or unexpired.


Body parameters


email_address*string

login_template_idstring

localestring

discovery_expiration_minutesint

Response fields


request_idstring

status_codeint
const stytch = require('stytch');

const client = new stytch.B2BClient({
  project_id: 'PROJECT_ID',
  secret: 'SECRET',
});

const params = {
  email_address: "sandbox@stytch.com",
};

client.otps.email.discovery.send(params)
  .then(resp => { console.log(resp) })
  .catch(err => { console.log(err) });
RESPONSE
{
	"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
	"status_code": 200
}

Common Error Types