Best Answer

Webhooks API

  • 19 November 2023
  • 7 replies
  • 70 views

Hello!
Can I create Webhook through API service to help me to integrate with LMS when I want to create or delete webhooks at run time in my system?

icon

Best answer by mj_ 20 November 2023, 22:24

View original

7 replies

Userlevel 7
Badge +3

Hmm, I don’t believe so, you can modify the OAuth clients via API, but don’t see anything about webhooks. That being said, I am curious why you would want to? Setting up the webhooks are fairly simple, you can’t setup a ton (10 active at a time), and they need to be on for events to trigger them so it feels like rapidly making new and removing would defeat the purpose of them?

Maybe you can describe your scenario more?

Thanks @Bfarkas  for replying,
In my case, i want to make my system generate a webhook by API in runtime based on the environment and domain used and specific parameters for every account need to integrate with the system to allow push data to him.
the url generated based on each environment and based on specific paramters.

Userlevel 7
Badge +3

So I think getting confused nd mixed up here. From the sounds of it, the webhook is not a Docebo webhook?

The idea of the webhook being setup on Docebo’s side is that it sits and waits for events to happen within Docebo and that sends data to your endpoint (defined within the webhook) for your program to then do more things. If the webhook does not exist, the events can’t trigger them to send anything to you when they happen, that’s why it was a bit of a weird ask to be able to make them ‘on the fly’ so to speak?

I guess put another way, without the webhook existing, how would your system know to use the API to generate the webhook to be available for the event? They are typically the trigger, not a middle action.

Do you have a diagram or something similar of what you are trying to do, or can be more specific in the description, some of the terms are generic so it is tough to know which side is Docebo and which side is something else of yours and which is ‘him’.

Maybe an actual example of the data flow of what you are trying to do (what event, when things happen, what changes, etc.)

Userlevel 4
Badge

Ciao, @Belal_Abdalhuk!

In addition to using the UI, webhooks in the Docebo can be setup via API using the following endpoint: POST /notifications/v1/webhooks. The API browser (found at https://<yourlms>.docebosaas.com/api-browser) can assist with more information about what information should go in the request body for this call.

Note the number of concurrent active webhooks (10) that @Bfarkas mentioned above as well the maximum number of event-types a single webhook can listen for (8) as these limits will still be true of webhooks created via API. A list of webhook events can be found here: https://help.docebo.com/hc/en-us/articles/360020124479-Webhooks-Events.

Similarly, webhooks can also be deleted via API using DELETE /notifications/v1/webhooks/{id}.

Hope this helps!

Userlevel 7
Badge +3

Ha, thanks @mj_ I thought I was going crazy last night as I swear I saw it in the api browser before but could not re-find it!

Ciao, @Belal_Abdalhuk!

In addition to using the UI, webhooks in the Docebo can be setup via API using the following endpoint: POST /notifications/v1/webhooks. The API browser (found at https://<yourlms>.docebosaas.com/api-browser) can assist with more information about what information should go in the request body for this call.

Note the number of concurrent active webhooks (10) that @Bfarkas mentioned above as well the maximum number of event-types a single webhook can listen for (8) as these limits will still be true of webhooks created via API. A list of webhook events can be found here: https://help.docebo.com/hc/en-us/articles/360020124479-Webhooks-Events.

Similarly, webhooks can also be deleted via API using DELETE /notifications/v1/webhooks/{id}.

Hope this helps!

THank you very much .

Ha, thanks @mj_ I thought I was going crazy last night as I swear I saw it in the api browser before but could not re-find it!

Thank you for your help.

Reply