updateMessage

Updates properties for an existing (individual) message. Properties set in this call can be used as filters in getMessageList calls - but note that this call sets the properties for an individual message, not for all messages in a set of messages.

updateMessage Input

updateMessage is a secure API method with the following URL and HTTP header requirements:

Submit to URL: https://api.bonanza.com/api_requests/secure_request
Required in HTTP header: X-BONANZLE-API-DEV-NAME set to your dev_id
  X-BONANZLE-API-CERT-NAME set to your cert_id

Note that all secure methods except for fetchToken and getBoothItems require you to submit a user token so that we know what user account you are acting on behalf of.  For details about setting up and submitting user tokens, see our intro to user tokens.

The name for your request should be updateMessageRequest.

Here are the available input parameters that can be serialized into JSON:

Argument Type Occurrence Meaning
Call-specific Input Fields
messageId integer Required

The id of the message to update.

read boolean Optional May be set to true to mark the message - and all messages in the thread that are to the authorized user - as read. Non-true values will be ignored - you cannot set a message to unread.
saved boolean Optional Whether the message is saved (true) or not (false) - note that unsaved messages are typically shown in the receiving user's inbox. This will affect all messages in the thread for which the authorized user is the receiver.

updateMessage Output

The name for the output returned from this request is updateMessageResponse. So, after parsing the serialized response into JSON, you can access the data with something like:

my_json_hash['updateMessageResponse']

Here are all the possible output parameters:

Argument Type Occurrence Meaning
Standard Output Fields
errorMessage Container Conditionally Description of an error or warning that occurred when Bonanza processed the request. Not returned if the ack value is Success.
errorMessage.error Container Conditionally,
repeatable: [0..*]
errorMessage.error.category ErrorCategory Conditionally Currently unused.
errorMessage.error.message string Conditionally A description of the error
errorMessage.error.type ErrorType Conditionally A unique descriptive name for the error.
timestamp dateTime Always This value represents the date and time when Bonanza 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 the "dateTime" type for information about this time format and converting to and from the GMT time zone.
Call-specific Output Fields
message Container Always Contains the updated message.
message.id integer Always The id of the message. This can be used as an input to getMessages to get all messages in the set of messages that this message belongs to.
message.from string Always The user name of the user that sent the message.
message.to string Always The user name of the user that the message was sent to.
message.senderPictureURL string Always The URL of the sender's profile picture
message.receiverPictureURL string Always The URL of the receiver's profile picture
message.sentAt dateTime Always The date and time at which the message was sent.
message.subject string Always The subject line of the message.
message.body string Always The body of the message. Note that the body may contain HTML.
message.read boolean Always

Whether the message has been read by the receiving user.

message.saved boolean Always Whether the message has been saved by the receiving user.