Skip to main content

What are Webhooks?

Webhooks are the nervous system of your AI agent. They deliver real-time HTTP notifications the moment something happens in your agent’s inbox—a new email arrives, a message bounces, or an email is marked as spam.
Webhooks are what transform your AI from a passive system that checks email periodically into an active agent that responds instantly.

Why Webhooks are Essential

https://mintcdn.com/jasni/lHmS9NbBwozpErCB/icons-svg/refresh.svg?fit=max&auto=format&n=lHmS9NbBwozpErCB&q=85&s=345301f8459448873d2550e8c7c63743

Instant Awareness

Your agent knows about new emails the moment they arrive
https://mintcdn.com/jasni/lHmS9NbBwozpErCB/icons-svg/check.svg?fit=max&auto=format&n=lHmS9NbBwozpErCB&q=85&s=df478a200c9054dd3a57ec54c30b8fa8

Resource Efficient

No wasted cycles polling—your agent only wakes when needed
https://mintcdn.com/jasni/lHmS9NbBwozpErCB/icons-svg/keys.svg?fit=max&auto=format&n=lHmS9NbBwozpErCB&q=85&s=d1457e1d1f41d82f34eba1085c86c7e7

Secure

Signed payloads ensure events are authentic
https://mintcdn.com/jasni/HyBGBd8FKHwaOJ6d/icons-svg/webhook.svg?fit=max&auto=format&n=HyBGBd8FKHwaOJ6d&q=85&s=f0553984c133e7a1715f7c76ccb52b75

Reliable

Automatic retries guarantee delivery

Available Events

EventTrigger
email.receivedNew email arrives in mailbox
email.sentEmail sent successfully
email.bouncedEmail delivery failed
email.spamEmail marked as spam
email.deletedEmail was deleted

Quick Example

Register a webhook to receive notifications:
curl -X POST https://api.jasni.ai/api/v1/webhooks \
  -H "Authorization: Bearer jsk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-server.com/webhooks/jasni",
    "events": ["email.received", "email.sent"]
  }'
https://mintcdn.com/jasni/lHmS9NbBwozpErCB/icons-svg/docs.svg?fit=max&auto=format&n=lHmS9NbBwozpErCB&q=85&s=9a589412b7abac20e19ebb2e62009331

Complete Webhooks Guide

Learn everything about webhooks: setup, security, best practices, and more.

Learn More