{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/terminal49/json-schema/terminal49-webhook-single-schema.json",
  "title": "WebhookSingle",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/terminal49-webhooks-api-openapi.yml#/components/schemas/WebhookSingle",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/WebhookResource"
    }
  },
  "$defs": {
    "WebhookAttributes": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "The callback URL Terminal49 POSTs notifications to."
        },
        "active": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "Event types to subscribe to (e.g. tracking_request.succeeded, container.transport.vessel_departed)."
          }
        },
        "secret": {
          "type": "string",
          "description": "Shared secret used to sign notification payloads."
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "WebhookResource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "webhook"
          ]
        },
        "attributes": {
          "$ref": "#/$defs/WebhookAttributes"
        }
      }
    }
  }
}