Contents

POST [/instances/$INSTANCES]/private/webhooks#

This is used to create a webhook.

Required permission: webhooks-write

Request:

The request must be a WebhookAddDetails.

Response:

204 No content:

The creation of the webhook is successsful.

404 Not found:

The merchant instance is unknown or it not in our data.

Details:

 interface WebhookAddDetails {

   // Webhook ID to use.
   webhook_id: string;

   // The event of the webhook: why the webhook is used.
   event_type: WebhookEventType;

   // URL of the webhook where the customer will be redirected.
   url: string;

   // Method used by the webhook
   http_method: string;

   // Header template of the webhook
   header_template?: string;

   // Body template by the webhook
   body_template?: string;

}