GetMyMessages

Returns information about the threaded messages sent to a user's My Messages mailbox.

Depending on the detail level, the response can include message counts and headers, resolution status and flagged status, and message text.

Note: GetMyMessages requires a DetailLevel in the request. Otherwise, an error is returned.

Please note that alerts are treated as flagged messages. Data formerly in the Alerts container now is returned in the Messages container, and the Alerts container is empty. For each high priority message, the Flagged field has a value of true. When the Flagged field is true, it means the message is displayed with a flag in the seller's My Messages mailbox on eBay. It is strongly recommended that the seller act on the message by the specified date (or within 60 days, if not specified).

GetMyMessages returns more types of messages than GetMemberMessages. GetMemberMessages returns more nodes per message than GetMyMessages.

The output of GetMyMessages is available as a notification. See MyMessages Notification.

For maximum efficiency, make sure your application can first call GetMyMessages with DetailLevel set to ReturnHeaders. Initially, do not specify any message ID. Your application should be able to cache the returned message ID values. Your application also should be able to create new My Messages requests (up to 10 cached message ID values per request).

Request Details

With a detail level of ReturnHeaders or ReturnMessages, GetMyMessages only accepts 10 unique message ID values, per request.

Controlling the Volume of the Response

Depending on the activity of the user, GetMyMessages can return an overwhelming amount of data. To reduce the volume of the response, you can restrict the number of messages returned by adding different filters to your request:

See the Samples section for calls that use these filtering mechanisms.

This call returns the text of the messages embedded in HTML code. You can parse the content from the HTML, or you can pass along the code as-is, depending on your needs.

Optimizing Your Calls

To make the most of your GetMyMessages calls, make one call with DetailLevel set to ReturnHeaders, without including MessageID values. This will return a complete list of message headers with their corresponding message ID values. Cache these ID values and use them in a second call to GetMyMessages with DetailLevel set to ReturnMessages. Using this method, you can retrieve details of up to ten specific messages at a time.

Testing GetMyMessages

You can test GetMyMessages in the Sandbox.

Several API calls allow you to replenish your supply of messages in the Sandbox. See Sending Messages for information on adding new messages. You can contact Developer Support to obtain further testing information.

Related Information

See:
    Communication Between Members
    Notifications for Buyers and Sellers

See also the reference documentation for these calls:



Back to top

GetMyMessages Input

The box below lists all fields that could be included in the call request. To learn more about an individual field or its type, click its name in the box (or scroll down to find it in the table below the box).

See also Samples.

See also the Deprecated Objects link above. Fields presented in this color are deprecated, and fields presented in this color are (or soon will be) non-operational.

The XML prototype does not include requester credentials. This is a documentation limitation only (see Standard Requester Credentials for Making Calls).

<?xml version="1.0" encoding="utf-8"?>
<GetMyMessagesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <!-- Call-specific Input Fields -->
  <EndTime> dateTime </EndTime>
  <ExternalMessageIDs> MyMessagesExternalMessageIDArrayType
    <ExternalMessageID> MyMessagesExternalMessageIDType (string) </ExternalMessageID>
    <!-- ... more ExternalMessageID values allowed here ... -->
  </ExternalMessageIDs>
  <FolderID> long </FolderID>
  <IncludeHighPriorityMessageOnly> boolean </IncludeHighPriorityMessageOnly>
  <MessageIDs> MyMessagesMessageIDArrayType
    <MessageID> MyMessagesMessageIDType (string) </MessageID>
    <!-- ... more MessageID values allowed here ... -->
  </MessageIDs>
  <Pagination> PaginationType
    <EntriesPerPage> int </EntriesPerPage>
    <PageNumber> int </PageNumber>
  </Pagination>
  <StartTime> dateTime </StartTime>
  <!-- Standard Input Fields -->
  <DetailLevel> DetailLevelCodeType </DetailLevel>
  <!-- ... more DetailLevel values allowed here ... -->
  <ErrorLanguage> string </ErrorLanguage>
  <MessageID> string </MessageID>
  <OutputSelector> string </OutputSelector>
  <!-- ... more OutputSelector values allowed here ... -->
  <Version> string </Version>
  <WarningLevel> WarningLevelCodeType </WarningLevel>
</GetMyMessagesRequest>
Argument Type Occurrence Meaning
Call-specific Input Fields [Jump to standard fields]
EndTime dateTime Conditional The end of the date-range filter. See StartTime (which is the beginning of the date-range filter).
ExternalMessageIDs MyMessagesExternalMessageIDArrayType Optional This field is currently available on the US site. A container for IDs that uniquely identify messages for a given user. If provided at the time of message creation, this ID can be used to retrieve messages and will take precedence over message ID.
ExternalMessageIDs
  .ExternalMessageID
MyMessagesExternalMessageIDType (string) Optional,
repeatable: [0..*]
Currently available on the US site. A message ID that uniquely identifies a message for a given user. If provided at the time of message creation, this ID can be used to retrieve messages, and will take precedence over the message ID. A total of 10 message IDs can be specified.
FolderID long Optional A unique identifier for a My Messages folder. If a FolderID is provided, only messages from the specified folder are returned in the response.
IncludeHighPriorityMessageOnly boolean Optional If this field is included in the requst and set to True, only High Priority messages are returned in the response.
MessageIDs MyMessagesMessageIDArrayType Conditional Container consisting of one to 10 MessageID fields.
MessageIDs.MessageID MyMessagesMessageIDType (string) Conditional,
repeatable: [0..*]
An ID that uniquely identifies a message for a given user.
Pagination PaginationType Optional Specifies how to create virtual pages in the returned list (such as total number of entries and total number of pages to return). Default for EntriesPerPage with GetMyMessages is 25.
Pagination.EntriesPerPage int Optional This integer value is used to specify the maximum number of entries to return in a single "page" of data. This value, along with the number of entries that match the input criteria, will determine the total pages (see PaginationResult.TotalNumberOfPages) in the result set. For most Trading API calls, the maximum value is 200 and the default value is 25 entries per page.

