Resend Verification Email API

On this page

This API is used to resend the verification email to a User. This API is useful if the User has deleted the email, or the verification Id has expired. By default, the verification Id will expire after 24 hours. You can modify this duration in the Tenant settings.

Request#

Resend the verification email without authentication, or use an API key for more control over the request and response.

Without an API key#

No Authentication Required
Resend the verification email
PUT/api/user/verify-email?applicationId={applicationId}&email={email}
OpenAPI Spec

Query Parameters#

applicationId
  • Type: String
  • Optional
  • Available since 1.21.0

The Id of the application. If valid, the email or message template configured in the Application settings will be used, if present. If not present, the template configured in the Tenant settings will be used. In either case, the corresponding Application object will be available to the template.

email
  • Type: String
  • Required

The email address used to uniquely identify the User.

Request Headers#

X-FusionAuth-TenantId
  • Type: String
  • Optional

The unique Id of the tenant used to scope this API request.

When only a single tenant is configured the tenant Id can be assumed and this additional header is optional. Once more than one tenant has been configured in FusionAuth the tenant Id is required for this request because the input parameters by themselves do not indicate which tenant the request is intended.

The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

With an API key#

API Key Authentication
Resend the verification email using an API key
PUT/api/user/verify-email?applicationId={applicationId}&email={email}&sendVerifyEmail={sendVerifyEmail}
OpenAPI Spec

Query Parameters#

applicationId
  • Type: String
  • Optional
  • Available since 1.21.0

The Id of the application. If valid, the email or message template configured in the Application settings will be used, if present. If not present, the template configured in the Tenant settings will be used. In either case, the corresponding Application object will be available to the template.

email
  • Type: String
  • Required

The email address used to uniquely identify the User.

sendVerifyEmail
  • Type: Boolean
  • Optional
  • Defaults to true

If you would only like to generate a new verificationId and return it in the JSON body without FusionAuth attempting to send the User an email set this optional parameter to false.

This may be useful if you need to integrate the Email Verification process using a third party messaging service.

Request Headers#

X-FusionAuth-TenantId
  • Type: String
  • Optional

The unique Id of the tenant used to scope this API request.

When only a single tenant is configured the tenant Id can be assumed and this additional header is optional. Once more than one tenant has been configured in FusionAuth the tenant Id is required for this request because the input parameters by themselves do not indicate which tenant the request is intended.

The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

Response#

When authenticated using an API key a response body will be provided. If an API key was not used to authenticate the request no body is returned.

Response Codes
CodeDescription
200The request was successful. The response will contain a JSON body if an API key was used for authentication. If no API key was provided no response body will be returned.
400The request was invalid or malformed. The response contains an Errors JSON object with the specific errors. FusionAuth also returns a 400 when the request needs a paid FusionAuth license and no license is present.
401FusionAuth didn't authorize the request. The Authorization header is missing, the API key isn't valid, or the API key doesn't have permission for this endpoint and method. The response is empty. For more information, see Unauthorized Responses.
404The object you're updating doesn't exist. The response is empty.
500FusionAuth had an internal error and logged a stack trace in the FusionAuth log files. The response usually contains an Errors JSON object with the [Exception] general error code. On MySQL, a data field larger than the database column also returns 500. For more information, see Data Field Sizes.
503The search index is unavailable or returned an error, so FusionAuth can't complete the request. The response contains a JSON body.

Response Body#

verificationId
  • Type: String

The email verification Id that was generated by this API request. This identifier may be used by the Verify a User's Email API. This field is only returned in the JSON response body if the request was authenticated using an API key, if an API key is not used no response body is returned.

verificationOneTimeCode
  • Type: String

Depending on your tenant configuration, this may be returned. The verification One Time Code is used with the gated Email Verification workflow. The user enters this code to verify their email.

Starter+ plan To use gated email, you'll need at least a Starter plan.

Example Response JSON
{
  "verificationId": "YkQY5Gsyo4RlfmDciBGRmvfj3RmatUqrbjoIZ19fmw4",
  "verificationOneTimeCode": "JJ6RTS"
}