{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/hookbridge/main/json-schema/hookbridge-message-summary-schema.json",
  "title": "MessageSummary",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/hookbridge-api-openapi.yml#/components/schemas/MessageSummary",
  "type": "object",
  "properties": {
    "message_id": {
      "type": "string"
    },
    "endpoint": {
      "type": "string",
      "format": "uri"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "delivering",
        "succeeded",
        "pending_retry",
        "failed_permanent"
      ]
    },
    "attempt_count": {
      "type": "integer"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "delivered_at": {
      "type": "string",
      "format": "date-time"
    },
    "first_attempt_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the first delivery attempt was made"
    },
    "response_status": {
      "type": "integer"
    },
    "response_latency_ms": {
      "type": "integer"
    },
    "processing_ms": {
      "type": "integer",
      "description": "Time spent processing the delivery (signing, headers, etc.)"
    },
    "total_delivery_ms": {
      "type": "integer",
      "description": "Total time from message creation to successful delivery"
    },
    "queue_wait_ms": {
      "type": "integer",
      "description": "Time spent waiting in the queue before first attempt"
    },
    "last_error": {
      "type": "string"
    },
    "deleted_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the message was soft-deleted. Only present on deleted rows; omitted for live messages."
    }
  }
}