Skip to main content

POST/update_conversation

This method can be used to update the conversationStatus or the read status of a specified conversation.

Note: Only one of these statuses can be updated at a time using this method. If both fields are included, only the read status of the specified conversation will be updated and the conversationStatus field will be ignored.
The conversationId of the conversation to modify, as well as the existing conversationType of the specified conversation are required as part of the request payload.

Important! Though it cannot be updated, the existing conversationType of the specified conversation to be updated is required in the request payload. If this value is not provided, an error will occur.


To update a conversation's status (for example, updating an ACTIVE conversation to ARCHIVE), include the conversationStatus field in the request with the updated value. To update a conversation's read status (for example, updating an UNREAD conversation to READ), include the read boolean in the request with the updated value.

Input

Resource URI

POST https://api.ebay.com/commerce/message/v1/update_conversation

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

This method has no URI parameters.

HTTP request headers

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

The table below shows additional HTTP request headers that are either required, conditionally required, or strongly recommended for this method. Other standard HTTP request headers- opens rest request components page (not in this table) can also be used, but they are optional.

HeaderTypeDescription
Content-TypestringThis header indicates the format of the request body provided by the client. Its value should be set to application/json.

For more information, refer to HTTP request headers.

Occurrence: Required

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

Copy complete valid JSON to clipboard

Request fields

Input container/fieldTypeDescription
conversationIdstring

This field specifies the unique identifier of the conversation that is to be updated.

Use the getConversations method to retrieve conversation ID values

Occurrence: Required

conversationStatusstring

This field specifies the status for which to update the specified conversation.

Valid values:

  • ACTIVE
  • ARCHIVE
  • DELETE
Note: This field should not be used in conjunction with the read field. If both fields are input in the request, only the read status will be updated for the specified conversation and the conversationStatus field will be ignored.

Occurrence: Conditional

conversationTypestring

This field specifies the existing type of the conversation being updated.

Important! This value cannot be updated using this method, but is required as part of the request payload.


Valid values:
  • FROM_MEMBERS
  • FROM_EBAY

Occurrence: Required

readboolean

This boolean specifies the read status for which to update the conversation.

If set to true, the conversation will update to 'read', and if set to false, the conversation will update to 'unread'.

Note: This field should not be used in conjunction with the conversationStatus field. If both fields are input in the request, only the read status will be updated for the specified conversation and the conversationStatus field will be ignored.

Occurrence: Conditional

Output

HTTP response headers

This call has no response headers.

Response payload

This call has no payload.

Response fields

This call has no field definitions.

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
204No Content
400Bad Request
401Unauthorized
403Forbidden
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.
355001API_MESSAGEREQUESTInvalid conversationStatus value. Please see documentation for valid values.
355002API_MESSAGEREQUESTInvalid conversationType value. Please see documentation for valid values.
355007API_MESSAGEREQUESTInvalid or unrecognized conversation_id value.

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: Modify the conversation status of a conversation

This method can be used to modify the conversation status of a conversation.

Input

The conversationId and the existing conversationType of the conversation to update are required in the request body of this method.

In this sample, the conversationStatus is being update to ACTIVE.

POSThttps://api.ebay.com/commerce/message/v1/update_conversation

Output

If the call is successful, HTTP response code 204 No Content will be returned and the conversation will be updated based on the request payload.

Sample 2: Modify the read status of a conversation

This method can be used to modify the read status of a conversation.

Input

The conversationId and the existing conversationType of the conversation to update are required in the request body of this method.

In this sample, the read status is being updated to 'read' (as shown by the true boolean).

POSThttps://api.ebay.com/commerce/message/v1/update_conversation

Output

If the call is successful, HTTP response code 204 No Content will be returned and the conversation will be updated based on the request payload.