---
title: "GitHub App webhook (pv2 console federation)"
method: POST
path: "/integrations/github/webhook"
tags: ["Webhooks"]
---

# GitHub App webhook (pv2 console federation)

`POST /integrations/github/webhook`

## Request

- Base URL: `https://api.mnemom.ai/v1`
- URL: `https://api.mnemom.ai/v1/integrations/github/webhook`
- Auth: none required

Receives GitHub App events. Authenticated by `X-Hub-Signature-256` (HMAC-SHA256 of the raw body with `GITHUB_APP_WEBHOOK_SECRET`, timing-safe compared) — `401 invalid_signature` otherwise, `503 github_app_unconfigured` when the secret is unset. Handles `installation` (created/deleted/suspend/unsuspend/new_permissions_accepted) and `installation_repositories` (added/removed) for installations already bound to a Mnemom org; `deleted` also revokes every open token grant. Everything else is acknowledged and ignored. Handler: `handleGithubWebhook` in `src/org/github-federation.ts`.

## Headers

- `X-Hub-Signature-256` string, required
- `X-GitHub-Event` string, required
- `X-GitHub-Delivery` string

## Request body

- object
  - `action` string
  - `installation` object
    - `id` integer

## Response `200`

Acknowledged (applied or ignored)

- object
  - `ok` boolean, required
  - `event` string
  - `action` string
  - `applied` boolean
  - `ignored` boolean
  - `unbound` boolean
  - `grants_revoked` integer

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Cross-origin write refused (`cross_origin_rejected`). A state-changing request that carries the browser session cookie must come from a first-party origin (`Origin`, or failing that `Referer`) and must not send a form-style body (text/plain, urlencoded, multipart) the operation does not declare. Bearer and API-key callers are never subject to this check.
- `404`: Resource not found
- `413`: Request body exceeded the per-endpoint size cap. Cards-as-primitive sub-resource verbs cap each primitive body at 64 KiB; full-card PUTs cap at 128 KiB (alignment) / 64 KiB (protection).
- `429`: Rate-limit exceeded. The global per-IP limiter (100 requests/minute, applied to every `/v1/*` route) rejected this request. Back off until the window resets — `Retry-After` carries the cooldown in seconds and `X-RateLimit-Reset` the absolute reset time.
- `500`: Server error — request was well-formed but the server failed to fulfill it. Typically a downstream dependency (DB / RPC / external API) returned an unexpected error.
- `503`: An upstream dependency is currently unavailable. The request was not processed; retry after the cooldown window.

---

[API](https://skmtc.dev/mnemom/apis/mnemom-api.md) · [All operations](https://skmtc.dev/mnemom/apis/mnemom-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mnemom/apis/mnemom-api/revisions/274b7a6ea182?raw)
