Skip to content

IMailboxService

This service processes your app's mailbox features on the Hive Axyl server. Based on the logged-in user, it provides mail sending and recall, sent mail and received mail retrieval, marking received mail as read, and mail deletion.

  • Interface: IMailboxService
  • Namespace: Hive.Axyl.Mailbox
  • Package: com.com2usplatform.hiveaxyl.mailbox

Registration and retrieval

using Hive.Axyl.Core;
using Hive.Axyl.Core.Unity;   // HiveBootstrap
using Hive.Axyl.Mailbox;

var config = CoreConfig.CreateBuilder("{appId}").Build();

HiveBootstrap.Initialize(config, builder =>
{
    builder.AddMailbox();
});

IMailboxService mailbox = HiveCore.Resolve<IMailboxService>();

Method summary

For the meaning of the 'Authentication' column, see Authentication requirement notation.

Sent mail

Method Authentication Description
SendMailAsync Session required Requests sending mail.
GetSentMailsAsync Session required Gets the list of sent mail.
GetMailAsync Session required Gets the details of a single sent mail item.
RevokeMailAsync Session required Requests a recall of sent mail.
DeleteSentMailAsync Session required Deletes sent mail.

Received mail

Method Authentication Description
GetReceivedMailsAsync Session required Gets the list of received mail.
GetReceivedMailAsync Session required Gets the details of a single received mail item.
MarkMailAsReadAsync Session required Marks the body or attached items of received mail as read.
DeleteReceivedMailAsync Session required Deletes received mail.

Common parameters

The last parameter of every method is ApiCallContext? context = null. If you omit it, the default values apply. For details, see Call context.

Every method takes the request body as the request parameter, and request is Required. The method descriptions below show only the request type and omit the parameter table. Check the fields of each request type in Data types.

Exceptions

  • ArgumentNullException: When request is null

Common Failure codes

The server responds with the following codes, but they are not feature-level results, so they branch to Failure, not Outcome. The cause code is contained in Failure.Problem.ExternalCode. For result branches and how to branch on them, see Core result model.

  • bad_request: Invalid request
  • invalid_parameter: Invalid request parameter format
  • missing_field: A required field or a required header itself, such as X-App-Id, is missing
  • missing_app_id: The X-App-Id header was sent, but its value is empty
  • unauthorized: The authentication token is missing or invalid
  • token_expired: The authentication token has expired
  • forbidden: No permission for the request
  • resource_not_found: The requested resource does not exist
  • method_not_allowed: The request method is not allowed
  • resource_conflict: The request conflicts with the resource state
  • unprocessable_content: The request content cannot be processed
  • rate_limit_exceeded: The request rate exceeds the allowed limit
  • internal_error: Internal server error
  • service_unavailable: The service is temporarily unavailable

Methods

SendMailAsync

Requests sending mail. It creates mail with a title, body, expiration time, recipients, and attached items, and the server accepts the request and then processes it asynchronously. Save MailId from the response, because you use it to get the sent mail with GetMailAsync, recall it with RevokeMailAsync, or delete it with DeleteSentMailAsync.

Attached items are reference information that identifies app content such as items, currency, and coupons. The mailbox does not actually grant attached items or mark them as claimed, so the app server handles verifying and granting the attached content.

When you call this method with a login session, you cannot specify Broadcast, which sends mail to all users, as the recipient scope. If you specify it, the result branches to BroadcastMailNotAllowedForUser, so specify recipients with Direct.

The SDK sends an idempotency key in the Idempotency-Key header with each send request, and it keeps the same key when the transport layer retries the request. For 60 minutes, the server treats requests that have both the same idempotency key and the same request body as duplicate requests. If you omit context or create a new ApiCallContext for each call, a different key is sent with each call, so even if you request the same mail again, it is sent as separate mail. When the app retries sending, pass the same request object as the first time again, and set the same key as the first time in ApiCallContext.IdempotencyKey. If the request body differs, the request is not treated as a duplicate.

Task<MailboxSendMailResult> SendMailAsync(SendMailRequest request, ApiCallContext? context = null);

Result cases — MailboxSendMailResult

