EmailAddress

@Serializable
data class EmailAddress(val id: String, val emailAddress: String, val verification: Verification? = null, val linkedTo: List<EmailAddress.LinkedEntity>? = null, val createdAt: Long? = null)

The EmailAddress object represents an email address associated with a user.

This class provides methods to create, retrieve, verify, and delete email addresses.

Parameters

id

The unique identifier for the email address.

emailAddress

The email address value.

verification

The verification status of the email address.

linkedTo

A list of linked accounts or identifiers associated with this email address.

createdAt

The creation timestamp of the email address, as a Unix timestamp in milliseconds.

Constructors

Link copied to clipboard
constructor(id: String, emailAddress: String, verification: Verification? = null, linkedTo: List<EmailAddress.LinkedEntity>? = null, createdAt: Long? = null)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
@Serializable
data class LinkedEntity(val id: String, val type: String)
Link copied to clipboard
sealed interface PrepareVerificationParams

Properties

Link copied to clipboard
@SerialName(value = "created_at")
val createdAt: Long?

Created at timestamp

Link copied to clipboard
@SerialName(value = "email_address")
val emailAddress: String

The email address value.

Link copied to clipboard
val id: String

The unique identifier for the email address.

Link copied to clipboard

Convenience function to tell whether the email is the user's primary email.

Link copied to clipboard

Convenience function to tell whether the email is verified.

Link copied to clipboard
@SerialName(value = "linked_to")
val linkedTo: List<EmailAddress.LinkedEntity>?

A list of linked accounts or identifiers associated with this email address.

Link copied to clipboard

The verification status of the email address.

Functions

Link copied to clipboard

Attempts to verify the email address with the given code.

Link copied to clipboard

Deletes the EmailAddress from the server.

Link copied to clipboard

Retrieves the EmailAddress from the server.

Link copied to clipboard

Prepares the email address for verification using the specified strategy.

Link copied to clipboard

Sends a verification code to this email address.

Link copied to clipboard

Verifies this email address using the provided verification code.