Developer docs

Connect your website to LodgeDesk

Use the LodgeDesk webhook API to receive bookings from your hotel website directly into your front desk — no manual entry, no delays.

Get your API keyJump to endpoint
On this page
OverviewAPI keyWebhook endpointRequest payloadResponsesBooking widgetCode examplesSecurity
Overview

How it works

LodgeDesk provides a webhook endpoint and an embeddable booking widget so your hotel website can send reservations directly into your dashboard. Every hotel gets a unique API key — bookings are routed to the correct property automatically.

1
Get your API key
Found in Settings → Routes & API. Keep it secret.
2
Add the endpoint
POST to the webhook URL with the guest and booking details.
3
Reservation created
LodgeDesk creates the guest, reservation and invoice instantly.
4
Staff notified
Your hotel email receives a confirmation notification.
Authentication

Your API key

Your API key is a unique secret token tied to your hotel. It is passed as part of the webhook URL — there is no separate authentication header required.

Where to find it
1
Log in to your LodgeDesk dashboard
2
Go to Settings (top navigation)
3
Click the Routes & API tab
4
Your API key is shown under API credentials
Keep your key secret
Do not expose your API key in public JavaScript, GitHub repos or client-side code. If your key is compromised, regenerate it immediately from the Routes & API settings tab.
Endpoint

Webhook endpoint

Send a POST request to the following URL to create a reservation directly in LodgeDesk.

POSThttps://lodgedesk.io/api/webhooks/book/YOUR_API_KEY
MethodPOST
Content-Typeapplication/json
AuthenticationAPI key in URL
ResponseJSON
Request body

Request payload

Send a JSON body with the following fields. All required fields must be present or the request will return a 400 error.

FieldTypeDescription
guest_first_name
stringrequired

Guest's first name.

guest_last_name
stringrequired

Guest's last name.

guest_email
stringrequired

Guest's email address. Used to match existing guest profiles.

guest_phone
stringrequired

Guest's phone number including country code. e.g. +260971234567

check_in
stringrequired

Check-in date in YYYY-MM-DD format. e.g. 2025-06-01

check_out
stringrequired

Check-out date in YYYY-MM-DD format. Must be after check_in.

room_number
stringrequired

The room number exactly as configured in your LodgeDesk rooms settings. e.g. 101

adults
numberrequired

Number of adult guests. Must be 1 or more.

notes
string

Optional special requests or notes from the guest. e.g. Early check-in requested

json — example payload
{
  "guest_first_name": "John",
  "guest_last_name":  "Doe",
  "guest_email":      "john@example.com",
  "guest_phone":      "+260971234567",
  "check_in":         "2025-06-01",
  "check_out":        "2025-06-03",
  "room_number":      "101",
  "adults":           2,
  "notes":            "Early check-in requested"
}
Responses

Response codes

200
Success
Reservation created. Returns { success: true, reservation_id: "..." }
400
Bad request
Missing required fields or invalid date format. Check your payload.
401
Unauthorised
API key not found or invalid. Check your webhook URL.
404
Room not found
The room_number does not match any room in your hotel settings.
409
Double booking
The room is already reserved for the requested dates.
500
Server error
An unexpected error occurred. Contact support if this persists.
Booking widget

Embeddable booking form

The quickest way to accept bookings on your website is the embeddable widget. Paste one line of HTML and a fully styled booking form appears — it handles the API call automatically using your key.

html — paste into your website
<script
  src="https://lodgedesk.io/widget.js"
  data-key="YOUR_API_KEY">
</script>
What the widget does automatically
Renders a booking form with all required fields
Validates dates, room number and required fields client-side
POSTs to your webhook endpoint with the correct JSON payload
Shows the guest a success or error message
Uses your hotel name from LodgeDesk settings
Get your widget snippet from Settings → Routes & API → Embeddable booking widget in your dashboard.
Code examples

Sending a booking

JavaScript / fetch
javascript
const res = await fetch(
  "https://lodgedesk.io/api/webhooks/book/YOUR_API_KEY",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      guest_first_name: "John",
      guest_last_name:  "Doe",
      guest_email:      "john@example.com",
      guest_phone:      "+260971234567",
      check_in:         "2025-06-01",
      check_out:        "2025-06-03",
      room_number:      "101",
      adults:           2,
      notes:            "Early check-in requested"
    })
  }
);
const data = await res.json();
// { success: true, reservation_id: "..." }
cURL
bash
curl -X POST \
  https://lodgedesk.io/api/webhooks/book/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "guest_first_name": "John",
    "guest_last_name":  "Doe",
    "guest_email":      "john@example.com",
    "guest_phone":      "+260971234567",
    "check_in":         "2025-06-01",
    "check_out":        "2025-06-03",
    "room_number":      "101",
    "adults":           2,
    "notes":            "Early check-in requested"
  }'
Security

Security & best practices

Never expose your key client-side
If you build a custom form, your webhook call should go through your own server — not directly from the browser. This prevents your key from being visible in the page source.
Use the embeddable widget for client-side use
The LodgeDesk widget is designed to be used directly in HTML. It handles key exposure safely. For custom integrations, proxy the request through your backend.
Regenerate your key if compromised
Go to Settings → Routes & API → Regenerate key. Your old key will stop working immediately. Update your website or backend with the new key.
HTTPS only
The LodgeDesk webhook endpoint only accepts requests over HTTPS. All data in transit is encrypted.
One key per property
Each hotel on LodgeDesk has its own isolated API key. Bookings are always routed to the correct property — there is no risk of cross-tenant data leaks.
Get started

Ready to connect your website?

Sign up free — your API key is waiting in Settings → Routes & API.

Start free trialAll documentation
© 2026 LodgeDesk. Built for African hospitality.
PrivacyTermsSecurityStatus