Skip to content

Events

Ingest, retrieve, and query webhook events.

Ingest Event

POST /e/:endpoint_id

Send an event to a specific endpoint. Requires HMAC signature verification.

Headers

HeaderRequiredDescription
AuthorizationYesBearer API key
X-PJ-SignatureYesHMAC-SHA256 signature
X-PJ-TimestampYesUnix timestamp used in signature
X-PJ-Event-TypeNoEvent type (auto-detected from body if omitted)
X-PJ-Correlation-IDNoCorrelation ID for tracing

Request Body

json
{
  "event_type": "order.created",
  "payload": {
    "order_id": "ORD-001",
    "amount": 99.99
  }
}

The body can be any JSON. event_type is extracted from the body or the X-PJ-Event-Type header.

Response

HTTP 202 Accepted
json
{
  "id": "evt_abc123...",
  "status": "QUEUED",
  "message": "Event received and queued for delivery"
}

List Events

GET /api/v1/events

Query Parameters

ParamTypeDefaultDescription
limitinteger50Results per page (max 100)
offsetinteger0Offset for pagination
endpoint_idstringFilter by endpoint
statusstringFilter by status
event_typestringFilter by event type

Response

json
{
  "events": [
    {
      "id": "evt_abc123...",
      "endpoint_id": "ep_def456...",
      "event_type": "order.created",
      "status": "DELIVERED",
      "created_at": "2026-05-26T12:00:00Z"
    }
  ],
  "total": 142,
  "limit": 50,
  "offset": 0
}

Get Event

GET /api/v1/events/:id

Response

json
{
  "id": "evt_abc123...",
  "org_id": "org_...",
  "endpoint_id": "ep_...",
  "event_type": "order.created",
  "status": "DELIVERED",
  "payload": {
    "order_id": "ORD-001",
    "amount": 99.99
  },
  "attempts": [
    {
      "id": "dat_...",
      "status_code": 200,
      "response_body": "OK",
      "duration_ms": 145,
      "created_at": "2026-05-26T12:00:01Z"
    }
  ],
  "created_at": "2026-05-26T12:00:00Z"
}

Replay Event

POST /api/v1/events/:id/replay

Re-delivers a past event. The original event is marked REPLAYED and a new event is created.

Response

json
{
  "id": "evt_new123...",
  "status": "QUEUED",
  "message": "Event replayed"
}

Released under the MIT License.