Result case Wire code Description
Success — The server accepted the send request. The mail ID is in Data.MailId.
BroadcastMailNotAllowedForUser broadcast_mail_not_allowed_for_user You cannot send mail to all users with a login session.
UnknownOutcome UNKNOWN A new result that this SDK version does not recognize.
Failure FAILURE The call could not be completed. The common Failure codes also branch to this case.

For the implementation procedure, see Send mail and Duplicate sending prevention.


GetSentMailsAsync

Gets the list of mail sent by the logged-in user. You can filter the results by category, content type, and mail status. So that you can check the sending history, the list includes expired and recalled mail, but it excludes deleted mail.

The list is retrieved by cursor, only in the next-page direction. To get the next page, put Data.Meta.Page.NextCursor from the response in Cursor of the next request. No previous-page cursor is provided. If you do not specify MailCategory, only mail in the default DEFAULT category is retrieved.

Task<MailboxGetSentMailsResult> GetSentMailsAsync(GetSentMailsRequest request, ApiCallContext? context = null);

Result cases — MailboxGetSentMailsResult

Result case Wire code Description
Success — Retrieved successfully.
UnknownOutcome UNKNOWN A new result that this SDK version does not recognize.
Failure FAILURE The call could not be completed. The common Failure codes also branch to this case.

For the implementation procedure, see Get the sent mail list.


GetMailAsync

Gets the details of a single sent mail item. It returns the basic mail information together with the attached items. You cannot get deleted mail.

Task<MailboxGetMailResult> GetMailAsync(GetMailRequest request, ApiCallContext? context = null);

Result cases — MailboxGetMailResult

Result case Wire code Description
Success — Retrieved successfully.
UnknownOutcome UNKNOWN A new result that this SDK version does not recognize.
Failure FAILURE The call could not be completed. The common Failure codes also branch to this case.

For the implementation procedure, see Get details of a single mail item.


RevokeMailAsync

Requests a recall of sent mail. The mail status changes to Revoked, and among the mail delivered to recipients, only mail that has not been read yet is recalled. The server processes the recall from recipients' mailboxes asynchronously.

Task<MailboxRevokeMailResult> RevokeMailAsync(RevokeMailRequest request, ApiCallContext? context = null);

Result cases — MailboxRevokeMailResult

Result case Wire code Description
Success — The server accepted the recall request.
UnknownOutcome UNKNOWN A new result that this SDK version does not recognize.
Failure FAILURE The call could not be completed. The common Failure codes also branch to this case.

For the implementation procedure, see Recall mail.


DeleteSentMailAsync

Changes sent mail to the deleted state. Deleted mail is excluded from the sent mail list and from detail retrieval.

Task<MailboxDeleteSentMailResult> DeleteSentMailAsync(DeleteSentMailRequest request, ApiCallContext? context = null);

Result cases — MailboxDeleteSentMailResult

Result case Wire code Description
Success — Deleted the mail.
UnknownOutcome UNKNOWN A new result that this SDK version does not recognize.
Failure FAILURE The call could not be completed. The common Failure codes also branch to this case.

For the implementation procedure, see Delete sent mail.


GetReceivedMailsAsync

Gets the list of mail received by the logged-in user. You can filter the results by category, content type, and read status, and titles are returned in the requested language. Expired, recalled, and deleted mail is excluded.

The list is retrieved by cursor in both directions, forward and backward. Put Data.Meta.Page.NextCursor or PreviousCursor from the response in Cursor of the next request, and specify the direction with Direction. If you do not specify MailCategory, MailContentType, TextRead, or AttachmentRead, the list is retrieved without that condition.

Task<MailboxGetReceivedMailsResult> GetReceivedMailsAsync(GetReceivedMailsRequest request, ApiCallContext? context = null);

Result cases — MailboxGetReceivedMailsResult

Result case Wire code Description
Success — Retrieved successfully.
UnknownOutcome UNKNOWN A new result that this SDK version does not recognize.
Failure FAILURE The call could not be completed. The common Failure codes also branch to this case.

For the implementation procedure, see Get the received mail list.


GetReceivedMailAsync

