# Webhook erstellen

`POST https://{tenant}.stamp.eu/rest/webhooks`

## Request-Body

| Feld | Typ | Pflicht |
| --- | --- | --- |
| `url` | string | ja |
| `description` | string \| null | nein |
| `active` | boolean | nein |
| `events` | `employee.created`, `employee.updated`, `employee.deleted`, `event.created`, `altered_event.created`, `altered_event.approved`, `altered_event.rejected`, `altered_event.deleted`, `leave_request.created`, `leave_request.approved`, `leave_request.denied`, `leave_request.deleted`, `schedule_model.created`, `schedule_model.updated`, `schedule_model.deleted`, `holiday.created`, `holiday.updated`, `holiday.deleted`, `unit.created`, `unit.updated`, `unit.deleted`, `department.created`, `department.updated`, `department.deleted`, `cost_center.created`, `cost_center.updated`, `cost_center.deleted`, `project.created`, `project.updated`, `project.deleted`, `location.created`, `location.updated`, `location.deleted`[] | ja |

## Antworten

### 201: `WebhookCreatedResource`

| Feld | Typ | Pflicht |
| --- | --- | --- |
| `data` | object | ja |
| `data.id` | string | ja |
| `data.url` | string | ja |
| `data.description` | string | ja |
| `data.events` | string | ja |
| `data.active` | string | ja |
| `data.secret_last4` | string | ja |
| `data.created_at` | string | ja |
| `data.updated_at` | string | ja |
| `data.secret` | string | ja |

### 401: Unauthenticated

| Feld | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `message` | string | ja | Error overview. |

### 422: Validation error

| Feld | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `message` | string | ja | Errors overview. |
| `errors` | object | ja | A detailed description of each field that failed validation. |
