From f2b58883e591c44092fcb5647b476ad8013287ba Mon Sep 17 00:00:00 2001 From: Pasindu Yeshan Date: Wed, 25 Mar 2026 11:28:23 +0530 Subject: [PATCH] Update verification code management API --- .../email-verification-on-update.md | 65 +++++++++++++++++-- .../mobile-verification-on-update.md | 3 + 2 files changed, 63 insertions(+), 5 deletions(-) diff --git a/en/includes/guides/users/attributes/email-verification-on-update.md b/en/includes/guides/users/attributes/email-verification-on-update.md index d90cfb6626..54a55d1d35 100644 --- a/en/includes/guides/users/attributes/email-verification-on-update.md +++ b/en/includes/guides/users/attributes/email-verification-on-update.md @@ -225,7 +225,58 @@ the verified email address will also be set as the primary email. ## Resend email verification -Run the following curl command in case you want to resend the email verification. +{% if product_name == "WSO2 Identity Server" %} +### By a non-privileged user + +Users can resend the email verification by executing the following API request. +{% endif %} + +!!! abstract "" + + === "Request format" + + ```curl + curl -X POST https://{{ host_name }}/api/identity/user/v1.0/me/resend-code + -H "Authorization: Bearer " + -H "Content-Type: application/json" \ + -d '{ + "properties": [{ + "key":"RecoveryScenario", + "value": + }] + }' + ``` + === "Sample request" + + ```curl + curl -X POST https://{{ host_name_example }}/api/identity/user/v1.0/me/resend-code + -H "Authorization: Bearer " + -H "Content-Type: application/json" \ + -d '{ + "properties": [{ + "key":"RecoveryScenario", + "value":"EMAIL_VERIFICATION_ON_UPDATE" + }] + }' + ``` + The verification scenario should be specified in the properties parameter of the request body as follows : + ``` + "properties": [{"key": "RecoveryScenario", "value": "EMAIL_VERIFICATION_ON_UPDATE"}] + ``` + - `EMAIL_VERIFICATION_ON_UPDATE`: Used when verifying a newly updated email address for a user.
+ - `EMAIL_VERIFICATION_ON_VERIFIED_LIST_UPDATE`: Used when updating the list of verified email addresses for a + user. + --- + + **Response** + ```curl + HTTP/1.1 201 Created + ``` + +{% if product_name == "WSO2 Identity Server" %} +### By a privileged user + +Privileged users can resend the email verification on behalf of a user by executing the following API request. !!! abstract "" @@ -248,8 +299,8 @@ Run the following curl command in case you want to resend the email verification ``` === "Sample request" - ``` - curl -X POST https://{{ host_name_example }}/api/identity/user/v1.0/resend-code + ```curl + curl -X POST https://{{ host_name_example }}/api/identity/user/v1.0/resend-code -H "Authorization: Bearer " -H "Content-Type: application/json" \ -d '{ @@ -268,12 +319,16 @@ Run the following curl command in case you want to resend the email verification "properties": [{"key": "RecoveryScenario", "value": "EMAIL_VERIFICATION_ON_UPDATE"}] ``` - `EMAIL_VERIFICATION_ON_UPDATE`: Used when verifying a newly updated email address for a user.
- - `EMAIL_VERIFICATION_ON_VERIFIED_LIST_UPDATE`: Used when updating the list of verified email addresses for a + - `EMAIL_VERIFICATION_ON_VERIFIED_LIST_UPDATE`: Used when updating the list of verified email addresses for a user. --- - + **Response** ```curl HTTP/1.1 201 Created ``` +{% if is_version >= "7.2.0" %} +For more details, see the [Verification Code Management API]({{base_path}}/apis/verification-code-management-rest-api/). +{% endif %} +{% endif %} diff --git a/en/includes/guides/users/attributes/mobile-verification-on-update.md b/en/includes/guides/users/attributes/mobile-verification-on-update.md index 4845b33425..5862a9099d 100644 --- a/en/includes/guides/users/attributes/mobile-verification-on-update.md +++ b/en/includes/guides/users/attributes/mobile-verification-on-update.md @@ -400,4 +400,7 @@ Privileged users can resend an SMS OTP on behalf of a user using the following A ``` "HTTP/1.1 201 Created" ``` +{% if is_version >= "7.2.0" %} +For more details, see the [Verification Code Management API]({{base_path}}/apis/verification-code-management-rest-api/). +{% endif %} {% endif %}