# Inbound Webhook Receiver for External Messages

`POST /api/integrations/{integration_id}/webhook`

### Overview
Webhook endpoint receiving asynchronous callbacks from external messaging platforms (WhatsApp, Slack) to trigger agent execution and reply.

### Authentication & Headers
- **Auth**: Channel signature validation (HMAC / Verify Token)
- **Required Header**: `API-Version: 1`

### Parameters
- **`integration_id`** *(path, string, required)*: Target integration UUID.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `integration_id` | path | string (uuid) | yes | Unique identifier of the external communication channel integration (WhatsApp, Slack). |

## Responses

### 200 — Webhook received and dispatched

### 422 — Validation Error

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `detail` | object[] | no |  |
| `detail[].loc` | string | integer[] | yes |  |
| `detail[].msg` | string | yes |  |
| `detail[].type` | string | yes |  |
| `detail[].input` | object | no |  |
| `detail[].ctx` | object | no |  |

```json
{
  "detail": [
    {
      "loc": [
        null
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
```

## Example

```bash
curl -X POST "$PINTER_URL/api/integrations/00000000-0000-0000-0000-000000000001/webhook" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```
