Перейти до основного вмісту
Apidly Cloud
Політика щодо cookie

Аналітичні та рекламні cookie залишаються вимкненими, доки ви їх не приймете. Політика щодо cookie

Ми хотіли б використовувати Google Analytics і Microsoft Clarity, щоб розуміти, як використовуються публічні сторінки, зокрема перегляди сторінок і записи сеансів, а також Reddit Pixel, щоб вимірювати, чи призводять наші оголошення в Reddit до відвідувань і реєстрацій. Тут ви обираєте, чи вони ввімкнені. Відмова ніяк не впливає на роботу сайту.

Довідник API: Вебхуки

Операції API v1 для розділу «Вебхуки»: scope, параметри, приклади на curl, JavaScript і Python та відповіді.

Оновлено 21 листопада 2026 р.6 хв читання
Відкрити як Markdown

Вебхуки: усі операції API v1 з потрібним scope, параметрами, прикладами на curl, JavaScript і Python та відповідями. Автентифікацію, помилки, посторінкову видачу, ліміти та ідемпотентність описано в огляді довідника API; див. також SDK і командний рядок.

Спробуйте зі своїм ключем: створіть API-ключ у консолі, виконайте в терміналі export APIDLY_API_KEY=... і вставте будь-який приклад curl нижче. Значення в прикладах умовні. На цій сторінці немає поля для введення ключа.

Описи операцій і полів узято з визначення API, вони англійською.

Операція Потрібний scope Опис
GET /webhooks full Ендпоінти вебхуків і типи подій, на які можна підписатися
POST /webhooks full Створити ендпоінт вебхука
DELETE /webhooks/{id} full Видалити ендпоінт вебхука
PATCH /webhooks/{id} full Змінити ендпоінт вебхука
GET /webhooks/{id}/deliveries full Журнал доставок одного ендпоінта, спочатку нові
POST /webhooks/{id}/rotate-secret full Випустити новий секрет підпису
POST /webhooks/{id}/test full Надіслати тестову подію
POST /webhooks/deliveries/{deliveryId}/redeliver full Повторно надіслати одну минулу доставку

GET /webhooks

Ендпоінти вебхуків і типи подій, на які можна підписатися

Webhook endpoints carry signing details, so reading them needs webhooks.manage, which only the full scope reaches: a read or servers key gets 403 insufficient_scope.

Потрібний scope: full · Роль творця: admin · Дозвіл: webhooks.manage

Приклад запиту (curl)

curl "https://apidly.com/api/v1/webhooks" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.webhooks.list();

Python (SDK)

client.webhooks.list()

Утиліта командного рядка: apidly webhooks (Довідник CLI)

Приклад відповіді (200)

{
  "webhooks": [
    {
      "id": "example",
      "url": "https://example.com/hook",
      "format": "json",
      "events": [
        "example"
      ],
      "description": "example",
      "active": false,
      "disabledReason": "example",
      "secretHint": "example",
      "consecutiveFailures": 1,
      "lastDeliveryAt": "2026-11-21T10:00:00.000Z",
      "lastSuccessAt": "2026-11-21T10:00:00.000Z",
      "createdAt": "2026-11-21T10:00:00.000Z",
      "secret": "example"
    }
  ],
  "events": [
    "example"
  ],
  "max": 1
}

Статуси помилок: 401, 403, 429.

POST /webhooks

Створити ендпоінт вебхука

The signing secret is shown only in this response. format picks the body: json (default, signed) or a chat app (slack, discord, teams), whose URL must be that app's incoming-webhook address (400 url_not_chat_webhook otherwise). Chat messages carry no signature header and never contain secrets, variable values or connection details.

Потрібний scope: full · Роль творця: admin

Тіло запиту

Ім'я Тип Обов'язковий Опис
url string так
format json | slack | discord | teams ні json (default): the signed JSON envelope. slack, discord, teams: a short message in the organization's language, posted in that app's incoming-webhook shape, with no signature header; the URL must be that app's incoming-webhook address.
description string ні
events масив із server.requested | server.approved | server.rejected | server.provisioning | server.running | server.stopped | server.interrupted | server.failed | server.destroyed | server.resumed | server.offline | server.back_online | server.disk_low | server.gpu_idle | server.rental_ending | server.rental_ended | plan.available | endpoint.created | endpoint.paused | endpoint.resumed | endpoint.scaled | endpoint.job.completed | payment.failed | balance.low | balance.exhausted | balance.topped_up | invoice.created | budget.threshold | alert.triggered | member.invited | member.joined | member.removed | api_key.created | api_key.revoked | api_key.rotated | api_key.updated | transfer.completed | transfer.failed | transfer.unverified | volume.created | volume.deleted | server.contract_expiring | server.contract_expired так Event types to receive. server.contract_expiring and server.contract_expired are deprecated names of server.rental_ending and server.rental_ended, removed after 2027-05-31: a new subscription cannot select them (400 invalid_body); one that already lists an old name keeps it and receives the event under that old name until then, and under the current name after.

