# Webhook Yönetimi

Webhook kayıtları Admin API'nin `client_webhooks` servisi üzerinden yönetilir. Tam parametre ve şema detayları için [ClientWebhook referansına](/admin-api/clientwebhook) bakın.

## Yeni webhook oluşturma

Adres ve topic bilgisiyle yeni bir webhook oluşturur.

```http
POST https://magaza-adiniz.myideasoft.com/admin-api/client_webhooks
```

İstek gövdesi:

```json
{
  "topic": "product/create",
  "address": "https://uygulamaniz.example.com/webhook",
  "status": 1
}
```

Yanıt:

```json
{
  "id": 1,
  "client": {
    "id": 1,
    "name": "Sendloop"
  },
  "topic": "product/create",
  "address": "https://uygulamaniz.example.com/webhook",
  "status": 1,
  "createdAt": "2022-07-26T10:59:04+03:00",
  "updatedAt": "2022-07-26T10:59:04+03:00"
}
```

## Webhook listesini alma

```http
GET https://magaza-adiniz.myideasoft.com/admin-api/client_webhooks
```

Yanıt:

```json
[
  {
    "id": 1,
    "client": { "id": 1, "name": "Sendloop" },
    "topic": "product/create",
    "address": "https://uygulamaniz.example.com/webhook",
    "status": 1,
    "createdAt": "2022-07-26T10:58:54+03:00",
    "updatedAt": "2022-07-26T10:58:54+03:00"
  },
  {
    "id": 2,
    "client": { "id": 1, "name": "Sendloop" },
    "topic": "payment/create",
    "address": "https://uygulamaniz.example.com/webhook",
    "status": 1,
    "createdAt": "2022-07-26T11:05:21+03:00",
    "updatedAt": "2022-07-26T11:05:21+03:00"
  }
]
```

## Webhook güncelleme

```http
PUT https://magaza-adiniz.myideasoft.com/admin-api/client_webhooks/{webhook_id}
```

İstek gövdesi:

```json
{
  "topic": "product/create",
  "address": "https://uygulamaniz.example.com/webhook",
  "status": 1
}
```

Yanıt, güncellenmiş webhook kaydıdır.

## Webhook silme

İlgili webhook'u kalıcı olarak siler.

```http
DELETE https://magaza-adiniz.myideasoft.com/admin-api/client_webhooks/{webhook_id}
```

Başarılı silme `204 No Content` ile döner; yanıtta içerik bulunmaz.

:::warning{title="fields"}
Eski dokümantasyonda örneklerde görünen `fields` özelliği **V8'de kaldırılmıştır**; istek gövdesine eklemeyin.
:::
