Skip to content

Messaging

A host working from your software needs to see messages from their Localoge guests, and reply without opening our website. Three building blocks:

  • the message.received webhook, which notifies you;
  • GET /reservations/{id}/messages, which returns the history;
  • POST /reservations/{id}/messages, which sends a reply.

{id} accepts both identifiers: ours (reservation_id, the one in webhooks and in message.received) or yours (external_reservation_id, for a stay you sent us).

Scopes: messages:read to read, messages:write to write.

{
"event": "message.received",
"event_key": "message:3f8a…:1759140000000",
"created_at": "2026-09-29T10:00:00.000Z",
"api_version": "v1",
"environment": "production",
"data": {
"external_property_id": "PROP-4821",
"reservation_id": "3f8a…",
"from": "guest",
"text": "Bonjour, peut-on arriver vers 18 h ?",
"sent_at": "2026-09-29T10:00:00.000Z"
}
}

reservation_id is the Localoge ID of the stay. It is null when the message comes before any reservation (a question asked from the listing page). from is guest or host.

Fenêtre de terminal
curl https://localoge.com/api/v1/channel/reservations/RES-99001/messages \
-H "Authorization: Bearer $LOCALOGE_KEY"
{
"success": true,
"environment": "production",
"data": {
"messages": [
{ "id": "a1…", "from": "guest", "text": "Bonjour, peut-on arriver vers 18 h ?", "sent_at": "2026-09-29T10:00:00.000Z" },
{ "id": "b2…", "from": "host", "text": "Oui, sans souci.", "sent_at": "2026-09-29T10:04:12.000Z" }
]
}
}
  • The ID in the URL is reservation_id (ours) or external_reservation_id (yours).
  • Messages are returned oldest first, the last 100 at most.
  • Only messages for this stay are returned: those exchanged between this guest and this host about this property. Never the conversation of another guest of the same property.
  • No names, no addresses: from is enough to render the conversation.
Fenêtre de terminal
curl -X POST https://localoge.com/api/v1/channel/reservations/RES-99001/messages \
-H "Authorization: Bearer $LOCALOGE_KEY" \
-H "Content-Type: application/json" \
-d '{ "text": "Oui, sans souci. Le code de la boîte à clés vous sera envoyé la veille." }'
{ "success": true, "environment": "production", "data": { "id": "c3…", "sent_at": "2026-09-29T10:05:00.000Z" } }
Code Situation
201 Message posted.
400 INVALID_PAYLOAD text missing, empty, or longer than 4000 characters.
404 RESERVATION_NOT_FOUND This stay ID does not exist on our side.

The guest sees the message as coming from the host, never from your software: the host is who they chose, and who they are writing to. So write in the host’s first person.

Who gets notified depends on where the stay came from:

Stay Is the guest notified?
Sold on Localoge (origin: "localoge") Yes: in real time if Localoge is open, by push notification on their phone, and by email.
Sent by you (origin: "partner") No. The message is stored in the conversation, but nothing is sent to the guest: your channel is the one that knows them and writes to them.

A stay you sent is never attached to the Localoge account of someone who signed up themselves, even if the guest.email address is theirs (see Reservations): your messages therefore cannot reach their Localoge inbox.