Webhooks API reference

Lodgestory can notify your systems the moment something happens in your workspace — a message arrives, a ticket changes hands, a campaign finishes, a call ends. You register an HTTPS endpoint, pick the events you care about, and Lodgestory POSTs a signed JSON notification to it for every matching event.

This page is the developer contract: the envelope every delivery shares, the headers and signature scheme, retry behaviour, the complete event catalogue, and the exact payload of every event type. For the product walkthrough (creating endpoints in the UI, delivery log, test and replay), see the Webhooks settings guide.

At a glance

TransportHTTPS POST with a JSON body
FormatOne envelope for every event; payload version 2026-05-01
AuthenticityHMAC-SHA256 signature on every subscription delivery (and on automation API calls when you set a signing secret)
Events40 subscribable event types (plus a synthetic webhook.test)
ReliabilityAt-least-once; up to 6 attempts with increasing delays; 10-second timeout per attempt
EndpointsUp to 30 per organisation, each with its own secret, event selection, and up to 30 custom headers. Manage them in Settings → Webhooks or with your API token
HistoryDelivery log retained 30 days, with on-demand replay

The envelope

Every delivery — regardless of event type — is a POST with this JSON body:

{
  "id": "0c6532a2-8e2a-4b6e-9d5e-1f9b1a7e4c11",
  "event": "message.received",
  "api_version": "2026-05-01",
  "occurred_at": "2026-08-02T10:14:02.000Z",
  "organisation_id": "550e8400-e29b-41d4-a716-446655440000",
  "data": {
    "object": "message",
    "message": {
      "…": "the full object — see the per-event reference below"
    }
  }
}
FieldTypeDescription
idstring (UUID)Unique delivery ID. Automatic retries of a failed delivery reuse the same id; a manual Redeliver mints a new one. Use it to deduplicate.
eventstringThe event type, e.g. ticket.assigned. Always matches the X-Webhook-Event header.
api_versionstringPayload schema version, currently 2026-05-01. It only changes if the shape changes incompatibly.
occurred_atstring (ISO 8601)When the underlying event happened (not when the delivery was attempted).
organisation_idstring (UUID)The organisation the event belongs to.
data.objectstringThe kind of record in the payload: one of message, message_status, template, ticket, contact, chat_resolution, chat_assignment, chat_team_assignment, chat_state, chat_workflow, flow_response, survey_response, campaign, channel, group, instagram_comment, call, goal_milestone, disposition, lead, lead_attempt, member, ai_request, or test.
data.<object>objectThe full record, under a key named after data.object (e.g. data.ticket). A point-in-time snapshot taken when the event fired.
data.previous_attributesobjectOnly on change-type events (see the catalogue below) — the value(s) before the change.

Delivery semantics

  • At-least-once. The same delivery can occasionally arrive twice (for example, if your endpoint responds slowly and a retry overlaps). Make your handler idempotent using id / X-Webhook-Id.
  • No ordering guarantee. Deliveries are made in parallel and retried independently, so events can arrive out of order. Sequence with occurred_at and the timestamps inside each object, not arrival order.
  • Snapshots, not live reads. The payload reflects the record at the moment the event fired. If you need the current state later, read it from the API.
  • Per-endpoint filtering. An endpoint only receives the event types it subscribes to.

Delivery headers

HeaderDescription
Content-TypeAlways application/json.
X-Webhook-IdThe delivery ID (same as id in the body). Idempotency key.
X-Webhook-EventThe event type (same as event in the body). Lets you route before parsing.
X-Webhook-TimestampUnix time in seconds when the delivery was signed. Part of the signature input.
X-Webhook-Signaturesha256=<hex HMAC> — see Verifying the signature. Always present on subscription deliveries; on automation API calls it is present only when the step has a signing secret.

If you configured custom headers on the endpoint (for example, an Authorization header for your own gateway), they are sent on every delivery in addition to the above.

Verifying the signature

Every delivery is signed with the endpoint's signing secret (shown when you create the endpoint; view or rotate it any time). The signature is an HMAC-SHA256 over the timestamp header and the raw request body, joined by a dot:

signature = "sha256=" + hex( HMAC_SHA256( secret, "<X-Webhook-Timestamp>.<raw body>" ) )

To verify: recompute it from the exact bytes you received and compare against X-Webhook-Signature using a constant-time comparison. Always use the raw, unparsed body — re-serializing the JSON changes the bytes and breaks the check.

Node.js

import crypto from 'crypto';

function isValidDelivery(req, secret) {
  const timestamp = req.headers['x-webhook-timestamp'];
  const signature = req.headers['x-webhook-signature']; // "sha256=…"
  const expected =
    'sha256=' +
    crypto
      .createHmac('sha256', secret)
      .update(`${timestamp}.${req.rawBody}`) // the exact bytes received
      .digest('hex');
  return (
    signature?.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected))
  );
}

Python

import hashlib, hmac

