Skip to navigation

Webhook events

View as Markdown

Your webhook endpoint receives a JSON payload whenever a supported message event occurs on the channel. Use event.type to choose how your application handles the delivery.

Event types

EventWhen it is sent
message.receivedNew message activity is available for the channel.
message.editedThe content of an existing message changes.
message.deletedA message is deleted from Zorvia.
message.removedA message is revoked or removed from the conversation.
message.failedZorvia cannot deliver a message.

Use the message object, including its sender and lifecycle timestamps, to determine the direction and current state of a message.received event.

Example payload

{
"event": {
"type": "message.received",
"source": null,
"occurred_at": "2026-07-23T10:14:52+00:00"
},
"workspace": {
"id": "workspace_01JQ8XNZ2JQZ7J4HQYN7A5H6F3"
},
"channel": {
"id": "8aa25bf5-f24d-4f9f-b4ab-287d41a29aa3",
"name": "Customer Support",
"driver": "whatsapp"
},
"connection": {
"id": "01JQ8Z21R8VZ0N59S7E7R4GPH1",
"driver": "webhook-server",
"name": "Order status integration"
},
"conversation": {
"id": "01JQ8YVVTBVAJ7QEW49GB0N2H5",
"type": "direct",
"name": "Ada Okafor"
},
"message": {
"id": "01JQ8Z5E2V4PTHB63SF7F4CJA2",
"conversation_id": "01JQ8YVVTBVAJ7QEW49GB0N2H5",
"sender_id": "01JQ8YT9G39ZC9V91G7J71C49T",
"sender_type": "contact",
"content": "Hello, I need help with my order.",
"type": "text",
"is_template": false,
"driver": "whatsapp",
"is_reply": false,
"is_comment": false,
"parent_id": null,
"meta": {},
"created_at": "2026-07-23T10:14:52+00:00",
"updated_at": "2026-07-23T10:14:52+00:00",
"deleted_at": null,
"sent_at": null,
"delivered_at": null,
"edited_at": null,
"removed_at": null,
"received_at": "2026-07-23T10:14:52+00:00",
"failed_at": null,
"lifecycle_timestamp": "2026-07-23T10:14:52+00:00"
}
}

Fields such as sender, media, quoted_message, and forwarded_message are included when they apply to the message.

Payload fields

FieldTypeDescription
event.typestringThe event name used to route the delivery in your application.
event.occurred_atstringWhen the event occurred, formatted as an ISO 8601 timestamp.
event.sourceobject | nullInformation about the originating connection, when available.
workspace.idstringThe Zorvia workspace that owns the channel.
channelobjectThe channel where the message activity occurred.
connectionobjectThe webhook configuration that sent the delivery.
conversationobjectThe affected conversation. Its values can be null when no conversation is available.
messageobjectThe affected message, including its content, type, relationships, and lifecycle timestamps.

Message lifecycle fields

The message object contains timestamps that help your application update its local state:

FieldDescription
created_atWhen the message record was created.
sent_atWhen the message was sent successfully.
received_atWhen Zorvia received the message.
delivered_atWhen delivery was confirmed.
edited_atWhen the message was last edited.
removed_atWhen the message was removed or revoked.
failed_atWhen message delivery failed.

Timestamps are ISO 8601 strings or null when that lifecycle stage has not occurred.

Handling events

Webhook deliveries can arrive more than once or out of order. Store message.id, compare event.occurred_at with the state you have already processed, and make each handler idempotent.

Use the signing instructions in Set up a webhook to verify that deliveries came from Zorvia.