Gets the details of a single received mail item. It returns the basic mail information, read status, and attached items together, and returns the title and body in the requested language. If there is no translation for the requested language, they are returned in the mail's default language.

Getting the mail does not change its read status. To mark the body or attached items as read, make a separate request with MarkMailAsReadAsync. You cannot get expired, recalled, or deleted mail.

Task<MailboxGetReceivedMailResult> GetReceivedMailAsync(GetReceivedMailRequest request, ApiCallContext? context = null);

Result cases — MailboxGetReceivedMailResult

Result case Wire code Description
Success — Retrieved successfully.
UnknownOutcome UNKNOWN A new result that this SDK version does not recognize.
Failure FAILURE The call could not be completed. The common Failure codes also branch to this case.

For the implementation procedure, see Get received mail details.


MarkMailAsReadAsync

Marks the body or attached items of received mail as read. Depending on Target, it records the body read time or the attached item read time, and the first recorded time is kept even if you call it multiple times.

The body read time and the attached item read time are null until you record them with this method. Getting the mail does not record the read time, so the app decides when to record it. For the processing flow, see Distinguish the read status from the claim status.

Task<MailboxMarkMailAsReadResult> MarkMailAsReadAsync(MarkMailAsReadRequest request, ApiCallContext? context = null);

Result cases — MailboxMarkMailAsReadResult

Result case Wire code Description
Success — Marked as read. Check the recorded times in Data.TextReadAt and Data.AttachmentReadAt.
UnknownOutcome UNKNOWN A new result that this SDK version does not recognize.
Failure FAILURE The call could not be completed. The common Failure codes also branch to this case.

For the implementation procedure, see Mark mail as read.


DeleteReceivedMailAsync

Changes received mail to the deleted state in the user's mailbox. You can delete it regardless of whether it has expired.

Task<MailboxDeleteReceivedMailResult> DeleteReceivedMailAsync(DeleteReceivedMailRequest request, ApiCallContext? context = null);

Result cases — MailboxDeleteReceivedMailResult

Result case Wire code Description
Success — Deleted the mail.
UnknownOutcome UNKNOWN A new result that this SDK version does not recognize.
Failure FAILURE The call could not be completed. The common Failure codes also branch to this case.

For the implementation procedure, see Delete received mail.

Data types

Fields shared by multiple types have the same meaning. All time fields are in UTC.

  • MailId: An ID that identifies a single sent mail item. Used to get, recall, and delete sent mail
  • MailRecipientId: An ID that identifies a single mail item delivered to a recipient's mailbox. Used to get, mark as read, and delete received mail
  • MailCategory: A mailbox category that the app defines, such as GROUP, GUILD, or EVENT. Used to retrieve mail divided into groups
  • SenderDisplayName: The sender name displayed on the mail screen. The value at the time of sending is stored, so later changes to the sender name are not reflected in mail that has already been sent
  • ExpiresAt: The time when the mail expires. Expired mail is excluded from the received mail list and detail retrieval, and it is included in the sent mail list and detail retrieval
  • Meta: Additional information that the server passes along as a raw JSON string without processing. Meta in list responses is MetaPage, which holds page information

AcceptedResponseData

The response when the server accepts a send request or a recall request.

Field Type Required Description
MailId string? Optional The ID of the mail for which the request was accepted.
AcceptedAt DateTimeOffset? Optional The time when the server accepted the request.
Meta string? Optional Additional information that the server passed along.

AttachmentItem

An attached item to include in the mail to send. The mailbox does not grant attached items, so the app sets the values needed to identify its content.

Field Type Required Description
AttachmentType string Optional The attached item type that the app defines, such as items, coupons, or currency. The default value is DEFAULT, and the maximum length is 30 characters.
ReferenceId string Required The ID that identifies the app's content. Up to 100 characters.
Quantity int Required The quantity to grant. It represents the number of items or the amount of currency to grant.

AxylCursorPagination

Page information for cursor-based list retrieval.

Field Type Required Description
NextCursor string? Optional The value to put in Cursor of the request to get the next page.
HasNext bool? Optional true if there is a next page.
PreviousCursor string? Optional The value to put in Cursor of the request to get the previous page. GetSentMailsAsync does not provide this value.
HasPrevious bool? Optional true if there is a previous page. It is null for methods that do not support bidirectional retrieval.

