{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/peoplescourt-ai/json-schema/peoplescourt-ai-canonical-create-or-rotate-webhook-endpoint-response-schema.json",
  "title": "CanonicalCreateOrRotateWebhookEndpointResponse",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/peoplescourt-ai-webhooks-api-openapi.yml#/components/schemas/CanonicalCreateOrRotateWebhookEndpointResponse",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/CanonicalWebhookEndpointResult"
    },
    "requestId": {
      "type": "string"
    }
  },
  "required": [
    "data",
    "requestId"
  ],
  "$defs": {
    "CanonicalWebhookEndpoint": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "partnerId": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "retiring",
            "disabled"
          ]
        },
        "signatureVersion": {
          "type": "string",
          "const": "pc-webhook-ed25519-v1"
        },
        "replacesEndpointId": {
          "type": "string"
        },
        "overlapUntil": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "partnerId",
        "url",
        "status",
        "signatureVersion",
        "createdAt",
        "updatedAt"
      ]
    },
    "CanonicalWebhookEndpointResult": {
      "type": "object",
      "properties": {
        "endpoint": {
          "$ref": "#/$defs/CanonicalWebhookEndpoint"
        },
        "rotation": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string"
            },
            "overlapUntil": {
              "type": "string"
            }
          }
        }
      },
      "required": [
        "endpoint"
      ]
    }
  }
}