رفتن به محتوا
cloudhostمستندات
مرجع API

وب‌هوک

رویدادهای امضاشده به آدرس شما. قابلیت پلن حرفه‌ای.

توضیح هر مسیر به انگلیسی است، همان متنی که مرجع از کد ساخته می‌شود. مسیرها، نام فیلدها و کدها همان‌اند که در درخواست می‌نویسید.
GET/v1/webhooks/events

The event types#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پاسخ

200object

  • eventsobject[]
    • typestring
    • descriptionstring

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/webhooks/events" \
  -H "Authorization: Bearer $KEY"
GET/v1/webhooks

The team's webhooks#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده

پارامترها

  • projectstringکوئری

    only this project's

پاسخ

200object

  • webhooksWebhook[]
  • limitinteger
  • planstring

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/webhooks" \
  -H "Authorization: Bearer $KEY"
POST/v1/webhooks

Create a webhook (the secret is shown once)#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین

بدنهٔ درخواستapplication/json

  • urlstringالزامی

    an https address that resolves to a public address

  • eventsstring[]الزامی

    event types, or ["*"]

  • projectstring

    a project's name; omit for the whole team

  • descriptionstring

پاسخ

200Webhook

  • idstring (uuid)
  • urlstring
  • descriptionstring
  • eventsstring[]
  • projectobject | null
  • enabledboolean
  • disabled_reasonstring | null
  • secret_hintstring
  • consecutive_failuresinteger
  • last_delivery_atstring (date-time) | null
  • last_statusstring | null
  • created_atstring (date-time)
  • updated_atstring (date-time)
  • secretstring

خطاها

