# Webhooks

Além das notificações do Slack e do Microsoft Teams, também é possível configurar Webhooks para eventos do Zen. Para criar ou modificar um Webhook, abra a [página de Webhooks](https://app.aikido.dev/settings/integrations/api/webhooks?regionRedirect=1) .

O Aikido tentará reenviar a notificação 5 vezes se a solicitação não for bem-sucedida. Uma solicitação é considerada malsucedida se for retornado um status HTTP diferente de 200 ou se ocorrer um timeout. [Esta página](https://apidocs.aikido.dev/reference/verirfying-webhooks) descreve como os eventos de webhook podem ser verificados.

### Eventos de Webhook

Os seguintes eventos são enviados atualmente:

#### Ataque detectado (Exemplo)

```json
{
   "event_type": "zen.attack",
   "created_at": 1760015974,
   "payload": {
      "url": "http://app.aikido.dev/runtime/services/X/events?groupId=X&eventId=X",
      "eventId": 123,
      "attack": {
         "blocked": false,
         "kind": "sql_injection"
      },
      "request": {
         "method": "POST",
         "route":"/add",
         "ip_address": "::ffff:127.0.0.1",
         "user_agent": "Mozilla/5.0 ..."
      },
      "service": {
         "id": 1,
         "name": "Test",
         "environment": "production"
      },
      "instance":{
         "id": 1,
         "ip_address": "172.17.0.123",
         "hostname": "hostname.local"
      },
      "user": {
         "id": "123abc",
         "blocked_at": 0
      },
      "message": "SQL injection detected in Test"
   },
   "dispatched_at": 1760016033,
   "workspace_id": 123
}
```

#### Onda de ataques detectada (Exemplo)

```json
{
   "event_type": "zen.attack_wave",
   "created_at": 1760015974,
   "payload": {
      "url": "http://app.aikido.dev/runtime/services/X/events?groupId=X&eventId=X",
      "eventId": 123,
      "attack": [],
      "request": {
         "ip_address": "::ffff:127.0.0.1",
         "user_agent": "Mozilla/5.0 ..."
      },
      "service": {
         "id": 1,
         "name": "Test",
         "environment": "production"
      },
      "instance":{
         "id": 1,
         "ip_address": "172.17.0.123",
         "hostname": "hostname.local"
      },
      "user": {
         "id": "123abc",
         "blocked_at": 0
      },
      "message": "Attack wave detected in Test"
   },
   "dispatched_at": 1760016033,
   "workspace_id": 123
}
```

#### Nova conexão de saída (Exemplo)

```json
{
   "event_type": "zen.outbound.discovered",
   "created_at": 1760016813,
   "payload": {
      "hostname": "aikido.dev",
      "port": 443,
      "service": {
         "id": 123,
         "name": "Test",
         "environment": "production"
      },
      "message": "New outbound connection detected in Test"
   },
   "timestamp": 1757599746000
}
```
