How to use the webhook API?

I do not understand what can or can’t be done with the webhook API and failed to find any information on it.
I think its purpose is to call another URL with some payload, right?
But when does it trigger and what will the payload be?

Hi @Silvan,

The Webhook API is a bit experimental at the moment, and is subject to change, hence there’s not much available on it. Here’s a demo you can quickly create with Pipedream:

Head over to Pipedream and generate a “Webhook HTTP Request” trigger, this will generate a URL that you can then copy. Replace the fields below with your API Key and URL from Pipedream, and then run the command.

curl -X 'POST' \
  'https://api.supernotes.app/v1/user/webhooks/' \
  -H 'accept: application/json' \
  -H 'Api-Key: ENTER_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "ENTER_URL_HERE"
}'

This has now generated a Webhook, and you should receive a successful response with an ID. Now anytime you create or edit a card, it will send a POST request to the URL you specified, in this case, Pipedream. Here’s a screenshot of some of the data you receive in Pipedream:

And that’s pretty much it, it’s quite basic at the moment, and we have plans to improve this in the future. Make sure to delete the webhook once you are finished, otherwise it will run continuously. I hope that helps and let us know if you have any further questions.

Ahh, that is the missing puzzle piece for me. I wasn’t sure how the Webhook would trigger, thank you!

What exactly do you mean by “finished”? Is it possible to setup an integration that will continuously run via such Webhooks or are they not indented for permanent integration?

Tobias just means that if you’re testing with Pipedream or some other system, remember to remove the webhook when you’re done to avoid sending your cards to places you don’t intend. Once you actually have a use-case / place you want to send your cards consistently it is of course fine to leave that webhook in place indefinitely.

Worth noting that we will probably be changing a few things around webhooks in the next few releases as we try to settle on the ideal format / system.

3 Likes