وضعیتتوضیح
400Bad request: bad_url, bad_events, bad_description, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden, plan_required (the plan's webhook limit)
404Not found: not_found
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/webhooks" \
  -H "Authorization: Bearer $KEY" \
  -d '{"url":"…","events":["…"]}'
GET/v1/webhooks/{id}

One webhook#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده

پارامترها

  • idstringمسیرالزامی

    webhook id

پاسخ

200Webhook

  • idstring (uuid)
  • urlstring
  • descriptionstring
  • eventsstring[]
  • projectobject | null
  • enabledboolean
  • disabled_reasonstring | null
  • secret_hintstring
  • consecutive_failuresinteger
  • last_delivery_atstring (date-time) | null
  • last_statusstring | null
  • created_atstring (date-time)
  • updated_atstring (date-time)

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/webhooks/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY"
DELETE/v1/webhooks/{id}

Delete a webhook#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین

پارامترها

  • idstringمسیرالزامی

    webhook id

پاسخ

200object

  • deletedboolean

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

نمونه

curl -X DELETE "https://api.ibel.ai/v1/webhooks/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY"
PATCH/v1/webhooks/{id}

Change a webhook or re-enable it#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین

پارامترها

  • idstringمسیرالزامی

    webhook id

بدنهٔ درخواستapplication/json

  • urlstring
  • eventsstring[]
  • descriptionstring
  • enabledboolean

پاسخ

200Webhook

  • idstring (uuid)
  • urlstring
  • descriptionstring
  • eventsstring[]
  • projectobject | null
  • enabledboolean
  • disabled_reasonstring | null
  • secret_hintstring
  • consecutive_failuresinteger
  • last_delivery_atstring (date-time) | null
  • last_statusstring | null
  • created_atstring (date-time)
  • updated_atstring (date-time)

خطاها

وضعیتتوضیح
400Bad request: bad_url, bad_events, bad_enabled, nothing_to_change
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

نمونه

curl -X PATCH "https://api.ibel.ai/v1/webhooks/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY" \
  -d '{"url":"…","events":["…"],"description":"…","enabled":true}'
POST/v1/webhooks/{id}/rotate-secret

A new signing secret (shown once)#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین

پارامترها

  • idstringمسیرالزامی

    webhook id

پاسخ

200Webhook

  • idstring (uuid)
  • urlstring
  • descriptionstring
  • eventsstring[]
  • projectobject | null
  • enabledboolean
  • disabled_reasonstring | null
  • secret_hintstring
  • consecutive_failuresinteger
  • last_delivery_atstring (date-time) | null
  • last_statusstring | null
  • created_atstring (date-time)
  • updated_atstring (date-time)
  • secretstring

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/webhooks/88e2fe1d-6d75-4de5-8c8f-27380ec66903/rotate-secret" \
  -H "Authorization: Bearer $KEY"
POST/v1/webhooks/{id}/test

Send a ping now#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین

پارامترها

  • idstringمسیرالزامی

    webhook id

پاسخ

200WebhookDeliveryFull

  • idinteger
  • event_idstring (uuid)
  • eventstring
  • statusstring

    one of pending, ok, failed

  • attemptsinteger
  • max_attemptsinteger
  • response_statusinteger | null
  • duration_msinteger | null
  • errorstring | null
  • created_atstring (date-time)
  • delivered_atstring (date-time) | null
  • next_attempt_atstring (date-time) | null
  • redelivery_ofinteger | null
  • requestobject
  • responseobject | null
  • historyobject[]

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/webhooks/88e2fe1d-6d75-4de5-8c8f-27380ec66903/test" \
  -H "Authorization: Bearer $KEY"
GET/v1/webhooks/{id}/deliveries

The delivery log#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده

پارامترها

  • idstringمسیرالزامی

    webhook id

  • statusstringکوئری

    ok, failed or pending

    one of ok, failed, pending

  • limitintegerکوئری

    1 to 100

  • beforeintegerکوئری

    a delivery id, for the next page

پاسخ

200object

  • deliveriesWebhookDelivery[]
    • idinteger
    • event_idstring (uuid)
    • eventstring
    • statusstring

      one of pending, ok, failed

    • attemptsinteger
    • max_attemptsinteger
    • response_statusinteger | null
    • duration_msinteger | null
    • errorstring | null
    • created_atstring (date-time)
    • delivered_atstring (date-time) | null
    • next_attempt_atstring (date-time) | null
    • redelivery_ofinteger | null
  • next_beforeinteger | null

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/webhooks/88e2fe1d-6d75-4de5-8c8f-27380ec66903/deliveries" \
  -H "Authorization: Bearer $KEY"
GET/v1/webhooks/{id}/deliveries/{did}

One delivery with its request and response#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده

پارامترها

  • idstringمسیرالزامی

    webhook id

  • didstringمسیرالزامی

    delivery id

پاسخ

200WebhookDeliveryFull

  • idinteger
  • event_idstring (uuid)
  • eventstring
  • statusstring

    one of pending, ok, failed

  • attemptsinteger
  • max_attemptsinteger
  • response_statusinteger | null
  • duration_msinteger | null
  • errorstring | null
  • created_atstring (date-time)
  • delivered_atstring (date-time) | null
  • next_attempt_atstring (date-time) | null
  • redelivery_ofinteger | null
  • requestobject
  • responseobject | null
  • historyobject[]

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/webhooks/88e2fe1d-6d75-4de5-8c8f-27380ec66903/deliveries/did" \
  -H "Authorization: Bearer $KEY"
POST/v1/webhooks/{id}/deliveries/{did}/redeliver

Send the same event again#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین

پارامترها

  • idstringمسیرالزامی

    webhook id

  • didstringمسیرالزامی

    delivery id

پاسخ

200WebhookDeliveryFull

  • idinteger
  • event_idstring (uuid)
  • eventstring
  • statusstring

    one of pending, ok, failed

  • attemptsinteger
  • max_attemptsinteger
  • response_statusinteger | null
  • duration_msinteger | null
  • errorstring | null
  • created_atstring (date-time)
  • delivered_atstring (date-time) | null
  • next_attempt_atstring (date-time) | null
  • redelivery_ofinteger | null
  • requestobject
  • responseobject | null
  • historyobject[]

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/webhooks/88e2fe1d-6d75-4de5-8c8f-27380ec66903/deliveries/did/redeliver" \
  -H "Authorization: Bearer $KEY"