انتقل إلى المحتوى الرئيسي
Apidly Cloud
سياسة ملفات تعريف الارتباط

تبقى ملفات تعريف الارتباط للتحليلات والإعلانات متوقفة ما لم تقبلها. سياسة ملفات تعريف الارتباط

نود استخدام Google Analytics وMicrosoft Clarity لفهم كيفية استخدام الصفحات العامة، بما في ذلك مشاهدات الصفحات وتسجيلات الجلسات، وReddit Pixel لقياس ما إذا كانت إعلاناتنا على Reddit تؤدي إلى زيارات وتسجيلات. أنت تختار هنا ما إذا كانت مفعّلة. الرفض لا يغيّر شيئًا في عمل الموقع.

مرجع واجهة API: Webhooks

عمليات API v1 الخاصة بـ Webhooks: النطاق والمعاملات وأمثلة بلغات curl وJavaScript وPython والاستجابات.

آخر تحديث 21 نوفمبر 20266 دقائق للقراءة
عرض بصيغة Markdown

Webhooks: جميع عمليات API v1 مع النطاق (scope) المطلوب والمعاملات وأمثلة بلغات curl وJavaScript وPython والاستجابات. المصادقة والأخطاء وتقسيم الصفحات والحدود وتكرار الطلبات الآمن موضحة في نظرة عامة على مرجع 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⁩⁩.

إنشاء حساب مجاني

هل كان هذا مفيدًا؟

ما زلت بحاجة إلى مساعدة؟ تواصل معنا