For GetOrders, the maximum value is 100 and the default value is 25 orders per page.

For GetUserDisputes, this value is hard-coded at 200, and any pagination input is ignored.

For GetProducts, the maximum value is 20, and any higher values are ignored.
Pagination.PageNumber int Optional Specifies the number of the page of data to return in the current call. Default is 1 for most calls. For some calls, the default is 0. Specify a positive value equal to or lower than the number of pages available (which you determine by examining the results of your initial request). See the documentation for other individual calls to determine the correct default value.
Min: 1. Default: 1.
StartTime dateTime Optional The beginning of the date-range filter. Filtering takes into account the entire timestamp of when messages were sent. Messages expire after one year.
Standard Input Fields  
DetailLevel DetailLevelCodeType Required,
repeatable: [1..*]
Detail levels are instructions that define standard subsets of data to return for particular data components (e.g., each Item, Transaction, or User) within the response payload. For example, a particular detail level might cause the response to include buyer-related data in every result (e.g., for every Item), but no seller-related data. Specifying a detail level is like using a predefined attribute list in the SELECT clause of an SQL query. Use the DetailLevel element to specify the required detail level that the client application needs pertaining to the data components that are applicable to the request.

The DetailLevelCodeType defines the global list of available detail levels for all request types. Most request types support certain detail levels or none at all. If you pass a detail level that exists in the schema but that isn't valid for a particular request, eBay ignores it processes the request without it. For each request type, see the detail level tables in the Input/Output Reference to determine which detail levels are applicable and which elements are returned for each applicable detail level. (Some detail level tables are still in the eBay Web Services guide. They will be moved to the Input/Output Reference in a future release.)

Note that DetailLevel is required input for GetMyMessages.

With GetSellerList and other calls that retrieve large data sets, please avoid using ReturnAll when possible. For example, if you use GetSellerList, use a GranularityLevel or use the GetSellerEvents call instead. If you do use ReturnAll with GetSellerList, use a small EntriesPerPage value and a short EndTimeFrom/EndTimeTo range for better performance.

Applicable values:

•   ReturnHeaders

(in) Returns message headers. For GetMyMessages, if you include MessageIDs or AlertIDs in the request, this detail level returns header information, without body text, for the specified message ID or alert ID values. If you include a FolderID, header information is returned only for the messages and alerts in the specified folder. If you do not include MessageIDs or AlertIDs, this detail level returns header information for Alerts and Messages as follows: - If all the Alerts have been read, they are sorted in date order, with the most recent first. - If one of the Alerts has not been read, the Read Alerts come first, sorted most recent first, followed by the Unread Alert(s). - All messages in ascending order by date received with the oldest messages first. Note that even when restricted by this detail level to return only header information, GetMyMessages may return a high volume of data.

•   ReturnMessages

(in) Returns full message information. For GetMyMessages, if you include MessageIDs or AlertIDs in the request, this detail level returns message information for the specified message ID or alert ID values. If you include a FolderID, message information is returned only for the messages and alerts in the specified folder.

•   ReturnSummary

(in) Returns the summary data. For GetMyMessages, this detail level returns the same data whether or not you include MessageIDs or AlertIDs in the request. Returns up to 10 FolderID and FolderName values. Currently, this detail level is the only way to retrieve FolderID and FolderName values. See "GetMyMessages" in the eBay Web Services Guide for a code sample that demonstrates this.


(Not all values in DetailLevelCodeType apply to this field.)
ErrorLanguage string Optional Use ErrorLanguage to return error strings for the call in a different language from the language commonly associated with the site that the requesting user is registered with. Specify the standard RFC 3066 language identification tag (e.g., en_US).
ID--- country
----- -----
de_AT Austria
de_CH Switzerland
de_DE Germany
en_AU Australia
en_CA Canada
en_GB United Kingdom
en_SG Singapore
en_US United States
es_ES Spain
fr_BE Belgium (French)
fr_CA Canada (French)
fr_FR France
it_IT Italy
nl_BE Belgium (Dutch)
nl_NL Netherlands
zh_CN China
en_IN India
en_IE Ireland
zh_HK Hong Kong

See Tags for the Identification of Languages.

MessageID string Optional Most Trading API calls support a MessageID element in the request and a CorrelationID element in the response. If you pass in a MessageID in a request, the same value will be returned in the CorrelationID field in the response. Pairing these values can help you track and confirm that a response is returned for every request and to match specific responses to specific requests. If you do not pass a MessageID value in the request, CorrelationID is not returned.

Note: GetCategories is designed to retrieve very large sets of metadata that change once a day or less often. To improve performance, these calls return cached responses when you request all available data (with no filters). When this occurs, the MessageID and CorrelationID fields aren't applicable. However, if you specify an input filter to reduce the amount of data returned, the calls retrieve the latest data (not cached). When this occurs, MessageID and CorrelationID are applicable.
OutputSelector string Optional,
repeatable: [0..*]
You can use the OutputSelector field to restrict the data returned by this call. When you make a call such as GetItem that retrieves data from eBay, the OutputSelector field is useful for restricting the data returned. This field makes the call response easier to use, especially when a large payload would be returned. If you use the OutputSelector field, the output data will include only the fields you specified in the request. For example, if you are using GetItem and you want the item data in the response to be restricted to the ViewItemURL (the URL where a user can view the listing) and BuyItNowPrice, then within the GetItem request, specify those output fields. To use this field, see the information at the following link.

See Selecting Fields to Retrieve.

Version string Conditional The version number of the API code that you are programming against (e.g., 549). The version you specify for a call has these basic effects:
- It indicates the version of the code lists and other data that eBay should use to process your request.
- It indicates the schema version you are using.
You need to use a version that is greater than or equal to the lowest supported version.

For the SOAP API: If you are using the SOAP API, this field is required. Specify the version of the WSDL your application is using.

