Inbound webhooks
Where connected tools send webhooks, how signatures are checked, and what Mendloop answers.
Connected tools tell Mendloop about changes through webhooks: new Sentry issues, Jira and Linear ticket updates,
GitHub events. Each connection has its own webhook URL, shown as its webhook_url; paste it into the tool.
Webhooks are optional for most tools: without them Mendloop still reads through the tool's API, but the
connection's webhook check waits for the first signed delivery.
Every delivery is logged, valid or not, and can be inspected and redelivered from the delivery log. Mendloop doesn't send outbound webhooks.
Receive a webhook#
/hooks/{integration}/{connection_id}The receiver for one connection. It checks the signature against the connection's secret, logs the delivery, answers at once and processes it in the background.
Auth: the tool's signature header, checked against the secret saved on the connection (see below).
| Integration | Signature header | Secret |
|---|---|---|
sentry |
Sentry-Hook-Signature: hex HMAC-SHA256 of the raw body |
The internal integration's client secret |
jira |
X-Hub-Signature (or X-Hub-Signature-256): sha256= + hex HMAC-SHA256 |
The webhook secret saved on the connection |
linear |
Linear-Signature: hex HMAC-SHA256; webhookTimestamp in the body must be within 5 minutes |
Linear's signing secret |
github_issues, github |
X-Hub-Signature-256: sha256= + hex HMAC-SHA256 |
The webhook secret saved on the connection |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
integration |
string | required | sentry, jira, linear, github_issues or github |
connection_id |
uuid | required | Connection id |
Response
| Field | Type | Description |
|---|---|---|
status |
string | accepted |
id |
uuid | The delivery id in the log |
Errors
| Status | Code | When |
|---|---|---|
| 401 | invalid_signature |
The signature is missing or wrong. The delivery is logged as rejected. |
| 404 | not_found |
Unknown integration or connection, or the connection is disconnected |
| 413 | payload_too_large |
The body is over 1 MB |
BODY='{"webhookEvent":"jira:issue_updated","issue":{"id":"10421","key":"ENG-4812"}}'
SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$WEBHOOK_SECRET" | sed 's/^.* //')
curl -X POST "https://ingest.getmendloop.com/hooks/jira/CONNECTION_ID" \
-H "Content-Type: application/json" \
-H "X-Hub-Signature: sha256=$SIG" \
-d "$BODY"import { createHmac } from "node:crypto";
const body = JSON.stringify({ webhookEvent: "jira:issue_updated", issue: { id: "10421", key: "ENG-4812" } });
const sig = createHmac("sha256", process.env.WEBHOOK_SECRET).update(body).digest("hex");
const res = await fetch("https://ingest.getmendloop.com/hooks/jira/CONNECTION_ID", {
method: "POST",
headers: { "Content-Type": "application/json", "X-Hub-Signature": `sha256=${sig}` },
body,
});
const data = await res.json();import hashlib
import hmac
import json
import os
import requests
body = json.dumps({"webhookEvent": "jira:issue_updated", "issue": {"id": "10421", "key": "ENG-4812"}}).encode()
sig = hmac.new(os.environ["WEBHOOK_SECRET"].encode(), body, hashlib.sha256).hexdigest()
resp = requests.post(
"https://ingest.getmendloop.com/hooks/jira/CONNECTION_ID",
headers={"Content-Type": "application/json", "X-Hub-Signature": f"sha256={sig}"},
data=body,
timeout=10,
)
resp.raise_for_status()
data = resp.json(){
"status": "accepted",
"id": "0193c4e7-5a6b-7c8d-9e0f-1a2b3c4d5e6f"
}Receive a GitHub App webhook#
/hooks/github/appThe single webhook URL of an instance's own GitHub App. The signature is checked against the instance's App webhook secret first; only then is the installation in the payload used to find the connection. Deliveries for no known installation (a ping, or an uninstall race) are answered 202 so GitHub doesn't retry them.
Auth: X-Hub-Signature-256 against the instance's GitHub App webhook secret (GITHUB_APP_WEBHOOK_SECRET on self-host).
Response
200 {status: accepted, id} when routed to a connection; 202 with detail no installation or unknown installation when there is nothing to route to.
Errors
| Status | Code | When |
|---|---|---|
| 401 | (no code) | Bad signature: {"detail": "bad signature"} |
| 400 | (no code) | Body isn't JSON: {"detail": "not JSON"} |
# GitHub sends these; this shows the shape.
curl -X POST "https://ingest.getmendloop.com/hooks/github/app" \
-H "Content-Type: application/json" \
-H "X-GitHub-Event: pull_request" \
-H "X-Hub-Signature-256: sha256=…" \
-d '{"action": "closed", "installation": {"id": 51234567}, "…": "…"}'{
"status": "accepted",
"id": "0193c4e7-5a6b-7c8d-9e0f-1a2b3c4d5e6f"
}Slack#
Slack's interactivity, slash commands and events go to the REST API host, not ingest:
/api/v1/hooks/slack/interactivity, /api/v1/hooks/slack/commands and /api/v1/hooks/slack/events. They are
checked with Slack's X-Slack-Signature and the app's signing secret. On the cloud, Add to Slack sets them up;
self-hosters get them filled in by the manifest at GET /api/v1/integrations/slack/manifest. A Slack app
connected with tokens in Socket Mode receives clicks without any public URL.
Answering fast#
The receiver acknowledges as soon as the delivery is logged and queued, so tools don't time out. A delivery that
later fails to process shows as failed in the log and can be redelivered.