{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/machineinbox-com/json-schema/machineinbox-com-set-webhook-response-schema.json",
  "title": "SetWebhookResponse",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/machineinbox-com-openapi.json#/components/schemas/SetWebhookResponse",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "webhook": {
      "$ref": "#/$defs/Webhook"
    },
    "secret": {
      "type": "string",
      "pattern": "^mi_whsec_[A-Za-z0-9_-]+$",
      "description": "HMAC-SHA256 signing secret for X-MachineInbox-Signature. Returned on every PUT; never shown elsewhere."
    },
    "secretNotice": {
      "type": "string"
    }
  },
  "required": [
    "webhook",
    "secret",
    "secretNotice"
  ],
  "$defs": {
    "Webhook": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastSuccessAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "lastFailureAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "lastFailureReason": {
          "type": [
            "string",
            "null"
          ]
        },
        "consecutiveFailures": {
          "type": "integer",
          "minimum": 0
        },
        "disabled": {
          "type": "boolean"
        }
      },
      "required": [
        "url",
        "createdAt",
        "updatedAt",
        "lastSuccessAt",
        "lastFailureAt",
        "lastFailureReason",
        "consecutiveFailures",
        "disabled"
      ]
    }
  }
}