Skip to main content
Browse documentation

Guide

Webhooks

Receive durable project events with signed, retryable HTTPS deliveries.

On this page
  1. Prerequisites
  2. Create an endpoint
  3. Expected result
  4. Errors
  5. Next step

Prerequisites

Use a server API key with webhooks:manage, an HTTPS endpoint that can read the unmodified request body, and durable storage for processed event IDs. Local or private network targets are rejected in production.

Create an endpoint

Create the endpoint in the console or API and store the one-time signing secret in your secret manager.

bash
curl https://api.moiraconnect.com/v1/webhooks \
  -X POST \
  -H "Authorization: Bearer $MOIRA_API_KEY" \
  -H "Idempotency-Key: $REQUEST_ID" \
  -H "Content-Type: application/json" \
  --data '{"url":"https://example.test/moira-events","event_filters":["message.*"]}'

Verify the signature against the raw body before parsing JSON. Return a success status quickly and move business work to your own durable queue.

Expected result

Each matching event produces a delivery record. Retries preserve the event identity, and the console exposes outcome, attempt, response status, and redacted failure information.

Errors

  • 422 validation_error means the target URL or event filter is invalid.
  • A disabled endpoint needs operator review before deliveries resume.
  • A repeated idempotency key with different input returns 409 idempotency_conflict.

Next step

Send a test event, confirm one verified delivery, and add an alert for sustained failures.