For the XML API: If you are using the XML API, this field has no effect. Instead, specify the version in the X-EBAY-API-COMPATIBILITY-LEVEL HTTP header. (If you specify Version in the body of an XML API request and it is different from the value in the HTTP header, eBay returns an informational warning that the value in the HTTP header was used instead.)

See:
    Routing the Request (Gateway URLs)
    eBay Schema Versioning Strategy
    Lowest Supported Version

WarningLevel WarningLevelCodeType Optional Controls whether or not to return warnings when the application passes unrecognized or deprecated elements in a request.

An unrecognized element is one that is not defined in any supported version of the schema. Schema element names are case-sensitive, so using WarningLevel can also help you remove any potential hidden bugs within your application due to incorrect case or spelling in field names before you put your application into the Production environment.

WarningLevel only validates elements; it doesn't validate XML attributes. It also doesn't control warnings related to user-entered strings or numbers, or warnings for logical errors.

We recommend that you only use this during development and debugging. Do not use this in requests in your production code.

Applicable values:

•   High

(in) Return warnings when the application passes unrecognized or deprecated elements in a request.

•   Low

(in) Do not return warnings when the application passes unrecognized or deprecated elements in a request. This is the default value if WarningLevel is not specified.


See Warning Level.



Back to top

GetMyMessages Output

The box below lists all fields that might be returned in the response. To learn more about an individual field or its type, click its name in the box (or scroll down to find it in the table below the box).

See also Samples.

See also the Deprecated Objects link above. Fields presented in this color are deprecated, and fields presented in this color are not returned (or soon will not be returned) or are not operational (or soon will be non-operational).

<?xml version="1.0" encoding="utf-8"?>
<GetMyMessagesResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <!-- Call-specific Output Fields -->
  <Messages> MyMessagesMessageArrayType
    <Message> MyMessagesMessageType
      <Content> string </Content>
      <ExpirationDate> dateTime </ExpirationDate>
      <ExternalMessageID> string </ExternalMessageID>
      <Flagged> boolean </Flagged>
      <Folder> MyMessagesFolderType
        <FolderID> long </FolderID>
      </Folder>
      <ForwardDetails> MyMessagesForwardDetailsType
      </ForwardDetails>
      <HighPriority> boolean </HighPriority>
      <ItemEndTime> dateTime </ItemEndTime>
      <ItemID> ItemIDType (string) </ItemID>
      <ItemTitle> string </ItemTitle>
      <ListingStatus> ListingStatusCodeType </ListingStatus>
      <MessageID> MyMessagesMessageIDType (string) </MessageID>
      <MessageType> MessageTypeCodeType </MessageType>
      <QuestionType> QuestionTypeCodeType </QuestionType>
      <Read> boolean </Read>
      <ReceiveDate> dateTime </ReceiveDate>
      <RecipientUserID> string </RecipientUserID>
      <Replied> boolean </Replied>
      <ResponseDetails> MyMessagesResponseDetailsType
        <ResponseEnabled> boolean </ResponseEnabled>
        <ResponseURL> anyURI </ResponseURL>
      </ResponseDetails>
      <Sender> string </Sender>
      <SendToName> string </SendToName>
      <Subject> string </Subject>
      <Text> string </Text>
    </Message>
    <!-- ... more Message nodes allowed here ... -->
  </Messages>
  <Summary> MyMessagesSummaryType
    <FlaggedMessageCount> int </FlaggedMessageCount>
    <FolderSummary> MyMessagesFolderSummaryType
      <FolderID> long </FolderID>
      <FolderName> string </FolderName>
      <NewAlertCount> int </NewAlertCount>
      <NewHighPriorityCount> int </NewHighPriorityCount>
      <NewMessageCount> int </NewMessageCount>
      <TotalAlertCount> int </TotalAlertCount>
      <TotalHighPriorityCount> int </TotalHighPriorityCount>
      <TotalMessageCount> int </TotalMessageCount>
    </FolderSummary>
    <!-- ... more FolderSummary nodes allowed here ... -->
    <NewAlertCount> int </NewAlertCount>
    <NewHighPriorityCount> int </NewHighPriorityCount>
    <NewMessageCount> int </NewMessageCount>
    <TotalAlertCount> int </TotalAlertCount>
    <TotalHighPriorityCount> int </TotalHighPriorityCount>
    <TotalMessageCount> int </TotalMessageCount>
    <UnresolvedAlertCount> int </UnresolvedAlertCount>
  </Summary>
  <!-- Standard Output Fields -->
  <Ack> AckCodeType </Ack>
  <Build> string </Build>
  <CorrelationID> string </CorrelationID>
  <Errors> ErrorType
    <ErrorClassification> ErrorClassificationCodeType </ErrorClassification>
    <ErrorCode> token </ErrorCode>
    <ErrorParameters ParamID="string"> ErrorParameterType
      <Value> string </Value>
    </ErrorParameters>
    <!-- ... more ErrorParameters nodes allowed here ... -->
    <LongMessage> string </LongMessage>
    <SeverityCode> SeverityCodeType </SeverityCode>
    <ShortMessage> string </ShortMessage>
  </Errors>
  <!-- ... more Errors nodes allowed here ... -->
  <HardExpirationWarning> string </HardExpirationWarning>
  <Timestamp> dateTime </Timestamp>
  <Version> string </Version>
</GetMyMessagesResponse>
Return Value Type Occurrence Meaning
Call-specific Output Fields [Jump to standard fields]
Messages MyMessagesMessageArrayType Conditionally Contains the message information for each message specified in MessageIDs. The amount and type of information returned varies based on the requested detail level. Contains one MyMessagesMessageType object per message. Returned as an empty node if user has no messages.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message MyMessagesMessageType Conditionally,
repeatable: [0..*]
Contains the data for one message.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message.Content string Conditionally The message body in plain text format. The message body is displayed in plain text even if the eBay user's Preferred Email Format preference on My eBay is set to HTML. Graphics and text formatting are dropped if the eBay user's preference is set to HTML.

DetailLevel: ReturnMessages.
Messages.Message
  .ExpirationDate
