Skip to content

Get OTP of a customer by email

GET https://api.leapa.co/v2/customers/email/{email}/otp

This endpoint needs your API key

Send it as a bearer token in the Authorization header. A request without one is answered with 401. See Authentication for where to find your key and how to keep it secret.

Request

curl -X GET "https://api.leapa.co/v2/customers/email/jeanne@example.com/otp" \
  -H "Authorization: Bearer $LEAPA_API_KEY" \
  -H "Accept: application/json"

Response

OK

{
  "code": 0,
  "expirationTime": 0,
  "isConfirmed": false,
  "customerId": "cus_3d8e51fa20",
  "customerName": "Jeanne Ndayishimiye",
  "confirmed": false
}

Path parameters

Values that go into the URL itself.

  • emailstringrequired
    Example:jeanne@example.com

Response

application/json
  • codeinteger<int32>
  • expirationTimeinteger<int64>
  • isConfirmedboolean
  • customerIdstring
  • customerNamestring
  • confirmedboolean

Status codes

  • 200OK
  • 400Bad request
  • 401Unauthorized
  • 402Payment required
  • 403Forbidden
  • 404Not found
  • 428Precondition required
  • 500Server error

Request

curl -X GET "https://api.leapa.co/v2/customers/email/jeanne@example.com/otp" \
  -H "Authorization: Bearer $LEAPA_API_KEY" \
  -H "Accept: application/json"

Response

OK

{
  "code": 0,
  "expirationTime": 0,
  "isConfirmed": false,
  "customerId": "cus_3d8e51fa20",
  "customerName": "Jeanne Ndayishimiye",
  "confirmed": false
}