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

# Webhooks API

> Create and manage webhooks programmatically

## Create Webhook

Create a new webhook endpoint.

```bash theme={null}
curl -X POST 'https://api.usehandled.io/api/v1/ipaas/webhook' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "target_url": "https://your-app.com/webhooks/handled",
    "is_active": true,
    "event_types": ["integrated_account:active", "sync_job_run:completed"]
  }'
```

### Parameters

| Field         | Type    | Description                             |
| ------------- | ------- | --------------------------------------- |
| `target_url`  | string  | Your HTTPS endpoint                     |
| `is_active`   | boolean | Enable/disable the webhook              |
| `event_types` | array   | Events to receive (omit for all events) |

### Response

```json theme={null}
{
  "id": "webhook_123",
  "target_url": "https://your-app.com/webhooks/handled",
  "secret": "your-webhook-secret",
  "is_active": true,
  "environment_id": "env_456",
  "created_at": "2024-01-15T10:30:00Z"
}
```

<Warning>
  Save the `secret` value. You need it to verify webhook signatures.
</Warning>

## List Webhooks

```bash theme={null}
curl 'https://api.usehandled.io/api/v1/ipaas/webhook' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```

## Get Webhook

```bash theme={null}
curl 'https://api.usehandled.io/api/v1/ipaas/webhook/{webhook_id}' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```

## Update Webhook

```bash theme={null}
curl -X PATCH 'https://api.usehandled.io/api/v1/ipaas/webhook/{webhook_id}' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "is_active": false
  }'
```

## Delete Webhook

```bash theme={null}
curl -X DELETE 'https://api.usehandled.io/api/v1/ipaas/webhook/{webhook_id}' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```

## Test Webhook

Send a test event to your endpoint.

```bash theme={null}
curl -X POST 'https://api.usehandled.io/api/v1/ipaas/webhook/test' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "webhook_123"
  }'
```
