Skip to content

Verify a code for email or phone

POST
/verify-code
curl --request POST \
--url http://localhost:8000/api/v1/verify-code \
--header 'Content-Type: application/json' \
--data '{ "contact": "example", "code": "example", "type": "email", "purpose": "registration" }'
Media type application/json
object
contact
required

Email address or phone number

string
code
required

Verification code

string
type
required

Type of contact

string
Allowed values: email phone
purpose

Purpose of verification (optional, defaults to “registration”)

string
Allowed values: registration login
Example
registration

Code verified successfully

Invalid or expired code

Validation error