Launch email verification with Management API

This article gives instructions on how to launch the email verification process with the Management API, to verify an email address of a specific User.

In short, the steps are

  1. (Optional) Have an email template prepared on ID server beforehand.

  2. Call the POST /api/rest/v1/user/{userId}/email/verify API.

The API will send the User an email message based on the template, which contains an unique link. The User clicks the link which opens a web page on the ID service, at which point their email address will be marked as verified.

Instructions

(Optional) Prepare an email template

Create an Email template which contains the text content. You can create any number of templates for different purposes, and you can update them later.

Check the API documentation for the current supported special variable names you can embed in the template. You must include at least the verification link variable: ${verificationUrl}.

Creating an email template is optional. If no template is specified in the API call, a message with default content is sent.

Call the verifying API

The API to send the email is POST /api/rest/v1/user/{userId}/email/verify. You can find the detailed documentation in the Management API documentation under the Email section.

This API verifies an email address of a single User, so you will need the user ID. You can customise some aspects of the verification process with additional parameters. Check the API schema for details.

Use the ID of your custom email template as emailTemplateId to use it.

Insert custom variable values to the template with the emailTemplateProperties parameter.