DeleteReceivedMailRequest

Field Type Required Description
MailRecipientId string Required The ID of the received mail to delete. Set MailRecipientId from the received mail list.

DeleteSentMailRequest

Field Type Required Description
MailId string Required The ID of the sent mail to delete.

DeletedReceivedMailResponseData

Field Type Required Description
MailRecipientId string? Optional The ID of the deleted received mail.
MailId string? Optional The original mail ID of the deleted received mail.
DeletedAt DateTimeOffset? Optional The time of deletion.
Meta string? Optional Additional information that the server passed along.

DeletedSentMailResponseData

Field Type Required Description
MailId string? Optional The ID of the deleted sent mail.
DeletedAt DateTimeOffset? Optional The time of deletion.
Meta string? Optional Additional information that the server passed along.

GetMailRequest

Field Type Required Description
MailId string Required The ID of the sent mail to get. Set MailId from the SendMailAsync response or the sent mail list.

GetReceivedMailRequest

Field Type Required Description
MailRecipientId string Required The ID of the received mail to get. Set MailRecipientId from the received mail list.
Language LanguageCode Required The language in which to receive the title and body. If there is no translation for this language, they are returned in the mail's default language.

GetReceivedMailsRequest

The retrieval conditions for the received mail list. Only the conditions with specified values are applied.

Field Type Required Description
Language LanguageCode? Optional The language in which to receive titles. If there is no translation for this language, they are returned in the mail's default language.
MailCategory string? Optional The mailbox category to retrieve. If not specified, no category condition is applied.
MailContentType ReceivedMailSearchRequestMailContentType? Optional The content type to retrieve. If not specified, no content type condition is applied.
TextRead bool? Optional The body read status condition. If true, only mail whose body has been read is retrieved; if false, only mail whose body has not been read is retrieved.
AttachmentRead bool? Optional The attached item read status condition. If true, only mail whose attached items have been marked as read is retrieved; if false, only mail whose attached items have not been marked as read is retrieved.
Cursor string? Optional The cursor from which to start retrieval. Set NextCursor or PreviousCursor from the previous response. If not specified, the first page is retrieved.
Direction ReceivedMailSearchRequestDirection? Optional The retrieval direction. If not specified, Next is used.
Size int Optional The number of mail items to retrieve at a time. The range is 1-50, and the default value is 10.

GetSentMailsRequest

The retrieval conditions for the sent mail list.

Field Type Required Description
MailCategory string Optional The mailbox category to retrieve. The default value is DEFAULT, and the maximum length is 64 characters.
MailContentType SentMailSearchRequestMailContentType? Optional The content type to retrieve. If not specified, all types are retrieved.
MailStatus SentMailSearchRequestMailStatus? Optional The mail status to retrieve. If not specified, all statuses are retrieved.
Cursor string? Optional The cursor from which to start retrieval. Set NextCursor from the previous response. If not specified, the first page is retrieved.
Size int Optional The number of mail items to retrieve at a time. The range is 1-50, and the default value is 10.

Mail

Mail information. It is delivered as Mail of MailRecipientResponseData.

Field Type Required Description
MailId string? Optional The mail ID.
MailCategory string Required The mailbox category.
MailContentType MailMailContentType? Optional The content type.
SenderType MailSenderType? Optional The sender type.
SenderId string? Optional The sender identifier.
SenderDisplayName string? Optional The sender name displayed on the mail screen.
RecipientScope MailRecipientScope? Optional The recipient scope.
RecipientPlayerIds IReadOnlyList<long>? Optional The list of Player IDs of the users who received the mail. It is null for mail sent to all users.
Title string? Optional The mail title displayed on the list and detail screens.
Body string? Optional The mail body displayed on the detail screen.
Language LanguageCode? Optional The default language of the mail. The mail is displayed in this language when there is no translation.
MailExtension string? Optional Mail policy data that the app defines. The server stores it as a string without interpreting it.
ExpiresAt DateTimeOffset? Optional The mail expiration time.
MailStatus MailMailStatus? Optional The mail status.
ClosedAt DateTimeOffset? Optional The time when the mail status changed to Expired or Revoked. It is null if the status is Active.
CreatedAt DateTimeOffset? Optional The time when the mail was created.
Attachments IReadOnlyList<MailAttachment>? Optional The list of attached items.