def is_valid_delivery(headers, raw_body: bytes, secret: str) -> bool:
    timestamp = headers["X-Webhook-Timestamp"]
    signature = headers.get("X-Webhook-Signature", "")
    expected = "sha256=" + hmac.new(
        secret.encode(), timestamp.encode() + b"." + raw_body, hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(signature, expected)

Replay protection. The timestamp is part of the signed input, so an attacker can't re-sign an old body with a fresh time. Reject deliveries whose X-Webhook-Timestamp is older than a few minutes (5 minutes is a sensible tolerance — remember that retries of a failed delivery are re-signed with a fresh timestamp on each attempt).

Rotation. After rotating a secret, deliveries are signed with the new secret immediately. If you need zero-gap rotation, verify against both secrets for a short window on your side.

Responding, retries, and automatic pause

  • Respond with any 2xx status to acknowledge. Anything else — including a timeout — counts as a failure.
  • Each attempt waits up to 10 seconds for your response. Acknowledge fast and process asynchronously; the response body is ignored (only the first 1,000 bytes are kept for the delivery log).
  • Failed deliveries are retried automatically: up to 6 attempts with roughly doubling delays, spread over about 3 minutes.
  • If an endpoint keeps failing — 15 consecutive events exhausting all their retries — it is paused automatically and stops receiving traffic. Fix your endpoint, then re-enable it (re-enabling resets the failure count). Any successful delivery also resets the count.
  • Every attempt is recorded in the delivery log (kept for 30 days) with status, response code, and attempt count. You can redeliver any logged delivery on demand; the replay carries the original payload with a fresh delivery ID.
  • Automatic pause and redelivery apply to endpoints (subscriptions) only. Automation API calls use the same retry schedule and the same 10-second timeout, but a failing target never pauses anything and cannot be redelivered from the webhooks screen — re-run the automation instead.

Chat identifiers — read this once

Two different chat identifiers appear across payloads, and mixing them up is the most common integration bug:

  • chat_id on ticket, chat_state, call, and goal_milestone payloads is the conversation ID (a UUID) — the same ID the Lodgestory API uses for chat endpoints.
  • chat_id on message payloads is the channel-level thread ID (for example [email protected] on WhatsApp) — the ID of the thread on the channel itself.
  • goal_milestone carries both: chat_id (conversation UUID) and channel_chat_id (channel thread ID), so you can join goal events to either stream.
  • instagram_comment carries both too: chat_id is the conversation UUID of the post's comment thread (every comment on the same post shares it) and channel_chat_id is the thread's channel-level ID, ig_media:<media id>. Comments never appear in message payloads — they have their own event.

Supported events

EventPayload objectFires whenprevious_attributes
message.sentmessageAn outbound message is sent on any channel — by an agent, a bot, a campaign, or the API.—
message.receivedmessageAn inbound message arrives on any channel.—
message.status_updatedmessage_statusA sent message's delivery status changes (SENT / DELIVERED / READ / FAILED), on channels that report receipts (WhatsApp Official). Push apps report through the push message status and campaign counters instead.—
template.createdtemplateA WhatsApp template is created and submitted for review.—
template.status_updatedtemplateWhatsApp's review status for a template changes (approved, rejected, paused…).—
template.quality_updatedtemplateWhatsApp's quality rating for an approved template changes (GREEN / YELLOW / RED / UNKNOWN).qualityScore
ticket.createdticketA ticket is filed — manually, by a bot journey, or via the API.—
ticket.status_changedticketA ticket is resolved or reopened.status
ticket.assignedticketA ticket's assignee changes (including unassignment when a member is removed).assigned_to_user_id
contact.createdcontactA contact is created — from a new conversation, the create-contact action, a web-chat visitor identifying themselves, a guest signing in on your own app (push notifications), or automatically when an advisor captures a disposition on a chat or call that has no linked contact (origin tells you which). Bulk imports don't fire per-record events.—
chat.resolvedchat_resolutionA conversation is resolved (closed) — by an agent, a bot journey's AI agent, or a workflow finishing when closing rules say so — or reopens: an admin or assignee reopens it, a new customer message auto-reopens it, or its workflow is restarted. via says which.resolved
chat.assignedchat_assignmentA conversation's primary assignee is set or changed — a bot journey hands it to a human, someone assigns it manually, or an automation assigns it. Secondary-assignee additions and removals don't fire it.assignee_user_id
chat.team_assignedchat_team_assignmentOne or more teams are newly attached to a conversation — the routing moment, which can happen with no individual owner selected (nobody online, or everyone at their open-chat cap — the chat then waits in the team's queue). Re-transfers to already-attached teams and team removals don't fire it.—
chat.workflow_startedchat_workflowA workflow (lifecycle-stage set) is attached to a conversation — the moment it enters the workflow.—
chat.state_changedchat_stateA conversation moves between workflow lifecycle stages (including a workflow restart).state_id, state_name
campaign.createdcampaignA campaign is created.—
campaign.completedcampaignA campaign finishes: COMPLETED, or FAILED when no message went out — including when its audience couldn't be prepared. Cancelled campaigns don't fire it.status
flow.response_receivedflow_responseA customer completes a WhatsApp Flow — the submitted answers, correlated to the chat and (when applicable) the campaign or bot-journey send.—
push.device_registeredpush_deviceA new install of one of your push apps registered its device (token refreshes are silent).—
push.device_identifiedpush_deviceA device was linked to a person (your backend's identify call or a contact token).—
push.device_invalidatedpush_deviceApple or Google reported the device's token dead (uninstalled, rotated); the device was retired until the app registers again.—
channel.connectedchannelA channel is connected (or recovers, for WhatsApp Official health).—
channel.disconnectedchannelA channel is disconnected or removed.—
group.createdgroupA WhatsApp group materialises on one of your WhatsApp Official channels. Group creation via the API is asynchronous — this event delivers the group's chat_id, correlated to your create call by request_id.—
instagram.comment.receivedinstagram_commentSomeone comments on one of your Instagram posts, reels or ads — top-level comments and replies alike — on an Instagram channel with Comments in inbox switched on. Your own account's comments never fire it.—
call.answeredcallA Lodgestory Voice call is picked up, mid-call — an agent answers an inbound call, or the customer answers an agent's outbound or click-to-call. For screen-pops.—
call.completedcallA call on a Lodgestory Voice number ends after being answered.—
call.missedcallA call on a Lodgestory Voice number ends unanswered — including a call a team member declined that nobody else answered, and a caller who only heard your closed or holiday message (business_hours.after_hours is true).—
call.recording_availablecallA call's recording becomes available for playback/download.—
call.transcript_availablecallA call's transcript becomes available.—
survey.response_submittedsurvey_responseA survey response is submitted (or a partial response is finalised). Carries the primary score and sentiment band.—
goal.milestone_reachedgoal_milestoneA live bot-journey session passes a Goal milestone. Builder test-runs never fire it.—
disposition.createddispositionAn advisor captures a disposition (outcome form) on a chat, a call, a booking or a lead — once per capture, after it is saved. Carries the template, the answers keyed by field id and the source ids.—
lead.createdleadA lead is created — by hand, from an intake, a CSV import, a Meta Instant Form (Meta Lead Ads), the API or an automation. A duplicate the Track's policy reused or refused creates nothing and does not fire.—
lead.assignedleadA lead's owner actually changes — a pool claim, an assignment rule, a manager's reassignment, a return to the pool, an SLA handover or the stale rescue. Not fired for a lead created already owned (that is lead.created).owner_user_id
lead.stage_changedleadA lead moves stage. status follows the stage's kind, so "won" is lead.stage_changed with status WON.stage_id, status
lead.track_movedleadA lead moves to another Track (its stage vocabulary and fields change with it — re-read rather than patch).track_id, stage_id
lead.outcome_capturedlead_attemptAn outcome is recorded for one attempt on a lead: the agent's, or — for a paced call nobody answered — the dialer's own. Once per dial. A call an agent placed to the lead outside the dialer is counted when it ends, and emits this only when an agent saves its outcome. The lead rides along.—
lead.sla_breachedleadA lead's first-response SLA expired with the lead still undialled. Once per lead. Says whether the breach also reassigned it.—
ai_request.createdai_requestThe Bot Journey AI agent raised a request for a person — a question for the team, a choice between options it proposed, or a change held until a teammate approves it (kind says which). Fires the moment it is raised, before anyone is notified. Builder test-runs never fire it.—
ai_request.answeredai_requestThe request left PENDING: answered, approved or rejected by a person (resolved_via says from where), or closed by Lodgestory — expired, auto-rejected because nobody answered, withdrawn by the agent, handled directly by a teammate in the conversation, or taken over from the console. status says which.status
ai_request.repliedai_requestKaylee replied to a teammate's ask-back on an open request — answered them, or asked the customer about it first. The request is still PENDING; ask_backs carries the thread, and its last entry is the one that changed. Builder test-runs never fire it.—
member.removedmemberA team member is removed from the organisation.—
webhook.testtestOnly when you press Send test (or call the test API) — never subscribable, delivered regardless of the endpoint's event selection.—

Call events fire for calls on Lodgestory Voice numbers. Calls carried by third-party telephony providers connected to your workspace don't produce webhooks.


Event payloads

Each section below documents one data.object type: the events that use it, every field, and a full example. All field names are snake_case; timestamps are ISO 8601 strings; any field can be null when the underlying value is absent.

message — message.sent, message.received

One payload per message, on every channel. direction always matches the event: inbound for message.received, outbound for message.sent. Internal system entries (join notes, automated markers) never fire message events. Campaign sends fire one message.sent per recipient. Instagram comments aren't messages — they arrive as instagram.comment.received (see instagram_comment below); a private reply sent from a comment is a real DM, though, and fires message.sent on the commenter's chat.

FieldTypeDescription
idstringMessage ID. For WhatsApp this is the provider message ID (wamid.…); other channels use their own ID format.
chat_idstringChannel-level thread ID (see Chat identifiers).
channel_idstring (UUID)The connected channel the message flowed through.
channel_typestringwhatsapp, instagram, messenger, linkedin, email, or webwidget.
directionstringinbound or outbound.
typestringMessage type — text, image, audio, video, document, location, sticker, contacts, interactive, button, and template sends.
textstringText/caption content, if any.
media_uristringMedia location for media messages, if any.
statusstringLatest known delivery status (SENT, DELIVERED, READ, FAILED); usually null on inbound messages.
from_namestringDisplay name of the sender (the customer on inbound).
from_numberstringSender's number/address on the channel. For channel_type: linkedin this is the sender's LinkedIn URN (urn:li:fsd_profile:… or urn:li:fsd_company:…), not a phone number; chat_id is the conversation id used by the messaging API.
reply_to_message_idstringID of the message this one replies to, if it's a reply.
agent_idstring (UUID)The team member who sent it, for agent-sent outbound messages.
viastring | nullbrowser_chat when the message travelled through browser chat — written by the customer on the page, or sent into it by your team or bot — and null for everything sent or received on the channel itself. A browser chat message keeps the chat's own chat_id, channel_id and channel_type, so it belongs to the same conversation; its id is Lodgestory's own (cs-… / cs-in-…), not a provider ID.
timestampstringWhen the message was recorded.
{
  "id": "wamid.HBgMOTE5OTk5OTk5OTk5FQIAEhgg…",
  "chat_id": "[email protected]",
  "channel_id": "3f6f6c53-9d2a-4a0e-8f2b-6b7e5a1c2d3e",
  "channel_type": "whatsapp",
  "direction": "inbound",
  "type": "text",
  "text": "Is breakfast included with the deluxe room?",
  "media_uri": null,
  "status": null,
  "from_name": "John Doe",
  "from_number": "+919999999999",
  "reply_to_message_id": null,
  "agent_id": null,
  "via": null,
  "timestamp": "2026-08-02T10:14:02.000Z"
}

message_status — message.status_updated

Delivery-receipt updates for messages you sent, on channels that report them (WhatsApp Official today). Expect one event per status transition — a read message typically produces SENT → DELIVERED → READ. Failures (FAILED) include messages the provider accepted but could not deliver.

FieldTypeDescription
message_idstringThe message whose status changed — matches message.id from the original message.sent.
chat_idstringMay be null on status updates — correlate using message_id.
channel_idstring (UUID)The channel the message was sent on.
channel_typestringChannel type (see message).
statusstringSENT, DELIVERED, READ, or FAILED.
timestampstringWhen the provider reported the status.
{
  "message_id": "wamid.HBgMOTE5OTk5OTk5OTk5FQIAEhgg…",
  "chat_id": null,
  "channel_id": "3f6f6c53-9d2a-4a0e-8f2b-6b7e5a1c2d3e",
  "channel_type": "whatsapp",
  "status": "READ",
  "timestamp": "2026-08-02T10:15:40.000Z"
}

template — template.created, template.status_updated, template.quality_updated

WhatsApp template lifecycle. template.created fires when the template is submitted (status is typically the initial review state); template.status_updated fires whenever WhatsApp's review status changes; template.quality_updated fires when WhatsApp's quality rating for an approved template moves (GREEN / YELLOW / RED / UNKNOWN), with the prior score in previous_attributes.qualityScore.

FieldTypeDescription
idstringThe template's ID with WhatsApp.
namestringTemplate name.
languagestringLanguage code, e.g. en, en_US.
categorystringMARKETING, UTILITY, or AUTHENTICATION.
statusstringReview status as reported by WhatsApp — e.g. PENDING, APPROVED, REJECTED, PAUSED.
rejected_reasonstringRejection reason (and recommendation, when provided) for rejected templates.
quality_scorestringWhatsApp quality rating, when reported.
{
  "id": "1189312045678901",
  "name": "booking_confirmation",
  "language": "en",
  "category": "UTILITY",
  "status": "APPROVED",
  "rejected_reason": null,
  "quality_score": null
}

ticket — ticket.created, ticket.status_changed, ticket.assigned

The full ticket record. ticket.status_changed fires only on a genuine open ⇄ resolved transition, with previous_attributes.status. ticket.assigned fires whenever the assignee changes, with previous_attributes.assigned_to_user_id (the previous assignee, or null if it was unassigned). When a member is removed from the organisation, each of their open tickets fires ticket.assigned with assigned_to_user_id: null.

FieldTypeDescription
idstring (UUID)Ticket ID.
ticket_numbernumberHuman-friendly per-organisation ticket number (#42).
chat_idstring (UUID)The conversation the ticket belongs to, if chat-linked.
call_log_idstring (UUID)The call the ticket was filed from, if call-linked.
customer_phonestringCustomer phone captured on the ticket.
customer_emailstringCustomer email captured on the ticket.
statusstringopen or resolved.
resolvedbooleanSame fact as status, as a boolean.
prioritystringLOW_PRIORITY, MEDIUM_PRIORITY, HIGH_PRIORITY, SOS, or NO_ACTION_REQUIRED.
assigned_to_user_idstring (UUID)Current assignee.
created_by_user_idstring (UUID)Who filed it (null for bot/API-created tickets).
issueobjectThe issue categories selected when the ticket was filed — mirrors your Ticket Workflow taxonomy for the channel.
fieldsobject | nullThe workflow's captured Details to capture, keyed by field id ({ "field_room_no": 204, "field_category": "Refund" }). Labels and types come from the workflow's field definitions (Settings → Ticket Workflows). null when nothing was captured.
remarksstringFree-text remarks trail.
created_atstringCreation time.
updated_atstringLast update time.
{
  "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "ticket_number": 42,
  "chat_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "call_log_id": null,
  "customer_phone": "+919999999999",
  "customer_email": null,
  "status": "resolved",
  "resolved": true,
  "priority": "HIGH_PRIORITY",
  "assigned_to_user_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
  "created_by_user_id": "77fa1329-5f0b-4c2d-9e3a-1b2c3d4e5f60",
  "issue": { "Room Service": ["Late delivery"] },
  "fields": { "field_room_no": 204, "field_category": "Refund" },
  "remarks": "Guest called twice; comped breakfast.",
  "created_at": "2026-08-01T09:00:00.000Z",
  "updated_at": "2026-08-02T11:02:00.000Z"
}

With, on ticket.status_changed:

"previous_attributes": { "status": "open" }

contact — contact.created

FieldTypeDescription
idstring (UUID)Contact ID.
namestringFull display name.
first_namestringFirst name.
last_namestringLast name.
phonestringPhone number (without country code when stored separately).
country_codestringCountry dialling code, e.g. +91.
emailstringEmail address.
originstringHow the contact came to exist. MANUAL — created by a person in the CRM contact dialog. null — created by the API, a new conversation, a sync, or a web-chat visitor identifying themselves. DISPOSITION — created and linked automatically because an advisor captured a disposition on a chat or call that had no contact yet (email chats take the address, WhatsApp 1:1 chats and calls take the number; on a call the advisor types the name). PUSH — created when a guest signed in on your own app and your backend identified the device (push notifications; it does not create a lead). BOT_JOURNEY — created by a bot journey's AI agent, when it saves details the customer gave or files a lead on a conversation that has no contact yet (also mid-conversation).
created_atstringCreation time.
{
  "id": "b7e23ec2-9054-4c3f-a1de-2f4b8c6d0e12",
  "name": "John Doe",
  "first_name": "John",
  "last_name": "Doe",
  "phone": "9999999999",
  "country_code": "+91",
  "email": null,
  "origin": "MANUAL",
  "created_at": "2026-08-02T10:14:05.000Z"
}

Treat origin: "DISPOSITION" and origin: "BOT_JOURNEY" contacts as already mid-conversation, not as new leads: a welcome sequence, a "thanks for reaching out" message, or a lead-scoring hook keyed on contact.created should skip them. The field is stamped on the event, not stored on the contact.

chat_resolution — chat.resolved

Fires when a conversation is resolved (closed), and again when it reopens. Resolution comes from an agent's explicit Resolve & Close, a bot journey's AI agent closing it after its goodbye, or a workflow finishing when the organisation's Chat closing switch (or the workflow's own closing rule) says finishing also resolves the chat. Reopening comes from an admin or assignee flipping it back, a new customer message auto-reopening it, the AI agent undoing its own close when a customer message raced it, or the chat's workflow being restarted. resolved tells you the direction, via tells you the cause, and previous_attributes carries the prior flag.

FieldTypeDescription
chat_idstring (UUID)The conversation.
channel_chat_idstringThe channel-level chat identifier (see Chat identifiers).
channel_idstring (UUID)The connected channel the conversation lives on.
resolvedbooleanThe new state: true = resolved, false = reopened.
resolved_atstringWhen it was resolved; null on reopen.
resolved_by_user_idstring (UUID)The agent who resolved it; null on reopen.
viastringWhat caused the change. AGENT — the explicit Resolve & Close / Reopen action. INBOUND_MESSAGE — a new customer message auto-reopened the chat (always resolved: false). WORKFLOW — finishing a workflow resolved the chat under the resolve-on-workflow-finish rules (resolved_by_user_id is the agent who finished it), or restarting that workflow reopened it. BOT_JOURNEY — a bot journey's AI agent resolved the chat after its goodbye (resolved_by_user_id is the channel's bot user), or reopened it at once because a customer message arrived while it was closing (resolved: false). A workflow the AI agent moves to a final stage closes the chat with WORKFLOW, as for a Workflow Stage step.
{
  "chat_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "channel_chat_id": "919812345678",
  "channel_id": "3f8e2a10-9b7c-4d2e-8f01-5a6b7c8d9e0f",
  "resolved": true,
  "resolved_at": "2026-08-02T12:30:00.000Z",
  "resolved_by_user_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
  "via": "AGENT"
}

With:

"previous_attributes": { "resolved": false }

A workflow-driven resolution carries the same shape with "via": "WORKFLOW"; the finishing move itself arrives separately as chat.state_changed with is_final: true. Two cases produce no chat.resolved even though a workflow finished: another workflow on the chat is still active (the chat stays open), or the agent unticked Also mark chat as resolved on that close.

chat_assignment — chat.assigned

Fires when a conversation's primary assignee is set or changed — the moment a human takes ownership: a bot journey hands the chat to an agent or team, someone assigns it manually in the CRM, or an automation's assign-chat action runs. It does not fire for secondary-assignee additions, for deassignments, or for the administrative primary re-election that runs when a team member is removed from the workspace.

FieldTypeDescription
chat_idstring (UUID)The conversation.
channel_chat_idstringThe channel-level chat identifier (see Chat identifiers).
channel_idstring (UUID)The connected channel the conversation lives on.
chat_namestringThe conversation's display name.
assignee_user_idstring (UUID)The new primary assignee.
assignee_namestringTheir display name.
assignee_emailstringTheir email.
previous_assignee_user_idstring (UUID)The prior primary; null when the chat had none.
assigned_by_user_idstring (UUID)Who made the assignment — an agent, or the service account when a bot journey or automation did it.
{
  "chat_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "channel_chat_id": "919812345678",
  "channel_id": "3f8e2a10-9b7c-4d2e-8f01-5a6b7c8d9e0f",
  "chat_name": "Asha Patel",
  "assignee_user_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
  "assignee_name": "Priya Sharma",
  "assignee_email": "[email protected]",
  "previous_assignee_user_id": null,
  "assigned_by_user_id": "5c6d7e8f-9a0b-1c2d-3e4f-5a6b7c8d9e0f"
}

With:

"previous_attributes": { "assignee_user_id": null }

chat_team_assignment — chat.team_assigned

Fires when one or more teams are newly attached to a conversation — the routing moment. It fires even when no individual owner gets selected (an off-hours transfer where nobody on the team is available attaches the team but picks nobody — chat.assigned then never fires, and this event is the only signal). Only the newly attached teams are reported; teams already on the conversation are not repeated.

It is also the signal for capacity overflow. Organisations can cap each advisor's open chats; when every eligible member of the routed team is at their cap (or offline), the team is attached, nobody is picked, and the chat waits in the team's queue with no owner. chat.assigned follows only when someone claims it, an admin assigns it, or an automation pulls it — so a chat.team_assigned with no chat.assigned after a few minutes is the "chat is queueing" condition worth alerting on.

FieldTypeDescription
chat_idstring (UUID)The conversation.
channel_chat_idstringThe channel-level chat identifier (see Chat identifiers).
channel_idstring (UUID)The connected channel the conversation lives on.
chat_namestringThe conversation's display name.
team_idsarray of string (UUID)The newly attached teams.
team_namesarray of stringTheir names, same order.
assigned_by_user_idstring (UUID)Who routed it — an agent, or the service account when a bot journey did it.
{
  "chat_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "channel_chat_id": "919812345678",
  "channel_id": "3f8e2a10-9b7c-4d2e-8f01-5a6b7c8d9e0f",
  "chat_name": "Asha Patel",
  "team_ids": ["7b2e4c66-1a2b-4c3d-9e0f-a1b2c3d4e5f6"],
  "team_names": ["Reservations"],
  "assigned_by_user_id": "5c6d7e8f-9a0b-1c2d-3e4f-5a6b7c8d9e0f"
}

chat_workflow — chat.workflow_started

Fires when a workflow (lifecycle-stage set) is attached to a conversation — the moment it enters the workflow. Stage transitions and completion then flow as chat.state_changed.

FieldTypeDescription
chat_idstring (UUID)The conversation.
state_machine_idstring (UUID)The workflow attached.
state_machine_namestringIts name.
state_idstringThe initial stage's ID.
state_namestringThe initial stage's name.
is_finalbooleanAlways false — a workflow cannot start already closed.
attached_by_user_idstring (UUID)Who attached it — the person, or the channel's bot user for rule- and journey-attached workflows.
triggerstringMANUAL (a person), AUTO (a channel auto-attach rule) or BOT_JOURNEY (a bot journey — its Workflow Stage step, or its AI agent moving the stage).
attached_atstringWhen the workflow was attached.
{
  "chat_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "state_machine_id": "0d47ac10-58cc-4372-a567-0e02b2c3d479",
  "state_machine_name": "Guest journey",
  "state_id": "node-1",
  "state_name": "New",
  "is_final": false,
  "attached_by_user_id": null,
  "trigger": "AUTO",
  "attached_at": "2026-08-02T12:30:00.000Z"
}

chat_state — chat.state_changed

Fires when a conversation moves between workflow lifecycle stages, including moving into a final stage and restarting a finished workflow. previous_attributes carries the stage it moved from.

FieldTypeDescription
chat_idstring (UUID)The conversation.
state_machine_idstring (UUID)The workflow (lifecycle-stage set) in play.
state_machine_namestringIts name.
state_idstringID of the stage the conversation is now in.
state_namestringName of that stage, e.g. Awaiting Guest.
is_finalbooleanWhether the new stage is a final stage.
responsible_user_idstring (UUID)Team member responsible for the transition, when recorded.
remarksstringTransition remarks, when provided.
changed_atstringWhen the transition happened.
{
  "chat_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "state_machine_id": "0d47ac10-58cc-4372-a567-0e02b2c3d479",
  "state_machine_name": "Guest journey",
  "state_id": "node-3",
  "state_name": "Awaiting Guest",
  "is_final": false,
  "responsible_user_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
  "remarks": "Waiting on guest confirmation",
  "changed_at": "2026-08-02T12:30:00.000Z"
}

With:

"previous_attributes": { "state_id": "node-2", "state_name": "In Progress" }

campaign — campaign.created, campaign.completed

campaign.created fires when the campaign is created — from the builder, the partner API, or an AI assistant. Its audience is usually still being prepared at that point: status is SCHEDULED and total_messages is the expected count. campaign.completed fires exactly once when the campaign ends: status is COMPLETED, or FAILED when not a single message went out — including when the audience couldn't be prepared (nobody in it could be messaged on the channel, or its segment was deleted first). A cancelled campaign never fires campaign.completed. The counters are final on the completion event.

FieldTypeDescription
idstring (UUID)Campaign ID.
namestringCampaign name.
statusstringSCHEDULED on campaign.created; COMPLETED or FAILED on campaign.completed.
channel_idstring (UUID)The channel the campaign sends on.
total_messagesnumberTotal recipients (the expected count while the audience is being prepared).
completed_messagesnumberSends that succeeded so far.
failed_messagesnumberSends that failed so far.
delivered_messagesnumberMessages delivered (WhatsApp Official; 0 on channels without delivery receipts).
read_messagesnumberMessages read (WhatsApp Official).
replied_messagesnumberRecipients who replied.
clicked_messagesnumberRecipients who tapped a tracked link.
message_typestringTEMPLATE, TEXT, IMAGE, VIDEO, DOCUMENT, or INTERACTIVE.
schedule_atstringWhen the campaign sends (ISO 8601).
audienceobject | nullWhere the recipients came from — see below. null for campaigns created before audiences were recorded.
prepare_statsobject | nullHow the audience became messages — see below. null until preparation records it.
created_atstringCreation time.

audience

FieldTypeDescription
kindstringfile (an uploaded CSV), list (chats and contacts picked in the builder, or recipients listed in an API request), segment (a saved segment), or retarget (a stage of a past campaign).
segment_idstring (UUID) | nullsegment only. null once the segment has been deleted.
segment_namestring | nullsegment only — kept after the segment is deleted.
source_campaign_idstring (UUID) | nullretarget only: the past campaign.
retarget_segmentstring | nullretarget only: the stage, for example READ_NOT_REPLIED or CLICKED.
frozen_countnumber | nullsegment and retarget: how many members or chats the audience had when preparation started.

prepare_stats — counts, each present only when it is above zero: read (audience entries processed), queued (messages scheduled), and the entries skipped — duplicate (the same chat twice), invalidPhone, invalidEmail, otherChannel (a chat on another channel), notFound (a chat or contact that no longer exists), invalidRow (an unreadable entry).

{
  "id": "5f7d8e9a-0b1c-2d3e-4f50-617283940a5b",
  "name": "August offers",
  "status": "COMPLETED",
  "channel_id": "3f6f6c53-9d2a-4a0e-8f2b-6b7e5a1c2d3e",
  "total_messages": 1200,
  "completed_messages": 1187,
  "failed_messages": 13,
  "delivered_messages": 1160,
  "read_messages": 902,
  "replied_messages": 141,
  "clicked_messages": 0,
  "message_type": "TEMPLATE",
  "schedule_at": "2026-08-01T09:30:00.000Z",
  "audience": {
    "kind": "segment",
    "segment_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "segment_name": "Goa guests — summer 2026",
    "source_campaign_id": null,
    "retarget_segment": null,
    "frozen_count": 1240
  },
  "prepare_stats": {
    "read": 1240,
    "queued": 1200,
    "duplicate": 12,
    "invalidPhone": 28
  },
  "created_at": "2026-08-01T08:00:00.000Z"
}

flow_response — flow.response_received

A customer completed a WhatsApp Flow. Every flow send carries a unique token minted by Lodgestory, so each response arrives already correlated: source says what sent the flow, and campaign_id is set for campaign sends. response is the answers object exactly as the flow's submit defined it (field names come from the flow's components); photo/document answers reference uploaded media ids.

FieldTypeDescription
idstring (UUID)The flow-token record's ID.
flow_idstringThe flow's ID with WhatsApp.
chat_idstringThe conversation (WhatsApp chat id) the response came from.
channel_idstring (UUID)The channel the flow was sent on.
sourcestringWhat sent the flow — journey, campaign, chat_template, or test_send.
campaign_idstring (UUID)The campaign, for campaign sends; otherwise null.
responseobjectThe submitted answers as key-value pairs.
sent_atstringWhen the flow message was sent.
responded_atstringWhen the customer submitted.
{
  "id": "9a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
  "flow_id": "662739091060588",
  "chat_id": "919888877766",
  "channel_id": "3f6f6c53-9d2a-4a0e-8f2b-6b7e5a1c2d3e",
  "source": "journey",
  "campaign_id": null,
  "response": {
    "check_in": "2026-09-12",
    "party_size": "4",
    "room_preference": "sea_view"
  },
  "sent_at": "2026-08-15T09:12:44.000Z",
  "responded_at": "2026-08-15T09:14:02.000Z"
}

channel — channel.connected, channel.disconnected

A connected messaging channel changed availability. The payload never includes channel credentials or tokens.

FieldTypeDescription
idstring (UUID)Channel ID — matches channel_id on message/campaign payloads.
channel_typestringwhatsapp, instagram, messenger, email, or webwidget.
namestringThe channel's identity on its platform (e.g. the WhatsApp business number ID).
phone_numberstringThe channel's phone number, for phone-based channels.
connectedbooleantrue on channel.connected, false on channel.disconnected.
{
  "id": "3f6f6c53-9d2a-4a0e-8f2b-6b7e5a1c2d3e",
  "channel_type": "whatsapp",
  "name": "104857623456789",
  "phone_number": "+919888877766",
  "connected": true
}

push_device — push.device_registered, push.device_identified, push.device_invalidated

A device of one of your push apps (see Push notifications API). Never carries the provider token.

{
  "id": "1d5e…",
  "channel_id": "c1d2e3f4-…",
  "contact_id": "33333333-…",
  "external_user_id": "u_4421",
  "platform": "android",
  "provider": "fcm",
  "app_version": "1.0.3",
  "os_version": "15",
  "locale": "en-IN",
  "timezone": "Asia/Kolkata",
  "notifications_enabled": true,
  "marketing_opt_in": true,
  "status": "ACTIVE",
  "invalid_reason": null,
  "last_seen_at": "2026-10-21T09:58:12.000Z",
  "created_at": "2026-10-21T09:58:12.000Z"
}

status is ACTIVE, UNSUBSCRIBED or INVALID (invalid_reason = Apple's / Google's reason, or stale after 180 days unseen). contact_id is null until identified. Push sends themselves raise no message.* events — they are not chat messages. Follow one with GET /api/wp-crm/push/{organisationId}/messages/{id} (per-device sent / delivered / opened), and a push campaign through its counters and campaign.completed.

group — group.created

A WhatsApp group appeared on one of your WhatsApp Official channels. Group creation via POST /api/wp-crm/groups/:orgId is asynchronous — the create call returns only a requestId; this event completes the loop by delivering the group's chat_id. Match on request_id to correlate. Groups created outside the API (e.g. from the connected phone) also fire it, with request_id: null.

The chat_id is a normal conversation ID: it works with the messaging, chats, and chat-assignment APIs, so you can immediately message the group and assign agents to it.

FieldTypeDescription
idstring (UUID)Group record ID (same value as chat_id, present for consistency with other *.created payloads).
chat_idstring (UUID)The group's conversation ID — use it with send-message, chats, and chat-assignments.
group_idstringWhatsApp's opaque group ID.
channel_idstring (UUID)The WhatsApp Official channel the group lives on.
subjectstringGroup subject/name.
descriptionstringGroup description, when set.
invite_linkstringShareable invite link, when already known.
join_approval_modebooleantrue when invite-link joiners need admin approval.
request_idstringThe requestId your create call returned; null for groups created outside the API.
created_atstring (ISO 8601)When the group was created.
{
  "id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
  "chat_id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
  "group_id": "120363043968812345",
  "channel_id": "3f6f6c53-9d2a-4a0e-8f2b-6b7e5a1c2d3e",
  "subject": "Villa Amara — Guest Group",
  "description": "Concierge support for your stay, 24×7.",
  "invite_link": "https://chat.whatsapp.com/JZk1aB2cD3e",
  "join_approval_mode": true,
  "request_id": "1234567890",
  "created_at": "2026-08-15T09:12:40.000Z"
}

instagram_comment — instagram.comment.received

Someone commented on one of your Instagram posts, reels or ads. Fires for Instagram channels that have Comments in inbox switched on (Connections), once per comment — replies to comments included (is_reply, with parent_id). Comments posted by your own account never fire it, and neither do public replies sent from Lodgestory. Comments live in the post's comment thread in the inbox: chat_id is that thread's conversation ID, shared by every comment on the same post. The media block describes the post the comment is on.

FieldTypeDescription
idstringInstagram's comment ID. Use it with the comments API to reply, reply privately, or hide.
textstringThe comment text.
usernamestringThe commenter's Instagram username.
from_idstringThe commenter's Instagram-scoped ID.
is_replybooleantrue when the comment is a reply to another comment.
parent_idstringThe top-level comment this one replies to; null for top-level comments.
is_ownbooleanWhether your own account posted it — always false on this event.
hiddenbooleanWhether the comment is hidden on Instagram.
created_atstringWhen the comment was posted.
chat_idstring (UUID)The post's comment-thread conversation ID (see Chat identifiers).
channel_chat_idstringThe thread's channel-level ID — ig_media:<media id>.
channel_idstring (UUID)The Instagram channel (account) the post belongs to.
channel_typestringAlways instagram.
mediaobjectThe post the comment is on — fields below.
media.idstringInstagram's media ID.
media.product_typestringFEED (post), REELS, or AD.
media.media_typestringInstagram's media type — IMAGE, VIDEO, or CAROUSEL_ALBUM — when known.
media.captionstringThe post's caption.
media.permalinkstringLink to the post on Instagram.
media.thumbnail_urlstringA thumbnail of the post, when available. Instagram's media links expire — don't store them long-term.
media.published_atstringWhen the post was published.
media.is_adbooleantrue when the comment was left on an ad.
media.ad_idstringThe ad's ID, for ad comments.
media.ad_titlestringThe ad's title, for ad comments.
media.original_media_idstringFor an ad built from an organic post, that post's media ID.
{
  "id": "17895695668004550",
  "text": "Is the pool villa available in June?",
  "username": "jane_doe",
  "from_id": "1234567890123456",
  "is_reply": false,
  "parent_id": null,
  "is_own": false,
  "hidden": false,
  "created_at": "2026-08-28T10:14:02.000Z",
  "chat_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "channel_chat_id": "ig_media:17900000000000000",
  "channel_id": "3f6f6c53-9d2a-4a0e-8f2b-6b7e5a1c2d3e",
  "channel_type": "instagram",
  "media": {
    "id": "17900000000000000",
    "product_type": "REELS",
    "media_type": "VIDEO",
    "caption": "Monsoon mornings at Villa Amara 🌧️ Book your June escape.",
    "permalink": "https://www.instagram.com/reel/C9xYzAbCdEf/",
    "thumbnail_url": "https://scontent.cdninstagram.com/v/t51.../thumb.jpg",
    "published_at": "2026-08-25T07:30:00.000Z",
    "is_ad": false,
    "ad_id": null,
    "ad_title": null,
    "original_media_id": null
  }
}

A private reply sent from a comment — in the inbox, by an automation, or via the API — is a real Instagram DM, so it fires message.sent on the commenter's chat, not on the thread.

call — call.answered, call.completed, call.missed, call.recording_available, call.transcript_available

All five events share this payload — a snapshot of the call record. On call.recording_available the payload always has recording_available: true; on call.transcript_available it always has has_transcript: true. Recording/transcript events can arrive minutes after call.completed for the same call (id ties them together). Fires for Lodgestory Voice numbers only.

call.answered fires while the call is still live, the moment it is picked up: an agent answers an inbound call (browser softphone, desk phone or their own phone), or the customer answers an agent's outbound call or an API click-to-call — on a connect call, when the two people are connected. Use it to pop the customer's record on the agent's screen — look up customer_number, and route the pop by agent.email / agent.user_id. On this event status is IN_PROGRESS; the fields only known at hangup are null or 0 (hangup_cause, ended_by, ended_via, ended_at, the durations, recording and transcript flags); and chat_id is usually null, because calls are linked to a conversation at hangup. It is sent once per answering agent — after a transfer it is sent again naming the new agent (an outbound call's part after the hand-over arrives as its own record with continuation_of set). It never arrives after call.completed for the same call; if a delayed pickup is processed after the hangup, it is dropped.