Приклад запиту (curl)

curl -X POST "https://apidly.com/api/v1/webhooks" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/hook","events":["server.requested"]}'

JavaScript (SDK)

await apidly.webhooks.create({
  url: "https://example.com/hook",
  events: [
    "server.requested"
  ]
});

Python (SDK)

client.webhooks.create(url="https://example.com/hook", events=["server.requested"])

Утиліта командного рядка: apidly webhooks (Довідник CLI)

Приклад відповіді (201)

{
  "webhook": {
    "id": "example",
    "url": "https://example.com/hook",
    "format": "json",
    "events": [
      "example"
    ],
    "description": "example",
    "active": false,
    "disabledReason": "example",
    "secretHint": "example",
    "consecutiveFailures": 1,
    "lastDeliveryAt": "2026-11-21T10:00:00.000Z",
    "lastSuccessAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "secret": "example"
  },
  "endpoint": {
    "id": "example",
    "url": "https://example.com/hook",
    "format": "json",
    "events": [
      "example"
    ],
    "description": "example",
    "active": false,
    "disabledReason": "example",
    "secretHint": "example",
    "consecutiveFailures": 1,
    "lastDeliveryAt": "2026-11-21T10:00:00.000Z",
    "lastSuccessAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "secret": "example"
  },
  "secret": "example"
}

Статуси помилок: 400, 401, 403, 429.

DELETE /webhooks/{id}

Видалити ендпоінт вебхука

Потрібний scope: full · Роль творця: admin

Параметри

Ім'я Де Тип Обов'язковий Опис
id path string так

Приклад запиту (curl)

curl -X DELETE "https://apidly.com/api/v1/webhooks/webhook_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.webhooks.delete("webhook_example");

Python (SDK)

client.webhooks.delete("webhook_example")

Утиліта командного рядка: apidly webhooks (Довідник CLI)

Приклад відповіді (200)

{
  "ok": false
}

Статуси помилок: 401, 403, 404, 429.

PATCH /webhooks/{id}

Змінити ендпоінт вебхука

Any of url, format, description, events and active. A new url or format is checked together (400 url_not_chat_webhook when a chat format gets an address that is not that app's). The secret is never returned; rotate it with POST /webhooks/{id}/rotate-secret.

Потрібний scope: full · Дозвіл: webhooks.manage

Параметри

Ім'я Де Тип Обов'язковий Опис
id path string так

Тіло запиту

Ім'я Тип Обов'язковий Опис
url string ні
format json | slack | discord | teams ні json (default): the signed JSON envelope. slack, discord, teams: a short message in the organization's language, posted in that app's incoming-webhook shape, with no signature header; the URL must be that app's incoming-webhook address.
description string ні
events масив із server.requested | server.approved | server.rejected | server.provisioning | server.running | server.stopped | server.interrupted | server.failed | server.destroyed | server.resumed | server.offline | server.back_online | server.disk_low | server.gpu_idle | server.rental_ending | server.rental_ended | plan.available | endpoint.created | endpoint.paused | endpoint.resumed | endpoint.scaled | endpoint.job.completed | payment.failed | balance.low | balance.exhausted | balance.topped_up | invoice.created | budget.threshold | alert.triggered | member.invited | member.joined | member.removed | api_key.created | api_key.revoked | api_key.rotated | api_key.updated | transfer.completed | transfer.failed | transfer.unverified | volume.created | volume.deleted | server.contract_expiring | server.contract_expired ні Event types to receive. server.contract_expiring and server.contract_expired are deprecated names of server.rental_ending and server.rental_ended, removed after 2027-05-31: a new subscription cannot select them (400 invalid_body); one that already lists an old name keeps it and receives the event under that old name until then, and under the current name after.
active boolean ні

Приклад запиту (curl)

curl -X PATCH "https://apidly.com/api/v1/webhooks/webhook_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/hook","format":"json","description":"example"}'

JavaScript (SDK)

await apidly.webhooks.update("webhook_example", {
  url: "https://example.com/hook",
  format: "json",
  description: "example"
});

Python (SDK)

client.webhooks.update("webhook_example")

Утиліта командного рядка: apidly webhooks (Довідник CLI)

Приклад відповіді (200)

{
  "webhook": {
    "id": "example",
    "url": "https://example.com/hook",
    "format": "json",
    "events": [
      "example"
    ],
    "description": "example",
    "active": false,
    "disabledReason": "example",
    "secretHint": "example",
    "consecutiveFailures": 1,
    "lastDeliveryAt": "2026-11-21T10:00:00.000Z",
    "lastSuccessAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "secret": "example"
  }
}

