POST/email_addresses/{email_address_id}/prepare_verification

Send a verification code to an email address

Sends a one-time code to the given email address so that a backend can verify the user controls it (for example, in a custom, backend-driven sign-in flow). The code is tracked on its own verification; confirm it with attempt_verification.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter
email_address_idstringrequired
The ID of the email address to send the verification code to

7 status codes
200The verification. After prepare_verification it is pending (unverified); after attempt_verification its status reflects the attempt outcome.
objectstringoptional
The type of the verification object.
idstringoptional
The ID of the verification. Pass this to attempt_verification.
statusstringoptional
The status of the verification (unverified, verified, expired, or failed).
strategystringoptional
The verification strategy (email_code or phone_code).
attemptsintegeroptional
The number of attempts made against this verification.
expire_atintegeroptional
Unix timestamp (milliseconds) at which the code expires.
channelstringoptional
The channel the code was sent over (phone numbers only).
400Request was not successful
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
401Authentication invalid
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
403Authorization invalid
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
404Resource not found
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
429Request was not successful
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
500Request was not successful
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional

Error handling

A 400 is returned: Request was not successful. A 401 is returned: Authentication invalid. A 403 is returned: Authorization invalid. A 404 is returned: Resource not found. A 429 is returned: Request was not successful. A 500 is returned: Request was not successful.