Nest Authbeta

POST /auth/passwordless/send

Passwordless — send login code (email or SMS)

Passwordless — send login code (email or SMS)

POST/auth/passwordless/send

Request body

NestAuthPasswordlessSendRequestDto

FieldTypeRequiredDescription
identifierstringrequiredEmail or phone (per `channel`)
Example: user@example.com
channel"email" | "sms"required
emailsms
tenantIdstringoptional

Examples

Example
{
  "identifier": "user@example.com",
  "channel": "email",
  "tenantId": "string"
}

Responses

200

MessageResponseDto

FieldTypeRequiredDescription
messagestringrequiredResponse message

Example response

{
  "message": "string"
}
400Validation failed (bad input).

ApiErrorResponseDto

FieldTypeRequiredDescription
statusCodenumberrequiredHTTP status code
Example: 401
errorstringrequiredHTTP status text / exception name
Example: Unauthorized
messagestringrequiredHuman-readable message
Example: Invalid credentials
codestringrequiredStable, machine-readable error code — branch on this, not the message
Example: INVALID_CREDENTIALS

Example response

{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "Invalid credentials",
  "code": "INVALID_CREDENTIALS"
}
401Missing, invalid, or expired authentication.

ApiErrorResponseDto

FieldTypeRequiredDescription
statusCodenumberrequiredHTTP status code
Example: 401
errorstringrequiredHTTP status text / exception name
Example: Unauthorized
messagestringrequiredHuman-readable message
Example: Invalid credentials
codestringrequiredStable, machine-readable error code — branch on this, not the message
Example: INVALID_CREDENTIALS

Example response

{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "Invalid credentials",
  "code": "INVALID_CREDENTIALS"
}

Try it

curl -X POST 'https://api.example.com/auth/passwordless/send' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -d '{"identifier":"user@example.com","channel":"email","tenantId":"string"}'

On this page