## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://docs.mem0.ai/llms.txt)

Use this file to discover all available pages before exploring further.

---

### Delete a Webhook Using Different SDKs

#### Python

```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)
```

#### JavaScript

```javascript
// 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

```
curl -X DELETE "https://api.mem0.ai/api/v1/webhooks/your_webhook_id/webhook/" \
     -H "Authorization: Token your-api-key"
```

#### PHP

```php
<?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;
```

#### Go

```go
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))
}
```

#### Java

```java
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());
```

#### Ruby

```ruby
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
```

---

### Response Status Codes

- **200**: Webhook deleted successfully
- **403**: You don't have access to this webhook
- **404**: Webhook not found

### Response Format

```json
{
  "message": "Webhook deleted successfully"
}
```

```json
{
  "error": "You don't have access to this webhook"
}
```

```json
{
  "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.

---
