General

If you want to react to changes happening in Makaira you can subscribe to our webhook. Every Entity that is available in Makaira can deliver a Webhook call.


Usage

You can use the webhook to trigger external processes in your systems outside of Makaira or to sync data from one Makaira installation to another.


Setup of Webhooks

To get started with webhooks, please contact our support and provide the following information:

  • Public Endpoint to deliver Webhooks to
  • Which Entities should be delivered via Webhook calls
  • On which Makaira Domain & Instance you want to have these webhook calls sent from

If you just want to change the delivery URL for the Webhook you can use the following call:

curl --location --request PUT 'https://<yoursubdomain>.makaira.io/configuration' \
--header 'Content-Type: application/json' \
--header 'X-Makaira-Instance: <instance name>' \
--header 'X-Makaira-Nonce: <nonce of request>' \
--header 'X-Makaira-Hash: <signature of request>' \
--data-raw '{
    "webhookConfig": {
        "url": "https://<your webhook delivery URL>"
    }
}'

Body of a Webhook Call

We are delivering a POST Call to your endpoint with the following body

{
    "customer": "your-subdomain",
    "instance": "stage",
    "type": "page",
    "ids": ["5"],
    "action": "create"
}
  • customer is the subdomain of your makaira installation
  • instance is the instance name where the Webhook is set up
  • type tells you what type of entity was changed
  • id is a list of entity ids that have been changed (e.g. in a bulk delete there could be multiple ids in this array)
  • action tells you which action was executed in the change (one of create, update, delete)