API ReferenceAuth
Send an OTP to a user
Emails a short numeric login code to an existing user. The user hands the code back to the integrator, which exchanges it for an access token via POST /auth/login-codes/verify. Always returns 202 to avoid account enumeration.
Authorization
ApiKeyAuth x-api-key<token>
API key for integrator authentication
In: header
Header Parameters
x-api-key*string
API key for authentication
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
import { PaytrieAPI, configure } from '@paytrie/sdk'configure({ headers: { 'x-api-key': process.env.PAYTRIE_API_KEY! } })const { data } = await PaytrieAPI.sendLoginCode({ email: "user@example.com"})Empty
{ "success": false, "errors": [ { "field": "string", "message": "string" } ]}