---
title: "Webhook'lar — API başvurusu"
description: "Hizmet, fatura, sipariş ve talep olayları için imzalı HTTPS geri çağrıları."
url: https://www.gyrohosting.com/developers/tr/api/webhooks.html
language: tr
openapi: https://www.gyrohosting.com/developers/openapi.json
api_version: 2.30.0
---

# Webhook'lar

Hizmet, fatura, sipariş ve talep olayları için imzalı HTTPS geri çağrıları.

Base URL: `https://www.gyrohosting.com/api/v1/client` · OpenAPI: https://www.gyrohosting.com/developers/openapi.json


## GET /cloud/webhooks

**Webhook'ları listele** · operationId `listWebhooks` · scope `webhooks` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/listWebhooks.json




### Yanıtlar

- **200**: Webhooks

### Örnekler

```bash
curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/webhooks' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro webhook list
```
```hcl
# kaynak gyro_webhook: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/webhook
resource "gyro_webhook" "ops" {
  url    = "https://hooks.example.com/gyro"
  events = ["service.active", "service.suspended", "invoice.paid"]
}

output "webhook_secret" {
  value     = gyro_webhook.ops.secret
  sensitive = true
}
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/webhooks", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/webhooks", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```


## POST /cloud/webhooks

**Webhook oluştur (gizli anahtar bir kez döner)** · operationId `createWebhook` · scope `webhooks` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/createWebhook.json

Teslimler `POST` JSON'dur; başlıklar `X-Gyro-Event`, `X-Gyro-Delivery`, `X-Gyro-Timestamp` ve
`X-Gyro-Signature: sha256=HMAC_SHA256(secret, timestamp + "." + body)` (beyaz etiketli bayi: `X-Webhook-*`).
Zaman damgası 5 dakikadan eskiyse reddedin. Tekrar: üstel geri çekilme, 8 deneme; 20 ardışık hata webhook'u kapatır.



### İstek gövdesi

| Alan | Tür | Açıklama |
|---|---|---|
| `url` (zorunlu) | string |  |
| `events` | array<WebhookEvent> | empty = all |
| `description` | string |  |
| `customer_id` | integer | Reseller main key only |

### Yanıtlar

- **201**: Created (includes secret)
- **422**: Validation or business rule failure (`confirm_required`, `invalid_image`, `tool_action_failed` ...)

### Örnekler

```bash
curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/webhooks' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://hooks.example.com/gyro", "events": ["service.active", "invoice.paid"]}'
```
```bash
gyro webhook create --help    # tüm seçenekler
```
```hcl
# kaynak gyro_webhook: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/webhook
resource "gyro_webhook" "ops" {
  url    = "https://hooks.example.com/gyro"
  events = ["service.active", "service.suspended", "invoice.paid"]
}

output "webhook_secret" {
  value     = gyro_webhook.ops.secret
  sensitive = true
}
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/webhooks", headers=h, json={"url": "https://hooks.example.com/gyro", "events": ["service.active", "invoice.paid"]}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/webhooks", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"url": "https://hooks.example.com/gyro", "events": ["service.active", "invoice.paid"]}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```


## GET /cloud/webhooks/{id}

**Webhook'u getir** · operationId `getWebhook` · scope `webhooks` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/getWebhook.json




### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer |  |

### Yanıtlar

- **200**: Webhook
- **404**: Not found — also returned for objects owned by someone else

### Örnekler

```bash
curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/webhooks/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro webhook get 12345
```
```hcl
# kaynak gyro_webhook: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/webhook
resource "gyro_webhook" "ops" {
  url    = "https://hooks.example.com/gyro"
  events = ["service.active", "service.suspended", "invoice.paid"]
}

output "webhook_secret" {
  value     = gyro_webhook.ops.secret
  sensitive = true
}
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/webhooks/12345", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/webhooks/12345", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```


## PATCH /cloud/webhooks/{id}

**Adres, olay, açıklama ya da durumu güncelle** · operationId `updateWebhook` · scope `webhooks` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/updateWebhook.json




### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer |  |

### İstek gövdesi

| Alan | Tür | Açıklama |
|---|---|---|
| `url` | string |  |
| `events` | array<WebhookEvent> |  |
| `description` | string |  |
| `status` | string (active, disabled) |  |

### Yanıtlar

- **200**: Webhook
- **404**: Not found — also returned for objects owned by someone else
- **422**: Validation or business rule failure (`confirm_required`, `invalid_image`, `tool_action_failed` ...)

### Örnekler

```bash
curl -s -X PATCH 'https://www.gyrohosting.com/api/v1/client/cloud/webhooks/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url": "string", "events": ["service.created"], "description": "string", "status": "active"}'
```
```bash
gyro webhook update 12345 --help    # tüm seçenekler
```
```hcl
# kaynak gyro_webhook: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/webhook
resource "gyro_webhook" "ops" {
  url    = "https://hooks.example.com/gyro"
  events = ["service.active", "service.suspended", "invoice.paid"]
}

output "webhook_secret" {
  value     = gyro_webhook.ops.secret
  sensitive = true
}
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.patch("https://www.gyrohosting.com/api/v1/client/cloud/webhooks/12345", headers=h, json={"url": "string", "events": ["service.created"], "description": "string", "status": "active"}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/webhooks/12345", {
  method: "PATCH",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"url": "string", "events": ["service.created"], "description": "string", "status": "active"}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```


## DELETE /cloud/webhooks/{id}

**Webhook'u sil** · operationId `deleteWebhook` · scope `webhooks` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/deleteWebhook.json




### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer |  |

### Yanıtlar

- **200**: Deleted
- **404**: Not found — also returned for objects owned by someone else

### Örnekler

```bash
curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/webhooks/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro webhook delete 12345
```
```hcl
# kaynak gyro_webhook: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/webhook
resource "gyro_webhook" "ops" {
  url    = "https://hooks.example.com/gyro"
  events = ["service.active", "service.suspended", "invoice.paid"]
}

output "webhook_secret" {
  value     = gyro_webhook.ops.secret
  sensitive = true
}
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/webhooks/12345", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/webhooks/12345", {
  method: "DELETE",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```


## POST /cloud/webhooks/{id}/test

**Şimdi bir api.test olayı gönder** · operationId `testWebhook` · scope `webhooks` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/testWebhook.json




### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer |  |

### Yanıtlar

- **200**: Result
- **404**: Not found — also returned for objects owned by someone else

### Örnekler

```bash
curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/webhooks/12345/test' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro webhook test 12345
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/webhooks/12345/test", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/webhooks/12345/test", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```


## GET /cloud/webhooks/{id}/deliveries

**Son 100 teslim** · operationId `listWebhookDeliveries` · scope `webhooks` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/listWebhookDeliveries.json




### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer |  |

### Yanıtlar

- **200**: Deliveries
- **404**: Not found — also returned for objects owned by someone else

### Örnekler

```bash
curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/webhooks/12345/deliveries' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro webhook delivery list 12345
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/webhooks/12345/deliveries", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/webhooks/12345/deliveries", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```
