Skip to main content
Replyke exposes two user type variants depending on context: User (public profile) and AuthUser (the authenticated user’s own data). All SDK hooks and API endpoints return one of these two types.

User

The User type is returned when fetching another user’s public profile. Sensitive and internal fields are excluded.
PropertyTypeDescription
idstringUnique user identifier (UUID).
foreignIdstring | nullYour system’s user ID if this user was created via external auth.
projectIdstringThe project this user belongs to.
role"admin" | "moderator" | "visitor"The user’s role within the project.
namestring | nullDisplay name.
usernamestring | nullUnique username handle.
avatarstring | nullAvatar image URL.
avatarFileIdstring | nullID of the managed avatar file record.
bannerFileIdstring | nullID of the managed banner file record.
avatarFileFile | nullPopulated avatar file object when include contains "files".
bannerFileFile | nullPopulated banner file object when include contains "files".
biostring | nullShort biography (max 300 characters).
birthdateDate | nullUser’s date of birth.
locationGeoPoint | nullGeoJSON point representing the user’s location.
metadataRecord<string, any>Custom key-value data for your project (max 10 KB).
reputationnumberAutomatically computed reputation score based on activity.
createdAtDateTimestamp when the account was created.

GeoPoint

PropertyTypeDescription
type"Point"GeoJSON geometry type. Always "Point".
coordinates[number, number]Longitude and latitude, in that order.

AuthUser

The AuthUser type is returned to the currently authenticated user about themselves. It extends User with additional fields not visible to others. All User fields above are included, plus:
PropertyTypeDescription
emailstring | nullThe user’s email address.
isVerifiedbooleanWhether the user’s email address has been verified.
isActivebooleanWhether the account is currently active.
lastActiveDateTimestamp of the user’s last activity.
updatedAtDateTimestamp when the account was last modified.
authMethodsstring[]Authentication methods linked to this account (e.g. ["password", "google"]).
suspensionsSuspension[]Array of active or past suspensions.

Suspension

PropertyTypeDescription
reasonstring | nullThe reason provided for the suspension.
startDateDateWhen the suspension began.
endDateDate | nullWhen the suspension ends, or null for indefinite.

Includes

Some endpoints accept an include parameter that populates additional fields. Pass "files" to populate avatarFile and bannerFile with File objects.

See Also