Skip to main content
When something happens in your libredesk instance, libredesk sends an HTTP POST to a URL you choose. The body is JSON containing the event name, a timestamp, and the conversation or message it happened to. Use webhooks to push libredesk activity into your own systems.

Configuration

1

Navigate to webhooks

Go to Admin → Integrations → Webhooks in your libredesk dashboard
2

Create webhook

Click New webhook and fill in:
  • Name: a name you will recognize later
  • URL: where libredesk sends the payload
  • Events: the events to subscribe to
  • Secret: optional, used to sign the payload
  • Active: enabled or disabled
3

Test webhook

Open the webhook’s menu in the list and click Send test to send a webhook.test event to your endpoint.

Security

Signature verification

When you set a secret, libredesk signs the payload with HMAC-SHA256 and sends the result in the X-Libredesk-Signature header as sha256=<signature>.

Headers

Every request carries these headers:

SSRF protection

Webhook URLs are one of several admin-configured outbound URLs covered by libredesk’s optional SSRF guard, which is disabled by default. See SSRF protection for details and how to enable it.

Events

Conversation events

Triggered when a new conversation is created, by a contact or by an agent.
Triggered when a conversation’s status is updated.
Triggered when a conversation is assigned to a user. Team assignment does not send this event.
Triggered when a conversation is unassigned from a user.
Triggered when tags are added or removed from a conversation.

Message events

Triggered when a new message is created in a conversation. This includes incoming and outgoing messages, private notes, and activity messages.
Triggered when an outgoing message’s status changes to sent or failed.

Automation rules

The Trigger webhook automation action sends a custom event, for example priority.escalated, to one active webhook.
conversation is shortened here.

Delivery and retries

  • Deliveries run in a background worker pool.
  • Failed deliveries are not retried.
  • Events are dropped when the delivery queue is full.
Worker count, queue size, and timeout are set in the [webhook] section of config.toml. Because there are no retries, verify the signature and reply within 3 seconds, then do the actual work after you have responded. An endpoint that blocks on slow processing will time out and lose the event.

Testing

Both of these give you a throwaway URL that shows the payloads libredesk sends:

Webhook.site

Generate a temporary URL to inspect webhook payloads

RequestBin

Collect and inspect HTTP requests

Example integration

An Express server that verifies the signature, replies immediately, and processes the event afterwards: