Webhook

A webhook is an automated HTTP callback that notifies your system in real time about events – such as when a message is received, delivered, or read. Instead of your software constantly polling for updates, the server proactively pushes notifications to you.

What is a Webhook?

A webhook is an event-driven HTTP POST request that an API sends to your URL whenever a specific event occurs. While normal API calls require you to actively poll for data ("Has anything changed?"), webhooks reverse the pattern: the service notifies you automatically ("X just happened").

In a messaging context, this means: when a customer sends you a WhatsApp message, SendSeven sends a POST request to your webhook URL (e.g., https://yourshop.com/webhooks/messages) with all message details as JSON. Your software receives the data instantly and can react – no constant polling required.

Webhooks use standard HTTP: POST request with a JSON body, optionally signed with HMAC-SHA256 for security (using your API Key for verification). Your server responds with HTTP 200 OK to confirm receipt. If your server is down or returns an error, the API retries the request with exponentially increasing delays (retry logic).

Why are Webhooks Important?

Webhooks enable real-time integration without performance overhead:

  • Push instead of pull – No constant API polling; your server is only contacted when events occur
  • Real-time response – Seconds instead of minutes between event and action
  • Resource efficiency – No unnecessary requests, lower infrastructure costs
  • Event granularity – 21 distinct event types across messages, emails, conversations, contacts, and link tracking
  • Asynchronous workflows – Long-running processes in the background without API timeouts

Typical use cases: message received leads to CRM ticket creation, message delivered triggers dashboard status update, message read updates analytics, opt-out removes contact from marketing list.

Practical Example

Your e-commerce shop uses WhatsApp for customer support. You configure a webhook in SendSeven:

Webhook URL: https://shop.example.com/api/webhooks/messages
Events: message.received, message.delivered

A customer writes: "Where is my order #12345?" SendSeven immediately sends a POST request to your URL:

{
  "event": "message.received",
  "messageId": "msg_xyz789",
  "from": "+491701234567",
  "channel": "whatsapp",
  "text": "Where is my order #12345?",
  "timestamp": "2026-02-19T14:45:30Z"
}

Your shop software receives the webhook, extracts the order number, retrieves tracking data from the database, and sends a reply via the REST API – fully automated, in seconds.

Webhooks with SendSeven

SendSeven fires 21 webhook event types across six categories, covering the full lifecycle of messages, emails, conversations, contacts, and link tracking:

EventDescription
Message Events
message.receivedNew message received from a contact
message.sentMessage sent to a contact
message.deliveredMessage delivery confirmed by the channel
message.failedMessage delivery failed
message.readMessage read by the recipient
Email Events
email.receivedNew email received
email.sentEmail sent
email.deliveredEmail delivery confirmed
email.bouncedEmail bounced
email.openedEmail opened (tracking pixel)
email.complainedEmail marked as spam
Conversation Events
conversation.createdNew conversation created
conversation.closedConversation closed
conversation.assignedConversation assigned to an agent
conversation.reopenedClosed conversation reopened
Contact Events
contact.createdNew contact created
contact.updatedContact details updated
contact.deletedContact deleted
contact.subscribedContact subscribes to a list
contact.unsubscribedContact unsubscribes from a list
Link Tracking Events
link.clickedTracked link clicked

Setup in the dashboard: enter your webhook URL, select the events you need, and receive a secret key for HMAC-SHA256 signature verification. Every webhook request includes an X-Webhook-Signature header -- you validate the signature to confirm the request genuinely came from SendSeven.

Retry logic on failures (5 attempts with exponential backoff over 24 hours), webhook delivery logs in the dashboard, and test requests for debugging. For a complete walkthrough with code examples, see the Webhook Setup Guide in the developer docs or the Webhooks Explained blog article.