Verify email

Confirms user email using a 6-digit code sent to inbox. This step is required before any financial operation.


Flow

1. Request code

Call /request_confirmation/ with email: true to send code to user email.

2. Verify code

Send received code to /verify_email/ with by_phone: false to confirm email. Profile field email_verified is updated to true.


Step 1 - Request email verification code

Request verification code (email)

Authorizations

Both x-api-key and Authorization: Bearer <token> headers are required.

Endpoint

POSThttps://dev.backend.colurs.co/request_confirmation/

Required Headers

Content-Type: application/jsonAccept: application/jsonx-api-key: [API_KEY]Authorization: Bearer [ACCESS_TOKEN]

Request Body

FieldTypeRequiredDescription
emailbooleanMust be true to send code by email
phonebooleanMust be false when verifying email

cURL Example

curl -X POST https://dev.backend.colurs.co/request_confirmation/ \
-H "Authorization: Bearer [ACCESS_TOKEN]" \
-H "x-api-key: [API_KEY]" \
-H "Content-Type: application/json" \
-d '{"phone": false, "email": true}'

Response

response.json
{
"message": 
"Verification code sent"}
⏱️
Code expires in 5 minutes. If it expires, request a new one.

Step 2 - Verify email code

Verify email

Authorizations

Both x-api-key and Authorization: Bearer <token> headers are required.

Endpoint

POSThttps://dev.backend.colurs.co/verify_email/

Required Headers

Content-Type: application/jsonAccept: application/jsonx-api-key: [API_KEY]Authorization: Bearer [ACCESS_TOKEN]

Request Body

FieldTypeRequiredDescription
codestring6-digit code received by email
by_phonebooleanMust be false for email verification

cURL Example

curl -X POST https://dev.backend.colurs.co/verify_email/ \
-H "Authorization: Bearer [ACCESS_TOKEN]" \
-H "x-api-key: [API_KEY]" \
-H "Content-Type: application/json" \
-d '{"code": "123456", "by_phone": false}'

Response

response.json
Profile field email_verified is updated to true on success.

Also verify phone to unlock all features. See Verify phone.