Статуси помилок: 400, 401, 403, 404, 429.

GET /webhooks/{id}/deliveries

Журнал доставок одного ендпоінта, спочатку нові

Потрібний scope: full · Роль творця: admin · Дозвіл: webhooks.manage

Параметри

Ім'я Де Тип Обов'язковий Опис
id path string так
limit query integer ні

Приклад запиту (curl)

curl "https://apidly.com/api/v1/webhooks/webhook_example/deliveries?limit=20" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.webhooks.listDeliveries("webhook_example", { limit: 20 });

Python (SDK)

client.webhooks.list_deliveries("webhook_example")

Утиліта командного рядка: apidly webhooks (Довідник CLI)

Приклад відповіді (200)

{
  "deliveries": [
    {
      "id": "example",
      "endpointId": "id_example",
      "eventId": "id_example",
      "type": "example",
      "status": "example",
      "attempts": 1,
      "isTest": false,
      "responseCode": 1,
      "responseSnippet": "example",
      "durationMs": 1,
      "lastAttemptAt": "2026-11-21T10:00:00.000Z",
      "nextAttemptAt": "2026-11-21T10:00:00.000Z",
      "createdAt": "2026-11-21T10:00:00.000Z"
    }
  ]
}

Статуси помилок: 401, 403, 404, 429.

POST /webhooks/{id}/rotate-secret

Випустити новий секрет підпису

The new secret is in this response only. The old one keeps signing for 24 hours so receivers can switch over.

Потрібний scope: full · Дозвіл: webhooks.manage

Параметри

Ім'я Де Тип Обов'язковий Опис
id path string так

Приклад запиту (curl)

curl -X POST "https://apidly.com/api/v1/webhooks/webhook_example/rotate-secret" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.webhooks.rotateSecret("webhook_example");

Python (SDK)

client.webhooks.rotate_secret("webhook_example")

Утиліта командного рядка: apidly webhooks (Довідник CLI)

Приклад відповіді (200)

{
  "webhook": {
    "id": "example",
    "url": "https://example.com/hook",
    "format": "json",
    "events": [
      "example"
    ],
    "description": "example",
    "active": false,
    "disabledReason": "example",
    "secretHint": "example",
    "consecutiveFailures": 1,
    "lastDeliveryAt": "2026-11-21T10:00:00.000Z",
    "lastSuccessAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "secret": "example"
  },
  "endpoint": {
    "id": "example",
    "url": "https://example.com/hook",
    "format": "json",
    "events": [
      "example"
    ],
    "description": "example",
    "active": false,
    "disabledReason": "example",
    "secretHint": "example",
    "consecutiveFailures": 1,
    "lastDeliveryAt": "2026-11-21T10:00:00.000Z",
    "lastSuccessAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "secret": "example"
  },
  "secret": "example"
}

Статуси помилок: 401, 403, 404, 429.

POST /webhooks/{id}/test

Надіслати тестову подію

A webhook.test event now (one attempt, never counted against the endpoint): the signed envelope for a json webhook, a short test message for a chat-app webhook.

Потрібний scope: full · Дозвіл: webhooks.manage

Параметри

Ім'я Де Тип Обов'язковий Опис
id path string так

Приклад запиту (curl)

curl -X POST "https://apidly.com/api/v1/webhooks/webhook_example/test" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.webhooks.test("webhook_example");

Python (SDK)

client.webhooks.test("webhook_example")

Утиліта командного рядка: apidly webhooks (Довідник CLI)

Приклад відповіді (200)

{
  "delivery": {
    "key": null
  }
}

Статуси помилок: 401, 403, 404, 429.

POST /webhooks/deliveries/{deliveryId}/redeliver

Повторно надіслати одну минулу доставку

Same payload, new delivery row.

Потрібний scope: full · Дозвіл: webhooks.manage

Параметри

Ім'я Де Тип Обов'язковий Опис
deliveryId path string так

Приклад запиту (curl)

curl -X POST "https://apidly.com/api/v1/webhooks/deliveries/webhook_example/redeliver" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.webhooks.redeliver("webhook_example");

Python (SDK)

client.webhooks.redeliver("webhook_example")

Утиліта командного рядка: apidly webhooks (Довідник CLI)

Приклад відповіді (200)

{
  "delivery": {
    "key": null
  }
}

Статуси помилок: 401, 403, 404, 429.

Готові спробувати?

Створіть безкоштовний обліковий запис і поповніть баланс, коли захочете запустити сервер. Мінімальне поповнення — 10 $.

Створити безкоштовний обліковий запис

Це було корисно?

Досі не виходить? Напишіть нам