Webhooks settings
The Webhooks screen lists each webhook address that Morphic sends changes to. Only administrators can open it. It is the Webhooks item in the sidebar and the Webhooks tab in Settings.
Status
The status box at the top of the screen shows how far delivery has reached.
| Status text | When it shows | What the text under it says |
|---|---|---|
| Delivery paused | The last delivery to a webhook address failed. | The error, for example <address> answered HTTP 500 for op 7, then "Morphic retries every minute until the address answers 2xx." |
| N change waiting or N changes waiting | At least one webhook is saved and changes have not been delivered yet. | "Delivered up to change #N of M. Delivery runs in the background every minute." |
| Up to date | No change is waiting, or no webhook is saved. | "Delivered up to change #N of M. Delivery runs in the background every minute." |
Webhook fields
Each webhook is a card. Add cards with Add webhook. Changes are saved only when you select Save webhooks.
| Setting | What it does | Options | Default |
|---|---|---|---|
| Address | Sends each change to this address with a POST request. Morphic rejects the save when the address is not a public http or https address. A card with an empty address is not saved. | Any URL, for example https://example.com/hooks/morphic | Empty |
| Enabled switch (on the Address row) | Turns delivery to this address on or off. Off addresses receive nothing. | On, off | On |
| Remove (trash icon, on the Address row) | Removes the card. The removal takes effect when you select Save webhooks. | None | Not applicable |
| Signing secret | Signs each request. When a secret is set, Morphic sends the header X-Morphic-Signature: sha256= followed by the HMAC-SHA256 of the request body. | Any text. Placeholder: "optional". Generate fills in a random 48-character hexadecimal value. | Requests are not signed unless a secret is set |
| Models | Sends only changes to the models you select. | One checkbox for each model. Components are not listed. Hint: "None ticked means all models." | None ticked, all models |
| Changes | Sends only the change types you select. | Created or edited, Moved to bin, Restored, Erased, Linked, Unlinked. Hint: "None ticked means every change." | None ticked, every change |
Buttons
| Button | What it does |
|---|---|
| Add webhook | Adds an empty card with the switch on. It is not saved yet. |
| How to verify signatures | Opens the Webhooks help page. |
| Save webhooks | Saves all cards that have an address. Morphic shows the toast Webhooks saved. If the save fails, Morphic shows the error message instead. |
Empty state
When no webhook is saved, the screen shows the title No webhooks yet. The text under it reads "Send every change to your build pipeline, search service or app, in order and signed."
Delivery
- Morphic checks for changes every minute in the background.
- Each change goes to every enabled webhook whose Models and Changes settings match it.
- A request times out after 5 seconds.
- A response with a status code from 200 to 299 counts as delivered. Any other response, or a connection error, stops delivery. Morphic then shows Delivery paused and retries the same change on the next run.
- Morphic sends each request with the header
Content-Type: application/jsonand the headerX-Morphic-Seq, which holds the change number. - When no webhook is enabled, delivery does nothing.