{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rutter/json-schema/rutter-get-webhook-log-response-schema.json",
  "title": "GetWebhookLogResponse",
  "description": "Fetches a single webhook delivery log by id, including its delivery attempts. Credential-shaped values in the payload, attempt bodies, response headers/bodies, and URLs are redacted. Lookups are limited to recently fired webhooks — an id outside that window, belonging to a different organization, or that doesn't exist is not found.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rutter-webhooks-api-openapi.yml#/components/schemas/GetWebhookLogResponse",
  "type": "object",
  "properties": {
    "webhook_log": {
      "$ref": "#/$defs/WebhookLogDetail"
    }
  },
  "required": [
    "webhook_log"
  ],
  "$defs": {
    "WebhookAttempt": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "webhook_config_id": {
          "type": "string",
          "format": "uuid"
        },
        "attempt_number": {
          "type": "number"
        },
        "duration_ms": {
          "type": "number"
        },
        "request_body": {},
        "request_start_time": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "did_truncate_response_body": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "network_error_code": {
          "type": [
            "string",
            "null"
          ]
        },
        "response_body": {
          "type": [
            "string",
            "null"
          ]
        },
        "response_headers": {
          "type": [
            "string",
            "null"
          ]
        },
        "status_code": {
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "webhook_config_id",
        "attempt_number",
        "duration_ms",
        "request_start_time",
        "url",
        "did_truncate_response_body",
        "network_error_code",
        "response_body",
        "response_headers",
        "status_code"
      ]
    },
    "WebhookLogDetail": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "item_id": {
          "type": "string",
          "format": "uuid"
        },
        "resource_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "next_attempt_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "actual_body": {},
        "payload": {},
        "retry_amount": {
          "type": "number"
        },
        "success": {
          "type": "boolean"
        },
        "url": {
          "type": "string"
        },
        "webhook_type": {
          "type": "string"
        },
        "attempts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WebhookAttempt"
          }
        },
        "created_at": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "item_id",
        "resource_id",
        "next_attempt_at",
        "retry_amount",
        "success",
        "url",
        "webhook_type",
        "attempts",
        "created_at",
        "updated_at"
      ]
    }
  }
}