List Messages

Returns all messages that belongs to a conversation

GET /v2/messaging/conversations/{conversationId}/messages

Request

ConversationId - The conversation the message belongs to


Response

FieldTypeDescription
messageIdintegerUnique identifier for the message
conversationIdintegerThe conversation the message belongs to
senderstringGuest or Host
bodystringThe text of the message
messageTypestringWhat kind of message this is — see below
sentAtdateTime (YYYY-MM-DDTHH:mm:ssZ)When the message was sent
viewedAtdateTime (YYYY-MM-DDTHH:mm:ssZ)When it was first opened by whoever it was addressed to, else null
attachmentsarrayFiles attached to the message

Message Types

TypeMeaning
ContactHostA guest enquiry about a home
ConversationA reply sent from the Plum inbox
ConversationViaEmailClientA reply sent using an email client
BookingThe message a guest leaves with a booking request
DeclinedThe message sent when a request to book is declined
UndeliveredA notice that an earlier message could not be delivered

Only Conversation can be sent through this API.

Attachments on a message

FieldTypeDescription
namestringThe name to show, as the file was uploaded
fileNamestringThe name the file is stored under. Downloads use this, not name
contentTypestringMedia type of the file
sizestringSize of the file in bytes, sent as a string rather than a number

Downloading a file needs both the fileName and the messageId it arrived on — see Attachments.

The response is { "data": [...], "total": n}This route does not page: the whole thread comes back in one call, so total is simply how many messages are in data.

viewedAt is the read receipt of whoever the message was addressed to.


StatusWhen it happens
200The conversation belongs to this host. A thread with nothing readable left is an empty data array with a total of 0, not an error
400The token carries no usable user id
401The Authorization header is missing, malformed or expired
404No conversation with that id belongs to the authenticated host
5xxA transient failure reaching the messaging back end. Safe to retry, because this endpoint only reads

A conversation that does not exist and one belonging to another host both return 404, deliberately, so nothing about another host's inbox can be inferred from the difference.

conversationId has to be a positive whole number. 0, a negative number or anything non-numeric does not match the route at all, so it comes back as a bare 404 rather than a validation error.