MailAttachment

Information about an attached item in the mail.

Field Type Required Description
MailId string? Optional The ID of the mail that the attached item belongs to.
Quantity int? Optional The quantity to grant.
AttachmentType string? Optional The attached item type that the app defined.
ReferenceId string? Optional The ID that identifies the app's content.
CreatedAt DateTimeOffset? Optional The time when the attached item was created.

MailRecipientResponseData

The response of GetReceivedMailAsync.

Field Type Required Description
MailRecipientId string? Optional The ID of the received mail.
Mail Mail? Optional Mail information. The title and body are in the requested language.
RecipientPlayerId long? Optional The Player ID of the user who received the mail.
DeliveredAt DateTimeOffset? Optional The time when the mail arrived.
TextReadAt DateTimeOffset? Optional The time when the body was marked as read. It is null if it has not been marked as read.
AttachmentReadAt DateTimeOffset? Optional The time when the attached items were marked as read. It is null if they have not been marked as read.
ExpiresAt DateTimeOffset? Optional The mail expiration time.
Meta string? Optional Additional information that the server passed along.

MailResponseData

The response of GetMailAsync. The fields are the same as Mail, with the addition of Meta of type string?, which is additional information that the server passed along.

MarkMailAsReadRequest

Field Type Required Description
MailRecipientId string Required The ID of the received mail to mark as read. Set MailRecipientId from the received mail list.
Target MarkMailRequestTarget Required The target to mark as read.

MarkMailResponseData

Field Type Required Description
MailRecipientId string? Optional The ID of the received mail that was marked as read.
TextReadAt DateTimeOffset? Optional The time when the body was marked as read. It is null if it has not been marked as read.
AttachmentReadAt DateTimeOffset? Optional The time when the attached items were marked as read. It is null if they have not been marked as read.
Meta string? Optional Additional information that the server passed along.

MetaPage

Field Type Required Description
Page AxylCursorPagination? Optional Cursor-based page information.

ReceivedMailListItem

An item in the received mail list.

Field Type Required Description
MailRecipientId string? Optional The ID of the received mail.
MailId string? Optional The ID of the original mail.
RecipientPlayerId long? Optional The Player ID of the user who received the mail.
DeliveredAt DateTimeOffset? Optional The time when the mail arrived.
TextReadAt DateTimeOffset? Optional The time when the body was marked as read. It is null if it has not been marked as read.
AttachmentReadAt DateTimeOffset? Optional The time when the attached items were marked as read. It is null if they have not been marked as read.
ExpiresAt DateTimeOffset? Optional The mail expiration time.
MailCategory string? Optional The mailbox category.
MailContentType ReceivedMailListItemMailContentType? Optional The content type.
Title string? Optional The mail title displayed on the list screen.
SenderId string? Optional The sender identifier.
SenderType ReceivedMailListItemSenderType? Optional The sender type.
SenderDisplayName string? Optional The sender name displayed on the mail screen.

ReceivedMailListResponseData

The response of GetReceivedMailsAsync.

Field Type Required Description
Items IReadOnlyList<ReceivedMailListItem> Required The received mail list.
Meta MetaPage? Optional Page information.

RevokeMailRequest

Field Type Required Description
MailId string Required The ID of the sent mail to recall. Set MailId from the SendMailAsync response or the sent mail list.

SendMailRequest

A request to send mail.

