Users data types ​
Fields below are declared serialized members. Base types contribute their own fields; related types link the payload graph. ? means nullable, and required marks a required C# initializer. These are schematic C# contract shapes, not compilable declarations or a separate JSON schema. Constructor members are repeated in the field list for easy scanning. Serialization attributes and implementation helpers are omitted; use the linked source for exact wire aliases and formatters.
Account ​
Represents a user account with associated avatar and status. Source
public partial record Account(
UserId Id,
long Version = 0
) : IHasId<UserId>, IHasVersion<long>, IRequirementTarget
{
UserId Id;
long Version;
AccountStatus Status;
Avatar Avatar;
}Related types: AccountStatus, Avatar, UserId.
AccountFull ​
Extended Account with full user details including identities and claims. Source
public sealed partial record AccountFull : Account
{
int FormatVersion;
bool IsAdmin;
bool SyncContacts;
Phone? Phone;
string Email;
string Name;
bool IsGreetingCompleted;
Moment CreatedAt;
string TimeZone;
AliasId? AliasId;
ApiMap<string, string> Claims;
bool IsBot;
ApiMap<string, string> JsonCompatibleIdentities;
}Related types: Account, AliasId, Phone.
JsonCompatibleIdentities is serialized under the name Identities, converting identity keys to strings.
AccountStatus ​
Specifies the status of a user account. Source
public enum AccountStatus
{
Active = 0,
Inactive = 1,
Suspended = 2,
Removed = 3,
}Accounts_CancelRegister ​
Command payload for accounts cancel register. Source
public sealed partial record Accounts_CancelRegister : ApiCommand<Unit>
{
required string Token;
}Related types: ApiCommand.
Accounts_ConfirmRegister ​
Command payload for accounts confirm register. Source
public sealed partial record Accounts_ConfirmRegister : ApiCommand<Unit>
{
required string Token;
}Related types: ApiCommand.
Accounts_CreateApiKey ​
Command payload for accounts create api key. Source
public sealed partial record Accounts_CreateApiKey : ApiCommand<string>
{
required string Name;
int ExpiresInDays;
}Related types: ApiCommand.
Accounts_DeactivateAllSessions ​
Command payload for accounts deactivate all sessions. Source
public sealed partial record Accounts_DeactivateAllSessions : ApiCommand<Unit>
{
required SessionKind[] Kinds;
}Related types: ApiCommand, SessionKind.
Accounts_DeactivateSession ​
Command payload for accounts deactivate session. Source
public sealed partial record Accounts_DeactivateSession : ApiCommand<Unit>
{
required string IdPrefix;
}Related types: ApiCommand.
Accounts_DeleteOwn ​
Command payload for accounts delete own. Source
public sealed partial record Accounts_DeleteOwn : ApiCommand<Unit>No additional serialized fields are declared here; use the base contract or string-identifier representation.
Related types: ApiCommand.
Accounts_SignOut ​
Command payload for accounts sign out. Source
public sealed partial record Accounts_SignOut : ApiCommand<Unit>
{
bool Deactivate;
}Related types: ApiCommand.
Accounts_Update ​
Command payload for accounts update. Source
public sealed partial record Accounts_Update : ApiCommand<Unit>
{
required AccountFull Account;
required long? ExpectedVersion;
}Related types: AccountFull, ApiCommand.
AppUpdateInfo ​
App Update Info contract used by the API operations and related records below. Source
public sealed partial record AppUpdateInfo(
AppKind AppKind,
string VersionString,
string StoreVersionString,
Moment ReleasedAt,
Moment DetectedAt
)
{
AppKind AppKind;
string VersionString;
string StoreVersionString;
Moment ReleasedAt;
Moment DetectedAt;
}Related types: AppKind.
Avatar ​
Represents a user's avatar with name, picture, and bio information. Source
public partial record Avatar(
Symbol Id,
long Version = 0
) : IHasId<Symbol>, IHasVersion<long>, IRequirementTarget
{
Symbol Id;
long Version;
string Name;
string PictureUrl;
MediaId? MediaId;
string Bio;
string AvatarKey;
Media.Media? Media;
}Related types: Media, MediaId.
AvatarDiff ​
Partial changes to avatar; omitted optional members leave their values unchanged. Source
public sealed partial record AvatarDiff : RecordDiff
{
string? Name;
string? Bio;
MediaId? LegacyMediaId;
string? PictureUrl;
string? AvatarKey;
UserId? UserId;
bool? IsAnonymous;
Option<MediaId?> MediaId;
}Related types: MediaId, RecordDiff, UserId.
AvatarFull ​
Extended Avatar with user association and anonymity flag. Source
public sealed partial record AvatarFull(
UserId UserId,
Symbol Id = default,
long Version = 0
) : Avatar(Id, Version)
{
UserId UserId;
bool IsAnonymous;
}Related types: Avatar, UserId.
Avatars_Change ​
Command payload for avatars change. Source
public sealed partial record Avatars_Change : ApiCommand<AvatarFull>
{
required Symbol AvatarId;
required long? ExpectedVersion;
required Change<AvatarDiff> Change;
}Related types: ApiCommand, AvatarDiff, AvatarFull, Change.
Avatars_SetDefault ​
Command payload for avatars set default. Source
public sealed partial record Avatars_SetDefault : ApiCommand<Unit>
{
required Symbol AvatarId;
}Related types: ApiCommand.
ChatPosition ​
Represents a user's position within a chat conversation. Source
public sealed partial record ChatPosition(
long EntryLid = 0,
string Origin = ""
) : IHasOrigin
{
long EntryLid;
string Origin;
}ChatPositionKind ​
Specifies the type of position tracked in a chat. Source
public enum ChatPositionKind
{
Read = 0,
View,
Heard,
}ChatPositions_Set ​
Command payload for chat positions set. Source
public sealed partial record ChatPositions_Set : ApiCommand<Unit>, INotDeduplicated
{
required ChatId ChatId;
required ChatPositionKind Kind;
required ChatPosition Position;
}Related types: ApiCommand, ChatId, ChatPosition, ChatPositionKind.
ChatUsageListKind ​
Specifies the type of chat usage tracking list. Source
public enum ChatUsageListKind
{
PeerChatsWroteTo = 0,
ViewedGroupChats = 1,
SearchChats = 2,
}ChatUsages_RegisterUsage ​
Command payload for chat usages register usage. Source
public sealed partial record ChatUsages_RegisterUsage
: ApiCommand<Unit>,
INotDeduplicated
{
required ChatUsageListKind Kind;
required ChatId ChatId;
DateTime? AccessTime;
}Related types: ApiCommand, ChatId, ChatUsageListKind.
DigestPreview ​
Digest Preview contract used by the API operations and related records below. Source
public sealed partial record DigestPreview
{
DigestPreviewChat[] Chats;
int OtherUnreadCount;
string RenderedHtml;
string UnsubscribeLink;
}Related types: DigestPreviewChat.
DigestPreviewChat ​
Digest Preview Chat contract used by the API operations and related records below. Source
public sealed partial record DigestPreviewChat
{
string ChatId;
string Name;
string Link;
long UnreadCount;
string[] BulletPoints;
}EmailAuth_SendTotp ​
Command payload for email auth send totp. Source
public sealed partial record EmailAuth_SendTotp : ApiCommand<Moment>
{
required Email Email;
TotpPurpose Purpose;
string? CaptchaToken;
string? CaptchaAction;
}Related types: ApiCommand, Email, TotpPurpose.
EmailAuth_ValidateTotp ​
Command payload for email auth validate totp. Source
public sealed partial record EmailAuth_ValidateTotp : ApiCommand<bool>
{
required Email Email;
required int Totp;
}Related types: ApiCommand, Email.
EmailAuth_VerifyEmail ​
Command payload for email auth verify email. Source
public sealed partial record EmailAuth_VerifyEmail : ApiCommand<bool>
{
required Email Email;
required int Token;
}Related types: ApiCommand, Email.
Emails_SendDigest ​
Command payload for emails send digest. Source
public sealed partial record Emails_SendDigest : ApiCommand<Unit>No additional serialized fields are declared here; use the base contract or string-identifier representation.
Related types: ApiCommand.
NativeAuth_SignInApple ​
Command payload for native auth sign in apple. Source
public sealed partial record NativeAuth_SignInApple : ApiCommand<Unit>
{
required string UserId;
required string Code;
required string? Email;
required string? Name;
}Related types: ApiCommand.
NativeAuth_SignInGoogle ​
Command payload for native auth sign in google. Source
public sealed partial record NativeAuth_SignInGoogle : ApiCommand<Unit>
{
required string Code;
}Related types: ApiCommand.
NativeAuth_SignOut ​
Command payload for native auth sign out. Source
public sealed partial record NativeAuth_SignOut : ApiCommand<Unit>No additional serialized fields are declared here; use the base contract or string-identifier representation.
Related types: ApiCommand.
OwnVoiceStatus ​
What the "Use my own voice" setting shows: the consent, the clone's state, and what's missing for the sample. MissingDuration is for the auto sample only - null with an explicit one. Source
public sealed partial record OwnVoiceStatus(
bool IsEnabled,
UserVoiceStatus Status,
VoiceSampleFailure Failure,
TimeSpan? MissingDuration,
bool HasExplicitSample
)
{
bool IsEnabled;
UserVoiceStatus Status;
VoiceSampleFailure Failure;
TimeSpan? MissingDuration;
bool HasExplicitSample;
}Related types: UserVoiceStatus, VoiceSampleFailure.
PhoneAuth_SendCode ​
Command payload for phone auth send code. Source
public sealed partial record PhoneAuth_SendCode : ApiCommand<TotpSendResult>
{
required Phone Phone;
TotpPurpose Purpose;
string? CaptchaToken;
string? CaptchaAction;
TotpChannel? Channel;
}Related types: ApiCommand, Phone, TotpChannel, TotpPurpose, TotpSendResult.
PhoneAuth_SendTotp ​
Command payload for phone auth send totp. Source
public sealed partial record PhoneAuth_SendTotp : ApiCommand<Moment>
{
required Phone Phone;
TotpPurpose Purpose;
string? CaptchaToken;
string? CaptchaAction;
}Related types: ApiCommand, Phone, TotpPurpose.
PhoneAuth_ValidateTotp ​
Command payload for phone auth validate totp. Source
public sealed partial record PhoneAuth_ValidateTotp : ApiCommand<bool>
{
required Phone Phone;
required int Totp;
}Related types: ApiCommand, Phone.
PhoneAuth_VerifyPhone ​
Command payload for phone auth verify phone. Source
public sealed partial record PhoneAuth_VerifyPhone : ApiCommand<bool>
{
required Phone Phone;
required int Totp;
}Related types: ApiCommand, Phone.
Presence ​
Specifies a user's online presence status. Source
public enum Presence
{
Unknown = 0,
Offline = 1,
Online = 2,
Away = 3,
Recording = 6,
}RecaptchaValidationResult ​
Result of a reCAPTCHA validation request. Source
public sealed partial record RecaptchaValidationResult(
bool Success,
string? ErrorMessage = null,
float? Score = null
)
{
bool Success;
string? ErrorMessage;
float? Score;
}RpcEndpointReason ​
Allowed values for rpc endpoint reason. Source
public enum RpcEndpointReason
{
Retained = 0,
Measured,
Unmeasurable,
Demoted,
}RpcEndpointReport ​
What a client reports about the RPC endpoint it connected through, so the split between direct and relayed connections can be measured rather than assumed. Source
public sealed partial record RpcEndpointReport(
string Endpoint,
RpcEndpointReason Reason,
double OriginProbeMs = -1,
double EndpointProbeMs = -1
)
{
string Endpoint;
RpcEndpointReason Reason;
double OriginProbeMs;
double EndpointProbeMs;
}Related types: RpcEndpointReason.
ServerApiInfo ​
Server API version and compatibility information. Source
public sealed partial record ServerApiInfo(
CompatibilityLevel CompatibilityLevel,
string VersionString,
string FullVersionString,
string DisplayVersionString,
string MinReportableClientVersion = ""
)
{
CompatibilityLevel CompatibilityLevel;
string VersionString;
string FullVersionString;
string DisplayVersionString;
string MinReportableClientVersion;
}Related types: CompatibilityLevel.
SessionInfo ​
Session Info contract used by the API operations and related records below. Source
public partial record SessionInfo(string IdPrefix)
{
string IdPrefix;
long Version;
bool IsActive;
Moment CreatedAt;
Moment LastSeenAt;
Moment ExpiresAt;
UserIdentity AuthenticatedIdentity;
UserId? UserId;
string Description;
string IPAddress;
bool IsCurrent;
}Related types: UserId, UserIdentity.
SessionInfoFull ​
Extended session info with version tracking. Source
public partial record SessionInfoFull(
Session Session
) : SessionInfo(
ReferenceEquals(Session, null) ? "" : Session.IdPrefix
), IRequirementTarget, IHasVersion<long>
{
Session Session;
UserId? GuestId;
}Related types: SessionInfo, UserId.
SessionTemporals_Set ​
Command payload for session temporals set. Source
public sealed partial record SessionTemporals_Set : ApiCommand<Unit>
{
required string Key;
required string? Value;
}Related types: ApiCommand.
SystemProperties_InvalidateEverything ​
Command payload for system properties invalidate everything. Source
public sealed partial record SystemProperties_InvalidateEverything(
Session Session,
bool Everywhere = false
) : ISessionCommand<Unit>, IApiCommand
{
Session Session;
bool Everywhere;
}SystemProperties_PruneComputedGraph ​
Command payload for system properties prune computed graph. Source
public sealed partial record SystemProperties_PruneComputedGraph(
Session Session,
bool Everywhere = false
) : ISessionCommand<Unit>, IApiCommand
{
Session Session;
bool Everywhere;
}TimeZone ​
Represents a time zone with Windows and IANA identifiers. Source
public sealed partial record TimeZone(string Id) : IHasId<string>
{
string Id;
string IanaName;
int UtcOffsetMinutes;
string City;
string CountryCode;
string CountryName;
}TotpChannel ​
Specifies the channel a time-based one-time password (TOTP) was delivered through. Source
public enum TotpChannel
{
Telegram,
Sms,
}TotpPurpose ​
Specifies the purpose of a time-based one-time password (TOTP). Source
public enum TotpPurpose
{
SignInPhone,
SignInEmail,
VerifyPhone,
VerifyEmail,
}TotpSendResult ​
Totp Send Result contract used by the API operations and related records below. Source
public sealed partial record TotpSendResult(Moment NextSendAt, TotpChannel? Channel )
{
Moment NextSendAt;
TotpChannel? Channel;
}Related types: TotpChannel.
UserIdentity ​
User Identity contract used by the API operations and related records below. Source
public readonly partial record struct UserIdentity
: IStringLike<UserIdentity>,
IComparable<UserIdentity>
{
string Id;
}UserPresences_CheckIn ​
Command payload for user presences check in. Source
public sealed partial record UserPresences_CheckIn
: ApiCommand<Unit>,
INotDeduplicated
{
required bool IsActive;
bool MustExtendSession;
}Related types: ApiCommand.
UserVoiceStatus ​
Allowed values for user voice status. Source
public enum UserVoiceStatus
{
None = 0,
Creating,
Ready,
Failed,
}VoiceMode ​
Specifies whether messages include voice, text, or both. Source
public enum VoiceMode
{
TextAndVoice,
JustText,
JustVoice,
}VoiceSampleFailure ​
Why a voice clone's reference clip can't be made from what the user has. Source
public enum VoiceSampleFailure
{
None = 0,
NotEnoughRecordings,
SampleMissing,
}