dateTime Conditionally The date and time at which a message expires.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message
  .ExternalMessageID
string Conditionally An ID used by an external application to uniquely identify a message. Returned only when specified by the external application on message creation.

This value is equivalent to the value used for MessageID in GetMemberMessages.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message.Flagged boolean Conditionally When the Flagged field is true, it means the message is displayed with a flag in the seller's My Messages mailbox on eBay. It is strongly recommended that the seller act on the message by the specified date (or within 60 days, if not specified).

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message.Folder MyMessagesFolderType Conditionally Details relating to a My Messages folder.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message.Folder
  .FolderID
long Conditionally An ID that uniquely identifies a My Messages folder.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message
  .ForwardDetails
MyMessagesForwardDetailsType Conditionally Details relating to the forwarding of a message. Only returned if the message is forwarded.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message.HighPriority boolean Conditionally Set this boolean to true to mark the message as a high-priority message.
Messages.Message.ItemEndTime dateTime Conditionally The date and time for the ended item
Messages.Message.ItemID ItemIDType (string) Conditionally The unique item ID. Not returned for messages that haven't been associated with a specific item.
Max length: 19 (Note: The eBay database specifies 38. Currently, Item IDs are usually 9 to 12 digits).

DetailLevel: ReturnHeaders.
Messages.Message.ItemTitle string Conditionally The title of the item listing.
Max length: 55.
Messages.Message.ListingStatus ListingStatusCodeType Conditionally Coming soon. Specifies an active or ended listing's status in eBay's processing workflow. If a listing ends with a sale (or sales), eBay needs to update the sale details (e.g., total price and buyer/high bidder) and the final value fee. This processing can take several minutes. If you retrieve a sold item and no details about the buyer/high bidder are returned or no final value fee is available, use this listing status information to determine whether eBay has finished processing the listing.

Note: For GetMyMessages, the listing status reflects the status of the listing at the time the question was created. The listing status for this call must not match the listing status returned by other calls (such as GetItemTransactions). This is returned only if Messages.Message.MessageType is AskSellerQuestion. This tag is no longer returned in the Sandbox environment.

Applicable values:

•   Active

(out) The listing is still active or the listing has ended with a sale but eBay has not completed processing the sale details (e.g., total price and high bidder). A multi-item listing is considered active until all items have winning bids or purchases or the listing ends with at least one winning bid or purchase. If the listing has ended with a sale but this Active status is returned, please allow several minutes for eBay to finish processing the listing.

•   Completed

(out) The listing has closed and eBay has completed processing the sale. All sale information returned from eBay (e.g., total price and high bidder) should be considered accurate and complete. Although the Final Value Fee (FVF) for FixedPriceItem and StoresFixedPrice items is returned by GetSellerTransactions and GetItemTransactions, all other listing types (excluding Buy It Now purchases) require the listing status to be Completed before the Final Value Fee is returned.

•   Custom

(out) Reserved for internal or future use.

•   CustomCode

(out) Reserved for internal or future use.

•   Ended

(out) The listing has ended. If the listing ended with a sale, eBay has completed processing of the sale. All sale information returned from eBay (e.g., total price and high bidder) should be considered accurate and complete. However, the final value fee is not yet available.


Messages.Message.MessageID MyMessagesMessageIDType (string) Conditionally An ID that uniquely identifies a message for a given user.

This value is not the same as the value used for the GetMemberMessages MessageID. Use the GetMemberMessages value (used as the GetMyMessages ExternalID) instead.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message.MessageType MessageTypeCodeType Conditionally Currently available on the US site. Specifies the type of message being retrieved through GetMyMessages.

Applicable values:

•   All

(in/out) All message types.

•   AskSellerQuestion

(in/out) Member to Member message initiated by bidder/potential bidder to a seller of a particular item.

•   ClassifiedsBestOffer

(out) Indicates that a best offer has been made on the seller's corresponding classified ad listing. This message type is only applicable to Classified categories that allow the Best Offer feature, such as motor vehicles.

•   ClassifiedsContactSeller

(out) Indicates that an inquiry has been sent to the seller regarding the corresponding classified ad listing.

•   ContactEbayMember

(out) Member to Member message initiated by any eBay member to another eBay member.

•   ContacteBayMemberViaAnonymousEmail

(out) Member message initiated after eBay receives an email sent by an eBay member's email client to another eBay member.

•   ContacteBayMemberViaCommunityLink

(out) Member to Member message initiated by any eBay member to another eBay member who has posted on a community forum within the past 7 days.

•   ContactMyBidder

(out) Member to Member message initiated by sellers to their bidders during an active listing.

•   ContactTransactionPartner

(out) Member message between order partners within 90 days after creation of the order.

•   CustomCode

(out) Reserved for future or internal use.

•   ResponseToASQQuestion

(out) Member to Member message initiated as a response to an Ask A Question message.

•   ResponseToContacteBayMember

(out) Member to Member message initiated as a response to a Contact eBay Member message.


Messages.Message.QuestionType QuestionTypeCodeType Conditionally Coming soon. Currently available on the US site. Specifies the context of the question. Corresponds to the message subject. Applies if Messages.Message.MessageType is

Applicable values:

•   CustomCode

(in/out) Reserved for future or internal use.

•   CustomizedSubject

(in/out) Customized subjects set by the seller using SetMessagePreferences or the eBay Web site.

•   General

(in/out) General questions about the item.

•   MultipleItemShipping

(in/out) Questions related to the shipping of this item bundled with other items also purchased on eBay.

•   None

(in/out) No question type applies. This value doesn't apply to AddMemberMessageAAQToPartner. Note that the value of None can apply if Messages.Message.MessageType isn't set to AskSellerQuestion.

•   Payment

(in/out) Questions related to the payment for the item.

•   Shipping

(in/out) Questions related to the shipping of the item.


Messages.Message.Read boolean Conditionally Whether or not a message has been viewed by a given user. Note that retrieving a message with the API does not mark it as read.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message.ReceiveDate dateTime Conditionally The date and time that a message was received by My Messages and stored in a database for the recipient.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message
  .RecipientUserID