Field Type Required Description
MailCategory string Optional The mailbox category. The default value is DEFAULT, and the maximum length is 64 characters.
SenderDisplayName string Required The sender name to display on the mail screen. Up to 100 characters.
RecipientScope SendMailRequestRecipientScope Required The recipient scope. When calling with a login session, specify Direct.
RecipientPlayerIds IReadOnlyList<long>? Optional The list of Player IDs of the users who will receive the mail. Required if RecipientScope is Direct, with a maximum of 100.
MailContentType SendMailRequestMailContentType Required The content type. To send attached items with the mail, specify Attachment.
Title string Required The mail title to display on the list and detail screens. Up to 300 characters.
Body string Required The mail body to display on the detail screen. Up to 1000 characters.
Language LanguageCode Required The language in which the title and body are written. It becomes the default language of the mail, and the mail is displayed in this language if there is no title and body in the recipient's language.
MailExtension string? Optional Mail policy data that the app defines, such as display conditions or claim conditions. The server stores it as a string without interpreting it. Up to 4096 characters.
ExpiresAt DateTimeOffset Required The mail expiration time. Specify a time within 30 days from the current time.
Attachments IReadOnlyList<AttachmentItem>? Optional The list of attached items. Used when MailContentType is Attachment, with a maximum of 10.

SentMailListItem

An item in the sent mail list. It contains the basic mail information and a summary of the recipients.

Field Type Required Description
MailId string? Optional The mail ID. To get the details, call GetMailAsync with this value.
SenderId string? Optional The sender identifier.
SenderDisplayName string? Optional The sender name displayed on the mail screen.
MailCategory string? Optional The mailbox category.
MailContentType SentMailListItemMailContentType? Optional The content type.
Title string? Optional The mail title displayed on the list screen.
MailStatus SentMailListItemMailStatus? Optional The mail status.
ClosedAt DateTimeOffset? Optional The time when the mail status changed to Expired or Revoked. It is null if the status is Active.
ExpiresAt DateTimeOffset? Optional The mail expiration time.
CreatedAt DateTimeOffset? Optional The time when the mail was sent.
FirstRecipientPlayerId long? Optional The first Player ID in the recipient list. Check all recipients with GetMailAsync. It is null for mail sent to all users.
RecipientCount long? Optional The total number of users who received the mail.

SentMailListResponseData

The response of GetSentMailsAsync.

Field Type Required Description
Items IReadOnlyList<SentMailListItem> Required The sent mail list.
Meta MetaPage? Optional Page information.

Enums

Use the C# member names in your app code. Wire values are the strings exchanged with the server.

LanguageCode

The language codes that Hive Axyl supports.

The Push module also has a LanguageCode

The Hive.Axyl.Push namespace also has a LanguageCode with the same name. If you import both namespaces in one file and use LanguageCode as is, the type is ambiguous and a compile error occurs. To use both types in one file, assign an alias to each type, such as using PushLanguageCode = Hive.Axyl.Push.LanguageCode; and using MailboxLanguageCode = Hive.Axyl.Mailbox.LanguageCode;.

C# member Wire value Description
Unspecified LANGUAGE_CODE_UNSPECIFIED The default value when no value is specified. Do not use it in requests.
Ko ko Korean.
En en English.
Ja ja Japanese.
ZhHans zh-Hans Simplified Chinese.
ZhHant zh-Hant Traditional Chinese.
De de German.
Fr fr French.
Ru ru Russian.
It it Italian.
Es es Spanish.
Pt pt Portuguese.
Pl pl Polish.
Nl nl Dutch.
Tr tr Turkish.
Th th Thai.
Id id Indonesian.
Ar ar Arabic.
Hi hi Hindi.
Vi vi Vietnamese.
Sv sv Swedish.
Cs cs Czech.
Fa fa Persian.
No no Norwegian.
Uk uk Ukrainian.
Ro ro Romanian.
He he Hebrew.
Ms ms Malay.
Da da Danish.
El el Greek.
Hu hu Hungarian.
Tl tl Tagalog.

Content type enums

The content type of mail. Each usage location has its own enum. All content type enums have the same members; only the wire value of Unspecified differs by enum.

