Lavanda Developer Docs
  • Welcome
  • Quickstart
    • Getting Started
    • Versioning
    • API Explorer
  • Concepts
    • Structure & Terms
    • Auth
    • Webhooks
    • API Paradigms
      • Connections
      • Pagination (Cursors)
      • Client Name Header
  • CRM
    • Leads
    • Contacts
    • Companies
    • Institutions
    • Offers
    • Subjects
  • Bookings
    • Bookings
  • Spaces & Inventory
    • Buildings
    • Unit Types
    • Units
  • Availability
    • Availability
  • Pricing
    • Pricing
    • Product
  • Ecommerce
    • Flow
    • Search
    • Checkout
  • Guest Messaging
    • General
  • Finance & Accounting
    • Invoices
    • Payments
  • Tickets
    • Tickets
    • Tasks
    • Charges
  • Users
    • Queries
      • whoami
    • Mutations
  • Legacy
    • README
    • Auth
    • Create Lead
    • Legacy Azure API
Powered by GitBook
On this page
  • Types
  • Queries
  • Mutations
  1. Guest Messaging

General

Our guest messaging platform supports both bookings and leads. Access to a booking's or lead's conversation is available through a specific field within these types (see the example provided below). Each conversation is a direct, one-to-one interaction between the host and a guest. It's important to note that while a single booking or lead can be associated with multiple conversations, each conversation is individually tailored to one guest.

The platform is omnichannel, facilitating communication through email and direct integrations with messaging services on platforms like Airbnb and Booking.com.

Please note that while the API allows access to existing conversations, it does not support the creation of new conversations. Conversations are automatically generated when a booking or lead is created. Additionally, any changes to the guest list, such as additions, removals, or updates, are automatically reflected in the conversations.

Types

type Conversation {
    id: ID
    participant: ConversationParticipant
    # This is a cursor based paginated query
    messages: [ConversationMessage]
}

type ConversationParticipant {
    id: ID
    name: String
    email: String
}

type ConversationMessage {
    id: ID
    body: String
    automated: Boolean
    channel: String # 'email'
    sentAt: Date
    sentBy: 'us' | 'participant'
    read: Boolean
    urgent: Boolean
    priority: Number
    snoozeUntil: Date
}

Queries

query {
  bookings {
    booking {
      # ... see the booking type
      converation: Conversation
    }
  }
}

query {
  leads {
    lead {
      # ... see the lead type
      converation: Conversation
    }
  }
}

# See above for getting messages from a conversation

Mutations

mutation {
    conversations {
       sendMessage(
          conversationId: ID
          body: String
          sentBy: 'us' | 'participant'
       ) {
          id: ID # new message id
       }
    }
}
PreviousCheckoutNextInvoices

Last updated 1 year ago