Update the callback URL for a smart contract event webhook

Introduction

This guide provides a detailed walkthrough on updating the callback URL of a webhook associated with a smart contract. Following these steps, you'll be able to modify the callback URL of a previously created webhook for a smart contract.

⚠️ Please note that you can only update the webhooks you have created. If you haven't set up any webhooks for a smart contract yet, please refer to the documentation on Set a webhook for a Smart Contractfor more information

Prerequisites

  • Obtain an authorization token
    You must obtain an authorisation token to interact with Overledger's API and call any endpoint. This token will authenticate your requests and grant you access to the necessary endpoints. Please follow the authentication process provided by Overledger to get your authorisation token.

Call the Update callback URL for a smart contract Webhooks Endpoint

This endpoint allows you to update the callback URL associated with a specific webhook for your smart contract.

  • Specify the webhookId you are trying to update in the endpoint path

https://api.sandbox.overledger.io/api/webhooks/smart-contract-events/{webhookId}

  • Send the new callbackUrl to Overledger
curl --request PATCH \
     --url https://api.sandbox.overledger.io/api/webhooks/smart-contract-events/webhookId \
     --header 'API-Version: 3.0.0' \
     --header 'Authorization: Bearer token' \
     --header 'accept: application/json' \
     --header 'content-type: application/json'
     --data '
{
  "callbackUrl": "https://www.example.com"
}
'

You can seamlessly update the callback URL for your smart contract webhook, ensuring that you receive notifications at the correct endpoint and stay informed about relevant events and actions within your system.