FieldTypeDescription
idstring (UUID)Call ID — matches call_log_id on tickets filed from calls.
directionstringINBOUND or OUTBOUND.
call_typestringconnect for a connect call — two outside numbers your system joined through the API, with no agent; standard for every other call. On a connect call caller_number is customer 1 (rung first), called_number and customer_number customer 2, and agent is null.
statusstringIN_PROGRESS on call.answered; otherwise the final call status — COMPLETED for answered calls; NO_ANSWER, CANCELLED, BUSY, or FAILED for missed ones. On a click-to-call, NO_ANSWER means nobody picked up — the customer, or the agent's own phone — and CANCELLED that the agent hung up (or it was hung up from the CRM) before the customer answered. Older click-to-calls the customer did not answer can carry CANCELLED with hangup_cause ORIGINATOR_CANCEL.
caller_numberstringThe calling party.
called_numberstringThe number dialled.
caller_idstringThe caller ID presented.
hangup_causestringTelephony hangup cause, e.g. NORMAL_CLEARING, NO_ANSWER, USER_BUSY. CALL_REJECTED on a call.missed with status NO_ANSWER means a team member declined the call and nobody else answered it (see agent_offers for who).
ended_bystring | nullWho ended the call: CUSTOMER, AGENT (including an agent hanging up from the CRM) or SYSTEM (switch-side timeout or failure). On call.missed, CUSTOMER means the caller hung up while waiting and SYSTEM that the queue or ring timed out. null when the provider does not report it. Lodgestory Voice only.
agent_user_idstring (UUID)The team member who handled the call; null on missed calls.
agentobject | nullThat team member: { "user_id", "name", "email" }, for matching the agent in your own system. null when the call has no agent; name / email are null for a member whose account was deleted.
connectobject | nullA connect call's two sides: { "status", "from", "to", "ended_by_party", "talk_seconds", "max_duration_sec", "record" }. from is customer 1 and to customer 2, each { "number", "status", "answered_at", "ring_seconds", "hangup_cause" } (to also has dialled_at, when customer 1 answered; its answered_at is when the two were connected). A side's status is answered, no_answer, busy, failed, cancelled (the call was ended while it rang) or not_dialled (customer 2, when customer 1 never answered). status is the call's outcome (COMPLETED only when the two talked); ended_by_party is from, to, system, api (a hang-up request) or max_duration (the talk time limit). The outcome fields are null until the call ends — on call.answered only the numbers are filled. null on every other call.
customer_numberstring | nullThe customer's side of the call whatever the direction — caller_number on inbound, called_number on outbound.
missed_agentsarrayOn missed calls: the agents that were rung, in ring order — each { "user_id", "name", "number" } (user_id/name are null when the rung extension maps to no team member). null when not applicable.
agent_offersarray | nullWhat each team member the call rang did with it (Lodgestory Voice, inbound calls) — on call.completed too, so an answered call can say "Asha declined, Bala answered". One entry per member, per route and per department: { "user_id", "name", "number", "via", "department_id", "offers", "declined", "no_answer", "busy", "unreachable", "outcome", "device", "while_offline", "first_offered_at", "last_offered_at" }. user_id / name are null when the extension maps to no team member (number is the extension); via is queue (a department rang them) or direct (their own number, a repeat caller sent to them, a voice-menu option); offers is how many times the call rang them and declined / no_answer / busy / unreachable how those rings ended; outcome is the member's strongest result on the call — answered, declined, no_answer, busy, unreachable, offline (the member the call was meant for was Offline or on a break, so nothing rang and the call went to their fallback; offers is 1 and the counters stay 0), answered_elsewhere (a colleague picked up first) or cancelled (the caller hung up while it rang); device is where they answered or declined — softphone (browser, mobile app or desk phone) or phone (their follow-me number) — and null for every other outcome, where no single device decided it; while_offline is true when the member was Offline or on a break and was rung anyway because an admin allowed them direct calls while offline (their own number, a repeat caller sent to them), false otherwise. null when the call carries no such record: outbound calls, call.answered, other telephony providers, and calls from before this was recorded. missed_agents is unchanged.
ended_viastring | nullapi when the agent hung up from the CRM; null otherwise.
transfersarrayCall transfers attempted on this call, in order (empty when none). Each: transfer_id, at, mode (blind / consult), by_user_id (who started it), by_supervisor (moved from the Team view), from_user_id (the member who had the call), to { "type": "agent" | "department" | "number", "user_id", "name", "number" }, outcome (completed, queued, recalled — target failed and the caller went back to the agent —, cancelled, no_answer / busy / declined / unreachable — target failed after the agent had left; see resolution —, customer_hangup, failed), fail_cause (no_answer, busy, declined — the target pressed Decline —, unreachable, target_hangup, cancelled or null), resolution (recalled, rerouted, released or null), queue_result (department transfers: answered, timeout, no_agent_timeout, abandoned or null), consult_seconds, completed_at. After a completed transfer agent_user_id is the receiving member (null for a number).
continuation_ofstring | nullSet on the second record an outbound call gets after a transfer: the provider call id of the first member's leg (the first record's transfers entry carries completed). The second record covers the part of the call after the hand-over, with its own duration and recording.
departmentobject | nullThe department queue the call was routed to by the number's routing, an IVR key or business hours (Lodgestory Voice): { "id", "name", "via", "at", "result", "wait_seconds" }. via is route (the number's own routing), failover (the previous queue failed over into it) or transfer (a member transferred the caller into it); result is how the caller left the queue — answered, timeout, no_agent_timeout (nobody was logged in), abandoned (the caller hung up while waiting), exit_key — or null while waiting; wait_seconds is the time in that queue. null when the call never reached a department queue (direct-agent numbers, outbound calls).
departmentsarrayEvery department queue the caller entered, in order — failovers and member transfers included (empty when none). Each: id, name, via, at, result, left_at, wait_seconds, sticky (true when the department's sticky agent answered before the queue was joined).
channelstringwhatsapp for a WhatsApp voice call (WhatsApp calling), pstn for a phone call.
whatsappobject | nullWhatsApp call details, null on phone calls: { "direction", "call_id", "user_id", "business_number", "wa_id" }. direction is user_initiated (the customer called your WhatsApp number) or business_initiated (a member called the customer on WhatsApp); call_id is WhatsApp's own call id when known; user_id is the customer's business-scoped WhatsApp user id when WhatsApp sends one; business_number is your WhatsApp number in E.164; wa_id is the customer's WhatsApp number (digits).
business_hoursobject | nullWhether the call arrived in or out of hours, by the business-hours schedule that routed it (Lodgestory Voice): { "schedule_id", "schedule_name", "state", "is_open", "after_hours", "day_name", "label", "at" }. state is open, closed (outside the weekly hours), holiday (closed for a holiday), special_open / special_closed (inside / outside the hours set for a special day), forced_closed (closed with Close now) or forced_open (opened with Open now); after_hours is true for closed, holiday, special_closed and forced_closed, and is_open is its opposite; day_name is the holiday or special day that decided it ("Diwali"); label is the named period the call fell in ("Lunch cover"); at is when the schedule decided. When a call passes more than one schedule, the last decision is kept. null when the call never passed a schedule — treat it as in hours — and on call.answered, because the record is written when the call ends. A caller who only heard the closed message arrives as call.missed with after_hours: true.
chat_idstring (UUID)The conversation the call is linked to, when matched to one.
duration_total_secnumberTotal seconds from initiation to hangup.
duration_talk_secnumberSeconds of talk time (0 for missed calls).
duration_ring_secnumberSeconds of ringing.
recording_availablebooleanWhether a recording is ready.
has_transcriptbooleanWhether a transcript is ready.
custom_identifierstring | nullThe identifier the call was placed with: lmv-… for calls started from the CRM or the API, or the customIdentifier you gave a voice broadcast. null on calls that were not placed by Lodgestory.
referencestring | nullYour own reference on a connect call (its request's reference); null on every other call.
initiated_atstringWhen the call started.
answered_atstringWhen it was answered (null if never).
ended_atstringWhen it ended.
{
  "id": "0b1f2e3d-4c5b-6a79-8897-a6b5c4d3e2f1",
  "direction": "INBOUND",
  "status": "NO_ANSWER",
  "caller_number": "+919999999999",
  "called_number": "+918888877766",
  "caller_id": "+919999999999",
  "hangup_cause": "NO_ANSWER",
  "agent_user_id": null,
  "missed_agents": [
    { "user_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9", "name": "Asha Rao", "number": "1001" },
    { "user_id": null, "name": null, "number": "1004" }
  ],
  "agent_offers": [
    {
      "user_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
      "name": "Asha Rao",
      "number": "1001",
      "via": "queue",
      "department_id": "0796d4bf-353d-4886-aca6-dc27969dd5ca",
      "offers": 2,
      "declined": 0,
      "no_answer": 2,
      "busy": 0,
      "unreachable": 0,
      "outcome": "no_answer",
      "device": "softphone",
      "while_offline": false,
      "first_offered_at": "2026-08-02T14:05:12.000Z",
      "last_offered_at": "2026-08-02T14:05:30.000Z"
    },
    {
      "user_id": null,
      "name": null,
      "number": "1004",
      "via": "queue",
      "department_id": "0796d4bf-353d-4886-aca6-dc27969dd5ca",
      "offers": 1,
      "declined": 0,
      "no_answer": 0,
      "busy": 0,
      "unreachable": 1,
      "outcome": "unreachable",
      "device": null,
      "while_offline": false,
      "first_offered_at": "2026-08-02T14:05:12.000Z",
      "last_offered_at": "2026-08-02T14:05:12.000Z"
    }
  ],
  "chat_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "duration_total_sec": 32,
  "duration_talk_sec": 0,
  "duration_ring_sec": 28,
  "recording_available": false,
  "has_transcript": false,
  "custom_identifier": null,
  "transfers": [],
  "continuation_of": null,
  "department": {
    "id": "0796d4bf-353d-4886-aca6-dc27969dd5ca",
    "name": "Sales",
    "via": "route",
    "at": "2026-08-02T14:05:12.000Z",
    "result": "timeout",
    "wait_seconds": 30
  },
  "departments": [
    {
      "id": "0796d4bf-353d-4886-aca6-dc27969dd5ca",
      "name": "Sales",
      "via": "route",
      "at": "2026-08-02T14:05:12.000Z",
      "result": "timeout",
      "left_at": "2026-08-02T14:05:42.000Z",
      "wait_seconds": 30,
      "sticky": false
    }
  ],
  "business_hours": {
    "schedule_id": "7d2c1b0a-5e4f-4a3b-9c8d-1f2e3d4c5b6a",
    "schedule_name": "Front desk hours",
    "state": "open",
    "is_open": true,
    "after_hours": false,
    "day_name": null,
    "label": null,
    "at": "2026-08-02T14:05:10.000Z"
  },
  "initiated_at": "2026-08-02T14:05:10.000Z",
  "answered_at": null,
  "ended_at": "2026-08-02T14:05:42.000Z"
}

A call.missed for a caller who rang on a holiday and heard the holiday greeting (abridged):

{
  "id": "9e8d7c6b-5a49-4382-a716-05f4e3d2c1b0",
  "direction": "INBOUND",
  "status": "NO_ANSWER",
  "caller_number": "+919999999999",
  "called_number": "+918888877766",
  "customer_number": "+919999999999",
  "agent_user_id": null,
  "missed_agents": null,
  "department": null,
  "departments": [],
  "business_hours": {
    "schedule_id": "7d2c1b0a-5e4f-4a3b-9c8d-1f2e3d4c5b6a",
    "schedule_name": "Front desk hours",
    "state": "holiday",
    "is_open": false,
    "after_hours": true,
    "day_name": "Diwali",
    "label": null,
    "at": "2026-11-08T06:30:02.000Z"
  },
  "channel": "pstn",
  "duration_talk_sec": 0,
  "initiated_at": "2026-11-08T06:30:01.000Z",
  "answered_at": null,
  "ended_at": "2026-11-08T06:30:14.000Z"
}

A call.answered for an inbound call (abridged):

{
  "id": "5c7d8e9f-0a1b-4c2d-9e3f-4a5b6c7d8e9f",
  "direction": "INBOUND",
  "status": "IN_PROGRESS",
  "caller_number": "+919999999999",
  "called_number": "+918888877766",
  "customer_number": "+919999999999",
  "hangup_cause": null,
  "ended_by": null,
  "agent_user_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
  "agent": {
    "user_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
    "name": "Asha Rao",
    "email": "[email protected]"
  },
  "department": { "id": "3f2e1d0c-9b8a-4765-8432-10fedcba9876", "name": "Sales", "via": "route", "at": "2026-08-02T14:05:02.000Z", "result": "answered", "wait_seconds": 6 },
  "channel": "pstn",
  "chat_id": null,
  "duration_total_sec": null,
  "duration_talk_sec": null,
  "custom_identifier": null,
  "initiated_at": "2026-08-02T14:05:00.000Z",
  "answered_at": "2026-08-02T14:05:09.000Z",
  "ended_at": null
}

A WhatsApp call's channel fields:

"channel": "whatsapp",
"whatsapp": {
  "direction": "user_initiated",
  "call_id": "wacid.HBgMOTE5ODc2NTQzMjEwFQIAEhgg",
  "user_id": null,
  "business_number": "+918888877766",
  "wa_id": "919999999999"
}

A transferred call's transfers entry:

"transfers": [
  {
    "transfer_id": "5f0c8c1e-2a3b-4c5d-9e6f-7a8b9c0d1e2f",
    "at": "2026-09-13T10:12:04.000Z",
    "mode": "consult",
    "by_user_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
    "by_supervisor": false,
    "from_user_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
    "to": { "type": "agent", "user_id": "c4d5e6f7-8091-42a3-b4c5-d6e7f8091a2b", "name": "Meera Iyer", "number": null },
    "outcome": "completed",
    "fail_cause": null,
    "resolution": null,
    "queue_result": null,
    "consult_seconds": 18,
    "completed_at": "2026-09-13T10:12:41.000Z"
  }
]

A call.missed for a connect call where customer 2 did not answer (abridged):

{
  "id": "7e8f9a0b-1c2d-4e3f-8a4b-5c6d7e8f9a0b",
  "direction": "OUTBOUND",
  "call_type": "connect",
  "status": "NO_ANSWER",
  "caller_number": "+919876543210",
  "called_number": "+919812345678",
  "caller_id": "+918888877766",
  "customer_number": "+919812345678",
  "agent_user_id": null,
  "agent": null,
  "connect": {
    "status": "NO_ANSWER",
    "from": { "number": "+919876543210", "status": "answered", "answered_at": "2026-10-24T09:30:06.000Z", "ring_seconds": 6, "hangup_cause": null },
    "to": { "number": "+919812345678", "status": "no_answer", "dialled_at": "2026-10-24T09:30:06.000Z", "answered_at": null, "ring_seconds": 30, "hangup_cause": "NO_ANSWER" },
    "ended_by_party": "system",
    "talk_seconds": 0,
    "max_duration_sec": 3600,
    "record": true
  },
  "duration_talk_sec": 0,
  "custom_identifier": "lmv-7e8f9a0b-1c2d-4e3f-8a4b-5c6d7e8f9a0b",
  "reference": "booking-4821",
  "initiated_at": "2026-10-24T09:30:00.000Z",
  "answered_at": "2026-10-24T09:30:06.000Z",
  "ended_at": "2026-10-24T09:30:37.000Z"
}

survey_response — survey.response_submitted

Fires when a survey response is submitted (or a partial response is finalised). Sensitive request metadata (IPs, tokens, user agents) is never included.

FieldTypeDescription
idstring (UUID)The response.
form_id / form_name / form_slugstringThe survey form it answers.
version_numbernumberThe published form version answered.
statusstringResponse status (e.g. COMPLETED, PARTIAL).
sourcestringHow it arrived (invite link, public link, in-chat…).
primary_scorenumberThe form's designated score question — what score-based automations key on.
primary_score_typestringThe score question's type (stars, NPS, thumbs…).
score_normalisednumberThe score mapped onto a 0–1 scale.
sentiment_bandstringDETRACTOR, PASSIVE, or PROMOTER.
invite_id / contact_idstring (UUID)The invite and contact, when known.
external_customer_refstringYour reference from a partner-API invite, when provided.
interaction_id / interaction_type / interaction_atstringThe call/chat/ticket the survey followed, when linked.
channel / agent_user_id / team_id / queue_idstringAttribution of the interaction, when known.
trigger_eventstringWhat sent the survey (e.g. an automation's trigger).
metadataobjectCustom metadata from a partner-API invite.
started_at / responded_atstringTiming of the response.
time_to_complete_secondsnumberHow long it took.
contact_consentbooleanWhether the respondent consented to be contacted.
consent_name / consent_email / consent_phonestringContact details they left, when consent was given.
answersarrayEvery answer. Each entry carries node_id, question_type, question_text, scale_min, scale_max, numeric_value, text_value, comment_text, selected_option_ids, selected_option_labels — the value fields not applicable to the question type are null.
{
  "id": "a1b2c3d4-e5f6-4071-8293-a4b5c6d7e8f9",
  "form_id": "0d47ac10-58cc-4372-a567-0e02b2c3d479",
  "form_name": "Post-stay CSAT",
  "form_slug": "post-stay-csat",
  "version_number": 3,
  "status": "COMPLETED",
  "source": "INVITE",
  "primary_score": 5,
  "primary_score_type": "STARS",
  "score_normalised": 1,
  "sentiment_band": "PROMOTER",
  "invite_id": "7b2e4c66-1a2b-4c3d-9e0f-a1b2c3d4e5f6",
  "contact_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "external_customer_ref": null,
  "interaction_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
  "interaction_type": "CALL",
  "interaction_at": "2026-08-02T12:00:00.000Z",
  "channel": "WHATSAPP_OFFICIAL",
  "agent_user_id": "5c6d7e8f-9a0b-1c2d-3e4f-5a6b7c8d9e0f",
  "team_id": null,
  "queue_id": null,
  "trigger_event": "call.completed",
  "metadata": null,
  "started_at": "2026-08-02T12:31:00.000Z",
  "responded_at": "2026-08-02T12:33:10.000Z",
  "time_to_complete_seconds": 130,
  "contact_consent": true,
  "consent_name": "Asha Patel",
  "consent_email": null,
  "consent_phone": "+919812345678",
  "answers": [
    {
      "node_id": "q-rating",
      "question_type": "STARS",
      "question_text": "How was your stay?",
      "scale_min": 1,
      "scale_max": 5,
      "numeric_value": 5,
      "text_value": null,
      "comment_text": "Lovely villa!",
      "selected_option_ids": null,
      "selected_option_labels": null
    }
  ]
}

goal_milestone — goal.milestone_reached

A live bot-journey conversation passed a Goal milestone. Carries the tracker values captured up to that point — ready to pipe conversions into your analytics or CRM. Fires for live conversations only; builder test-runs are excluded.

FieldTypeDescription
idstring (UUID)Milestone event ID (each occurrence is its own event record).
goal_idstring (UUID)The goal.
goal_namestringIts name, e.g. Bookings.
milestone_idstring (UUID)The milestone reached.
milestone_namestringIts name, e.g. Booking confirmed.
journey_idstringThe bot journey the session was running.
chat_idstring (UUID)Conversation ID (see Chat identifiers).
channel_chat_idstringChannel-level thread ID — joins to message.chat_id.
chat_namestringConversation display name.
channel_idstring (UUID)The channel the session ran on.
tracker_valuesobjectTracker name → captured value, as of this milestone. {} when none.
recorded_atstringWhen the milestone was recorded.
{
  "id": "9e8d7c6b-5a49-3827-1605-f4e3d2c1b0a9",
  "goal_id": "1a2b3c4d-5e6f-7081-92a3-b4c5d6e7f809",
  "goal_name": "Bookings",
  "milestone_id": "aa11bb22-cc33-dd44-ee55-ff6677889900",
  "milestone_name": "Booking confirmed",
  "journey_id": "journey-42",
  "chat_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "channel_chat_id": "[email protected]",
  "chat_name": "John Doe",
  "channel_id": "3f6f6c53-9d2a-4a0e-8f2b-6b7e5a1c2d3e",
  "tracker_values": { "Order_ID": "ORD-1042", "Room_Type": "Deluxe" },
  "recorded_at": "2026-08-02T09:15:00.000Z"
}

disposition — disposition.created

An advisor captured a disposition — the outcome form on a chat, a call, a booking, or a lead in the Agent Dialer. Fires once per capture. The id matching source_type is set: chat_id, call_id or booking_id — or lead_id for a LEAD outcome, which also carries call_id when the outcome was for a call. values is keyed by the template's field ids (the template's fields array, available from the dispositions API, maps ids to labels). Lodgestory's own Meta Ads Lead Signals consume the same event in-process.

FieldTypeDescription
idstring (UUID)Disposition ID.
source_typestringCHAT, CALL, CALENDAR_BOOKING or LEAD.
chat_idstring (UUID) | nullConversation ID when source_type is CHAT (see Chat identifiers).
call_idstring (UUID) | nullCall ID when source_type is CALL.
booking_idstring (UUID) | nullBooking ID when source_type is CALENDAR_BOOKING.
lead_idstring (UUID) | nullLead ID when source_type is LEAD — every outcome an agent saves in the Agent Dialer is recorded as the lead's disposition, on the Track's outcome form when it has one.
contact_idstring (UUID)The contact the outcome is anchored to (auto-created from the chat when it had none).
template_idstring (UUID) | nullThe disposition template used; null for a free-form capture.
template_namestring | nullIts name, e.g. Chat outcome.
valuesobjectField id → answer (string, number, or array for multi-selects). {} when none.
outcome_labelstring | nullOptional one-line outcome.
notesstring | nullFree-text notes.
created_by_user_idstring (UUID) | nullThe advisor who captured it.
created_atstringWhen it was captured.
{
  "id": "6f1c2d3e-4a5b-4c6d-8e9f-0a1b2c3d4e5f",
  "source_type": "CHAT",
  "chat_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "call_id": null,
  "booking_id": null,
  "lead_id": null,
  "contact_id": "0b4d5c6e-7f80-4a91-b2c3-d4e5f6a7b8c9",
  "template_id": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
  "template_name": "Chat outcome",
  "values": { "outcome": "Booked", "booking_value": "18500" },
  "outcome_label": "Booked — 2 nights",
  "notes": null,
  "created_by_user_id": "5c9a1f2e-3b4d-4e6f-8a9b-0c1d2e3f4a5b",
  "created_at": "2026-09-04T09:15:00.000Z"
}

lead — lead.created, lead.assigned, lead.stage_changed, lead.track_moved, lead.sla_breached

A lead — one enquiry in a Track, pointing at a contact. Every lead event carries the same snapshot of the lead as it stood after the change; previous_attributes (see the catalogue) holds what changed, under the same field names. Captured details are under fields, keyed by the lead type's field ids. The dedupe fingerprint is never sent.

FieldTypeDescription
idstring (UUID)Lead ID.
track_idstring (UUID)The Track the lead is in.
track_namestring | nullIts name, for labelling without a second call.
lead_type_idstring (UUID) | nullThe lead type, when typed.
contact_idstring (UUID)The contact the lead points at.
stage_idstringCurrent stage id (a Track stage, or a workflow node id on a Workflow Track).
statusstringOPEN, WON, LOST, JUNK or MERGED — follows the kind of stage the lead is in.
owner_user_idstring (UUID) | nullThe owner; null = in the pool.
claimed_atstring | nullWhen the current owner took it.
sourcestringWhere it came from: MANUAL, CSV_IMPORT, WEB_FORM, PUBLIC_API, WEBHOOK, CHAT, CALL_INBOUND, CALL_MISSED, CALL_OUTBOUND, GOAL, DISPOSITION, TICKET, AUTOMATION, BOOKING or META_LEAD_ADS (a Facebook or Instagram Instant Form synced by Meta Lead Ads; source_detail is the form's name). Never changes after creation.
source_detailstring | nullFree-text provenance (a portal name, an import id).
utmobject | nullUTM parameters captured at intake. A Meta Instant Form lead carries source (facebook or instagram), medium lead_ads, campaign, term (ad set), content (ad) and meta_* ids (form, ad, ad set, campaign, page, platform, whether organic); a lead from a click-to-chat ad carries medium click_to_chat and meta_ad_id.
intake_idstring (UUID) | nullThe intake that created it, if any.
fieldsobject | nullCaptured details, field id → value.
scorenumber | null0–10 from the Track's scoring table; null when unscored.
prioritynumber | null0–100.
next_action_atstring | nullThe callback time.
next_action_notestring | nullThe callback note.
first_touched_atstring | nullThe first dial.
time_to_first_dial_secondsnumber | nullCreation to first dial.
stage_entered_atstring | nullWhen it entered its current stage.
last_contacted_atstring | nullThe latest dial.
attempt_countnumberDials so far.
connected_countnumberDials that connected.
last_outcomestring | nullThe latest outcome code.
sla_due_atstring | nullWhen the first-response SLA falls due.
sla_breached_atstring | nullWhen it was breached.
sla_actionstring | nulllead.sla_breached only: what the breach did (NOTIFY, REASSIGN or BOTH).
reassignedboolean | nulllead.sla_breached only: whether the breach moved the lead to someone else.
reassigned_to_user_idstring (UUID) | nulllead.sla_breached only: who it went to.
previous_owner_user_idstring (UUID) | nulllead.sla_breached only: who had it before.
dnd_statusstring | nullThe do-not-call verdict last recorded for the number.
consent_idstring (UUID) | nullReserved; consent capture is not available yet.
created_by_user_idstring (UUID) | nullWho created it (null for an intake or import).
created_atstringCreated.
updated_atstringLast changed.

lead_attempt — lead.outcome_captured

One attempt on a lead and its outcome, with the lead embedded under lead (the same shape as above). Fires once per dial: an agent's saved outcome — or, for a paced call that nobody answered, the dialer's own report. lead.stage_changed covers where the lead ended up.

FieldTypeDescription
idstring (UUID)Attempt ID.
lead_idstring (UUID)The lead.
attempt_nonumber1-based and gap-free per lead — the "3rd call" in a retry cadence is attempt_no 3.
channelstringCALL, or the channel of a logged touch.
agent_user_idstring (UUID) | nullWho made it.
call_log_idstring (UUID) | nullThe call, when the dial went through Lodgestory Voice.
disposition_idstring (UUID) | nullThe disposition the outcome was recorded as (see disposition.created).
outcomestring | nullThe outcome code (INTERESTED, DID_NOT_PICK, BUSY, …).
connectedbooleanWhether the call connected.
script_idstring (UUID) | nullThe call script followed, if any.
script_answersobject | nullWhat the agent answered in the script.
script_patharray | nullThe script blocks actually walked.
started_atstringStarted.
ended_atstring | nullEnded.
talk_secondsnumber | nullTalk time.
wrap_secondsnumber | nullAfter-call work.
retry_reasonstring | nullWhy the retry cadence did what it did: SCHEDULED, MAX_PER_DAY (deferred to tomorrow), MAX_ATTEMPTS or MAX_DAYS (gave up), RULE_DISABLED, NO_RULE, or TERMINAL_STATUS (the lead is closed).
leadobjectThe lead after the outcome (see lead).

ai_request — ai_request.created, ai_request.answered, ai_request.replied

The Bot Journey AI agent raised a request for a person — a question for the team (kind QUESTION), a choice between options it proposed (CHOICE), or a change it may only make with a teammate's OK (APPROVAL) — and, later, the request was settled; in between, Kaylee may have replied to a teammate's ask-back about it. See the Kaylee console for how requests reach your team.

ai_request.created fires the moment the request is raised, before anyone is notified — turn_user_id is still null. ai_request.answered fires once it leaves PENDING for any reason, with previous_attributes.status PENDING: a person answered, approved or rejected it (resolved_via says from where), or Lodgestory closed it (resolved_via SYSTEM) — it expired, was auto-rejected because nobody answered, was withdrawn by the agent, was handled directly by a teammate who replied in the conversation, or was taken over from the console. Requests raised in builder test-runs fire none of these events.

ai_request.replied fires while the request is still PENDING, each time Kaylee replies to a teammate's ask-back — a question a teammate put to her about the request before deciding — or asks the customer about it first. The thread is in ask_backs, and the last entry is the one that changed: status ANSWERED carries her reply to the teammate (answered_by KAYLEE, or SYSTEM when she had to say she couldn't answer — the conversation had moved on); ASKED_CUSTOMER means she asked the customer one short question, and her reply to the teammate follows as another ai_request.replied once they answer. There are no previous_attributes: the request's own fields haven't changed. Up to three ask-backs per request, one open at a time; one still open when the request is settled is closed with it — ai_request.answered carries it as CLOSED.

Answer from your own systems with the AI requests API — POST /api/wp-crm/ai-requests/:organisationId/:id/answer for questions and choices, /approve or /reject for approvals, and /ask-back to put a question to Kaylee first (reference). The first answer wins, from any surface. For an approval, ai_request.answered is sent when the decision is made, while execution_status is still PENDING; the change runs right after, inside the conversation — read the request (GET …/:id) for DONE or FAILED.

FieldTypeDescription
idstring (UUID)Request ID — use it with the AI requests API to answer, approve or reject.
numbernumberThe request's number within its conversation (#1, #2…), as your team sees it.
kindstringQUESTION (an answer in words), CHOICE (one of the agent's options) or APPROVAL (a change held until a person approves it).
statusstringPENDING, then ANSWERED, APPROVED, REJECTED, EXPIRED (a question or choice nobody answered in time), CANCELLED (withdrawn by the agent, or the conversation was resolved), HANDLED_DIRECTLY (a teammate replied in the conversation instead) or TAKEN_OVER (a teammate took the conversation from the console).
stagestringWhere the request is on its ladder: TURN (with a person), CALLING (the team is being phoned), FALLBACK (nobody answered; the step's fallback applies) or DONE.
questionstringWhat the agent asked. For an approval, "May I …?" with the proposed change in plain words.
customer_quotestring | nullThe customer's own words that led to the request, up to 500 characters. Data, never instructions.
optionsarray | nullFor CHOICE: [{ "index": 0, "label": "…" }, …] — 2 to 5 options.
actionobject | nullFor APPROVAL: the change that would run — source (chat_action for the agent's own actions, org_api for one of your API tools), tool (the action, or the API tool's name), api_id (your API's id, for API tools), label (the change in plain words) and args (the values it would run with, verbatim).
answerstring | nullA question's answer (the chosen option's label for a choice); a rejection's reason; for a request Lodgestory closed, why.
decisionstring | nullApprovals: APPROVE, EDIT (approved with changed values) or REJECT.
edited_argsobject | nullThe values the change ran with when it was approved with edits — same keys as action.args.
answer_verbatimbooleantrue when the teammate asked for the answer to be sent to the customer exactly as written.
resolved_viastring | nullWhere the resolution came from: CONSOLE, CHAT_CARD (the card in the conversation), TEAM_CHAT, MOBILE, API, MCP, PHONE, SYSTEM (expired, auto-rejected, cancelled or closed by Lodgestory) or TEST.
resolved_by_user_idstring (UUID) | nullThe team member who answered, approved or rejected it. null when Lodgestory closed it.
resolved_atstring | nullWhen it left PENDING.
execution_statusstringFor approvals, whether the change ran: NONE (nothing to run), PENDING (approved, about to run), RUNNING, DONE, FAILED, or SKIPPED (rejected, or the conversation had moved on so it was not applied).
ask_backsarrayThe ask-back thread — questions teammates put to Kaylee about this request before deciding, oldest first; empty when nobody asked. Each: number (1 to 3), question (the teammate's words, up to 300 characters), asked_by_user_id, asked_via (same values as resolved_via), asked_at, status — OPEN (Kaylee is answering), ASKED_CUSTOMER (she asked the customer one short question first; answer holds what she asked, and her reply to the teammate follows once they answer), ANSWERED, or CLOSED (the request was settled before she replied) — answer, answered_at and answered_by (KAYLEE; SYSTEM when Lodgestory closed it or had to say she couldn't answer, for example because the conversation had moved on; null while open).
chat_idstring (UUID) | nullThe conversation ID (see Chat identifiers).
channel_namestring | nullThe conversation's channel as Lodgestory names it, e.g. WHATSAPP, INSTAGRAM, EMAIL.
customer_labelstring | nullA masked label for the customer — a first name and initial, or a partly hidden number — never the full name or number.
journey_idstring (UUID) | nullThe bot journey the agent was running.
agent_labelstring | nullThe AI Agent step's name in the builder.
target_team_idstring (UUID) | nullThe team the request is for. null when it went to named people only.
target_team_namestring | nullThat team's name.
turn_user_idstring (UUID) | nullThe team member whose turn it is (or was last). null on ai_request.created, and while nobody has had the turn — for example when the team is being phoned straight away.
expires_atstringWhen the request expires if nobody answers.
created_atstringWhen the agent raised it.
updated_atstringLast change.

ai_request.created — a change held for approval:

{
  "id": "6f1d2c3b-4a5e-4f60-9b7c-8d9e0f1a2b3c",
  "number": 1,
  "kind": "APPROVAL",
  "status": "PENDING",
  "stage": "TURN",
  "question": "May I call \"Issue refund\" with amount: 8400, booking_ref: LS-20931?",
  "customer_quote": "Please refund the 8,400 I paid for the extra night, we never used it.",
  "options": null,
  "action": {
    "source": "org_api",
    "tool": "Issue refund",
    "api_id": "2b7c1d9e-3f40-4a51-b62c-7d8e9f0a1b2c",
    "label": "call \"Issue refund\" with amount: 8400, booking_ref: LS-20931",
    "args": { "amount": 8400, "booking_ref": "LS-20931" }
  },
  "answer": null,
  "decision": null,
  "edited_args": null,
  "answer_verbatim": false,
  "resolved_via": null,
  "resolved_by_user_id": null,
  "resolved_at": null,
  "execution_status": "NONE",
  "ask_backs": [],
  "chat_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "channel_name": "WHATSAPP",
  "customer_label": "Sofia L.",
  "journey_id": "9c1e4b2a-7d3f-4e85-a6b0-1f2e3d4c5b6a",
  "agent_label": "Concierge AI",
  "target_team_id": "4e5f6a7b-8c9d-4e0f-a1b2-c3d4e5f6a7b8",
  "target_team_name": "Finance",
  "turn_user_id": null,
  "expires_at": "2026-10-10T14:05:00.000Z",
  "created_at": "2026-10-10T10:05:00.000Z",
  "updated_at": "2026-10-10T10:05:00.000Z"
}

ai_request.replied — Riya, whose turn it is, asked Kaylee back from the console before deciding, and Kaylee answered her (the request is unchanged; no previous_attributes):

{
  "id": "6f1d2c3b-4a5e-4f60-9b7c-8d9e0f1a2b3c",
  "number": 1,
  "kind": "APPROVAL",
  "status": "PENDING",
  "stage": "TURN",
  "question": "May I call \"Issue refund\" with amount: 8400, booking_ref: LS-20931?",
  "customer_quote": "Please refund the 8,400 I paid for the extra night, we never used it.",
  "options": null,
  "action": {
    "source": "org_api",
    "tool": "Issue refund",
    "api_id": "2b7c1d9e-3f40-4a51-b62c-7d8e9f0a1b2c",
    "label": "call \"Issue refund\" with amount: 8400, booking_ref: LS-20931",
    "args": { "amount": 8400, "booking_ref": "LS-20931" }
  },
  "answer": null,
  "decision": null,
  "edited_args": null,
  "answer_verbatim": false,
  "resolved_via": null,
  "resolved_by_user_id": null,
  "resolved_at": null,
  "execution_status": "NONE",
  "ask_backs": [
    {
      "number": 1,
      "question": "Did they check out a night early, or book an extra night they then didn't use?",
      "asked_by_user_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
      "asked_via": "CONSOLE",
      "asked_at": "2026-10-10T10:06:10.000Z",
      "status": "ANSWERED",
      "answer": "They checked out a night early: Sofia wrote that they left on the 8th and the room stayed empty on the 9th. Whether the booking fee is refundable isn't in the conversation or my instructions.",
      "answered_at": "2026-10-10T10:06:25.000Z",
      "answered_by": "KAYLEE"
    }
  ],
  "chat_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "channel_name": "WHATSAPP",
  "customer_label": "Sofia L.",
  "journey_id": "9c1e4b2a-7d3f-4e85-a6b0-1f2e3d4c5b6a",
  "agent_label": "Concierge AI",
  "target_team_id": "4e5f6a7b-8c9d-4e0f-a1b2-c3d4e5f6a7b8",
  "target_team_name": "Finance",
  "turn_user_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
  "expires_at": "2026-10-10T14:05:00.000Z",
  "created_at": "2026-10-10T10:05:00.000Z",
  "updated_at": "2026-10-10T10:06:25.000Z"
}

Had Kaylee needed to check with the customer first, the entry would have arrived as ASKED_CUSTOMER with her question to the customer in answer, followed by a second ai_request.replied with the entry ANSWERED once the customer replied.

ai_request.answered — the same request, approved with edits from the console (the change then runs with edited_args); the ask-back thread rides along:

{
  "id": "6f1d2c3b-4a5e-4f60-9b7c-8d9e0f1a2b3c",
  "number": 1,
  "kind": "APPROVAL",
  "status": "APPROVED",
  "stage": "DONE",
  "question": "May I call \"Issue refund\" with amount: 8400, booking_ref: LS-20931?",
  "customer_quote": "Please refund the 8,400 I paid for the extra night, we never used it.",
  "options": null,
  "action": {
    "source": "org_api",
    "tool": "Issue refund",
    "api_id": "2b7c1d9e-3f40-4a51-b62c-7d8e9f0a1b2c",
    "label": "call \"Issue refund\" with amount: 8400, booking_ref: LS-20931",
    "args": { "amount": 8400, "booking_ref": "LS-20931" }
  },
  "answer": null,
  "decision": "EDIT",
  "edited_args": { "amount": 8000, "booking_ref": "LS-20931" },
  "answer_verbatim": false,
  "resolved_via": "CONSOLE",
  "resolved_by_user_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
  "resolved_at": "2026-10-10T10:08:40.000Z",
  "execution_status": "PENDING",
  "ask_backs": [
    {
      "number": 1,
      "question": "Did they check out a night early, or book an extra night they then didn't use?",
      "asked_by_user_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
      "asked_via": "CONSOLE",
      "asked_at": "2026-10-10T10:06:10.000Z",
      "status": "ANSWERED",
      "answer": "They checked out a night early: Sofia wrote that they left on the 8th and the room stayed empty on the 9th. Whether the booking fee is refundable isn't in the conversation or my instructions.",
      "answered_at": "2026-10-10T10:06:25.000Z",
      "answered_by": "KAYLEE"
    }
  ],
  "chat_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "channel_name": "WHATSAPP",
  "customer_label": "Sofia L.",
  "journey_id": "9c1e4b2a-7d3f-4e85-a6b0-1f2e3d4c5b6a",
  "agent_label": "Concierge AI",
  "target_team_id": "4e5f6a7b-8c9d-4e0f-a1b2-c3d4e5f6a7b8",
  "target_team_name": "Finance",
  "turn_user_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
  "expires_at": "2026-10-10T14:05:00.000Z",
  "created_at": "2026-10-10T10:05:00.000Z",
  "updated_at": "2026-10-10T10:08:40.000Z"
}

With:

"previous_attributes": { "status": "PENDING" }

A question answered by phone looks the same with kind QUESTION, status ANSWERED, the spoken answer transcribed in answer, resolved_via PHONE and action null.

member — member.removed

A team member was removed from the organisation. Their open chats and tickets are unassigned as part of removal — the counts tell you how many, and each unassigned ticket also fires its own ticket.assigned event (new assignee null), so you can reconcile either way.

FieldTypeDescription
user_idstring (UUID)The removed member.
emailstringTheir email.
first_namestringFirst name.
last_namestringLast name.
organisation_idstring (UUID)The organisation they were removed from.
removed_rolesarrayThe roles they held at removal.
unassigned_chatsnumberOpen chats that lost their assignee.
unassigned_ticketsnumberOpen tickets that lost their assignee.
removed_atstringWhen the removal happened.
{
  "user_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
  "email": "[email protected]",
  "first_name": "Asha",
  "last_name": "Rao",
  "organisation_id": "550e8400-e29b-41d4-a716-446655440000",
  "removed_roles": ["CRM_USER"],
  "unassigned_chats": 4,
  "unassigned_tickets": 2,
  "removed_at": "2026-08-02T16:20:00.000Z"
}

test — webhook.test

Sent only when you trigger Send test on an endpoint. It is delivered, signed, retried, and logged exactly like a real event — use it to verify your signature check end to end. It ignores the endpoint's event selection and cannot be subscribed to.

{
  "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
  "event": "webhook.test",
  "api_version": "2026-05-01",
  "occurred_at": "2026-08-02T17:00:00.000Z",
  "organisation_id": "550e8400-e29b-41d4-a716-446655440000",
  "data": {
    "object": "test",
    "test": { "message": "This is a test webhook from your CRM." }
  }
}

Automation API calls

An automation's Call your API action posts to an endpoint you choose, through this same delivery pipeline — signed, retried, and recorded in the delivery log. It is not a subscription: nobody subscribes to automation.api_call, and it is delivered only to the URL configured on that step. See the Automations guide for how to set one up.

The envelope carries three things a subscription delivery can't: which automation fired, and the run's live context — the chat/contact/agent/ticket/call/survey values re-read at execution time, after any waits — alongside the trigger record itself in the usual data shape.

Headers. The standard delivery headers apply (X-Webhook-Id, X-Webhook-Timestamp, and X-Webhook-Signature when a signing secret is set — verified exactly as above), plus X-Webhook-Event: automation.api_call and any custom headers configured on the step. Three extra identity headers ride along:

HeaderMeaning
X-Automation-Rule-IdThe automation that fired.
X-Automation-Run-IdThis enrolment — one run per trigger occurrence.
X-Automation-Step-IdWhich step in that run made the call.

Idempotency. Delivery is at-least-once (retries, and a step replay after an interrupted run). Deduplicate on run_id + step_id, which are stable across every attempt — not on id, which is per-delivery.

FieldTypeDescription
eventstringAlways automation.api_call.
automation.rule_id / rule_namestringThe automation that fired.
automation.run_idstring (UUID)The enrolment. Half of the idempotency key.
automation.step_idstring (UUID)The step that called. The other half.
automation.trigger_eventstringThe event that started the run, e.g. chat.assigned.
dataobjectThe trigger's record in the same shape a subscription delivery of trigger_event would carry (data.object names the key). For a scheduled automation — which has no trigger record — data.object is "trigger".
context.chat / contact / agent / ticket / call / surveyobjectThe run's evaluated context at execution time. Groups the trigger doesn't populate are present but empty.
{
  "id": "b21c8e14-9f3a-4d77-a0c2-6e5b1f2d3c4a",
  "event": "automation.api_call",
  "api_version": "2026-05-01",
  "occurred_at": "2026-08-14T09:15:00.000Z",
  "organisation_id": "550e8400-e29b-41d4-a716-446655440000",
  "automation": {
    "rule_id": "9d3d5405-b33e-4cd5-9b1e-106a3cb8e116",
    "rule_name": "Unanswered handover watchdog",
    "run_id": "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
    "step_id": "8cfff0de-7cc4-4395-909a-5a7a312747d5",
    "trigger_event": "chat.assigned"
  },
  "data": {
    "object": "chat_assignment",
    "chat_assignment": {
      "chat_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "assignee_user_id": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
      "previous_assignee_user_id": null
    }
  },
  "context": {
    "chat": {
      "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "name": "Asha Patel",
      "primaryAssigneeUserId": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
      "agentRepliedSinceTrigger": false,
      "resolved": false
    },
    "contact": { "e164": "+919812345678", "fullName": "Asha Patel" },
    "agent": { "userId": "8a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9", "fullName": "Priya Sharma" },
    "ticket": {}, "call": {}, "survey": {}
  }
}

Endpoint requirements. The URL must be http(s) and resolve to a public address — loopback, private, link-local and reserved ranges are refused at connection time, so an internal service cannot be reached even via DNS that resolves privately. Redirects are followed at most three times, each re-checked. Respond 2xx to acknowledge; anything else is retried with the standard backoff.


Managing endpoints via the API

Endpoints can be managed two ways. Both work on the same endpoints and count toward the same limit of 30.

With your API token (public API)

Authenticate with the JWT from POST /api/wp-crm/token (see Accounts & sign-in) as an Admin, Account Owner or service account (CRM_BOT). The organisationId in the path must be the organisation the token was issued for. This is the API an automation platform uses for instant triggers.

Method & pathWhat it does
POST /api/wp-crm/webhooks/{organisationId}Create an endpoint. 201 with the endpoint and its signing secret. No other API response returns the secret, so store it now.
GET /api/wp-crm/webhooks/{organisationId}List every endpoint, newest first — including the ones created in Settings → Webhooks — as { webhooks, maxWebhooks }. Secrets and custom header values are never returned; headerNames says which headers are set.
POST /api/wp-crm/webhooks/{organisationId}/{webhookId}/testQueue a webhook.test delivery. 202 with { queued, deliveryId }.
DELETE /api/wp-crm/webhooks/{organisationId}/{webhookId}Delete an endpoint and its delivery log. 200 with { deleted, webhookId }. New events stop at once; a delivery already queued, or a retry of a failed one, can still arrive for a few minutes.
GET /api/wp-crm/webhooks/{organisationId}/samples?event=…&limit=3Sample events: your organisation's most recent records, each wrapped in the envelope a delivery of that event carries, as { event, samples }. Built by the same code as a delivery, so the fields match. Nothing is sent or recorded. limit is 1–10 (default 3); an empty samples means you have no such records yet. Supported events: contact.created, message.received, lead.created, call.missed, flow.response_received.

Each endpoint is returned as webhookId, url, events, description, isActive, headerNames, consecutiveFailures, disabledAt, createdByUserId, createdAt and updatedAt. Errors: 400 for an invalid URL, an unknown event or field, or an organisation that already has 30 endpoints (on samples: an unsupported event or a limit outside 1–10); 401 for a missing or expired token or another organisation's ID; 403 for any other role; 404 for a webhookId outside your organisation.

In a sample, occurred_at is when the record's event happened, and each envelope has its own random id. A few fields can differ from the delivery that record produced: contact.origin is always null, and a lead or message shows its current state (stage, delivery status) rather than its state when the event fired.

Zapier REST Hook triggers: register one endpoint per Zap. In the trigger's subscribe step, POST with url = bundle.targetUrl and the event you want, and keep the returned webhookId; in the unsubscribe step, DELETE …/{webhookId}; in Perform List, GET …/samples?event=… and read each sample the way Perform reads a delivery.

POST /api/wp-crm/webhooks/550e8400-e29b-41d4-a716-446655440000
Authorization: Bearer <token>
Content-Type: application/json

{ "url": "https://hooks.zapier.com/hooks/standard/1234567/abcdef/", "events": ["lead.created"], "description": "Zapier — New lead" }

With a signed-in admin session (dashboard API)

Everything the Settings → Webhooks UI does is available under /wp-crm/webhooks for an Admin or Account Owner of the organisation, signed in to the dashboard. Every call names the organisation with the organisationId query parameter.

Method & pathWhat it does
POST /wp-crm/webhooksCreate an endpoint. Returns the record including its generated signing secret.
GET /wp-crm/webhooksList the organisation's endpoints.
PUT /wp-crm/webhooks/:idUpdate URL, events, description, headers, or isActive (re-enabling resets the failure counter).
DELETE /wp-crm/webhooks/:idDelete an endpoint.
POST /wp-crm/webhooks/:id/rotate-secretGenerate and return a new signing secret.
GET /wp-crm/webhooks/:id/deliveries?limit=50Recent deliveries for the endpoint (default 50, max 200).
POST /wp-crm/webhooks/:id/testSend a webhook.test delivery.
POST /wp-crm/webhooks/deliveries/:deliveryId/redeliverReplay a logged delivery (fresh delivery ID, original payload).

Create/update body fields (the public API's create takes the same fields as the dashboard's create; any other field is refused with 400)

FieldTypeNotes
urlstringThe receiving endpoint. Must be a valid URL and must not point at the Lodgestory API. Use HTTPS in production.
eventsstring[]Any set of the subscribable events listed above.
descriptionstringOptional label shown in the UI.
headersobjectOptional custom headers sent with every delivery — up to 30; names must be valid HTTP header names (≤ 256 chars); values ≤ 2,048 chars, no line breaks.
isActivebooleanUpdate only — enable/disable the endpoint.

Limits

  • 30 endpoints per organisation, however they were created — Settings, the dashboard API or the public API. Each Zapier instant trigger uses one.
  • 30 custom headers per endpoint (name ≤ 256 chars, value ≤ 2,048 chars, no line breaks).
  • Endpoint URLs cannot target the Lodgestory API.
  • Delivery log retention: 30 days (replay is available within that window).
  • Response bodies are truncated to 1,000 bytes in the delivery log.

Related pages


Did this page help you?