{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/livetennisapi-com/json-schema/livetennisapi-com-webhook-schema.json",
  "title": "Webhook",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/livetennisapi-com-webhooks-api-openapi.yml#/components/schemas/Webhook",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "url": {
      "type": "string"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "score",
          "break_point",
          "point",
          "status"
        ]
      }
    },
    "enabled": {
      "type": "boolean",
      "description": "Set to false automatically after 25 consecutive delivery failures — delete and re-register to resume."
    },
    "created_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "last_delivery_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "consecutive_failures": {
      "type": "integer"
    },
    "last_error": {
      "type": [
        "string",
        "null"
      ]
    },
    "secret": {
      "type": "string",
      "description": "Present ONLY on the 201 registration response — shown exactly once. Signs every delivery: `X-LTAPI-Signature-V1` is HMAC-SHA256 of `<t>.<raw request body>` with this secret."
    },
    "secret_note": {
      "type": "string"
    }
  }
}