When notifications matter most, learn more about your email events with webhooks.

Use webhooks to notify users about email delivery issues, or find out when a customer opens an important email.

Get notified about important email events

Maileroo offers you the ability to implement email webhooks, allowing you to get notified about important key events such as opens, clicks, deliveries, bounces and more!

Webhook Payloads

Webhook payloads are sent in JSON format, containing information about the event that occurred. Below are some examples of the payloads you can expect to receive from Maileroo.

Click Tracking Webhook

When a recipient clicks on a link in your email, you can track this event using the click tracking webhook. This is useful for tracking the engagement of your recipients with your emails.

{
    "domain_id": 774,
    "event_data": {
    "ip": "103.120.6.123",
    "original_url": "https://example.com/confirm/link",
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0"
    },
    "event_id": "cb91d71458a75cb7160a2cca9c472a42a97bf925385998e0",
    "event_time": 1710545577,
    "event_type": "clicked",
    "inserted_at": "2024-03-15T23:32:57.401Z",
    "message_id": "<499840827041934075286474.8057.2024315233239@domain.com>",
    "message_reference_id": "0ed7094bf9509ac3145c4aa97182be44",
    "tags": null,
    "user_id": 323
}

Open Tracking Webhook

When a recipient opens your email, you can track this event using the open tracking webhook. This is useful for tracking the engagement of your recipients with your emails.

{
    "domain_id": 789,
    "event_data": {
        "ip": "123.45.67.89",
        "user_agent": "Mozilla/5.0 (Compatible; ExampleBrowser/1.0; Windows NT)"
    },
    "event_id": "ghij1234klmn5678opqr9101",
    "event_time": 1710545567,
    "event_type": "opened",
    "inserted_at": "2024-03-15T23:32:47.664Z",
    "message_id": "abcdef1234567890@examplemail.com",
    "message_reference_id": "mrefabcdef1234567890",
    "tags": null,
    "user_id": 1003
}

Delivery Webhook

When an email is successfully delivered to a recipient, you can track this event using the delivery webhook. This is useful for tracking the delivery of your emails.

{
    "domain_id": 123,
    "event_data": {
        "to": "recipient@example.com"
    },
    "event_id": "abcd1234efgh5678ijkl9101",
    "event_time": 1710545542,
    "event_type": "delivered",
    "inserted_at": "2024-03-15T23:32:22.397Z",
    "message_id": "<1234567890abcdef@examplemail.com>",
    "message_reference_id": "mref1234567890abcdef",
    "tags": null,
    "user_id": 1001
}

Bounce Webhook

When an email is not delivered to a recipient, you can track this event using the bounce webhook. This is useful for tracking the delivery issues of your emails.

{
    "domain_id": 123,
    "event_data": {
        "reason": "452-4.2.2 The recipient's inbox is out of storage space. Please direct the recipient to support link.",
        "to": "example@email.com"
    },
    "event_id": "0dc2204928b817f0122d1e311aee0ee702ac378840ef7df5",
    "event_time": 1710545557,
    "event_type": "deferred",
    "inserted_at": "2024-03-15T23:32:37.427Z",
    "message_id": "<312897663424678224496834.5399.202431411321@domain.com>",
    "message_reference_id": "982e548d6b5ff15562272aa42b1f4517",
    "tags": null,
    "user_id": 123
}

Automate your workflows

Use webhooks to automate your workflows and integrate with other systems. Get notified about important email events and take action based on the information you receive.

Send an email with tags

client := NewMailerooClient("YOUR_API_KEY")

client.SetFrom("John Doe", "john.doe@example.com").
SetTo("Jane Doe", "jane.doe@example.com").
SetSubject("Hello").
SetPlain("Hello World").
SetReferenceId(client.GenerateReferenceId()).
SetTracking(true).
SetTags(map[string]string{"tag1": "value1", "tag2": "value2"})

response, err := client.SendBasicEmail()

if err != nil {
    fmt.Println("Error:", err)
} else {
    fmt.Println("Response:", response)
}

Webhook payload for delivered event

{
"domain_id": 123,
"event_data": {
    "to": "jane.doe@example.com"
},
"event_id": "abcd1234efgh5678ijkl9101",
"event_time": 1710545542,
"event_type": "delivered",
"inserted_at": "2024-03-15T23:32:22.397Z",
"message_id": "<1234567890abcdef@examplemail.com>",
"message_reference_id": "mref1234567890abcdef",
"tags": {"tag1": "value1", "tag2": "value2"},
"user_id": 1001
}

Ready to start sending emails?