Send verification code to email or phone
POST
/send-verification-code
const url = 'http://localhost:8000/api/v1/send-verification-code';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"contact":"example","type":"email","purpose":"registration"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8000/api/v1/send-verification-code \ --header 'Content-Type: application/json' \ --data '{ "contact": "example", "type": "email", "purpose": "registration" }'Request Body required
Section titled “Request Body required ” Media type application/json
object
contact
required
Email address or phone number
string
type
required
Type of contact
string
purpose
Purpose of verification (optional, defaults to “registration”)
string
Example
registrationResponses
Section titled “ Responses ”Verification code sent successfully
Validation error
Too many requests