ข้ามไปยังเนื้อหาหลัก
Apidly Cloud
นโยบายคุกกี้

คุกกี้เพื่อการวิเคราะห์และการโฆษณาจะปิดอยู่จนกว่าคุณจะยอมรับ นโยบายคุกกี้

เราต้องการใช้ Google Analytics และ Microsoft Clarity เพื่อทำความเข้าใจว่าหน้าสาธารณะถูกใช้งานอย่างไร รวมถึงการเข้าชมหน้าและการบันทึกเซสชัน และใช้ Reddit Pixel เพื่อวัดว่าโฆษณาของเราบน Reddit นำไปสู่การเข้าชมและการสมัครใช้งานหรือไม่ คุณเลือกที่นี่ว่าจะเปิดใช้งานหรือไม่ การปฏิเสธไม่ทำให้การทำงานของเว็บไซต์เปลี่ยนไป

เอกสารอ้างอิง API: เว็บฮุค

การดำเนินการของ API v1 สำหรับ เว็บฮุค: สโคป พารามิเตอร์ ตัวอย่างใน curl, JavaScript และ Python และผลลัพธ์

อัปเดตล่าสุด 21 พฤศจิกายน 2569อ่าน 9 นาที
ดูเป็น Markdown

เว็บฮุค: ทุกการดำเนินการของ API v1 พร้อมสโคปที่ต้องใช้ พารามิเตอร์ ตัวอย่างใน curl, JavaScript และ Python และผลลัพธ์ที่ได้ การยืนยันตัวตน ข้อผิดพลาด การแบ่งหน้า ขีดจำกัด และ idempotency อยู่ในภาพรวมเอกสารอ้างอิง API ดูเพิ่มเติมที่ SDK และบรรทัดคำสั่ง

ลองใช้กับคีย์ของคุณ: สร้างคีย์ API ในคอนโซล รัน export APIDLY_API_KEY=... ในเทอร์มินัล แล้ววางตัวอย่าง curl ด้านล่าง ค่าในตัวอย่างเป็นเพียงภาพประกอบ หน้านี้ไม่มีช่องให้กรอกคีย์

คำอธิบายของการดำเนินการและฟิลด์มาจากนิยามของ API และเป็นภาษาอังกฤษ

การดำเนินการ สโคปที่ต้องใช้ สรุป
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.

สโคปที่ต้องใช้: 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.

สโคปที่ต้องใช้: 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}

ลบเอนด์พอยต์เว็บฮุก

สโคปที่ต้องใช้: 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.

สโคปที่ต้องใช้: 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

บันทึกการส่งของเอนด์พอยต์หนึ่งรายการ ใหม่สุดก่อน

สโคปที่ต้องใช้: 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

ส่งการส่งครั้งก่อนอีกครั้ง

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

สร้างบัญชีฟรี

เนื้อหานี้มีประโยชน์หรือไม่

ยังแก้ไม่ได้ใช่ไหม ติดต่อเรา