メインコンテンツへスキップ
Apidly Cloud
Cookieポリシー

分析用と広告用の Cookie は、同意しない限りオフのままです。 Cookieポリシー

公開ページがどのように使われているかを把握するため、ページビューやセッション録画を含め、Google AnalyticsとMicrosoft Clarityを、またRedditでの当社広告が訪問やアカウント登録につながっているかを計測するためにReddit Pixelを利用したいと考えています。オンにするかどうかは、ここでお選びいただけます。拒否してもサイトの動作は変わりません。

API リファレンス: Webhook

Webhook の API v1 の操作: スコープ、パラメーター、curl・JavaScript・Python の例、レスポンス。

最終更新: 2026年11月21日読了目安 7 分
Markdown で表示

Webhook: API v1 のすべての操作について、必要なスコープ、パラメーター、curl・JavaScript・Python の例、レスポンスを掲載します。認証、エラー、ページ分割、レート制限、冪等性は API リファレンスの概要を参照してください。SDK とコマンドラインツールもご覧ください。

自分のキーで試す: コンソールで API キーを作成し、ターミナルで export APIDLY_API_KEY=... を実行してから、下の curl の例を貼り付けてください。例の値は説明用です。このページにキーを入力する欄はありません。

操作とフィールドの説明は API 定義から取っており、英語のままです。

操作 必要なスコープ 概要
GET /webhooks full Webhook エンドポイントと購読できるイベントタイプ
POST /webhooks full Webhook エンドポイントを作成
DELETE /webhooks/{id} full Webhook エンドポイントを削除
PATCH /webhooks/{id} full Webhook エンドポイントを変更
GET /webhooks/{id}/deliveries full 1 つのエンドポイントの配信ログ (新しい順)
POST /webhooks/{id}/rotate-secret full 新しい署名シークレットを発行
POST /webhooks/{id}/test full テストイベントを送信
POST /webhooks/deliveries/{deliveryId}/redeliver full 過去の配信を 1 件再送信

GET /webhooks

Webhook エンドポイントと購読できるイベントタイプ

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.

必要なスコープ: 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

Webhook エンドポイントを作成

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.

必要なスコープ: 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}

Webhook エンドポイントを削除

必要なスコープ: 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}

Webhook エンドポイントを変更

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.

必要なスコープ: 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

1 つのエンドポイントの配信ログ (新しい順)

必要なスコープ: 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.

必要なスコープ: 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.

必要なスコープ: 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

過去の配信を 1 件再送信

Same payload, new delivery row.

必要なスコープ: 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です。

無料アカウントを作成

この内容は役に立ちましたか?

解決しませんか? お問い合わせ