مرجع API
وبهوک
رویدادهای امضاشده به آدرس شما. قابلیت پلن حرفهای.
توضیح هر مسیر به انگلیسی است، همان متنی که مرجع از کد ساخته میشود. مسیرها، نام فیلدها و کدها هماناند که در درخواست مینویسید.
GET
/v1/webhooks/eventsThe event types#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پاسخ
200object
eventsobject[]typestringdescriptionstring
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/webhooks/events" \
-H "Authorization: Bearer $KEY"GET
/v1/webhooksThe team's webhooks#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
پارامترها
projectstringکوئریonly this project's
پاسخ
200object
webhooksWebhook[]idstring (uuid)urlstringdescriptionstringeventsstring[]projectobject | nullnamestringkindstring
enabledbooleandisabled_reasonstring | nullsecret_hintstringconsecutive_failuresintegerlast_delivery_atstring (date-time) | nulllast_statusstring | nullcreated_atstring (date-time)updated_atstring (date-time)
limitintegerplanstring
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/webhooks" \
-H "Authorization: Bearer $KEY"POST
/v1/webhooksCreate a webhook (the secret is shown once)#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین
بدنهٔ درخواستapplication/json
urlstringالزامیan https address that resolves to a public address
eventsstring[]الزامیevent types, or ["*"]
projectstringa project's name; omit for the whole team
descriptionstring
پاسخ
200Webhook
idstring (uuid)urlstringdescriptionstringeventsstring[]projectobject | nullnamestringkindstring
enabledbooleandisabled_reasonstring | nullsecret_hintstringconsecutive_failuresintegerlast_delivery_atstring (date-time) | nulllast_statusstring | nullcreated_atstring (date-time)updated_atstring (date-time)secretstring
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | Bad request: bad_url, bad_events, bad_description, bad_json |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden, plan_required (the plan's webhook limit) |
| 404 | Not found: not_found |
| 500 | internal: 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)urlstringdescriptionstringeventsstring[]projectobject | nullnamestringkindstring
enabledbooleandisabled_reasonstring | nullsecret_hintstringconsecutive_failuresintegerlast_delivery_atstring (date-time) | nulllast_statusstring | nullcreated_atstring (date-time)updated_atstring (date-time)
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: 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
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: 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
urlstringeventsstring[]descriptionstringenabledboolean
پاسخ
200Webhook
idstring (uuid)urlstringdescriptionstringeventsstring[]projectobject | nullnamestringkindstring
enabledbooleandisabled_reasonstring | nullsecret_hintstringconsecutive_failuresintegerlast_delivery_atstring (date-time) | nulllast_statusstring | nullcreated_atstring (date-time)updated_atstring (date-time)
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | Bad request: bad_url, bad_events, bad_enabled, nothing_to_change |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: 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-secretA new signing secret (shown once)#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین
پارامترها
idstringمسیرالزامیwebhook id
پاسخ
200Webhook
idstring (uuid)urlstringdescriptionstringeventsstring[]projectobject | nullnamestringkindstring
enabledbooleandisabled_reasonstring | nullsecret_hintstringconsecutive_failuresintegerlast_delivery_atstring (date-time) | nulllast_statusstring | nullcreated_atstring (date-time)updated_atstring (date-time)secretstring
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: 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}/testSend a ping now#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین
پارامترها
idstringمسیرالزامیwebhook id
پاسخ
200WebhookDeliveryFull
idintegerevent_idstring (uuid)eventstringstatusstringone of
pending,ok,failedattemptsintegermax_attemptsintegerresponse_statusinteger | nullduration_msinteger | nullerrorstring | nullcreated_atstring (date-time)delivered_atstring (date-time) | nullnext_attempt_atstring (date-time) | nullredelivery_ofinteger | nullrequestobjectheadersobjectbodystringtruncatedboolean
responseobject | nullstatusintegerheadersobjectbodystring | null
historyobject[]
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: 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}/deliveriesThe delivery log#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
پارامترها
idstringمسیرالزامیwebhook id
statusstringکوئریok, failed or pending
one of
ok,failed,pendinglimitintegerکوئری1 to 100
beforeintegerکوئریa delivery id, for the next page
پاسخ
200object
deliveriesWebhookDelivery[]idintegerevent_idstring (uuid)eventstringstatusstringone of
pending,ok,failedattemptsintegermax_attemptsintegerresponse_statusinteger | nullduration_msinteger | nullerrorstring | nullcreated_atstring (date-time)delivered_atstring (date-time) | nullnext_attempt_atstring (date-time) | nullredelivery_ofinteger | null
next_beforeinteger | null
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: 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
idintegerevent_idstring (uuid)eventstringstatusstringone of
pending,ok,failedattemptsintegermax_attemptsintegerresponse_statusinteger | nullduration_msinteger | nullerrorstring | nullcreated_atstring (date-time)delivered_atstring (date-time) | nullnext_attempt_atstring (date-time) | nullredelivery_ofinteger | nullrequestobjectheadersobjectbodystringtruncatedboolean
responseobject | nullstatusintegerheadersobjectbodystring | null
historyobject[]
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: 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}/redeliverSend the same event again#
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین
پارامترها
idstringمسیرالزامیwebhook id
didstringمسیرالزامیdelivery id
پاسخ
200WebhookDeliveryFull
idintegerevent_idstring (uuid)eventstringstatusstringone of
pending,ok,failedattemptsintegermax_attemptsintegerresponse_statusinteger | nullduration_msinteger | nullerrorstring | nullcreated_atstring (date-time)delivered_atstring (date-time) | nullnext_attempt_atstring (date-time) | nullredelivery_ofinteger | nullrequestobjectheadersobjectbodystringtruncatedboolean
responseobject | nullstatusintegerheadersobjectbodystring | null
historyobject[]
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
نمونه
curl -X POST "https://api.ibel.ai/v1/webhooks/88e2fe1d-6d75-4de5-8c8f-27380ec66903/deliveries/did/redeliver" \
-H "Authorization: Bearer $KEY"