Skip to main content

Overview

Webhooks enable real-time notifications for memory events in your Mem0 project. Webhooks are configured at the project level, meaning each webhook is tied to a specific project and receives events solely from that project. You can configure webhooks to send HTTP POST requests to your specified URLs whenever memories are created, updated, deleted, or categorized.

Managing Webhooks

Create Webhook

Create a webhook for your project. It will receive events only from that project:

Get Webhooks

Retrieve all webhooks for your project:

Update Webhook

Update an existing webhook’s configuration by specifying its webhook_id:

Delete Webhook

Delete a webhook by providing its webhook_id:

Event Types

Mem0 supports the following event types for webhooks:
  • memory_add: Triggered when a memory is added.
  • memory_update: Triggered when an existing memory is updated.
  • memory_delete: Triggered when a memory is deleted.
  • memory_categorize: Triggered when a memory is categorized.

Webhook Payload

When a memory event occurs, Mem0 sends an HTTP POST request to your webhook URL with the following payload: Memory add/update/delete payload:
Memory categorize payload:

Best Practices

  1. Implement Retry Logic: Ensure your webhook endpoint can handle temporary failures.
  2. Verify Webhook Source: Implement security measures to verify that webhook requests originate from Mem0.
  3. Process Events Asynchronously: Process webhook events asynchronously to avoid timeouts and ensure reliable handling.
  4. Monitor Webhook Health: Regularly review your webhook logs to ensure functionality and promptly address delivery failures.
If you have any questions, please feel free to reach out to us using one of the following methods:

Discord

Join our community

GitHub

Ask questions on GitHub

Support

Talk to founders