> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leavo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Webhooks

> List, update, and delete webhooks

## List Webhooks

<Card>
  <strong>GET</strong> `/backend/webhooks`
</Card>

### Request Example

```bash theme={null}
curl -X GET "https://api.leavo.ai/backend/webhooks" \
  -H "Authorization: Bearer your_api_key_here"
```

### Response

```json theme={null}
{
  "success": true,
  "data": [
    {
      "id": "webhook-uuid",
      "url": "https://your-app.com/webhooks/leavo",
      "events": ["lead.created", "lead.status_changed"],
      "active": true,
      "created_at": "2024-01-15T10:30:00Z"
    }
  ]
}
```

***

## Get Webhook

<Card>
  <strong>GET</strong> `/backend/webhooks/{id}`
</Card>

```bash theme={null}
curl -X GET "https://api.leavo.ai/backend/webhooks/webhook-uuid" \
  -H "Authorization: Bearer your_api_key_here"
```

***

## Update Webhook

<Card>
  <strong>PUT</strong> `/backend/webhooks/{id}`
</Card>

### Request Example

```bash theme={null}
curl -X PUT "https://api.leavo.ai/backend/webhooks/webhook-uuid" \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "events": ["lead.created", "message.received"],
    "active": false
  }'
```

***

## Delete Webhook

<Card>
  <strong>DELETE</strong> `/backend/webhooks/{id}`
</Card>

```bash theme={null}
curl -X DELETE "https://api.leavo.ai/backend/webhooks/webhook-uuid" \
  -H "Authorization: Bearer your_api_key_here"
```

### Response

```
HTTP 204 No Content
```

***

## Regenerate Secret

<Card>
  <strong>POST</strong> `/backend/webhooks/{id}/regenerate-secret`
</Card>

Generates a new secret for signature verification.

```bash theme={null}
curl -X POST "https://api.leavo.ai/backend/webhooks/webhook-uuid/regenerate-secret" \
  -H "Authorization: Bearer your_api_key_here"
```

### Response

```json theme={null}
{
  "success": true,
  "data": {
    "secret": "whsec_new_secret_here"
  }
}
```

<Warning>
  After regenerating the secret, update your integration to use the new value.
</Warning>