string Conditionally The displayable user ID of the recipient.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message.Replied boolean Conditionally Whether or not a message has been replied.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message
  .ResponseDetails
MyMessagesResponseDetailsType Conditionally Details relating to the response to a message.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message
  .ResponseDetails
  .ResponseEnabled
boolean Conditionally Whether a message can be responded to. To respond to a message, use the URL in ResponseURL. You may need to log into the eBay Web site to complete the response.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message
  .ResponseDetails.ResponseURL
anyURI Conditionally A URL that the recipient must visit to respond to a message. Responding may require logging into the eBay Web site.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message.Sender string Conditionally The display name of the eBay user that sent the message.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message.SendToName string Conditionally The displayable name of the user or eBay application to which the message is sent. Only returned for M2M, and if a value exists.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message.Subject string Conditionally The subject of the message.

DetailLevel: ReturnHeaders, ReturnMessages.
Messages.Message.Text string Conditionally This field contains message content, and can contain a threaded message. This field can contain plain text or HTML, depending on the format of the original message. The API does not check the email-format preferences in My Messages on the eBay Web site.
Max length: 2 megabytes in size.

DetailLevel: ReturnMessages.
Summary MyMessagesSummaryType Conditionally Summary data for a given user's messages. This includes the numbers of new messages, flagged messages, and total messages. The amount and type of data returned is the same whether or not the request includes specific MessageIDs. Always/Conditionally returned logic assumes a detail level of ReturnMessages.

DetailLevel: ReturnSummary.
Summary.FlaggedMessageCount int Conditionally The number of messages that have been flagged. Always returned for detail level ReturnSummary.

DetailLevel: ReturnSummary.
Summary.FolderSummary MyMessagesFolderSummaryType Conditionally,
repeatable: [0..*]
Folder summary for each folder. Always returned for detail level ReturnSummary.

DetailLevel: ReturnSummary.
Summary.FolderSummary.FolderID long Conditionally An ID that uniquely identifies a My Messages folder. Always returned for detail level ReturnSummary.

DetailLevel: ReturnSummary.
Summary.FolderSummary
  .FolderName
string Conditionally The name of a specified My Messages folder. For GetMyMessages, Inbox (FolderID = 0) and Sent (FolderID = 1) are not returned.

DetailLevel: ReturnSummary.
Summary.FolderSummary
  .NewAlertCount
int Conditionally This field has been deprecated, starting with the 685 release. Alerts are now synonymous with Flagged messages, and are added to the Summary.FlaggedMessageCount value.

DetailLevel: ReturnSummary.
Summary.FolderSummary
  .NewHighPriorityCount
int Conditionally The total number of new high priority messages that a given user has.

DetailLevel: ReturnSummary.
Summary.FolderSummary
  .NewMessageCount
int Conditionally The number of new messages in a given folder. Always returned for detail level ReturnSummary.

DetailLevel: ReturnSummary.
Summary.FolderSummary
  .TotalAlertCount
int Conditionally This field has been deprecated, starting with the 685 release. Alerts are now synonymous with Flagged messages, and are added to the Summary.FlaggedMessageCount value.

DetailLevel: ReturnSummary.
Summary.FolderSummary
  .TotalHighPriorityCount
int Conditionally The total number of high priority messages that a given user has.

DetailLevel: ReturnSummary.
Summary.FolderSummary
  .TotalMessageCount
int Conditionally The total number of messages in a given folder. Always returned for detail level ReturnSummary.

DetailLevel: ReturnSummary.
Summary.NewAlertCount int Conditionally This field has been deprecated, starting with the 685 release. Alerts are now synonymous with Flagged messages, and are added to the Summary.FlaggedMessageCount value.

DetailLevel: ReturnSummary.
Summary.NewHighPriorityCount int Conditionally The total number of new high priority messages that a given user has.

DetailLevel: ReturnSummary.
Summary.NewMessageCount int Conditionally The number of new messages that a given user has. Always returned for detail level ReturnSummary.

DetailLevel: ReturnSummary.
Summary.TotalAlertCount int Conditionally This field has been deprecated, starting with the 685 release. Alerts are now synonymous with Flagged messages, and are added to the Summary.FlaggedMessageCount value.

DetailLevel: ReturnSummary.
Summary.TotalHighPriorityCount int Conditionally The total number of high priority messages that a given user has.

DetailLevel: ReturnSummary.
Summary.TotalMessageCount int Conditionally The total number of messages for a given user. Always returned for detail level ReturnSummary.

DetailLevel: ReturnSummary.
Summary.UnresolvedAlertCount int Conditionally The number of alerts that are not yet resolved. Always returned for detail level ReturnSummary.

DetailLevel: ReturnSummary.
Standard Output Fields  
Ack AckCodeType Always A token representing the application-level acknowledgement code that indicates the response status (e.g., success). The AckCodeType list specifies the possible values for Ack.

Applicable values:

•   CustomCode

(out) Reserved for internal or future use.

•   Failure

(out) Request processing failed

•   Success

(out) Request processing succeeded

•   Warning

(out) Request processing completed with warning information being included in the response message


(Not all values in AckCodeType apply to this field.)
Build string Always This refers to the specific software build that eBay used when processing the request and generating the response. This includes the version number plus additional information. eBay Developer Support may request the build information when helping you resolve technical issues.
CorrelationID string Conditionally Most Trading API calls support a MessageID element in the request and a CorrelationID element in the response. If you pass in a MessageID in a request, the same value will be returned in the CorrelationID field in the response. Pairing these values can help you track and confirm that a response is returned for every request and to match specific responses to specific requests. If you do not pass a MessageID value in the request, CorrelationID is not returned.

Note: GetCategories is designed to retrieve very large sets of metadata that change once a day or less often. To improve performance, these calls return cached responses when you request all available data (with no filters). When this occurs, the MessageID and CorrelationID fields aren't applicable. However, if you specify an input filter to reduce the amount of data returned, the calls retrieve the latest data (not cached). When this occurs, MessageID and CorrelationID are applicable.
Errors ErrorType Conditionally,
repeatable: [0..*]
A list of application-level errors (if any) that occurred when eBay processed the request.

See Error Handling.

Errors.ErrorClassification ErrorClassificationCodeType Conditionally API errors are divided between two classes: system errors and request errors.

Applicable values:

•   CustomCode

(out) Reserved for internal or future use.

•   RequestError

(out) An error has occurred either as a result of a problem in the sending application or because the application's end-user has attempted to submit invalid data (or missing data). In these cases, do not retry the request. The problem must be corrected before the request can be made again. If the problem is due to something in the application (such as a missing required field), the application must be changed. If the problem is a result of end-user data, the application must alert the end-user to the problem and provide the means for the end-user to correct the data. Once the problem in the application or data is resolved, resend the request to eBay with the corrected data.

•   SystemError

(out) Indicates that an error has occurred on the eBay system side, such as a database or server down. An application can retry the request as-is a reasonable number of times (eBay recommends twice). If the error persists, contact Developer Technical Support. Once the problem has been resolved, the request may be resent in its original form.


Errors.ErrorCode token Conditionally A unique code that identifies the particular error condition that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms. See the "Errors by Number" document.
Errors.ErrorParameters ErrorParameterType Conditionally,
repeatable: [0..*]
This optional element carries a list of context-specific error variables that indicate details about the error condition. These are useful when multiple instances of ErrorType are returned.
Errors.ErrorParameters
  [ attribute ParamID ]
string Conditionally The index of the parameter in the list of parameter types returned within the error type.
Errors.ErrorParameters.Value string Conditionally The value of the variable (e.g., the attribute set ID)
Errors.LongMessage string Conditionally A more detailed description of the condition that raised the error.
Errors.SeverityCode SeverityCodeType Conditionally Indicates whether the error is a severe error (causing the request to fail) or an informational error (a warning) that should be communicated to the user.

Applicable values:

•   CustomCode

(out) Reserved for internal or future use

•   Error

(out) Application-level error

•   Warning

(out) Warning or informational error


Errors.ShortMessage string Conditionally A brief description of the condition that raised the error.
HardExpirationWarning string Conditionally Expiration date of the user's authentication token. Only returned within the 7-day period prior to a token's expiration. To ensure that user authentication tokens are secure and to help avoid a user's token being compromised, tokens have a limited life span. A token is only valid for a period of time (set by eBay). After this amount of time has passed, the token expires and must be replaced with a new token.
Timestamp dateTime Always This value represents the date and time when eBay processed the request. The time zone of this value is GMT and the format is the ISO 8601 date and time format (YYYY-MM-DDTHH:MM:SS.SSSZ). See Time Values in the eBay Web Services guide for information about this time format and converting to and from the GMT time zone.

Note: GetCategories and other Trading API calls are designed to retrieve very large sets of metadata that change once a day or less often. To improve performance, these calls return cached responses when you request all available data (with no filters). When this occurs, this time value reflects the time the cached response was created. Thus, this value is not necessarily when the request was processed. However, if you specify an input filter to reduce the amount of data returned, the calls retrieve the latest data (not cached). When this occurs, this time value does reflect when the request was processed.
Version string Always The version of the response payload schema. Indicates the version of the schema that eBay used to process the request. See "Standard Data for All Calls" in the eBay Web Services Guide for information on using the response version when troubleshooting "CustomCode" values that appear in the response.



Back to top

GetMyMessages Detail Controls


Detail Control: DetailLevel

The DetailLevel input field influences which call-specific fields may be returned. (All standard output fields are returned regardless of DetailLevel.)

The none column indicates the fields that are returned when you do not specify a DetailLevel.

YThe field is always returned.
(Y)The field is conditionally returned. See the field documentation for clarification of conditions.
-The field is not returned.

Output Field ReturnHeaders ReturnMessages ReturnSummary
Messages(Y)(Y)-
Messages.Message(Y)(Y)-
Messages.Message.Content-(Y)-
Messages.Message.ExpirationDate(Y)(Y)-
Messages.Message.ExternalMessageID(Y)(Y)-
Messages.Message.Flagged(Y)(Y)-
Messages.Message.Folder(Y)(Y)-
Messages.Message.Folder.FolderID(Y)(Y)-
Messages.Message.ForwardDetails(Y)(Y)-
Messages.Message.ItemID(Y)--
Messages.Message.MessageID(Y)(Y)-
Messages.Message.Read(Y)(Y)-
Messages.Message.ReceiveDate(Y)(Y)-
Messages.Message.RecipientUserID(Y)(Y)-
Messages.Message.Replied(Y)(Y)-
Messages.Message.ResponseDetails(Y)(Y)-
Messages.Message.ResponseDetails.ResponseEnabled(Y)(Y)-
Messages.Message.ResponseDetails.ResponseURL(Y)(Y)-
Messages.Message.Sender(Y)(Y)-
Messages.Message.SendToName(Y)(Y)-
Messages.Message.Subject(Y)(Y)-
Messages.Message.Text-(Y)-
Summary--(Y)
Summary.FlaggedMessageCount--(Y)
Summary.FolderSummary--(Y)
Summary.FolderSummary.FolderID--(Y)
Summary.FolderSummary.FolderName--(Y)
Summary.FolderSummary.NewAlertCount--(Y)
Summary.FolderSummary.NewHighPriorityCount--(Y)
Summary.FolderSummary.NewMessageCount--(Y)
Summary.FolderSummary.TotalAlertCount--(Y)
Summary.FolderSummary.TotalHighPriorityCount--(Y)
Summary.FolderSummary.TotalMessageCount--(Y)
Summary.NewAlertCount--(Y)
Summary.NewHighPriorityCount--(Y)
Summary.NewMessageCount--(Y)
Summary.TotalAlertCount--(Y)
Summary.TotalHighPriorityCount--(Y)
Summary.TotalMessageCount--(Y)
Summary.UnresolvedAlertCount--(Y)



