Skip to main content

GET/conversation/{conversation_id}

This method can be used to retrieve messages within a specific conversation.

The conversation_id of the conversation for which to retrieve messages is required as path parameters, and the and conversation_type of the conversation is required as a query parameter.

Input

Resource URI

GET https://api.ebay.com/commerce/message/v1/conversation/{conversation_id}?

This method is supported in Sandbox environment. To access the endpoint, just replace the api.ebay.com root URI with api.sandbox.ebay.com

URI parameters

ParameterTypeDescription
conversation_idstringThis path parameters specifies the unique identifier of the conversation that is to be retrieved.

Use the getConversations method to retrieve conversation ID values.

Occurrence: Required

conversation_typestringThis query parameter specifies the type of the conversation being retrieved.

This parameter is always required when using the this method.

Valid values:
  • FROM_EBAY
  • FROM_MEMBERS

Occurrence: Required

limitintegerThe maximum number of entries that can be returned on each page of the paginated response.

Use this parameter in conjunction with the offset parameter to control the pagination of the output. For example, if offset is set to 10 and limit is set to 10, the call retrieves entries 11 through 20 from the result set.

Note: This feature employs a zero-based list, where the first item in the list has an offset of 0.
If this parameter is omitted, the default value is used.

Default: 25

Maximum: 50

Occurrence: Optional

offsetintegerThe number of reports to skip in the result set before returning the first entry in the paginated response.

Use this parameter in conjunction with the limit parameter to control the pagination of the output. For example, if offset is set to 0 and limit is set to 10, the first page of the response will contain the first 10 entries from the complete list retrieved by the call.

Note: This feature employs a zero-based list, where the first item in the list has an offset of 0.
If this parameter is omitted, the default value is used.

Default: 0

Occurrence: Optional

HTTP request headers

All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization.

All other standard RESTful request headers are optional. For more information on standard RESTful request headers, see the HTTP request headers- opens rest request components page table.

OAuth scope

This request requires an access token created with the authorization code grant flow, using one or more scopes from the following list (please check your Application Keys page for a list of OAuth scopes available to your application):

https://api.ebay.com/oauth/api_scope/commerce.message

See OAuth access tokens for more information.

Request payload

This call has no payload.

Request fields

This call has no field definitions.

Output

HTTP response headers

This call has no response headers.

Response payload

Response fields

Output container/fieldTypeDescription
conversationStatusstring

The current status of the conversation, such as ACTIVE or ARCHIVE.

Occurrence: Always

conversationTitlestring

The title of the conversation.

Occurrence: Always

conversationTypestring

The type of the conversation, such as FROM_EBAY or FROM_MEMBERS.

Occurrence: Always

hrefstring

The URI to the current page of results.

Occurrence: Always

limitinteger

The value of the limit parameter submitted in the request.

Occurrence: Always

messagesarray of MessageDetail

This array returns a list of messages from the specified conversation.

Occurrence: Always

messages.createdDatestring

The date, in ISO 8601 format, the message was received.

Occurrence: Always

messages.messageBodystring

The message text.

Occurrence: Always

messages.messageIdstring

The unique identifier of the message.

Occurrence: Always

messages.messageMediaarray of MessageMedia

This array returns a list, if applicable, of media attached to the message.

Occurrence: Conditional

messages.messageMedia.mediaNamestring

The name of the media attached to the message.

Occurrence: Conditional

messages.messageMedia.mediaTypestring

The type of media attached to the message.

Valid values:

  • IMAGE
  • PDF
  • DOC
  • TXT

Occurrence: Conditional

messages.messageMedia.mediaUrlstring

The URL of the self-hosted media attached to the message. URLs must use the "HTTPS" protocol.

Occurrence: Conditional

messages.readStatusboolean

This boolean indicates if the message has been viewed by the recipient.

If this boolean is returned as true, the message has been read. If this boolean is returned as false, the message has not been read.

Occurrence: Always

messages.recipientUsernamestring

The eBay username of the message recipient.

Occurrence: Always

messages.senderUsernamestring

The eBay username of the message sender.

Occurrence: Always

messages.subjectstring

The subject line of the message.

Occurrence: Conditional

nextstring

The URI for the next page of results.

This value is only returned if there is an additional page of results in the result set.

Occurrence: Conditional

offsetinteger

The value of the offset parameter submitted in the request.

Occurrence: Always

prevstring

The URI for the previous page of results.

This is only retuned if there is a previous page of results in the result set.

Occurrence: Conditional

totalinteger

The total number of entries returned in the result set.

Occurrence: Always

HTTP status codes

This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.

StatusMeaning
200OK
400Bad Request
401Unauthorized
403Forbidden
404Not Found
500Internal Server Error

Error codes

For more on errors, plus the codes of other common errors, see Handling errors.

CodeDomainCategoryMeaning
335000API_MESSAGEAPPLICATIONInternal server error encountered. If this problem persists, contact the eBay Developers Program for support.
355007API_MESSAGEREQUESTInvalid or unrecognized conversation_id value.
355008API_MESSAGEREQUESTInvalid offset. The offset value must be a positive integer value and synchronized up with the limit value. If the limit value is 20, value offset values would be 0, 20, 40, etc.
355009API_MESSAGEREQUESTInvalid limit. The limit value must be a positive integer value that does not exceed {maximumAllowedLimitNumber}.

Warnings

This call has no warnings.

Samples

New to making API calls? Please see Making a Call.

Note: Identifiers, such as order IDs or user IDs, and personal data in these samples might be anonymized or may no longer be active on eBay. If necessary, substitute current, relevant eBay data in your requests.

Sample 1: Retrieve messages from a conversation

This method can be used to retrieve messages, and their details, from a specific conversation.

Input

The conversation_id of the conversation for which to retrieve messages is required as a path parameter for this method. The conversation_type of the conversation is also required as a query parameter.

GEThttps://api.ebay.com/commerce/message/v1/conversation/4********d?conversationType=FROM_MEMBERS&limit=3

Output

If the call is successful, details about each message within the specified conversation (and within the specified filter parameters) will be returned. This can include information such as the message text and ID, its read status, and the usernames of the sender and recipient.