C# member Wire value Description
Unspecified Differs by enum. The default value when no value is specified. Do not use it in requests.
Text TEXT Mail that contains only text.
Attachment ATTACHMENT Mail that also contains attached items.
Enum Where used Unspecified wire value
SendMailRequestMailContentType SendMailRequest.MailContentType SEND_MAIL_REQUEST_MAIL_CONTENT_TYPE_UNSPECIFIED
SentMailSearchRequestMailContentType GetSentMailsRequest.MailContentType SENT_MAIL_SEARCH_REQUEST_MAIL_CONTENT_TYPE_UNSPECIFIED
ReceivedMailSearchRequestMailContentType GetReceivedMailsRequest.MailContentType RECEIVED_MAIL_SEARCH_REQUEST_MAIL_CONTENT_TYPE_UNSPECIFIED
MailMailContentType Mail.MailContentType, MailResponseData.MailContentType MAIL_MAIL_CONTENT_TYPE_UNSPECIFIED
SentMailListItemMailContentType SentMailListItem.MailContentType SENT_MAIL_LIST_ITEM_MAIL_CONTENT_TYPE_UNSPECIFIED
ReceivedMailListItemMailContentType ReceivedMailListItem.MailContentType RECEIVED_MAIL_LIST_ITEM_MAIL_CONTENT_TYPE_UNSPECIFIED

Mail status enums

The current status of sent mail. All mail status enums have the same members; only the wire value of Unspecified differs by enum.

C# member Wire value Description
Unspecified Differs by enum. The default value when no value is specified. Do not use it in requests.
Active ACTIVE Valid mail.
Revoked REVOKED Recalled mail.
Expired EXPIRED Expired mail.
Enum Where used Unspecified wire value
SentMailSearchRequestMailStatus GetSentMailsRequest.MailStatus SENT_MAIL_SEARCH_REQUEST_MAIL_STATUS_UNSPECIFIED
MailMailStatus Mail.MailStatus, MailResponseData.MailStatus MAIL_MAIL_STATUS_UNSPECIFIED
SentMailListItemMailStatus SentMailListItem.MailStatus SENT_MAIL_LIST_ITEM_MAIL_STATUS_UNSPECIFIED

Recipient scope enums

The recipient scope of mail. The two enums have the same members; only the wire value of Unspecified differs.

C# member Wire value Description
Unspecified Differs by enum. The default value when no value is specified. Do not use it in requests.
Broadcast BROADCAST Mail sent to all users. You cannot specify it when sending with a login session.
Direct DIRECT Mail sent to the users specified in RecipientPlayerIds.
Enum Where used Unspecified wire value
SendMailRequestRecipientScope SendMailRequest.RecipientScope SEND_MAIL_REQUEST_RECIPIENT_SCOPE_UNSPECIFIED
MailRecipientScope Mail.RecipientScope, MailResponseData.RecipientScope MAIL_RECIPIENT_SCOPE_UNSPECIFIED

Sender type enums

The type of the party that sent the mail. The two enums have the same members; only the wire value of Unspecified differs.

C# member Wire value Description
Unspecified Differs by enum. The default value when no value is specified.
Admin ADMIN Mail sent by an operator.
HiveSystem HIVE_SYSTEM Mail sent by the Hive system.
ProjectSystem PROJECT_SYSTEM Mail sent by the project system.
User USER Mail sent by a user.
Enum Where used Unspecified wire value
MailSenderType Mail.SenderType, MailResponseData.SenderType MAIL_SENDER_TYPE_UNSPECIFIED
ReceivedMailListItemSenderType ReceivedMailListItem.SenderType RECEIVED_MAIL_LIST_ITEM_SENDER_TYPE_UNSPECIFIED

MarkMailRequestTarget

The target to mark as read with MarkMailAsReadAsync. The read time field that is recorded differs depending on the specified target.

C# member Wire value Description
Unspecified MARK_MAIL_REQUEST_TARGET_UNSPECIFIED The default value when no value is specified. Do not use it in requests.
Text TEXT Marks the body as read and records TextReadAt.
Attachment ATTACHMENT Marks the attached items as read and records AttachmentReadAt.
All ALL Marks both the body and the attached items as read.

ReceivedMailSearchRequestDirection

The retrieval direction of GetReceivedMailsAsync.

C# member Wire value Description
Unspecified RECEIVED_MAIL_SEARCH_REQUEST_DIRECTION_UNSPECIFIED The default value when no value is specified. Do not use it in requests.
Previous PREVIOUS Retrieves in the previous-page direction.
Next NEXT Retrieves in the next-page direction.