Back to top

GetMyMessages Samples

New to making API calls? Please see Routing the Request.

Note: Some item IDs, user IDs, or other data in these samples might no longer be active on eBay. If necessary, you can substitute current eBay data in your requests.

Available samples:

Sample: Basic Call

Retrieves Message headers for the authenticated user.

Description

This sample shows how to retrieve the headers for messages. Once retrieved, you can cache the MessageID values, which you can use to get more details on specific messages with another GetMyMessages call.

Input

XML format (HTTP POST). Also available is the .txt version of this XML.

<?xml version="1.0" encoding="utf-8"?>
<GetMyMessagesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <RequesterCredentials>
    <eBayAuthToken>ABC...123</eBayAuthToken>
  </RequesterCredentials>
  <WarningLevel>High</WarningLevel>
  <DetailLevel>ReturnHeaders</DetailLevel>
</GetMyMessagesRequest>

Output

XML format. Also available is the .txt version of this XML.

<GetMyMessagesResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2010-02-19T17:46:17.619Z</Timestamp>
  <Ack>Success</Ack>
  <Version>655</Version>
  <Build>E655_CORE_BUNDLED_10639415_R1</Build>
  <Alerts/>
  <Messages>
    <Message>
      <Sender>bigbuyer</Sender>
      <RecipientUserID>magicalbookseller</RecipientUserID>
      <SendToName>magicalbookseller</SendToName>
      <Subject>bigbuyer has sent a question about item #110043598202,
          ending on Feb-18-10 18:52:35 PST - Acura : CL</Subject>
      <MessageID>1095480</MessageID>
      <ExternalMessageID>763010</ExternalMessageID>
      <Flagged>false</Flagged>
      <Read>false</Read>
      <ReceiveDate>2010-02-12T02:54:32.000Z</ReceiveDate>
      <ExpirationDate>2011-02-12T02:54:31.000Z</ExpirationDate>
      <ItemID>110043598202</ItemID>
      <ResponseDetails>
        <ResponseEnabled>true</ResponseEnabled>
        <ResponseURL>http://contact.sandbox.ebay.com/ws/eBayISAPI.dll?M2MContact&
            item=110043598202&requested=bigbuyer&qid=763010&redirect=0&messageid=m1095480</ResponseURL>
      </ResponseDetails>
      <Folder>
        <FolderID>0</FolderID>
      </Folder>
      <Replied>false</Replied>
    </Message>
    <Message>
      <Sender>bountifulbuyer</Sender>
      <RecipientUserID>magicalbookseller</RecipientUserID>
      <SendToName>magicalbookseller</SendToName>
      <Subject>bountifulbuyer has sent a question about :Question about book Edition for item #110043547115,
          ending on Feb-16-10 15:45:13 PST - Harry Potter and the Philosopher's Stone</Subject>
      <MessageID>1095270</MessageID>
      <ExternalMessageID>762802</ExternalMessageID>
      <Flagged>false</Flagged>
      <Read>false</Read>
      <ReceiveDate>2010-02-10T18:03:43.000Z</ReceiveDate>
      <ExpirationDate>2011-02-10T18:03:43.000Z</ExpirationDate>
      <ItemID>110043547115</ItemID>
      <ResponseDetails>
        <ResponseEnabled>true</ResponseEnabled>
        <ResponseURL>http://contact.sandbox.ebay.com/ws/eBayISAPI.dll?M2MContact&
            item=110043547115&requested=bountifulbuyer&qid=762802&redirect=0&messageid=m1095270</ResponseURL>
        <UserResponseDate>2010-02-10T18:51:33.000Z</UserResponseDate>
      </ResponseDetails>
      <Folder>
        <FolderID>0</FolderID>
      </Folder>
      <Replied>true</Replied>
    </Message>
  </Messages>
</GetMyMessagesResponse>

Back to list of samples

Sample: Specific Message IDs

Retrieves specific Messages, according to the provided message ID values.

Description

Retrieve a summary of your messages by calling GetMyMessages with DetailLevel set to ReturnHeaders. Make a second call to GetMyMessages with DetailLevel set to ReturnMessages, and specify the message IDs of the messages you want to review. This returns detailed information for each specified message.

Input

You can specify up to to 10 MessageID values per request.

XML format (HTTP POST). Also available is the .txt version of this XML.

<?xml version="1.0" encoding="utf-8"?> 
<GetMyMessagesRequest xmlns="urn:ebay:apis:eBLBaseComponents"> 
  <Version>467</Version> 
  <DetailLevel>ReturnMessages</DetailLevel> 
  <RequesterCredentials> 
    <eBayAuthToken>123...ABC</eBayAuthToken> 
  </RequesterCredentials> 
  <MessageIDs> 
    <MessageID>2848093</MessageID> 
  </MessageIDs> 
</GetMyMessagesRequest> 

Output

Notice that the response contains HTML within the Text node.

XML format. Also available is the .txt version of this XML.

<?xml version="1.0" encoding="UTF-8"?>
<GetMyMessagesResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2006-06-22T21:37:44.984Z</Timestamp>
  <Ack>Success</Ack>
  <Version>465</Version>
  <Build>e465_core_Bundled_3107419_R1</Build>
  <Messages>
    <Message>
      <Sender>eBay</Sender>
      <RecipientUserID>sampleseller</RecipientUserID>
      <Subject>eBay Offer Submitted: Austin Healey</Subject>
      <MessageID>2848093</MessageID>
      <Text>
        <html>
          <head>
            <title>eBay Offer Submitted: Austin Healey</title>
          </head>
          <body bgcolor="#FFFFFF">
            <table cellpadding="0" cellspacing="0" width="100%">
              <tr>
                <td width="100%" style="word-wrap: break-word;">
                  <table cellpadding="0" cellspacing="0" border="0" class="BodyFont"
                    width="100%">
                    <tr>
                      <td><img src="http://pics.qa.ebaystatic.com/aw/pics/logos/
                        ebay_95x39.gif" alt="eBay"/></td>
                      <td valign="bottom" align="left" class="Help"><b>eBay sent this
                        message to Sample Seller (sampleseller).</b>
                      <br/>
