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 Create 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
  • Status: enabled or disabled
3

Test webhook

Use the test button to send a sample payload to verify your endpoint is working

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.
Triggered when a conversation’s status is updated.
Triggered when a conversation is assigned to a user.
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.
Triggered when an existing message is updated.

Delivery and retries

  • Deliveries run in a background worker pool.
  • The request timeout is set in config.toml.
  • Failed deliveries are not retried.
  • Events can be dropped when the delivery queue is full. The queue size is set in config.toml.
Because there are no retries, verify the signature and reply within 5 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: