{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gunspec-io/json-schema/gunspec-io-webhook-endpoint-created-schema.json",
  "title": "WebhookEndpointCreated",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gunspec-io-account-api-openapi.yml#/components/schemas/WebhookEndpointCreated",
  "allOf": [
    {
      "$ref": "#/$defs/WebhookEndpoint"
    },
    {
      "type": "object",
      "properties": {
        "secret": {
          "type": "string",
          "description": "HMAC signing secret. Returned only here, on creation. No other endpoint will show it again."
        }
      },
      "required": [
        "secret"
      ]
    }
  ],
  "$defs": {
    "WebhookEndpoint": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Opaque endpoint id. Address it at `/v1/me/webhooks/{endpointId}`."
        },
        "url": {
          "type": "string",
          "description": "Absolute, directly fetchable URL."
        },
        "events": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Event types this endpoint is subscribed to. The full list is on the `POST` operation."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Prose summary of the record, where one has been written."
        },
        "active": {
          "type": "boolean",
          "description": "False while the endpoint is paused. A paused endpoint receives nothing and is not retried."
        },
        "createdAt": {
          "type": "string",
          "description": "When the record was first added, `YYYY-MM-DD HH:MM:SS` in UTC."
        },
        "updatedAt": {
          "type": "string",
          "description": "When the endpoint was last changed, ISO 8601."
        }
      },
      "required": [
        "id",
        "url",
        "events",
        "active"
      ]
    }
  }
}