{
  "openapi": "3.1.0",
  "info": {
    "title": "Webhooks API",
    "description": "Inbound webhook receivers for Puglieseweb — owned by shared-support. Each endpoint verifies the sender signature and dispatches the event for async processing (e.g. Sentry alerts → support analyzer → GitHub PRs).",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.puglieseweb.com/webhooks/v1",
      "description": "Production"
    }
  ],
  "paths": {
    "/sentry": {
      "post": {
        "tags": [
          "Sentry"
        ],
        "summary": "Sentry webhook receiver",
        "description": "Receives Sentry webhook events. Requests must include a valid `Sentry-Hook-Signature` header (HMAC-SHA256 over the raw request body, computed with the integration's client secret). Valid payloads are queued for asynchronous analysis (Bedrock Claude + GitHub PR creation).",
        "operationId": "sentry_webhook_sentry_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SentryWebhookResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "SentryWebhookResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "description": "`accepted` when the alert was queued for analysis; `skipped` when the payload is not actionable; `ok` for installation verification.",
            "examples": [
              "accepted",
              "skipped",
              "ok"
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "Sentry issue short ID when accepted"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "SentryWebhookResponse"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "ResponseValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "ResponseValidationError"
      }
    }
  }
}