{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tessio-eu/json-schema/tessio-eu-webhook-created-schema.json",
  "title": "WebhookCreated",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tessio-eu-openapi.json#/components/schemas/WebhookCreated",
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "format": "uri"
    },
    "events": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/WebhookEventType"
      }
    },
    "secret": {
      "type": [
        "string",
        "null"
      ],
      "description": "Signing secret (whsec_…), shown once, store it to verify X-Tessio-Signature. Present when the call created the endpoint; null when it changed one that already had a secret, because editing the URL or the event list leaves the secret in place so your signature check keeps working. Ask for a replacement with `POST /v1/webhook/secret`.\n"
    }
  },
  "$defs": {
    "WebhookEventType": {
      "type": "string",
      "enum": [
        "age_check.completed",
        "age_check.expired",
        "age_check.failed",
        "age_check.attempt_failed"
      ],
      "description": "`age_check.completed`: a result is in. `age_check.failed`: a presentation verified but gave no readable answer, because it did not disclose the claim. `age_check.expired`: the request lifetime elapsed with no answer (sandbox checks complete by themselves first). `age_check.attempt_failed`: a presentation failed verification, over either transport, or a wallet sent an error response such as a decline, and the check stays pending, so it is not terminal: the check still ends in one of the other three, announced to an endpoint subscribed to it. It is a notice, not a log: at most one waits unsent per check, one whose check has ended before it is picked up is dropped, and it does not follow the terminal event, except rarely when a delivery is interrupted while being sent. Read the check for `failedAttempts` and `lastFailureCodes`, which count every attempt. An endpoint saved before this event existed stored the events known then, so add it to receive it.\n"
    }
  }
}