Receive Update Event
Setting Up Start

Setting Up Webhook

Endpoint Description

This endpoint allows you to configure a webhook to receive notifications for certain events.

POST {baseUrl}/api/v1/configuration/configure-webhook
Content-Type: application/json
Authorization: Basic {encodedClientId:clientSecret}
{
    "moc_id": "exampleID",
    "webhook_url": "https://example.com/webhook"
}

Request Details

Headers

  • Content-Type: application/json
  • Authorization: Basic Auth clientId:clientSecret
    • The clientId and clientSecret should be base64 encoded.

Payload

KeyRequiredTypeDescription
moc_idNoStringThe ID of the module configuration. If no id modify will apply to all
webhook_urlYesStringThe URL to which notifications will be sent.

Success Response

HTTP status code: 200

KeyDefinition
message"successful" – Indicates successful setup.

Error Response

HTTP status code: 401

KeyDefinition
errorThe error code indicating the nature of the failure.
error_description"Invalid client credentials" – Typically shown when authentication details are wrong.

Example Usage

Here’s how you can use curl to set up the webhook:

curl -X POST "{baseUrl}/webhook/" \
  -H "Content-Type: application/json" \
  -H "Authorization: Basic $(echo -n '{clientId}:{clientSecret}' | base64)" \
  -d '{
        "moc_id": "exampleID",
        "webhook_url": "https://example.com/webhook"
      }'

Notes

  • Ensure that the webhook_url is accessible from the server sending the webhook.
  • The provided moc_id should correspond to a valid module configuration.