GET
/
api
/
v1
/
webhooks
/
projects
/
{project_id}
# To use the Python SDK, install the package:
# pip install mem0ai

from mem0 import MemoryClient
client = MemoryClient(api_key="your_api_key")

# Get all webhooks
webhooks = client.get_webhooks(project_id="your_project_id")
print(webhooks)

# Create a webhook
webhook = client.create_webhook(
    url="https://your-webhook-url.com",
    name="My Webhook",
    project_id="your_project_id",
    event_types=["memory:add"]
)
print(webhook)
[
  {
    "webhook_id": "<string>",
    "name": "<string>",
    "url": "<string>",
    "event_types": [
      "<string>"
    ],
    "is_active": true,
    "project": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
]

Get Webhook

Get a webhook by providing the project ID.

Authorizations

Authorization
string
header
required

API key authentication. Prefix your Mem0 API key with 'Token '. Example: 'Token your_api_key'

Path Parameters

project_id
string
required

Unique identifier of the project

Response

200
application/json
List of webhooks for the project
webhook_id
string

Unique identifier of the webhook

name
string

Name of the webhook

url
string

URL endpoint for the webhook

event_types
string[]

List of event types the webhook subscribes to

is_active
boolean

Whether the webhook is active

project
string

Name of the project the webhook is associated with

created_at
string

Timestamp when the webhook was created

updated_at
string

Timestamp when the webhook was last updated