v1

latestOpenAPI 3.0.32026-07-2632131.4 MB
Inbox Conversations

Get conversations

Get conversations

get/communication/conversations

Query parameters

filtersstring

Array of filters to query by.

field: Subject of the filter: status, type, guest._id, owner._id, reservation._id, reservation.status, read, assignee._id, listing._id

operator: Enhanced MongoDB comparison operator: $eq, $exists, $not, $contains, $notcontains, $gt, $lt, $between, $in, $nin

value: Value to filter by

fieldsstring

Selection of fields, separated by space

sortstring

Sorting, default: -createdAt

limitinteger

Pagination, max: 100, default is: 25

cursorAfterstring

Pagination cursor, default:'',

cursorAfter and cursorBefore are not allowed to be used at the same time in one request.

First request will require only limit parameter and in response you will get cursor object.

Use cursor.after to send in query params cursorAfter parameter in order to move forward.

Use cursor.before to send in query params cursorBefore parameter in order to move backwards.

An empty string in after or before cursor in response will indicate that there is no more documents in this direction.

If you sort buy something different than createdAt, please make sure include this parameter in fields, or you will get empty cursor.

cursorAfter and cursorBefore are not allowed to be used at the same time in one request.

cursorBeforestring

Pagination cursor, default:null

conversation typesstring

The conversations API currently supports requests for guest conversations and owners conversations.

The filter field type(guest/ owner, guest by default) is required in order to determine the type of the returned conversations. (in contrast to the guest conversation, owner's contains owner's info)

Owners conversations do not support airbnb2 module type, messages that sent with platform module type will be sent through Email.

Response

OK

statusnumber

Example response

{
  "status": 200,
  "data": {
    "count": 30,
    "countUnread": 2,
    "fields": "guest reservation status assignee priority createdAt",
    "limit": 25,
    "conversations": [
      {
        "_id": "6134a49cd450d300307794cb",
        "priority": 10,
        "meta": {
          "reservations": [
            {
              "_id": "61347d71d450d300307792a4",
              "status": "inquiry",
              "checkIn": "2021-09-04T21:00:00.000Z",
              "checkOut": "2021-09-05T20:00:00.000Z",
              "listing": {
                "tags": [
                  "Pool"
                ],
                "_id": "5fba2d97d8e638002d76d842",
                "picture": {
                  "_id": "615c0214cdf3370028883d3a",
                  "thumbnail": "https://res.cloudinary.com/guesty/image/upload/c_fit,h_200/v1606036872/preprod/5fb67280e39677002e6c2683/ephepadfvgopafgykxrc.jpg"
                },
                "address": {
                  "full": "Loma Mazamitla Sur, La Aurora, 44790 Guadalajara, Jal., Mexico",
                  "city": "Guadalajara",
                  "country": "Mexico",
                  "state": "Jalisco"
                },
                "nickname": "OPS-Listing",
                "title": "TEST"
              }
            }
          ],
          "guest": {
            "_id": "61347d70d450d300307792a3",
            "email": "asdasd@assadsa.com"
          }
        },
        "accountId": "5fb67280e39677002e6c2683",
        "createdAt": "2021-09-05T11:06:05.388Z",
        "state": {
          "status": "OPEN"
        }
      }
    ]
  }
}