Webhooks let you react to events in your Hopsule workspace as they happen — a new decision is accepted, a memory is updated, a PR analysis finishes — by POSTing a signed JSON payload to a URL you control.Documentation Index
Fetch the complete documentation index at: https://docs.hopsule.com/llms.txt
Use this file to discover all available pages before exploring further.
Configure your endpoint
In the dashboard, open Settings → Webhooks for the organization you want to subscribe from. You’ll see a single-form page:Endpoint URL
The HTTPS URL Hopsule should POST to. Need a quick target for
testing? webhook.site gives you a public URL
instantly and shows every POST in real time, no signup.
Pick events
Tick the events you care about. Unticked events are dropped server-
side — the dispatcher records a
skipped row so you can audit
silent paths.Test endpoint
Click Test to POST a
test.preflight envelope synchronously
against your URL. If you get a 2xx back, Save unlocks and the
signing secret is revealed once. Copy it now — Hopsule never echoes
it back on subsequent reads.Webhooks are organization-scoped — one endpoint per org. The dispatcher
fires asynchronously from the request that triggered the event, so
webhook latency never affects user-facing operations.
Payload format
Every POST has the same envelope shape. Subscribers should match on the top-levelevent field:
| Header | Purpose |
|---|---|
X-Hopsule-Event | Event id (matches what you ticked in Settings). |
X-Hopsule-Signature | sha256=<hex> HMAC of the raw body. |
X-Hopsule-Attempt | 1 for the original delivery, 2 for the retry. |
User-Agent | Always Hopsule-Webhooks/1.0. |
Verifying signatures
Compute HMAC-SHA256 of the raw request body using your signing secret, prefix it withsha256=, then constant-time compare against the
X-Hopsule-Signature header.
Event catalog
Each event id is the same string you tick in Settings → Webhooks. The shape ofdata mirrors the REST API response for that entity.
Decisions
| Event id | Fires when |
|---|---|
decision.created | A draft or proposed decision is added. |
decision.updated | Statement, rationale, tags, or links change. |
decision.status_changed | DRAFT → PENDING → ACCEPTED / REJECTED / DEPRECATED. |
decision.deleted | A decision is permanently removed. |
Memories
| Event id | Fires when |
|---|---|
memory.created | A new memory entry is captured. |
memory.updated | Memory content or metadata changes. |
memory.deleted | Memory is removed. |
Capsules
| Event id | Fires when |
|---|---|
capsule.created | A new context capsule is created. |
capsule.updated | Body, scope, or attachments change. |
capsule.deleted | Capsule is removed. |
Tasks
| Event id | Fires when |
|---|---|
task.created | A new task is opened. |
task.status_changed | Open ↔ in-progress ↔ done. |
task.completed | Task is marked done. |
Pull request analysis
| Event id | Fires when |
|---|---|
pr.analysis_completed | Hopsule finished scanning a pull request. |
pr.violation_detected | A PR change conflicts with an accepted decision. |
pr.results_accepted | An admin accepted the proposed PR findings. |
Projects
| Event id | Fires when |
|---|---|
project.created | A new project is added to the org. |
project.import_completed | Repository import finished successfully. |
project.import_failed | Repository import errored; payload includes the reason. |
Members
| Event id | Fires when |
|---|---|
member.added | A user joined the organization. |
member.removed | A user was removed. |
member.role_changed | Member promoted or demoted. |
Retries and delivery log
Hopsule retries failed deliveries once, 2 seconds after the first attempt. Failure conditions:- network error or timeout (the dispatcher caps each attempt at 8s)
- any 4xx or 5xx response
WebhookDelivery table with their
response code, body (truncated to 4KB), latency, and error message.
You can re-deliver a payload manually by re-saving the endpoint or by
firing a Test event.
For long-running endpoints, return 200 OK quickly and process
asynchronously on your side — the dispatcher does not wait for slow
subscribers and will mark them failed on timeout.
Rotating the signing secret
In Settings → Webhooks, click Rotate. A fresh secret is generated and shown once. The old secret stops being valid immediately, so update your subscriber before deployments complete — there is no overlap window.Test event
The Test button POSTs atest.preflight envelope to your URL
synchronously, regardless of your subscription. Use it to:
- verify the URL is reachable before saving
- confirm your signature verification code accepts our payload
- re-check connectivity after a deploy on your side