Your registered name is included to show this message originated from eBay. <a
href="http://pages.ebay.com/help/confidence/name-userid-emails.html">Learn more</a>.
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </body>
        </html>
      </Text>
      <Flagged>false</Flagged>
      <Read>false</Read>
      <ReceiveDate>2006-06-21T14:17:27.000Z</ReceiveDate>
      <ExpirationDate>2006-08-20T14:17:04.000Z</ExpirationDate>
      <ResponseDetails>
        <ResponseEnabled>false</ResponseEnabled>
      </ResponseDetails>
      <Folder>
        <FolderID>0</FolderID>
      </Folder>
    </Message>
  </Messages>
</GetMyMessagesResponse>

Back to list of samples

Sample: Message Folders

Retrieves message headers for the specified folder.

Description

If you get too much data when retrieving only message headers, you can further restrict the amount of data returned by specifying a FolderID in the request. Doing so returns only the message headers from the specified folder.

Retrieve the FolderID values for the My Messages folders by calling GetMyMessages with a DetailLevel of ReturnSummary. Note that the FolderID for the Inbox is 0.

Input

This example uses a FolderID of 2.

XML format (HTTP POST). Also available is the .txt version of this XML.

<?xml version="1.0" encoding="utf-8"?> 
<GetMyMessagesRequest xmlns="urn:ebay:apis:eBLBaseComponents"> 
  <Version>467</Version> 
  <DetailLevel>ReturnMessages</DetailLevel> 
  <RequesterCredentials> 
    <eBayAuthToken>123...ABC</eBayAuthToken> 
  </RequesterCredentials> 
  <FolderID>2</FolderID> 
</GetMyMessagesRequest> 

Output

The following sample shows the results from this call. Notice that the message is from FolderID 2.

XML format. Also available is the .txt version of this XML.

<?xml version="1.0" encoding="utf-8"?>
<GetMyMessagesResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2006-06-27T00:48:48.734Z</Timestamp>
  <Ack>Success</Ack>
  <Version>465</Version>
  <Build>e465_core_Bundled_3107419_R1</Build>
  <Alerts/>
  <Messages>
    <Message>
      <Sender>eBay</Sender>
      <RecipientUserID>sampleuser</RecipientUserID>
      <Subject>eBay Second Chance Offer for Item #330000037619: Auction Title</Subject>
      <MessageID>2809419</MessageID>
      <Flagged>false</Flagged>
      <Read>false</Read>
      <ReceiveDate>2006-06-20T23:34:37.000Z</ReceiveDate>
      <ExpirationDate>2006-07-20T23:34:30.000Z</ExpirationDate>
      <ResponseDetails>
        <ResponseEnabled>true</ResponseEnabled>
        <ResponseURL>http://respondtothis.com</ResponseURL>
      </ResponseDetails>
      <Folder>
        <FolderID>2</FolderID>
      </Folder>
    </Message>
  </Messages>
</GetMyMessagesResponse>

Back to list of samples



Back to top

GetMyMessages Change History

Version Description
743
2011-10-12
  • MessageType.ClassifiedsBestOffer (added): Indicates that a best offer has been made on the seller's corresponding classified ad listing.
  • MessageType.ClassifiedsContactSeller (added): Indicates that an inquiry has been sent to the seller regarding the corresponding classified ad listing.
677
2010-07-07
  • IncludeHighPriorityMessageOnly (added): Element newly available in Sandbox only.
  • Pagination (added): Element newly available in Sandbox only.
661
2010-03-17
  • Various (modified): The documentation has been updated to state that Alerts are now treated as flagged messages. Data formerly in the Alerts container now is returned in the Messages container, and the Alerts container is empty.
657
2010-02-17
  • Messages.Message.Text (doc change): The documentation has been updated to state that the content of the field can contain up to 2 MB of data.
635
2009-09-16
  • Messages.Message.Text (modified): Threaded messages are returned. Additionally, emails that were sent by an eBay member's email client (to another eBay member) are returned; their message type is indicated as MessageTypeCodeType.ContacteBayMemberViaAnonymousEmail.
583
2008-09-17
  • Messages.Message.QuestionType.None (added): New value indicating that no question type applies.
573
2008-07-09
  • Messages.Message.ListingStatus (added): Specifies the listing status at the time the question was created.
  • Messages.Message.MessageType (added): Available on the US site as of September 2009. Specifies the type of message being retrieved through GetMyMessages.
  • Messages.Message.QuestionType (added): Available on the US site as of September 2009. Specifies the context of the question, and corresponds to the subject of the message.
  • Messages.Message.ExternalMessageID (added): Available on the US site as of September 2009. An ID used by an external application to uniquely identify a message.
  • Messages.Message.Content (added): The message body. This can be plain text.
479
2006-09-20
  • Messages.Message.Folder (doc change): Messages.Message.Folder is conditionally returned.
445
2006-1-25
  • Messages.Message.SendToName (added): A new value is returned, the displayable name of the user or eBay application to which the message is sent. Only returned for M2M, and if a value exists.
439
2005-12-28
  • Alerts.Alert.ResponseDetails.ResponseEnabled (added): Indicates whether or not an alert or message can be responded to. To respond to an alert or message, use the URL in ResponseURL. You may need to log into the eBay Web site to complete the response.
  • Messages.Message.ResponseDetails.ResponseEnabled (added): Indicates whether or not an alert or message can be responded to. To respond to an alert or message, use the URL in ResponseURL. You may need to log into the eBay Web site to complete the response.



Back to top

User-Contributed Notes

   
 
 
 

Copyright © 2005–2013 eBay, Inc. All rights reserved. This documentation and the API may only be used in accordance with the eBay Developers Program and API License Agreement.