Skip to main content
DELETE
/
api
/
v1
/
webhooks
/
{webhook_id}
/
Python
# To use the Python SDK, install the package:
# pip install mem0ai

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

# Delete a webhook
response = client.delete_webhook(webhook_id="your_webhook_id")
print(response)
// To use the JavaScript SDK, install the package:
// npm i mem0ai

import MemoryClient from 'mem0ai';
const client = new MemoryClient({ apiKey: "your-api-key" });

// Delete a webhook
client.deleteWebhook("your_webhook_id")
.then(response => console.log('Delete webhook response:', response))
.catch(error => console.error(error));
curl -X DELETE "https://api.mem0.ai/api/v1/webhooks/your_webhook_id/webhook/" \
-H "Authorization: Token your-api-key"
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mem0.ai/api/v1/webhooks/your_webhook_id/webhook/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => ["Authorization: Token your-api-key"],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
package main

import (
"fmt"
"net/http"
"io/ioutil"
)

func main() {
req, _ := http.NewRequest("DELETE", "https://api.mem0.ai/api/v1/webhooks/your_webhook_id/webhook/", nil)
req.Header.Add("Authorization", "Token your-api-key")

res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)

fmt.Println(string(body))
}
import com.konghq.unirest.http.HttpResponse;
import com.konghq.unirest.http.Unirest;

// Delete a webhook
HttpResponse<String> response = Unirest.delete("https://api.mem0.ai/api/v1/webhooks/your_webhook_id/webhook/")
.header("Authorization", "Token your-api-key")
.asString();

System.out.println(response.getBody());
require 'uri'
require 'net/http'

url = URI("https://api.mem0.ai/api/v1/webhooks/{webhook_id}/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "message": "Webhook deleted successfully"
}
{
"error": "You don't have access to this webhook"
}
{
"error": "Webhook not found"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

webhook_id
string
required

Unique identifier of the webhook.

Response

Webhook deleted successfully

message
string
Example:

"Webhook deleted successfully"